Bootstrapped with multiple languages and multilib enabled for maximum coverage. Regression tested on x86_64-apple-darwin15.5.0 and x86_64-linux
PFA the patch 2016-08-21 Ayush Goel <ayushgoel1...@gmail.com> * Makefile.def: Added gnulib as build & host library and dependency of all-gcc on gnulib * Makefile.in: regenerated * configure.ac: Added gnulib as build and host library * configure: regenerated * gcc/Makefile.in: Added path to gnulib static library (libgnu.a) and gnulib header files * gcc/mkconfig.sh: Included gnulib’s config.h * gcc/doc/sourcebuild.texi: Added gnulib and how to use the update script to update/import gnu lib modules * gnulib: created directory * gnulib/Makefile.in: new file * gnulib/configure.ac: new file * gnulib/update-gnulib.sh: script to import gnulib modules using gnulib-tool * gnulib/import: created by update-gnulib.sh * gnulib/import/Makefile.in: imported from gnulib * gnulib/import/alignof.h: Imported from gnulib * gnulib/import/exitfail.c: Imported from gnulib * gnulib/import/exitfail.h: Imported from gnulib * gnulib/import/extra: Imported from gnulib * gnulib/import/extra/snippet: Imported from gnulib * gnulib/import/extra/snippet/_Noreturn.h: Imported from gnulib * gnulib/import/extra/snippet/arg-nonnull.h: Imported from gnulib * gnulib/import/extra/snippet/c++defs.h: Imported from gnulib * gnulib/import/extra/snippet/warn-on-use.h: Imported from gnulib * gnulib/import/gettext.h: Imported from gnulib * gnulib/import/m4: Imported from gnulib * gnulib/import/m4/00gnulib.m4: Imported from gnulib * gnulib/import/m4/absolute-header.m4: Imported from gnulib * gnulib/import/m4/extern-inline.m4: Imported from gnulib * gnulib/import/m4/gnulib-cache.m4: Imported from gnulib * gnulib/import/m4/gnulib-common.m4: Imported from gnulib * gnulib/import/m4/gnulib-comp.m4: Imported from gnulib * gnulib/import/m4/gnulib-tool.m4: Imported from gnulib * gnulib/import/m4/include_next.m4: Imported from gnulib * gnulib/import/m4/longlong.m4: Imported from gnulib * gnulib/import/m4/multiarch.m4: Imported from gnulib * gnulib/import/m4/obstack.m4: Imported from gnulib * gnulib/import/m4/off_t.m4: Imported from gnulib * gnulib/import/m4/ssize_t.m4: Imported from gnulib * gnulib/import/m4/stddef_h.m4: Imported from gnulib * gnulib/import/m4/stdint.m4: Imported from gnulib * gnulib/import/m4/stdlib_h.m4: Imported from gnulib * gnulib/import/m4/sys_types_h.m4: Imported from gnulib * gnulib/import/m4/unistd_h.m4: Imported from gnulib * gnulib/import/m4/warn-on-use.m4: Imported from gnulib * gnulib/import/m4/wchar_t.m4: Imported from gnulib * gnulib/import/obstack.c: Imported from gnulib * gnulib/import/obstack.h: Imported from gnulib * gnulib/import/stddef.in.h: Imported from gnulib * gnulib/import/stdint.in.h: Imported from gnulib * gnulib/import/stdlib.in.h: Imported from gnulib * gnulib/import/sys: Imported from gnulib * gnulib/import/sys_types.in.h: Imported from gnulib * gnulib/import/unistd.c: Imported from gnulib * gnulib/import/unistd.in.h: Imported from gnulib * gnulib/stamp-h1: generated -Ayush On 20 August 2016 at 8:52:56 PM, Manuel López-Ibáñez (lopeziba...@gmail.com) wrote: > On 20 August 2016 at 11:22, ayush goel wrote: > >> > >> We're talking about a one-line change, but this is absolutely > >> crucial and central to use of gnulib. Until this is correct, > >> any previous host-specific testing is invalid, unfortunately. > >> > >> In the previous revision, you had: > >> > >> INCGNU = -I../gnulib -I$(srcdir)/../gnulib/import > >> > >> and I was expecting to see in the new revision something > >> like: > >> > >> INCGNU = -I../gnulib/import -I$(srcdir)/../gnulib/import > >> > >> or perhaps even better: > >> > >> INCGNU = -I$(build_libobjdir)/gnulib/import -I$(srcdir)/../gnulib/import > >> > >> Try hacking one of the generated replacement headers, one that gcc > >> is sure to include, to cause a compilation error. E.g. add an #error call > >> to the generated gnulib/import/unistd.h. If a gcc build, from scratch since > >> there are no Makefile dependencies, still compiles with that, then we're > >> still not picking the right headers. > > > > So your concern seems valid, however the build process seems to pick > > the correct headers. > > I did try to raise an error from the gnulib generated header unitstd.h > > and it gives me a compile time error: > > Perhaps adding #error is not the best way to test this, since gnulib > may still pick the correct headers, but gcc the wrong ones and the > error you showed happens when building gnulib. A better way, perhaps, > would be to add to unitsdt.h something like > > #define unitstd_h_gnulib > > then in some gcc/ file that includes this header, like gcov-tool.c or > system.h, you can do just after the #include > > #ifndef unitstd_h_gnulib > #error "unitstd_h_gnulib not defined" > #endif > > Test that it fails when not having the correct INCGNU and that it > works when having it. This should settle it, I hope. > > Cheers, > > Manuel. >
importgnulib_8_21.patch
Description: Binary data