diff options
author | Enkovich Ilya <ilya.enkovich@intel.com> | 2012-04-18 08:29:55 +0000 |
---|---|---|
committer | Kirill Yukhin <kyukhin@gcc.gnu.org> | 2012-04-18 08:29:55 +0000 |
commit | 6acc8a3cf37e7948e9d059d98118509a99e69b41 (patch) | |
tree | 665618fe712d7275184c8295fd74ecbfc16d772f /gcc | |
parent | 8f940ee6546bc5411d4f65174c87c20a424c7ca1 (diff) | |
download | gcc-6acc8a3cf37e7948e9d059d98118509a99e69b41.zip gcc-6acc8a3cf37e7948e9d059d98118509a99e69b41.tar.gz gcc-6acc8a3cf37e7948e9d059d98118509a99e69b41.tar.bz2 |
linux-common.h: New.
2012-04-18 Enkovich Ilya <ilya.enkovich@intel.com>
* config/i386/linux-common.h: New.
* config.gcc: Add i386/linux-common.h before
all i386/linux.h and i386/linux64.h usages.
* config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): New.
(LINK_SPEC): Use GNU_USER_TARGET_LINK_SPEC.
* config/i386/gnu-user64.h: Likewise.
* config/i386/gnu-user.common.h (GNU_USER_TARGET_CC1_SPEC): New.
(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
(GNU_USER_TARGET_MATHFILE_SPEC): New.
(ENDFILE_SPEC): Use GNU_USER_TARGET_MATHFILE_SPEC.
From-SVN: r186560
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/config.gcc | 6 | ||||
-rw-r--r-- | gcc/config/i386/gnu-user-common.h | 16 | ||||
-rw-r--r-- | gcc/config/i386/gnu-user.h | 6 | ||||
-rw-r--r-- | gcc/config/i386/gnu-user64.h | 7 | ||||
-rw-r--r-- | gcc/config/i386/linux-common.h | 55 |
6 files changed, 94 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11bb11c..bb0e5e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2012-04-18 Enkovich Ilya <ilya.enkovich@intel.com> + + * config/i386/linux-common.h: New. + + * config.gcc: Add i386/linux-common.h before + all i386/linux.h and i386/linux64.h usages. + + * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): New. + (LINK_SPEC): Use GNU_USER_TARGET_LINK_SPEC. + * config/i386/gnu-user64.h: Likewise. + + * config/i386/gnu-user.common.h (GNU_USER_TARGET_CC1_SPEC): New. + (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC. + (GNU_USER_TARGET_MATHFILE_SPEC): New. + (ENDFILE_SPEC): Use GNU_USER_TARGET_MATHFILE_SPEC. + 2012-04-18 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_node_name): Remove. diff --git a/gcc/config.gcc b/gcc/config.gcc index bf3b2c3..63d6612 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1228,7 +1228,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i # Assume modern glibc default_gnu_indirect_function=yes if test x$enable_targets = xall; then - tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux64.h" + tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h" tm_defines="${tm_defines} TARGET_BI_ARCH=1" tmake_file="${tmake_file} i386/t-linux64" x86_multilibs="${with_multilib_list}" @@ -1263,7 +1263,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ;; esac else - tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux.h" + tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h" fi ;; i[34567]86-*-knetbsd*-gnu) @@ -1285,7 +1285,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h" case ${target} in x86_64-*-linux*) - tm_file="${tm_file} linux.h i386/linux64.h" + tm_file="${tm_file} linux.h i386/linux-common.h i386/linux64.h" # Assume modern glibc default_gnu_indirect_function=yes ;; diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h index 6ca954d..5554936 100644 --- a/gcc/config/i386/gnu-user-common.h +++ b/gcc/config/i386/gnu-user-common.h @@ -39,17 +39,23 @@ along with GCC; see the file COPYING3. If not see #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" +#undef GNU_USER_TARGET_CC1_SPEC +#define GNU_USER_TARGET_CC1_SPEC "%(cc1_cpu) %{profile:-p}" + #undef CC1_SPEC -#define CC1_SPEC "%(cc1_cpu) %{profile:-p}" +#define CC1_SPEC GNU_USER_TARGET_CC1_SPEC /* Similar to standard GNU userspace, but adding -ffast-math support. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ +#define GNU_USER_TARGET_MATHFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ %{mpc32:crtprec32.o%s} \ %{mpc64:crtprec64.o%s} \ - %{mpc80:crtprec80.o%s} \ - %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" + %{mpc80:crtprec80.o%s}" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + GNU_USER_TARGET_MATHFILE_SPEC " " \ + GNU_USER_TARGET_ENDFILE_SPEC /* Put all *tf routines in libgcc. */ #undef LIBGCC2_HAS_TF_MODE diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h index 3b48b00..9020be9 100644 --- a/gcc/config/i386/gnu-user.h +++ b/gcc/config/i386/gnu-user.h @@ -75,14 +75,16 @@ along with GCC; see the file COPYING3. If not see { "link_emulation", GNU_USER_LINK_EMULATION },\ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } -#undef LINK_SPEC -#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ +#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ -dynamic-linker %(dynamic_linker)} \ %{static:-static}}" +#undef LINK_SPEC +#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC + /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named NAME whose size is SIZE bytes and alignment is ALIGN bytes. diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h index 1ec5e20..0e66d26 100644 --- a/gcc/config/i386/gnu-user64.h +++ b/gcc/config/i386/gnu-user64.h @@ -53,8 +53,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see %{" SPEC_X32 ":--x32} \ %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" -#undef LINK_SPEC -#define LINK_SPEC "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ +#define GNU_USER_TARGET_LINK_SPEC \ + "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ %{shared:-shared} \ @@ -66,6 +66,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see %{" SPEC_X32 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKERX32 "}} \ %{static:-static}}" +#undef LINK_SPEC +#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC + #if TARGET_64BIT_DEFAULT #if TARGET_BI_ARCH == 2 #define MULTILIB_DEFAULTS { "mx32" } diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h new file mode 100644 index 0000000..fd53b32 --- /dev/null +++ b/gcc/config/i386/linux-common.h @@ -0,0 +1,55 @@ +/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. + Copyright (C) 2012 Free Software Foundation, Inc. + Contributed by Ilya Enkovich. + +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. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + GNU_USER_TARGET_OS_CPP_BUILTINS(); \ + ANDROID_TARGET_OS_CPP_BUILTINS(); \ + } \ + while (0) + +#undef CC1_SPEC +#define CC1_SPEC \ + LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ + GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) + +#undef LINK_SPEC +#define LINK_SPEC \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC, \ + GNU_USER_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + +#undef LIB_SPEC +#define LIB_SPEC \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ + GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, \ + ANDROID_STARTFILE_SPEC) + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_MATHFILE_SPEC " " \ + GNU_USER_TARGET_ENDFILE_SPEC, \ + GNU_USER_TARGET_MATHFILE_SPEC " " \ + ANDROID_ENDFILE_SPEC) |