summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-22 11:32:00 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-22 11:32:00 +0000
commit59908db32077347df004426074a90659e4015bc6 (patch)
tree51df2eedf8600e20a317e703179c58bbc2c9dd77
parent3857441cd17203e9f0c5ab36c5667a28497ffaa7 (diff)
downloadgcc-59908db32077347df004426074a90659e4015bc6.tar.gz
Mon Feb 22 14:13:23 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
* configure.in (i[34567]86-*-linux-gnu*, i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*, i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as fixincludes. * configure: Rebuilt. * fixinc.x86-linux-gnu: New script for fixing asm-statements bug on x86 linux. * fixinc/fixinc.x86-linux-gnu: Copy of the previous one. * fixinc/mkfixinc.sh (i[34567]86-*-linux-gnu*, i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*, i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as fixincludes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25370 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog19
-rwxr-xr-xgcc/configure8
-rw-r--r--gcc/configure.in8
-rw-r--r--gcc/fixinc.x86-linux-gnu140
-rw-r--r--gcc/fixinc/fixinc.x86-linux-gnu140
-rwxr-xr-xgcc/fixinc/mkfixinc.sh7
6 files changed, 314 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a1203e6adfa..1a90b5bfc1a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,22 @@
+Mon Feb 22 14:13:23 1999 Vladimir N. Makarov <vmakarov@cygnus.com>
+
+ * configure.in (i[34567]86-*-linux-gnu*,
+ i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*,
+ i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as
+ fixincludes.
+
+ * configure: Rebuilt.
+
+ * fixinc.x86-linux-gnu: New script for fixing asm-statements bug
+ on x86 linux.
+
+ * fixinc/fixinc.x86-linux-gnu: Copy of the previous one.
+
+ * fixinc/mkfixinc.sh (i[34567]86-*-linux-gnu*,
+ i[34567]86-*-linux-gnulibc1, i[34567]86-*-linux-gnuaout*,
+ i[34567]86-*-linux-gnuoldld*): Use fixinc.x86-linux-gnu as
+ fixincludes.
+
Mon Feb 22 08:55:05 1999 Ovidiu Predescu <ovidiu@cup.hp.com>
* objc/objc-act.c (encode_type): Temporary revert to the old
diff --git a/gcc/configure b/gcc/configure
index 9b9f4beb494..50bfce163ef 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -3522,7 +3522,7 @@ for machine in $build $host $target; do
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
tm_file=i386/linux-oldld.h
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
;;
@@ -3530,7 +3530,7 @@ for machine in $build $host $target; do
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
tm_file=i386/linux-aout.h
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
;;
@@ -3540,7 +3540,7 @@ for machine in $build $host $target; do
tm_file=i386/linux.h
tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
if test x$enable_threads = xyes; then
@@ -3553,7 +3553,7 @@ for machine in $build $host $target; do
tm_file=i386/linux.h
tmake_file="t-linux i386/t-crtstuff"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
if test x$enable_threads = xyes; then
diff --git a/gcc/configure.in b/gcc/configure.in
index 04c7523d319..3b3c72f0704 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -1185,7 +1185,7 @@ changequote([,])dnl # with a.out format using
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
tm_file=i386/linux-oldld.h
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
;;
@@ -1195,7 +1195,7 @@ changequote([,])dnl # with a.out format
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
tm_file=i386/linux-aout.h
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
;;
@@ -1207,7 +1207,7 @@ changequote([,])dnl # with ELF format using the
tm_file=i386/linux.h
tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
if test x$enable_threads = xyes; then
@@ -1222,7 +1222,7 @@ changequote([,])dnl # with ELF format using glibc 2
tm_file=i386/linux.h
tmake_file="t-linux i386/t-crtstuff"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- fixincludes=Makefile.in #On Linux, the headers are ok already.
+ fixincludes=fixinc.x86-linux-gnu
gnu_ld=yes
float_format=i386
if test x$enable_threads = xyes; then
diff --git a/gcc/fixinc.x86-linux-gnu b/gcc/fixinc.x86-linux-gnu
new file mode 100644
index 00000000000..9e32586ef2b
--- /dev/null
+++ b/gcc/fixinc.x86-linux-gnu
@@ -0,0 +1,140 @@
+#! /bin/sh
+#
+# The script is created for Cygnus by vmakarov@cygnus.com and based on
+# fixinc.wrap
+#
+# This script is designed for x86 with gnulibc of version 2.0 and less
+# for solution of problems with invalid asm-statements by creating
+# small wrappers around the include files containg the asm-statements.
+#
+# See README-fixinc for more information.
+
+
+# Directory in which to store the results.
+LIB=${1?"fixincludes: output directory not specified"}
+
+# Make sure it exists.
+if [ ! -d $LIB ]; then
+ mkdir $LIB || exit 1
+fi
+
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+ ;;
+*)
+ cd $LIB; LIB=`${PWDCMD-pwd}`
+ ;;
+esac
+
+echo Building fixed headers in ${LIB}
+
+file=selectbits.h
+echo Fixed $file for glibc-2.0.x
+rm -f $LIB/$file
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-2.0.x. */
+#ifndef _SELECTBITS_H_WRAPPER
+#include <features.h>
+#include_next <selectbits.h>
+
+#if defined(__FD_ZERO) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__ ("cld; rep; stosl" \
+ : "=m" (((__fd_mask *) \
+ (fdsetp))[__FDELT (__FD_SETSIZE)]), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (sizeof (__fd_set) \
+ / sizeof (__fd_mask)), \
+ "2" ((__fd_mask *) (fdsetp)) \
+ : "memory"); \
+ } while (0)
+#endif
+
+#define _SELECTBITS_H_WRAPPER
+#endif /* _SELECTBITS_H_WRAPPER */
+__EOF__
+# Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not
+# the start, so that if #include_next gets another instance of
+# the wrapper, this will follow the #include_next chain until
+# we arrive at the real <selectbits.h>.
+chmod a+r $LIB/$file
+
+# asm/posix_types.h for libc version 1.x
+file=asm/posix_types.h
+echo Fixed $file for glibc-1.x
+rm -f $LIB/$file
+dir=`dirname $LIB/$file`
+if [ ! -d $dir ]; then
+ mkdir -p $dir || exit 1
+fi
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-1.x. */
+#ifndef _POSIX_TYPES_H_WRAPPER
+#include <features.h>
+#include_next <asm/posix_types.h>
+
+#if defined(__FD_ZERO) && !defined(__GLIBC__)
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=m" (*(__kernel_fd_set *) (fdsetp)), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (__FDSET_LONGS), \
+ "2" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
+ } while (0)
+#endif
+
+#define _POSIX_TYPES_H_WRAPPER
+#endif /* _POSIX_TYPES_H_WRAPPER */
+__EOF__
+# Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
+# the start, so that if #include_next gets another instance of
+# the wrapper, this will follow the #include_next chain until
+# we arrive at the real <asm/posix_types.h>.
+chmod a+r $LIB/$file
+
+# gnu/types.h for libc version 1.x
+file=gnu/types.h
+echo Fixed $file for glibc-1.x
+rm -f $LIB/$file
+dir=`dirname $LIB/$file`
+if [ ! -d $dir ]; then
+ mkdir -p $dir || exit 1
+fi
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-1.x. */
+#ifndef _TYPES_H_WRAPPER
+#include <features.h>
+#include_next <gnu/types.h>
+
+#if defined(__FD_ZERO) && !defined(__GLIBC__)
+#undef __FD_ZERO
+# define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=m" (*(__fd_set *) (fdsetp)), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (__FDSET_LONGS), \
+ "2" ((__fd_set *) (fdsetp)) :"memory"); \
+ } while (0)
+#endif
+
+#define _TYPES_H_WRAPPER
+#endif /* _TYPES_H_WRAPPER */
+__EOF__
+# Define _TYPES_H_WRAPPER at the end of the wrapper, not the start,
+# so that if #include_next gets another instance of the wrapper,
+# this will follow the #include_next chain until we arrive at
+# the real <gnu/types.h>.
+chmod a+r $LIB/$file
+
+exit 0
+
diff --git a/gcc/fixinc/fixinc.x86-linux-gnu b/gcc/fixinc/fixinc.x86-linux-gnu
new file mode 100644
index 00000000000..9e32586ef2b
--- /dev/null
+++ b/gcc/fixinc/fixinc.x86-linux-gnu
@@ -0,0 +1,140 @@
+#! /bin/sh
+#
+# The script is created for Cygnus by vmakarov@cygnus.com and based on
+# fixinc.wrap
+#
+# This script is designed for x86 with gnulibc of version 2.0 and less
+# for solution of problems with invalid asm-statements by creating
+# small wrappers around the include files containg the asm-statements.
+#
+# See README-fixinc for more information.
+
+
+# Directory in which to store the results.
+LIB=${1?"fixincludes: output directory not specified"}
+
+# Make sure it exists.
+if [ ! -d $LIB ]; then
+ mkdir $LIB || exit 1
+fi
+
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+ ;;
+*)
+ cd $LIB; LIB=`${PWDCMD-pwd}`
+ ;;
+esac
+
+echo Building fixed headers in ${LIB}
+
+file=selectbits.h
+echo Fixed $file for glibc-2.0.x
+rm -f $LIB/$file
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-2.0.x. */
+#ifndef _SELECTBITS_H_WRAPPER
+#include <features.h>
+#include_next <selectbits.h>
+
+#if defined(__FD_ZERO) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__ ("cld; rep; stosl" \
+ : "=m" (((__fd_mask *) \
+ (fdsetp))[__FDELT (__FD_SETSIZE)]), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (sizeof (__fd_set) \
+ / sizeof (__fd_mask)), \
+ "2" ((__fd_mask *) (fdsetp)) \
+ : "memory"); \
+ } while (0)
+#endif
+
+#define _SELECTBITS_H_WRAPPER
+#endif /* _SELECTBITS_H_WRAPPER */
+__EOF__
+# Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not
+# the start, so that if #include_next gets another instance of
+# the wrapper, this will follow the #include_next chain until
+# we arrive at the real <selectbits.h>.
+chmod a+r $LIB/$file
+
+# asm/posix_types.h for libc version 1.x
+file=asm/posix_types.h
+echo Fixed $file for glibc-1.x
+rm -f $LIB/$file
+dir=`dirname $LIB/$file`
+if [ ! -d $dir ]; then
+ mkdir -p $dir || exit 1
+fi
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-1.x. */
+#ifndef _POSIX_TYPES_H_WRAPPER
+#include <features.h>
+#include_next <asm/posix_types.h>
+
+#if defined(__FD_ZERO) && !defined(__GLIBC__)
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=m" (*(__kernel_fd_set *) (fdsetp)), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (__FDSET_LONGS), \
+ "2" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
+ } while (0)
+#endif
+
+#define _POSIX_TYPES_H_WRAPPER
+#endif /* _POSIX_TYPES_H_WRAPPER */
+__EOF__
+# Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
+# the start, so that if #include_next gets another instance of
+# the wrapper, this will follow the #include_next chain until
+# we arrive at the real <asm/posix_types.h>.
+chmod a+r $LIB/$file
+
+# gnu/types.h for libc version 1.x
+file=gnu/types.h
+echo Fixed $file for glibc-1.x
+rm -f $LIB/$file
+dir=`dirname $LIB/$file`
+if [ ! -d $dir ]; then
+ mkdir -p $dir || exit 1
+fi
+cat <<'__EOF__' >$LIB/$file
+/* This file fixes __FD_ZERO bug for glibc-1.x. */
+#ifndef _TYPES_H_WRAPPER
+#include <features.h>
+#include_next <gnu/types.h>
+
+#if defined(__FD_ZERO) && !defined(__GLIBC__)
+#undef __FD_ZERO
+# define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=m" (*(__fd_set *) (fdsetp)), \
+ "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "1" (__FDSET_LONGS), \
+ "2" ((__fd_set *) (fdsetp)) :"memory"); \
+ } while (0)
+#endif
+
+#define _TYPES_H_WRAPPER
+#endif /* _TYPES_H_WRAPPER */
+__EOF__
+# Define _TYPES_H_WRAPPER at the end of the wrapper, not the start,
+# so that if #include_next gets another instance of the wrapper,
+# this will follow the #include_next chain until we arrive at
+# the real <gnu/types.h>.
+chmod a+r $LIB/$file
+
+exit 0
+
diff --git a/gcc/fixinc/mkfixinc.sh b/gcc/fixinc/mkfixinc.sh
index 863623c77dd..1f45ca5c5ad 100755
--- a/gcc/fixinc/mkfixinc.sh
+++ b/gcc/fixinc/mkfixinc.sh
@@ -91,6 +91,13 @@ case $machine in
fixincludes=
;;
+ i[34567]86-*-linux-gnu* | \
+ i[34567]86-*-linux-gnulibc1 | \
+ i[34567]86-*-linux-gnuaout* | \
+ i[34567]86-*-linux-gnuoldld*)
+ fixincludes=fixinc.x86-linux-gnu
+ ;;
+
*-sgi-irix*)
fixincludes=fixinc.irix
;;