On Thu, Aug 19, 2021 at 12:40 AM Maamoun TK <[email protected]> wrote:
> On Wed, Aug 18, 2021 at 11:38 PM Stijn Tintel <[email protected]> wrote: > >> On 18/08/2021 22:29, Maamoun TK wrote: >> > On Tue, Aug 17, 2021 at 9:40 AM Niels Möller <[email protected] >> > <mailto:[email protected]>> wrote: >> > >> > The configuration where it didn't work was >> > powerpc64-openwrt-linux-musl. I'd like Nettle to work on embedded >> > systems whenever practical. But support depends on assistance from >> > users >> > of those systems. >> > >> > As I understood it, this system needs to use the v2 ABI. I would >> hope >> > it's easy to detect the abi used by the configured C compiler, and >> > then >> > select the same prologue sequence as is currently used for >> > little-endian. I.e., one more configure test, and changing the >> > "ifelse(WORDS_BIGENDIAN,no," condition in powerpc64/machine.m4 to >> > check >> > a different configure variable. >> > >> > >> > I skipped processing the assembly files with a different approach, I >> > made the configuration check for musl and endianness variant to >> > trigger assembly processing. You can check the fix in this branch >> > https://git.lysator.liu.se/mamonet/nettle/-/tree/ppc64_musl_fix >> > <https://git.lysator.liu.se/mamonet/nettle/-/tree/ppc64_musl_fix> >> > Apparently, the bug reporter uses a cross-compiler for powerpc arch. >> > It would be great to run this fix at the same bug environment since I >> > tested the patch in different circumstances. >> >> Your patch has no effect in my environment (OpenWrt build system), as >> host_os is linux-gnu, according to config.log, so it doesn't match >> *musl. See [1] for config.log and [2] for full compile log. >> >> The output of powerpc64-openwrt-linux-musl-gcc -E -dM - </dev/null | >> sort, which was requested earlier in this thread can be seen at [3]. >> >> Thanks, >> Stijn >> >> [1] https://gist.github.com/9e0ecb025033dda1d0d58094da84c308 >> [2] https://gist.github.com/stintel/0e7046df511cf4d1ca20edb56df50b1b >> [3] https://gist.github.com/stintel/b3651a7db87edea9e8bd0aef242bcdae > > > config.guess detects the C standard library based on a result from the > compiler defined in "CC_FOR_BUILD" variable, for some reason OpenWrt build > system failed to set that variable properly, from your config.log I can see > CC_FOR_BUILD='gcc -O -g' but when I use bare musl tools I get > CC_FOR_BUILD='musl-gcc' > The macro GMP_PROG_CC_FOR_BUILD in aclocal.m4 sets "CC_FOR_BUIL=gcc -O -g" rather than the actual compiler by checking if the library is configured with cross-compiling, I wonder if there is a workaround for that. _______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
