aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Millan <robertmh@gnu.org>2003-10-21 09:52:47 +0000
committerDavid S. Miller <davem@gcc.gnu.org>2003-10-21 02:52:47 -0700
commite2befd7d4bbecf0faf062e6692b589a1e0ed0de1 (patch)
tree6bc6663457673c05b20526a6138c2e83091e9f9b /gcc
parent2426d8dd9e129a0270f152e758380f35ef074bb7 (diff)
downloadgcc-e2befd7d4bbecf0faf062e6692b589a1e0ed0de1.zip
gcc-e2befd7d4bbecf0faf062e6692b589a1e0ed0de1.tar.gz
gcc-e2befd7d4bbecf0faf062e6692b589a1e0ed0de1.tar.bz2
kfreebsdgnu.h: New.
2003-09-28 Robert Millan <robertmh@gnu.org> * config/i386/kfreebsdgnu.h: New. i386-*-kfreebsd-gnu definitions. * config/kfreebsdgnu.h: New. *-*-kfreebsd-gnu definitions. * config/t-kfreebsd-gnu: New. *-*-kfreebsd-gnu tmake_file. * config.gcc: Add *-*-kfreebsd*-gnu and i[34567]86-*-kfreebsd*-gnu. From-SVN: r72744
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config.gcc17
-rw-r--r--gcc/config/i386/kfreebsdgnu.h35
-rw-r--r--gcc/config/kfreebsdgnu.h41
-rw-r--r--gcc/config/t-kfreebsd-gnu16
5 files changed, 116 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ce5ad94..372c3bf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-09-28 Robert Millan <robertmh@gnu.org>
+
+ * config/i386/kfreebsdgnu.h: New. i386-*-kfreebsd-gnu definitions.
+ * config/kfreebsdgnu.h: New. *-*-kfreebsd-gnu definitions.
+ * config/t-kfreebsd-gnu: New. *-*-kfreebsd-gnu tmake_file.
+ * config.gcc: Add *-*-kfreebsd*-gnu and i[34567]86-*-kfreebsd*-gnu.
+
2003-10-21 Eric Botcazou <ebotcazou@libertysurf.fr>
* web.c: Fix various comments.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 7e4c820..1446f11 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -406,6 +406,17 @@ case ${target} in
esac
fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
;;
+*-*-kfreebsd*-gnu)
+ # Must come before *-*-gnu*
+ xm_defines=POSIX # needed for cross-compiling from FreeBSD?
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
+ # GNU tools are the only tools.
+ gas=yes
+ gnu_ld=yes
+ case ${enable_threads} in
+ "" | yes | posix) thread_file='posix' ;;
+ esac
+ ;;
*-*-linux*libc1* | *-*-linux*aout*)
# Avoid the generic linux case.
;;
@@ -953,6 +964,12 @@ x86_64-*-linux*)
i386/x86-64.h i386/linux64.h"
tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64"
;;
+i[34567]86-*-kfreebsd*-gnu) # must be before i[34567]86-*-gnu*
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h kfreebsdgnu.h i386/kfreebsdgnu.h"
+ tmake_file="t-slibgcc-elf-ver t-kfreebsd-gnu i386/t-crtstuff"
+ float_format=i386
+ use_fixproto=no
+ ;;
i[34567]86-*-gnu*)
;;
i[34567]86-pc-msdosdjgpp*)
diff --git a/gcc/config/i386/kfreebsdgnu.h b/gcc/config/i386/kfreebsdgnu.h
new file mode 100644
index 0000000..66b231d
--- /dev/null
+++ b/gcc/config/i386/kfreebsdgnu.h
@@ -0,0 +1,35 @@
+/* Definitions for Intel 386 running GNU/KFreeBSD systems with ELF format.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Bruno Haible.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (i386 KFreeBSD/ELF)");
+
+/* FIXME: Is a KFreeBSD-specific fallback mechanism necessary? */
+#undef MD_FALLBACK_FRAME_STATE_FOR
+
+#undef LINK_SPEC
+#define LINK_SPEC "-m elf_i386_fbsd %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{static:-static}}}"
diff --git a/gcc/config/kfreebsdgnu.h b/gcc/config/kfreebsdgnu.h
new file mode 100644
index 0000000..59a6829
--- /dev/null
+++ b/gcc/config/kfreebsdgnu.h
@@ -0,0 +1,41 @@
+/* Definitions for GNU/KFreeBSD systems with ELF format.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Bruno Haible.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARET_OS_CPP_BUILTINS() \
+ builtin_define ("__GNU_KFreeBSD__=0"); \
+ builtin_define ("__gnu_kfreebsd__=0"); \
+ builtin_define ("__FreeBSD_kernel__=5"); \
+ builtin_define ("__ELF__"); \
+ builtin_define_std ("unix"); \
+ builtin_assert ("system=posix");
+
+#undef TARGET_CPU_CPP_BUILTINS
+#define TARGET_CPU_CPP_BUILTINS() \
+ builtin_define ("__i386__"); \
+ builtin_define_std ("i386"); \
+ builtin_assert ("cpu=i386"); \
+ builtin_assert ("machine=i386");
+
+/* do {} while (0) */
diff --git a/gcc/config/t-kfreebsd-gnu b/gcc/config/t-kfreebsd-gnu
new file mode 100644
index 0000000..a40dc7a
--- /dev/null
+++ b/gcc/config/t-kfreebsd-gnu
@@ -0,0 +1,16 @@
+# glibc provides a limits.h, which must be combined with gcc's limits.h.
+LIMITS_H_TEST = true
+
+# Compile crtbeginS.o and crtendS.o with pic.
+CRTSTUFF_T_CFLAGS_S = -fPIC
+# Compile libgcc2.a with pic.
+TARGET_LIBGCC2_CFLAGS = -fPIC
+
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
+# the symbol versions that glibc used.
+SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
+
+# Use unwind-dw2-fde-glibc
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+ $(srcdir)/unwind-sjlj.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c