summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@NetBSD.org>1999-08-10 03:35:30 +0000
committersommerfeld <sommerfeld@NetBSD.org>1999-08-10 03:35:30 +0000
commit74b698556bef0fec988a7f11623d0b33c8bb1e3d (patch)
tree2a14a611e3f1acfd3ef61f46264361c181fcbd4d /gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh
parenta531d8c31eb19b0af2632eebb2fdd05674390e71 (diff)
Cross-compile support: allow -B option to specify directory for backend
Diffstat (limited to 'gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh')
-rw-r--r--gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh b/gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh
index 40a0de2c0fd..2bc88224aa8 100644
--- a/gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh
+++ b/gnu/usr.bin/egcs/cpp/usr.bin.cpp.sh
@@ -42,6 +42,7 @@
# doesn't search gcc-include
#
PATH=/usr/bin:/bin
+CC=${CC-gcc}
CPP=/usr/libexec/cpp
ALST="-traditional -D__GNUC__ -$ "
NSI=no
@@ -60,6 +61,9 @@ do
;;
-traditional)
;;
+ -B*)
+ CPP=`${CC} $A -print-prog-name=cpp`
+ ;;
-ansi)
ALST=`echo $ALST | sed -e 's/-traditional//'`
;;