shells/ksh93: Fix build with gcc5

The ksh93 build process requires the pre-GCC5 CPP newline behavior, which
the -P argument provides by disabling line markers.  This enables ksh93
to be built by gcc5 and later.

Approved by:	GCC blanket
PR:		216707 (related)
This commit is contained in:
John Marino 2017-02-09 20:26:22 +00:00
parent 29bc8b4ce9
commit cd7f376bdf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=433771

View File

@ -0,0 +1,20 @@
--- src/cmd/INIT/iffe.sh.orig 2013-03-06 16:33:17 UTC
+++ src/cmd/INIT/iffe.sh
@@ -3414,7 +3414,7 @@ $src
(eval "$src") <&$nullin || e=1
;;
mac*|nomac*)
- if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i
else e=1
fi
@@ -3705,7 +3705,7 @@ $inc
<<\"#define $v\">> $v <<\"/* native $v */\">>
<<\"#endif\">>
#endif" > $tmp.c
- if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t
if test -s $tmp.t
then success