Subject: Possible short-term fix for sparc64 cpp problem
To: None <port-sparc64@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: port-sparc64
Date: 01/23/2001 11:27:55
Could someone who has been experiencing problems with sparc64's /usr/bin/cpp
please patch that script with the following diff and test it with a
previously failing package? This *should* make sure that all the necessary
platform definitions work.
=====
--- cpp.old Tue Jan 23 11:21:47 2001
+++ cpp Tue Jan 23 11:24:05 2001
@@ -43,8 +43,8 @@
#
PATH=/usr/bin:/bin
CC=${CC-gcc}
-CPP=/usr/libexec/cpp
-ALST="-traditional -D__GNUC__ -$ "
+CPP="${CC} -E"
+ALST="-traditional -Wp,-$ "
NSI=no
OPTS=""
INCS="-nostdinc"
@@ -61,18 +61,12 @@
;;
-traditional)
;;
- -B*)
- CPP=`${CC} $A -print-prog-name=cpp`
- ;;
-ansi)
ALST=`echo $ALST | sed -e 's/-traditional//'`
;;
-I*)
INCS="$INCS $A"
;;
- -U__GNUC__)
- ALST=`echo $ALST | sed -e 's/-D__GNUC__//'`
- ;;
-imacros|-include|-idirafter|-iprefix|-iwithprefix)
INCS="$INCS '$A' '$1'"
shift
@@ -99,7 +93,7 @@
then
INCS="$INCS -I/usr/include"
fi
- eval exec $CPP $ALST $INCS $OPTS
+ eval exec $CPP - $ALST $INCS $OPTS
fi
exit 0
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi NetBSD: Run with it.
-- NetBSD 1.5 now available on CD-ROM -- http://www.wasabisystems.com/