On Thu, Aug 19, 2021 at 9:04 AM Niels Möller <[email protected]> wrote:

> Maamoun TK <[email protected]> writes:
>
> > 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'
>
> In Nettle's Makefiles, CC_FOR_BUILD is intended to be a compiler
> targetting the *build* system, used to compile things like eccdata.c
> that are run on the build system as part of the build. It's intended to
> be different from CC when cross compiling.
>
> Not entirely sure how CC_FOR_BUILD is used in config.guess, but I think
> it is used to detect the system type of the build system.
>
> > There is nothing specific in the output of
> powerpc64-openwrt-linux-musl-gcc
> > -E -dM log as I can see. In musl libc FAQ, they stated that there is no
> > __MUSL__ in the preprocessor macros https://wiki.musl-libc.org/faq.html
>
> The interesting thing I see is
>
> #define _CALL_ELF 2
>
> I hope this can be used to distinguish from other big-endian systems,
> that use ELFv1 abi?
>

That's right, in little-endian systems I got "#define _CALL_ELF 2" while in
big-endian ones that value is 1 except when using musl. I've updated the
patch in the branch
https://git.lysator.liu.se/mamonet/nettle/-/tree/ppc64_musl_fix to exploit
this distinction. Testing the fix again by the bug reporter will be
appreciated since I don't have OpenWrt build system in my power system.

regards,
Mamone
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to