summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgp <gp@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-06 17:04:39 +0000
committergp <gp@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-06 17:04:39 +0000
commitb1aac5f561adc5e77d7609c33384416f8211ae5c (patch)
treee57b37f2a340413c6dbe53859978be1a18f04dfc
parent63fd152d301fc717ad29b2167ebc3fad50a76437 (diff)
downloadgcc-b1aac5f561adc5e77d7609c33384416f8211ae5c.tar.gz
Preliminary i386-pc-nto-qnx6 support.
* config/i386/nto.h: New. * config/i386/t-nto: New. * config.gcc (i[34567]86-*-nto-qnx*): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70203 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config.gcc6
-rw-r--r--gcc/config/i386/nto.h101
-rw-r--r--gcc/config/i386/t-nto7
4 files changed, 120 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 614c8042704..410a4dbf897 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-06 Graeme Peterson <gp@qnx.com>
+
+ * config/i386/nto.h: New.
+ * config/i386/t-nto: New.
+ * config.gcc (i[34567]86-*-nto-qnx*): New.
+
2003-08-06 Phil Edwards <pme@gcc.gnu.org>
* doc/install.texi (*-*-solaris2*): Refine configure instructions.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index b9976d2e6f2..15ff2ce6923 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1066,6 +1066,12 @@ i[34567]86-*-mach*)
# tmake_file=t-libc-ok
use_collect2=yes
;;
+i[34567]86-*-nto-qnx*)
+ tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/nto.h"
+ tmake_file=i386/t-nto
+ gnu_ld=yes
+ gas=yes
+ ;;
i[34567]86-*-rtems*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
diff --git a/gcc/config/i386/nto.h b/gcc/config/i386/nto.h
new file mode 100644
index 00000000000..76fa8e7946b
--- /dev/null
+++ b/gcc/config/i386/nto.h
@@ -0,0 +1,101 @@
+/* Definitions for Intel 386 running QNX/Neutrino.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+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 "i386/unix.h"
+
+#undef DEFAULT_PCC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 1
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (QNX/Neutrino/i386 ELF)");
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("__X86__"); \
+ builtin_define_std ("__QNXNTO__"); \
+ builtin_define_std ("__QNX__"); \
+ builtin_define_std ("__ELF__"); \
+ builtin_define_std ("__LITTLEENDIAN__");\
+ builtin_assert ("system=qnx"); \
+ builtin_assert ("system=qnxnto"); \
+ builtin_assert ("system=nto"); \
+ builtin_assert ("system=unix"); \
+ if (flag_pic) \
+ { \
+ builtin_define ("__PIC__"); \
+ builtin_define ("__pic__"); \
+ } \
+ } \
+ while (0)
+
+#undef THREAD_MODEL_SPEC
+#define THREAD_MODEL_SPEC "posix"
+
+#ifdef CROSS_COMPILE
+#define SYSROOT_SUFFIX_SPEC "x86"
+#endif
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+"%{!shared: \
+ %{!symbolic: \
+ %{pg:mcrt1.o%s} \
+ %{!pg:%{p:mcrt1.o%s} \
+ %{!p:crt1.o%s}}}} \
+crti.o%s \
+%{fexceptions: crtbegin.o%s} \
+%{!fexceptions: %R/lib/crtbegin.o}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "crtend.o%s crtn.o%s"
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{h*} %{v:-V} \
+ %{b} \
+ %{static:-dn -Bstatic} \
+ %{shared:-G -dy -z text} \
+ %{symbolic:-Bsymbolic -G -dy -z text} \
+ %{G:-G} \
+ %{YP,*} \
+ %{!YP,*:%{p:-Y P,%R/lib} \
+ %{!p:-Y P,%R/lib}} \
+ %{Qy:} %{!Qn:-Qy} \
+ -m i386nto \
+ %{!shared: --dynamic-linker /usr/lib/ldqnx.so.2}"
+
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "long unsigned int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
+
+#define NO_IMPLICIT_EXTERN_C 1
+
diff --git a/gcc/config/i386/t-nto b/gcc/config/i386/t-nto
new file mode 100644
index 00000000000..314c2609f8b
--- /dev/null
+++ b/gcc/config/i386/t-nto
@@ -0,0 +1,7 @@
+# Don't run fixproto
+STMP_FIXPROTO =
+
+CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fPIC
+TARGET_LIBGCC2_CFLAGS = -fPIC -fexceptions
+
+EXTRA_PARTS = crtbegin.o