Hi,

we recently ran into build failures on Windows systems using a somewhat old 
grep, coming from a syntax error in the libstdc++-symbols.ver version file:

# Symbol versioning for shared libraries.
if ENABLE_SYMVERS
libstdc++-symbols.ver:  ${glibcxx_srcdir}/$(SYMVER_FILE) \
                $(port_specific_symbol_files)
        cp ${glibcxx_srcdir}/$(SYMVER_FILE) $@.tmp
        chmod +w $@.tmp
        if test "x$(port_specific_symbol_files)" != x; then \
          if grep '^# Appended to version file.' \
               $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then 
\
            cat $(port_specific_symbol_files) >> $@.tmp; \
          else \
            sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \
            sed -n '/DO NOT DELETE/,$$p' $@.tmp > tmp.bottom; \
            cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@.tmp; \
            rm tmp.top tmp.bottom; \
          fi; \
        fi

Note the double /dev/null on the grep command line.  The first one causes the 
grep to fail when the command is invoked on these systems.  That's old code, 
but it is now invoked for config/abi/pre/float128.ver on the mainline and 5 
branch and this breaks the build on these systems (4.9 builds fine).

This first /dev/null doesn't serve any useful purpose and seems to be a typo, 
so the attached patch gets rid of it.

Tested on x86/Windows and x86-64/Linux, OK for mainline and 5 branch?


2016-04-06  Eric Botcazou <ebotca...@adacore.com>

libstdc++-v3/
        * src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
        * src/Makefile.in: Regenerate.

-- 
Eric Botcazou
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 234695)
+++ src/Makefile.am	(working copy)
@@ -228,7 +228,7 @@ libstdc++-symbols.ver:  ${glibcxx_srcdir
 	chmod +w $@.tmp
 	if test "x$(port_specific_symbol_files)" != x; then \
 	  if grep '^# Appended to version file.' \
-	       $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
+	       $(port_specific_symbol_files) > /dev/null 2>&1; then \
 	    cat $(port_specific_symbol_files) >> $@.tmp; \
 	  else \
 	    sed -n '1,/DO NOT DELETE/p' $@.tmp > tmp.top; \

Reply via email to