Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] disable generation of linemarkers by the preprocessor for sigtmp.c
- X-seq: zsh-workers 34286
- From: Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] disable generation of linemarkers by the preprocessor for sigtmp.c
- Date: Thu, 15 Jan 2015 09:43:37 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=simple; d=mail.ud10.udmedia.de; h= date:from:to:subject:message-id:mime-version:content-type; s= beta; bh=N0kadcgSFO51e5ZWyufZzdno8q2Tzf7SV6++Un8j5qE=; b=SGsW0Ae b3/hXOaG0cKgYMSb6G1mf+J2XfJRIX67LZN0Jb1nc+2NeYQwJ1sa4dFP09D3v9hA VqV3QCA/BIUsZaO/FUAvz+KASN4xc0onaoEmloukjqJqZYUB07AhyJUvw85A6vWL QYNBgVM/bDLfpym1W1aQ+S+/40Xtg2M8QJhY=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi.
Upcoming gcc-5 currently miscompiles zsh. The reason is that the
signames2.awk script doesn't handle the new linemarkers generated by
that compiler:
markus@x4 Src % cat sigtmp.c
#include <signal.h>
XXNAMES XXSIGHUP SIGHUP
XXNAMES XXSIGINT SIGINT
XXNAMES XXSIGQUIT SIGQUIT
XXNAMES XXSIGILL SIGILL
XXNAMES XXSIGTRAP SIGTRAP
XXNAMES XXSIGABRT SIGABRT
XXNAMES XXSIGIOT SIGIOT
XXNAMES XXSIGBUS SIGBUS
XXNAMES XXSIGFPE SIGFPE
XXNAMES XXSIGKILL SIGKILL
XXNAMES XXSIGUSR1 SIGUSR1
XXNAMES XXSIGSEGV SIGSEGV
XXNAMES XXSIGUSR2 SIGUSR2
XXNAMES XXSIGPIPE SIGPIPE
XXNAMES XXSIGALRM SIGALRM
XXNAMES XXSIGTERM SIGTERM
XXNAMES XXSIGSTKFLT SIGSTKFLT
XXNAMES XXSIGCLD SIGCLD
XXNAMES XXSIGCHLD SIGCHLD
XXNAMES XXSIGCONT SIGCONT
XXNAMES XXSIGSTOP SIGSTOP
XXNAMES XXSIGTSTP SIGTSTP
XXNAMES XXSIGTTIN SIGTTIN
XXNAMES XXSIGTTOU SIGTTOU
XXNAMES XXSIGURG SIGURG
XXNAMES XXSIGXCPU SIGXCPU
XXNAMES XXSIGXFSZ SIGXFSZ
XXNAMES XXSIGVTALRM SIGVTALRM
XXNAMES XXSIGPROF SIGPROF
XXNAMES XXSIGWINCH SIGWINCH
XXNAMES XXSIGPOLL SIGPOLL
XXNAMES XXSIGIO SIGIO
XXNAMES XXSIGPWR SIGPWR
XXNAMES XXSIGSYS SIGSYS
XXNAMES XXSIGUNUSED SIGUNUSED
XXNAMES XXSIGRTMIN _SIGRTMIN
markus@x4 Src % gcc-4.9 -E sigtmp.c >|sigtmp.out
markus@x4 Src % gcc-5 -E sigtmp.c >|sigtmp_.out
markus@x4 Src % diff -u sigtmp.out sigtmp_.out
--- sigtmp.out 2015-01-15 09:09:41.899667049 +0100
+++ sigtmp_.out 2015-01-15 09:09:45.209590084 +0100
@@ -25,6 +25,8 @@
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 22 "/usr/include/bits/sigset.h" 3 4
+
+# 22 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;
@@ -741,8 +743,8 @@
-# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/stddef.h" 1 3 4
-# 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/stddef.h" 3 4
+# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/5.0.0/include/stddef.h" 1 3 4
+# 216 "/usr/lib/gcc/x86_64-pc-linux-gnu/5.0.0/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 343 "/usr/include/signal.h" 2 3 4
@@ -1031,39 +1033,181 @@
# 2 "sigtmp.c" 2
-XXNAMES XXSIGHUP 1
-XXNAMES XXSIGINT 2
-XXNAMES XXSIGQUIT 3
-XXNAMES XXSIGILL 4
-XXNAMES XXSIGTRAP 5
-XXNAMES XXSIGABRT 6
-XXNAMES XXSIGIOT 6
-XXNAMES XXSIGBUS 7
-XXNAMES XXSIGFPE 8
-XXNAMES XXSIGKILL 9
-XXNAMES XXSIGUSR1 10
-XXNAMES XXSIGSEGV 11
-XXNAMES XXSIGUSR2 12
-XXNAMES XXSIGPIPE 13
-XXNAMES XXSIGALRM 14
-XXNAMES XXSIGTERM 15
-XXNAMES XXSIGSTKFLT 16
-XXNAMES XXSIGCLD 17
-XXNAMES XXSIGCHLD 17
-XXNAMES XXSIGCONT 18
-XXNAMES XXSIGSTOP 19
-XXNAMES XXSIGTSTP 20
-XXNAMES XXSIGTTIN 21
-XXNAMES XXSIGTTOU 22
-XXNAMES XXSIGURG 23
-XXNAMES XXSIGXCPU 24
-XXNAMES XXSIGXFSZ 25
-XXNAMES XXSIGVTALRM 26
-XXNAMES XXSIGPROF 27
-XXNAMES XXSIGWINCH 28
-XXNAMES XXSIGPOLL 29
-XXNAMES XXSIGIO 29
-XXNAMES XXSIGPWR 30
-XXNAMES XXSIGSYS 31
-XXNAMES XXSIGUNUSED 31
+
+# 3 "sigtmp.c"
+XXNAMES XXSIGHUP
+# 3 "sigtmp.c" 3 4
+ 1
+
+# 4 "sigtmp.c"
+XXNAMES XXSIGINT
+# 4 "sigtmp.c" 3 4
+ 2
...
And then the awk script generates a bogus signames.c file:
% gawk -f ./signames2.awk sigtmp.out >| signames.c
The fix is simple. Just disable the generation of linemarkers by the
preprocessor.
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index f0379d2d17c8..649b28991666 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -24,7 +24,7 @@ hdrdeps="zshcurses.h zshterm.h"
signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
- $(CPP) sigtmp.c >sigtmp.out
+ $(CPP) -P sigtmp.c >sigtmp.out
$(AWK) -f $(sdir)/signames2.awk sigtmp.out > $@
rm -f sigtmp.c sigtmp.out
--
Markus
Messages sorted by:
Reverse Date,
Date,
Thread,
Author