summaryrefslogtreecommitdiff
path: root/gcc/config/gnu-user.h
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-12 14:29:14 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-12 14:29:14 +0000
commitdeb14f24f54a7cdc7025362667ed3a3821ddc7d0 (patch)
treeff08d18c3d28c2afe4a515b7f6be1be610e755a3 /gcc/config/gnu-user.h
parent5c70c066d7fd897f15f11793ecb5a958b5d3eb54 (diff)
downloadgcc-deb14f24f54a7cdc7025362667ed3a3821ddc7d0.tar.gz
* config.gcc (arm*-*-linux*, bfin*-uclinux*, bfin*-linux-uclibc*,
crisv32-*-linux* | cris-*-linux*, frv-*-*linux*, moxie-*-uclinux*, hppa*64*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu, x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu, ia64*-*-linux*, lm32-*-uclinux*, m32r-*-linux*, m32rle-*-linux*, m68k-*-uclinux*, m68k-*-linux*, microblaze*-linux*, mips64*-*-linux* | mipsisa64*-*-linux*, mips*-*-linux*, s390-*-linux*, s390x-*-linux*, sh*-*-linux*, sparc-*-linux*, sparc64-*-linux*, vax-*-linux*, xtensa*-*-linux*, am33_2.0-*-linux*): Use gnu-user.h before linux.h. * config/gnu-user.h: New. Copied from linux.h. (LINUX_TARGET_STARTFILE_SPEC): Rename to GNU_USER_TARGET_STARTFILE_SPEC. (LINUX_TARGET_ENDFILE_SPEC): Rename to GNU_USER_TARGET_ENDFILE_SPEC. (LINUX_TARGET_CC1_SPEC): Rename to GNU_USER_TARGET_CC1_SPEC. (LINUX_TARGET_LIB_SPEC): Rename to GNU_USER_TARGET_LIB_SPEC. (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, LINUX_TARGET_OS_CPP_BUILTINS, CHOOSE_DYNAMIC_LINKER1, CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64, BIONIC_DYNAMIC_LINKER, BIONIC_DYNAMIC_LINKER32, BIONIC_DYNAMIC_LINKER64, LINUX_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64, TARGET_C99_FUNCTIONS, TARGET_HAS_SINCOS): Remove. * config/arm/linux-eabi.h (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC. (LIB_SPEC): Use GNU_USER_TARGET_LIB_SPEC. (STARTFILE_SPEC): Use GNU_USER_TARGET_STARTFILE_SPEC. (ENDFILE_SPEC): Use GNU_USER_TARGET_ENDFILE_SPEC * config/linux.h (NO_IMPLICIT_EXTERN_C, ASM_APP_ON, ASM_APP_OFF, LINUX_TARGET_STARTFILE_SPEC, STARTFILE_SPEC, LINUX_TARGET_ENDFILE_SPEC, ENDFILE_SPEC, LINUX_TARGET_CC1_SPEC, CC1_SPEC, CPLUSPLUS_CPP_SPEC, LINUX_TARGET_LIB_SPEC, LIB_SPEC, LINK_EH_SPEC, LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168711 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/gnu-user.h')
-rw-r--r--gcc/config/gnu-user.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
new file mode 100644
index 00000000000..1c4e71d1bb4
--- /dev/null
+++ b/gcc/config/gnu-user.h
@@ -0,0 +1,97 @@
+/* Definitions for systems using, at least optionally, a GNU
+ (glibc-based) userspace or other userspace with libc derived from
+ glibc (e.g. uClibc) or for which similar specs are appropriate.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006,
+ 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Contributed by Eric Youngdale.
+ Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
+
+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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* Don't assume anything about the header files. */
+#define NO_IMPLICIT_EXTERN_C
+
+#undef ASM_APP_ON
+#define ASM_APP_ON "#APP\n"
+
+#undef ASM_APP_OFF
+#define ASM_APP_OFF "#NO_APP\n"
+
+/* Provide a STARTFILE_SPEC appropriate for GNU userspace. Here we add
+ the GNU userspace magical crtbegin.o file (see crtstuff.c) which
+ provides part of the support for getting C++ file-scope static
+ object constructed before entering `main'. */
+
+#if defined HAVE_LD_PIE
+#define GNU_USER_TARGET_STARTFILE_SPEC \
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define GNU_USER_TARGET_STARTFILE_SPEC \
+ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC GNU_USER_TARGET_STARTFILE_SPEC
+
+/* Provide a ENDFILE_SPEC appropriate for GNU userspace. Here we tack on
+ the GNU userspace magical crtend.o file (see crtstuff.c) which
+ provides part of the support for getting C++ file-scope static
+ object constructed before entering `main', followed by a normal
+ GNU userspace "finalizer" file, `crtn.o'. */
+
+#define GNU_USER_TARGET_ENDFILE_SPEC \
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC
+
+/* This is for -profile to use -lc_p instead of -lc. */
+#define GNU_USER_TARGET_CC1_SPEC "%{profile:-p}"
+#ifndef CC1_SPEC
+#define CC1_SPEC GNU_USER_TARGET_CC1_SPEC
+#endif
+
+/* The GNU C++ standard library requires that these macros be defined. */
+#undef CPLUSPLUS_CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
+
+#define GNU_USER_TARGET_LIB_SPEC \
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
+#undef LIB_SPEC
+#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
+
+#if defined(HAVE_LD_EH_FRAME_HDR)
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#endif
+
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+
+/* Use --as-needed -lgcc_s for eh support. */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
+#define TARGET_POSIX_IO