[v3] Fix race condition in libstdc++-v3/configure.ac

H.J. Lu hjl.tools@gmail.com
Sat Sep 5 17:04:00 GMT 2009


On Tue, Sep 1, 2009 at 1:49 PM, Ralf Wildenhues<Ralf.Wildenhues@gmx.de> wrote:
> * Paolo Bonzini wrote on Tue, Sep 01, 2009 at 10:06:06AM CEST:
>> On 08/31/2009 11:26 PM, Ralf Wildenhues wrote:
>> >I wasn't quite sure whether the 'cd include&&  make' is necessary each
>> >time include/Makefile is changed, or only when config.status is invoked
>> >without arguments (i.e., after configure runs).  The patch assumes the
>> >latter and introduces a 'generate-headers' tag for this.
>>
>> It seems safest to invoke "make -C include pch_build=" on every
>> include/Makefile change, and leave the pch to be created by the
>> recursive make invocation.  In principle, the task of
>> include/Makefile could be done all by AC_CONFIG_LINKS, but not pch
>> creation.
>
> So you are saying that the fact that the precompiled headers are created
> early is by accident, not intentional?  Doesn't the rest of the build
> then possibly *use* these precompiled headers for compilation, and thus
> possibly behave differently when they are not present?  (Yes, I
> understand that that would be a bug in the pch, but it seems useful to
> expose such a bug.)
>
> One problem with entering include and running 'make' there right after
> creating include/Makefile is that config.h typically does not exist yet,
> because we build config files before config headers.  config.h is
> required by bits/c++config.h.  That's why the patch below is broken.
>
>> Also, you probably need to modify the configure-[+prefix+][+module+]
>> definition in the toplevel, and add a : $(MAKE) there.
>
> Probably.  Adding $(MAKE) in this case makes
>  make -n configure-foodir
>
> less useful (as it will change files, not just show what would happen)
> but OTOH it would allow parallel make to work in libstdc++-v3/include
> (when triggered from config.status).  Tough choice.  (Hmm, maybe I
> should report this to bug-make again.)
>
> Cheers,
> Ralf
>
> v3: fix config.status instantiation of subdir makefiles.
>
> libstdc++-v3/ChangeLog:
> 2009-09-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
>
>        * configure.ac: Replace AC_CONFIG_COMMANDS([default])
>        instantiation with additional commands issued for each Makefile
>        in glibcxx_SUBDIRS, so `./config.status subdir/Makefile' also
>        runs these commands.  When generating include/Makefile, also
>        run `make' in include.
>        * configure: Regenerate.
>

This breaks 32bit libstdc++ on Linux/x86-64.  The 32bit
bits/c++config.h is missing:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41280

-- 
H.J.



More information about the Libstdc++ mailing list