From 97ad1d43e974f6743ef9966b280e2b3e049de337 Mon Sep 17 00:00:00 2001 From: Donn Terry Date: Sat, 10 Apr 1999 05:15:27 +0000 Subject: [PATCH] t-interix: Use mostly system headers unchanged. * i386/t-interix: Use mostly system headers unchanged. Use system assert.h * fixinc/fixinc.interix: Ditto (make almost no-op). * config/x-interix.h (_ALL_SOURCE): add -D * config/x-interix.h (crti.o): Delete dependency. * config/xm-interix.h (ONLY_INT_FIELDS): Define only when bootstrapping. * i386/xm-i386-interix.h: New file. * i386/interix.h (ASM_OUTPUT_LIMITED_STRING): Fix warnings. * i386/i386-interix.h: Renamed from interix.h. * configure.in (interix): Use new files. * configure: Rebuilt. From-SVN: r26332 --- gcc/ChangeLog | 14 ++++++++ gcc/config/i386/{interix.h => i386-interix.h} | 6 ++-- gcc/config/i386/t-interix | 6 ++++ gcc/config/i386/xm-i386-interix.h | 34 +++++++++++++++++++ gcc/config/x-interix | 9 ++--- gcc/config/xm-interix.h | 2 ++ gcc/configure | 4 +-- gcc/configure.in | 4 +-- 8 files changed, 65 insertions(+), 14 deletions(-) rename gcc/config/i386/{interix.h => i386-interix.h} (99%) create mode 100644 gcc/config/i386/xm-i386-interix.h diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3da9b8ed6ef..566eb70fa10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +Sat Apr 10 06:04:50 1999 Donn Terry (donn@interix.com) + + * i386/t-interix: Use mostly system headers unchanged. + Use system assert.h + * fixinc/fixinc.interix: Ditto (make almost no-op). + * config/x-interix.h (_ALL_SOURCE): add -D + * config/x-interix.h (crti.o): Delete dependency. + * config/xm-interix.h (ONLY_INT_FIELDS): Define only when bootstrapping. + * i386/xm-i386-interix.h: New file. + * i386/interix.h (ASM_OUTPUT_LIMITED_STRING): Fix warnings. + * i386/i386-interix.h: Renamed from interix.h. + * configure.in (interix): Use new files. + * configure: Rebuilt. + Sat Apr 10 05:25:28 1999 Daniel Jacobowitz * rs6000/sysv4.h (CPP_OS_LINUX_SPEC): Fix conditions diff --git a/gcc/config/i386/interix.h b/gcc/config/i386/i386-interix.h similarity index 99% rename from gcc/config/i386/interix.h rename to gcc/config/i386/i386-interix.h index ea2227533d5..d665844f887 100644 --- a/gcc/config/i386/interix.h +++ b/gcc/config/i386/i386-interix.h @@ -157,10 +157,10 @@ Boston, MA 02111-1307, USA. */ register unsigned char *_limited_str = (unsigned char *) (STR); \ register unsigned ch; \ fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP); \ - for (; ch = *_limited_str; _limited_str++) \ + for (; (ch = *_limited_str); _limited_str++) \ { \ - register int escape; \ - switch (escape = ESCAPES[ch]) \ + register int escape = ESCAPES[ch]; \ + switch (escape) \ { \ case 0: \ putc (ch, (FILE)); \ diff --git a/gcc/config/i386/t-interix b/gcc/config/i386/t-interix index 39df73956b6..4c6d84f1b39 100644 --- a/gcc/config/i386/t-interix +++ b/gcc/config/i386/t-interix @@ -8,3 +8,9 @@ LIB1ASMFUNCS = _chkstk interix.o: $(srcdir)/config/i386/interix.c $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/interix.c +# System headers will track gcc's needs. +# Even LANG_EXTRA_HEADERS may be temporary. +USER_H=$(LANG_EXTRA_HEADERS) + +# We don't want this one either. +INSTALL_ASSERT_H= diff --git a/gcc/config/i386/xm-i386-interix.h b/gcc/config/i386/xm-i386-interix.h new file mode 100644 index 00000000000..8bfd5e2d915 --- /dev/null +++ b/gcc/config/i386/xm-i386-interix.h @@ -0,0 +1,34 @@ +/* Configuration for GNU compiler + for an Intel i386 or later processor running Interix. + Copyright (C) 1999 Free Software Foundation, Inc. + Contributed by Donn Terry (donn@interix.com) + Derived from code by Douglas B. Rupp (drupp@cs.washington.edu) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include + +#define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG +#ifdef __GNUC__ +# define HOST_WIDEST_INT long long +#else +# define HOST_WIDEST_INT __int64 +#endif +#define HOST_WIDEST_INT_PRINT_DEC "%lld" +#define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu" +#define HOST_WIDEST_INT_PRINT_HEX "0x%llx" diff --git a/gcc/config/x-interix b/gcc/config/x-interix index 270770fe696..afdfe76c7f7 100644 --- a/gcc/config/x-interix +++ b/gcc/config/x-interix @@ -16,14 +16,9 @@ RANLIB_TEST = false SHELL = sh # Existing CC/GCC may not define -D__INTERIX, so need this here. -X_CFLAGS= -D__INTERIX +# Since we want to configure with _ALL_SOURCE, we need to build that way too +X_CFLAGS= -D__INTERIX -D_ALL_SOURCE LIBGCC2_INCLUDES = -idirafter $${INTERIX_ROOT}/usr/include # Headers come from a funny place SYSTEM_HEADER_DIR=$${INTERIX_ROOT}/usr/include - -EXTRA_PARTS += crti.o - -crti.o: $(srcdir)/crti.c - $(GCC_FOR_TARGET) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/crti.c - diff --git a/gcc/config/xm-interix.h b/gcc/config/xm-interix.h index 46cbaee4e76..756fb5d465f 100644 --- a/gcc/config/xm-interix.h +++ b/gcc/config/xm-interix.h @@ -26,8 +26,10 @@ Boston, MA 02111-1307, USA. */ #endif #ifndef ONLY_INT_FIELDS +#ifndef __GNUC__ #define ONLY_INT_FIELDS 1 #endif +#endif #ifndef USE_PROTOTYPES #define USE_PROTOTYPES 1 diff --git a/gcc/configure b/gcc/configure index c6c284231a4..f3c48854d19 100755 --- a/gcc/configure +++ b/gcc/configure @@ -3782,8 +3782,8 @@ for machine in $build $host $target; do exeext=.exe ;; i[34567]86-*-interix*) - tm_file=i386/interix.h - xm_file="${xm_file} xm-interix.h" + tm_file=i386/i386-interix.h + xm_file="i386/xm-i386-interix.h xm-interix.h" xm_defines="USG NO_SYS_SIGLIST" tmake_file="i386/t-interix" extra_objs=interix.o diff --git a/gcc/configure.in b/gcc/configure.in index 75852375563..07e8c75a9d9 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -1510,8 +1510,8 @@ changequote([,])dnl changequote(,)dnl i[34567]86-*-interix*) changequote([,])dnl - tm_file=i386/interix.h - xm_file="${xm_file} xm-interix.h" + tm_file=i386/i386-interix.h + xm_file="i386/xm-i386-interix.h xm-interix.h" xm_defines="USG NO_SYS_SIGLIST" tmake_file="i386/t-interix" extra_objs=interix.o -- 2.30.2