aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-01-31 07:42:50 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-01-31 07:42:50 -0500
commitd33322698a52c37144de3ef1eb293bc3b6d0c81b (patch)
treedcbf90a1bb482959319e5d46728a85d226932461
parentb27804a87663e6fa09dd2d56cda678c3abf93dd9 (diff)
downloadgcc-d33322698a52c37144de3ef1eb293bc3b6d0c81b.zip
gcc-d33322698a52c37144de3ef1eb293bc3b6d0c81b.tar.gz
gcc-d33322698a52c37144de3ef1eb293bc3b6d0c81b.tar.bz2
(sys/mc_param.h): Remove embedded asm.
From-SVN: r11129
-rw-r--r--gcc/fixinc.ptx60
1 files changed, 59 insertions, 1 deletions
diff --git a/gcc/fixinc.ptx b/gcc/fixinc.ptx
index 031b8f4..d66998d 100644
--- a/gcc/fixinc.ptx
+++ b/gcc/fixinc.ptx
@@ -1,7 +1,7 @@
#! /bin/sh
# Install modified versions of certain ANSI-incompatible
# native Sequent DYNIX/ptx System V Release 3.2 system include files.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1996 Free Software Foundation, Inc.
# Contributed by Bill Burton <billb@progress.com>
# Portions adapted from fixinc.svr4 and fixincludes.
#
@@ -193,5 +193,63 @@ if [ \! -z "$file_to_fix" ]; then
fi
fi
+# /usr/include/sys/mc_param.h has an embedded asm for the cpuid intruction
+# on the P5. This is not used by anything else so we ifdef it out.
+file=sys/mc_param.h
+if [ -r ${LIB}/$file ]; then
+ file_to_fix=${LIB}/$file
+else
+ if [ -r ${INPUT}/$file ]; then
+ file_to_fix=${INPUT}/$file
+ else
+ file_to_fix=""
+ fi
+fi
+if [ \! -z "$file_to_fix" ]; then
+ echo Checking $file_to_fix
+ if grep __GNUC__ $file_to_fix > /dev/null; then
+ true
+ else
+ sed -e '/__asm/,/}/{
+/__asm/i\
+#if !defined (__GNUC__) && !defined (__GNUG__)
+/}/a\
+#endif
+}' \
+ $file_to_fix > ${LIB}/${file}.sed
+ rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+ echo Fixed $file_to_fix
+ fi
+fi
+
+# /usr/include/sys/mc_param.h has an embedded asm for the cpuid intruction
+# on the P5. This is not used by anything else so we ifdef it out.
+file=sys/mc_param.h
+if [ -r ${LIB}/$file ]; then
+ file_to_fix=${LIB}/$file
+else
+ if [ -r ${INPUT}/$file ]; then
+ file_to_fix=${INPUT}/$file
+ else
+ file_to_fix=""
+ fi
+fi
+if [ \! -z "$file_to_fix" ]; then
+ echo Checking $file_to_fix
+ if grep __GNUC__ $file_to_fix > /dev/null; then
+ true
+ else
+ sed -e '/__asm/,/}/{
+/__asm/i\
+#if !defined (__GNUC__) && !defined (__GNUG__)
+/}/a\
+#endif
+}' \
+ $file_to_fix > ${LIB}/${file}.sed
+ rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+ echo Fixed $file_to_fix
+ fi
+fi
+
exit 0