[LEDE-DEV] dropbear & gcc 7.1.0

e9hack e9hack at gmail.com
Wed May 31 12:17:46 PDT 2017


Am 30.05.2017 um 08:25 schrieb Syrone Wong:
> Can this related to endianness? Based on current reports, it only
> occurs on big-endian platforms.
> 
> I found:
> 
> * Note: in order to use the optimized macros your platform must
> support unaligned 32 and 64 bit read/writes.
> * The x86 platforms allow this but some others [ARM for instance] do
> not. On those platforms you **MUST**
> * use the portable [slower] macros.
> 
> in https://github.com/mkj/dropbear/blob/master/libtomcrypt/src/headers/tomcrypt_cfg.h
> 
> A quick way to verify this might be define LTC_NO_ASM.

Defining LTC_NO_ASM doesn't help. It seems, the problem is somewhere in libtommath. Patching of Makefile.in in
libtommath solves the problem for me:

#################
--- a/libtommath/Makefile.in	2017-05-18 16:47:02.000000000 +0200
+++ b/libtommath/Makefile.in	2017-05-31 18:21:24.318437603 +0200
@@ -11,6 +11,8 @@
 # So that libtommath can include Dropbear headers for options and m_burn()
 CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../

+CFLAGS += -O2
+
 ifndef IGNORE_SPEED

 #for speed
#################

Regards,
Hartmut



More information about the Lede-dev mailing list