]> gcc.gnu.org Git - gcc.git/commitdiff
(sys/mc_param.h): Remove embedded asm.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 31 Jan 1996 12:42:50 +0000 (07:42 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 31 Jan 1996 12:42:50 +0000 (07:42 -0500)
From-SVN: r11129

gcc/fixinc.ptx

index 031b8f412d016ccea0c5ee8e9d595de42f95ea82..d66998dd17a19d65241f6e3f46f4941bd4a5d4ee 100644 (file)
@@ -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
 
This page took 0.066909 seconds and 5 git commands to generate.