[PATCH] build-many-glibcs.py: Add some s390x glibc variants.

Stefan Liebler stli@linux.ibm.com
Wed Aug 12 14:22:09 GMT 2020


On 8/10/20 7:23 PM, Joseph Myers wrote:
> On Mon, 10 Aug 2020, Stefan Liebler via Libc-alpha wrote:
> 
>> Here, conformtest.py is running something like this:
>> echo "#include <stdio.h>" > tst.c
>> s390x-glibc-linux-gnu-gcc -O3 -I../include ...  -I.. -fno-builtin -ansi
>> -D_XOPEN_SOURCE -D_ISOMAC -E tst.c -P -Wp,-dN
>> => The output contains the __USE_EXTERN_INLINES from
>> <glibc>/libio/bits/stdio.h for getc_unlocked, getchar_unlocked,
>> putc_unlocked and putchar_unlocked.
> 
> So this should be reported as a bug in Bugzilla; the inline functions 
> ought to have the same feature test macro conditionals as the main 
> declarations (i.e. __USE_POSIX199506).
I've created the bugzilla:
"Bug 26376 - Namespace violation in stdio.h and sys/stat.h if build with
optimization."
https://sourceware.org/bugzilla/show_bug.cgi?id=26376

and posted this patch:
"[PATCH] Fix namespace violation in stdio.h and sys/stat.h if build with
optimization. [BZ #26376]"
https://sourceware.org/pipermail/libc-alpha/2020-August/116979.html

> 
>> Is there a reason, why ...
>> - scripts/build-many-glibcs.py configures glibc with
>> CC="<target-triple>-gcc <ccopts>" instead of CC="<target-triple>-gcc"
>> CFLAGS="<ccopts>" CXX/CXXFLAGS? If build-many-glibcs.py is configuring
>> the glibc with the FLAGS, the the "make check" for the O3 extra-glibc is
>> passing.
> 
> The general principle is that all options required in all compilations, 
> including ABI options, should go in CC, while options that might get 
> overridden in some cases go in CFLAGS.  -g and -O options belong in 
> CFLAGS.  build-many-glibcs.py doesn't currently have a mechanism for 
> overriding CFLAGS (when testing -Os builds I hardcoded a CFLAGS setting 
> for all builds).  It probably does make sense to include some -O3 and -Os 
> builds (with some new mechanism to change CFLAGS) by default, so we know 
> when those break.
I've just posted this patch:
"[PATCH] build-many-glibcs.py: Add a s390x -O3 glibc variant."
https://sourceware.org/pipermail/libc-alpha/2020-August/116980.html

> 
>> - conform/conformtest.py is called without the configured CFLAGS and
>> thus without optimization? I assume one reason is -Wall -Werror.
> 
> There are lots of other variants that could meaningfully be tested with 
> conformtest.py and linknamespace.py.  Enabling optimization is one, 
> _FILE_OFFSET_BITS=64 is another that's known to have namespace problems 
> (bug 14106).  It's useful to know about failures when someone runs tests 
> with different options, but less clear exactly what variants should be 
> tested by default.
> 

Thanks,
Stefan


More information about the Libc-alpha mailing list