Forgot to mention, it needs additional CFLAGS to include tommath_class.h correctly, this hasn't been included into my repo.
TARGET_CFLAGS += -Ilibtommath/ Best Regards, Syrone Wong On Thu, Jun 1, 2017 at 2:10 PM, Syrone Wong <wong.syr...@gmail.com> wrote: > Confirmed that with the latest libtom*, dropbear works well on MIPS & GCC 7. > > This repo is based on dropbear 2017.75. > > https://github.com/wongsyrone/dropbear-test > Best Regards, > Syrone Wong > > > On Thu, Jun 1, 2017 at 5:48 AM, Syrone Wong <wong.syr...@gmail.com> wrote: >> I checked the bundled libtom* in dropbear: >> >> bundled: libtomcrypt is 1.16, libtommath is 0.40 >> latest: libtomcrypt is 1.17, libtommath is 1.0 >> >> There are various fixes since the bundled version: >> https://github.com/libtom/libtommath/releases >> >> I will try the latest version from libtom. >> >> >> Best Regards, >> Syrone Wong >> >> >> On Thu, Jun 1, 2017 at 3:17 AM, e9hack <e9h...@gmail.com> wrote: >>> 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 >>> >>> _______________________________________________ >>> Lede-dev mailing list >>> Lede-dev@lists.infradead.org >>> http://lists.infradead.org/mailman/listinfo/lede-dev _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev