Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Use CC to determine if gcc is used



On Mon, 27 Apr 2015 18:57:09 +0200
Heiko Becker <mail@xxxxxxxxxxxxxxx> wrote:
> On 04/27/15 18:50, Peter Stephenson wrote:
> > On Mon, 27 Apr 2015 18:37:15 +0200
> > Please could you tell us what the underlying problem is (I mean that the
> > first patch was trying to fix)?  Then we can fix it properly.  All I
> > know is it fails somehow --- you said "miscompiled".  If we know how we
> > ought to be able to stop playing games with versions of CPP (presumably...)
> 
> Same problem as described here:
> http://www.zsh.org/mla/workers/2015/msg00211.html

OK, I've seen now --- the line markers are actually in the *middle* of
the output.  That's not going to work...  So it really is
gcc-specific; I can't imagine anything else is doing anything that
weird.

Simply removing the line markers won't work, then.  But from what I'm
seeing, the following probably ought to...

diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 71dd613..c2e59c9 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -28,8 +28,8 @@ hdrdeps="zshcurses.h zshterm.h"
 # on the option to remove them being the same.
 signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
 	$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
-	case "$(CPP)" in \
-	gcc*) \
+	case "`$(CPP) --version </dev/null 2>&1`" in \
+	*"Free Software Foundation"*) \
 	$(CPP) -P sigtmp.c >sigtmp.out;; \
 	*) \
 	$(CPP) sigtmp.c >sigtmp.out;; \


pws



Messages sorted by: Reverse Date, Date, Thread, Author