Message ID | 20120228085045.GX18768@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
Il 28/02/2012 09:50, Jakub Jelinek ha scritto: > - $(EGREP) -v '#(#| |$$)' $@.tmp | \ > + $(EGREP) -v '^[ ]*#(#| |$$)' $@.tmp | \ I don't know this part very well, so I wonder why you have to remove comments at all... hence I wonder if sed 's/##.*//;s/# .*//;s/#$//' (alternation is not portable in sed) would be closer to the original intentions. Anyhow, if the above change works it is surely ok for 4.7.0. Paolo
On Tue, Feb 28, 2012 at 09:57:38AM +0100, Paolo Bonzini wrote: > Il 28/02/2012 09:50, Jakub Jelinek ha scritto: > > - $(EGREP) -v '#(#| |$$)' $@.tmp | \ > > + $(EGREP) -v '^[ ]*#(#| |$$)' $@.tmp | \ > > I don't know this part very well, so I wonder why you have to remove > comments at all... hence I wonder if sed 's/##.*//;s/# .*//;s/#$//' > (alternation is not portable in sed) would be closer to the original > intentions. The reason for comment removal is that we pipe this into the preprocessor, which without the removal spits hundreds of <stdin>:25:7: error: invalid preprocessing directive #Names <stdin>:33:7: error: invalid preprocessing directive #std etc. errors. Preprocessing directives are only recognized at the start of the lines, after optional whitespace, so other comments are just fine. Jakub
Il 28/02/2012 10:19, Jakub Jelinek ha scritto: >>> > > - $(EGREP) -v '#(#| |$$)' $@.tmp | \ >>> > > + $(EGREP) -v '^[ ]*#(#| |$$)' $@.tmp | \ >> > >> > I don't know this part very well, so I wonder why you have to remove >> > comments at all... hence I wonder if sed 's/##.*//;s/# .*//;s/#$//' >> > (alternation is not portable in sed) would be closer to the original >> > intentions. > The reason for comment removal is that we pipe this into the preprocessor, > which without the removal spits hundreds of > <stdin>:25:7: error: invalid preprocessing directive #Names > <stdin>:33:7: error: invalid preprocessing directive #std > etc. errors. Preprocessing directives are only recognized at the > start of the lines, after optional whitespace, so other comments are > just fine. Ok then! Paolo
Thanks Jakub for taking care of this. Paolo.
Paolo Carlini <paolo.carlini@oracle.com> writes:
> Thanks Jakub for taking care of this.
Indeed, and sorry for the breakage. Nothing of the sort turned up on
x86_64-linux testing.
Rainer
--- 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 \