This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix up libstdc++ build breakage with ldbl-extra.ver


Hi!

On Mon, Feb 27, 2012 at 03:28:32PM -0800, Benjamin Kosnik wrote:
> On Tue, 28 Feb 2012 00:12:33 +0100
> Jakub Jelinek <jakub@redhat.com> wrote:
> 
> > and $(EGREP) -v '#(#| |$$)' just throws away the whole
> > };# Appended to version file.
> > line.  I wonder if
> > sed -e 's/#[# $].*$//'
> > wouldn't be better, or alternative add ^ before the first #
> > in the egrep regex.  Of course we can add a newline to gnu.ver, but
> > the next time somebody forgots to add a newline at the end of the file
> > we'll have the same problem again.
> > 
> > Benjamin, what do you prefer?
> 
> I would prefer not having gnu.ver have to end in a newline. Slight
> preference for ^ before first # but I don't really care.

Here is a patch.  Just ^ wasn't enough.  Ok for trunk?

2012-02-28  Jakub Jelinek  <jakub@redhat.com>

	* src/Makefile.am (libstdc++-symbols.ver): Only remove comment lines
	if they are at the beginning of lines (with optional whitespace before
	#).
	* src/Makefile.in: Regenerated.

--- libstdc++-v3/src/Makefile.am	2012-02-27 16:03:11.269648298 +0100
+++ libstdc++-v3/src/Makefile.am	2012-02-28 09:42:02.179585742 +0100
@@ -115,7 +115,7 @@ libstdc++-symbols.ver:  ${glibcxx_srcdir
 	    rm tmp.top tmp.bottom; \
 	  fi; \
 	fi
-	$(EGREP) -v '#(#| |$$)' $@.tmp | \
+	$(EGREP) -v '^[ 	]*#(#| |$$)' $@.tmp | \
 	  $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1)
 	rm -f $@.tmp
 
--- libstdc++-v3/src/Makefile.in	2012-02-27 16:03:11.269648298 +0100
+++ libstdc++-v3/src/Makefile.in	2012-02-28 09:42:30.126598881 +0100
@@ -776,7 +776,7 @@ vpath % $(top_srcdir)
 @ENABLE_SYMVERS_TRUE@	    rm tmp.top tmp.bottom; \
 @ENABLE_SYMVERS_TRUE@	  fi; \
 @ENABLE_SYMVERS_TRUE@	fi
-@ENABLE_SYMVERS_TRUE@	$(EGREP) -v '#(#| |$$)' $@.tmp | \
+@ENABLE_SYMVERS_TRUE@	$(EGREP) -v '^[ 	]*#(#| |$$)' $@.tmp | \
 @ENABLE_SYMVERS_TRUE@	  $(COMPILE) -E -P -include config.h - > $@ || (rm -f $@ ; exit 1)
 @ENABLE_SYMVERS_TRUE@	rm -f $@.tmp
 @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver-sun : libstdc++-symbols.ver \

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]