bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110687] AC_C_BIGENDIAN fails when cross-compiling with -std=c11 and


From: Zack Weinberg
Subject: [sr #110687] AC_C_BIGENDIAN fails when cross-compiling with -std=c11 and -flto
Date: Wed, 27 Jul 2022 10:22:41 -0400 (EDT)

Follow-up Comment #1, sr #110687 (project autoconf):

It appears to me that this is an issue with cross compilation and strict
conformance mode (-std=c11), not with -flto.  Could you please report what
happens, using the same cross-compilation toolchain, if you run the same
configure command but using CFLAGS="-std=c11" LDFLAGS="" ?

It would also be helpful to know which C library is in use in the target
environment, and its version number.

FYI, it is pointless to use -std=c11 if you're not also going to use -Wall and
-Wpedantic.  Only the combination of all three of those options gives you all
of the diagnostics required by the standard.  If you just want to ensure C2011
semantics when compiling code you didn't write, and you don't want to spend
hours and hours fixing all the issues like these, it is better to use
-std=gnu11 and leave warnings options to the authors of the program.

(To be clear, Autoconf should work regardless -- but there might not _be_ any
practical way for Autoconf to detect endianness when cross compiling to an
environment that provides no extensions beyond ISO C.)


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110687>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]