On Tue, Aug 5, 2014 at 7:10 AM, Bruce Korb <bk...@gnu.org> wrote: > Hi, > > On Tue, Aug 5, 2014 at 4:35 AM, Alexander Ivchenko <aivch...@gmail.com> wrote: >>> Testing for *android* is less than ideal, because of the possibility of >>> configuring a *-linux* toolchain to have multilibs using various different >>> C libraries (with -mandroid being used to select the Android multilib). >>> So, specifying a bypass based on some relevant text that appears in the >>> header would be better. >>> >>> -- >>> Joseph S. Myers >>> jos...@codesourcery.com >> >> I've added check for "BIONIC" keyword. Hopefully it won't disappear. > > "based on some relevant text" > I think that's important, too (that it be relevant). > "BIONIC" is just some improbable text you found in the header. > My guess is that testing for '*android*' would be more selective, > and certainly less obscure. Who would ever guess that > "BIONIC" implies "android"? > >> Updated patch: >> >> diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog >> index f7effee..e05412e 100644 >> --- a/fixincludes/ChangeLog >> +++ b/fixincludes/ChangeLog >> @@ -1,3 +1,10 @@ >> +2014-08-04 Alexander Ivchenko <alexander.ivche...@intel.com> >> + >> + * inclhack.def (stdio_va_list): Bypass fix for Bionic. >> + (complier_h_tradcpp): Remove. >> + * fixincl.x: Regenerate. >> + * tests/base/linux/compiler.h: Remove. >> + >> 2014-04-22 Rainer Orth <r...@cebitec.uni-bielefeld.de> >> >> * inclhack.def (math_exception): Bypass on *-*-solaris2.1[0-9]*. >> diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x > > [[generated text is not needed for approval]] > >> diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def >> index 6a1136c..bf452c6 100644 >> --- a/fixincludes/inclhack.def >> +++ b/fixincludes/inclhack.def >> @@ -1140,20 +1140,6 @@ fix = { >> }; >> >> /* >> - * Old Linux kernel's <compiler.h> header breaks Traditional CPP >> - */ >> -fix = { >> - hackname = complier_h_tradcpp; > > [[ OK ]] > >> @@ -3722,8 +3708,9 @@ fix = { >> fix = { >> hackname = stdio_va_list; >> files = stdio.h; >> - bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; >> + bypass = >> '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list|BIONIC'; >> /* >> + * In Bionic va_list is always appropriately typedefed to >> __gnuc_va_list. > > And that typedef does not live in stdio.h either. > If there is no better way to identify this file, then > >> Is it ok? > > It is "okay". (You may be left with little choice -- I can't see the header > :).
you can see the current version of bionic's stdio.h here: https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h i'm happy to add any string to the header file that makes things easier. if you want 'x-gcc-no-fixincludes' or whatever in there, just say :-) (you're correct that the string 'BIONIC' is currently there only as a side-effect; our FORTIFY_SOURCE implementation uses a __BIONIC_FORTIFY_INLINE macro.)