libstdc++/5095: broken $(MAKEFLAGS)
Golubev I. N.
gin@mo.msk.ru
Wed Dec 12 11:28:00 GMT 2001
>Number: 5095
>Category: libstdc++
>Synopsis: broken $(MAKEFLAGS)
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 12 09:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.0.2
>Organization:
>Environment:
System: SCO_SV d-fens 3.2 2 i386
GNU Make version 3.79.1
host: i586-pc-sco3.2v5.0.2
build: i586-pc-sco3.2v5.0.2
target: i586-pc-sco3.2v5.0.2
configured with: configure --without-included-gettext --prefix=/usr --with-as=/usr/bin/gas --enable-multilib --disable-static --enable-shared --with-system-zlib --program-transform-name=s/cpp/gcpp/ --enable-languages=c,c++,f77
>Description:
target libstdc++-v3 build fails
>How-To-Repeat:
gmake bootstrap-lean
gmake[3]: Entering directory `$top_builddir/i586-pc-sco3.2v5.0.2/libstdc++-v3'
/bin/sh: syntax error at line 1: `(' unexpected
gmake[3]: *** [all-recursive] Error 2
gmake[3]: Leaving directory `$top_builddir/i586-pc-sco3.2v5.0.2/libstdc++-v3'
gmake[2]: *** [all-recursive-am] Error 2
gmake[2]: Target `all' not remade because of errors.
gmake[2]: Leaving directory `$top_builddir/i586-pc-sco3.2v5.0.2/libstdc++-v3'
gmake[1]: *** [all-target-libstdc++-v3] Error 2
When doing `$(MAKE) all-recursive' in leave gmake process,
$(MAKEFLAGS) expansion *in shell command* causes arguments like
LIBCXXFLAGS=$(LIBCXXFLAGS_FOR_TARGET)
to appear in `set' shell command. Its expansion in upper level makes
yields
'LIBCXXFLAGS=$(LIBCXXFLAGS_FOR_TARGET)'
Entries in MAKEFLAGS like this appear due to $(EXTRA_TARGET_FLAGS) in
top-level Makefile. When passed through command line arguments to
sub-make once, they are ok. But the next sub-make handles them as
described above.
>Fix:
Passing variable values containing references to other makefile
variables to sub-make that uses Makefile generated by automake is more
reliable when using AM_MAKEFLAGS environment variable. Its value does
not get mangled by recursive makes.
That is, top-level makefile might call recursive make for target build
like this:
AM_MAKEFLAGS='AR=$$(AR_FOR_TARGET) AS=$$(AS_FOR_TARGET)' $(MAKE)
Unfortunately, it should be done only for modules using automake,
otherwise AM_MAKEFLAGS will affect nothing.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list