Re: [PATCH wwwdocs] gcc-14: Some very common historic Autoconf probes that no longer work
On Sat, 17 Feb 2024, Florian Weimer wrote: > + > +Older Autoconf versions (for example, Autoconf 2.13) generate core > +probes that are incompatible with C99. These include the basic > +compiler functionality check: : : Yes, thank you! Gerald PS: Feel free to copy me on wwwdocs patches.
Re: [PATCH wwwdocs] gcc-14: Some very common historic Autoconf probes that no longer work
Florian Weimer writes: > --- > htdocs/gcc-14/porting_to.html | 43 > +++ > 1 file changed, 43 insertions(+) > > diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html > index 123b5e9f..ab65c5e7 100644 > --- a/htdocs/gcc-14/porting_to.html > +++ b/htdocs/gcc-14/porting_to.html > @@ -437,6 +437,49 @@ issues addressed in more recent versions.) Versions > before 2.69 may > have generic probes (for example for standard C support) that rely on > C features that were removed in C99 and thus fail with GCC 14. > > + > +Older Autoconf versions (for example, Autoconf 2.13) generate core > +probes that are incompatible with C99. These include the basic > +compiler functionality check: > + > + > +#include "confdefs.h" > +main(){return(0);} > + > + > +And a check for standard C compatibility: > + > + > +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) > +int main () { int i; for (i = 0; i 256; i++) > +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); > +exit (0); } > + > + Consider adding the check name so it shows up on search engine results? ("Checking for $X ... no") > +(Several variants with different line breaks and whitespace were in > +use.) If it is not possible to port the configure script to current > +Autoconf, these issues can be patched directly: > + > + > +#include "confdefs.h" > +int main(){return(0);} > + > + > +And for the second probe: > + > + > +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) > +int main () { int i; for (i = 0; i 256; i++) > +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) > return 2; > +return 0; } > + > + > +There is a long tail of less frequent issues, involving keyword > +checking (for inline), and checks for dlopen > +and mmap. A setvbuf probe was previously > +expected to fail at run time because it triggered undefined behavior, > +now it fails because of a compilation error. > + > Turning errors back into warnings > > LGTM otherwise. > > base-commit: 1fcd61437d6a3d7bf24b993b09d525486dc9a2e5 signature.asc Description: PGP signature
[PATCH wwwdocs] gcc-14: Some very common historic Autoconf probes that no longer work
--- htdocs/gcc-14/porting_to.html | 43 +++ 1 file changed, 43 insertions(+) diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html index 123b5e9f..ab65c5e7 100644 --- a/htdocs/gcc-14/porting_to.html +++ b/htdocs/gcc-14/porting_to.html @@ -437,6 +437,49 @@ issues addressed in more recent versions.) Versions before 2.69 may have generic probes (for example for standard C support) that rely on C features that were removed in C99 and thus fail with GCC 14. + +Older Autoconf versions (for example, Autoconf 2.13) generate core +probes that are incompatible with C99. These include the basic +compiler functionality check: + + +#include "confdefs.h" +main(){return(0);} + + +And a check for standard C compatibility: + + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + + +(Several variants with different line breaks and whitespace were in +use.) If it is not possible to port the configure script to current +Autoconf, these issues can be patched directly: + + +#include "confdefs.h" +int main(){return(0);} + + +And for the second probe: + + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; +return 0; } + + +There is a long tail of less frequent issues, involving keyword +checking (for inline), and checks for dlopen +and mmap. A setvbuf probe was previously +expected to fail at run time because it triggered undefined behavior, +now it fails because of a compilation error. + Turning errors back into warnings base-commit: 1fcd61437d6a3d7bf24b993b09d525486dc9a2e5