Commit 6acc8a3c by Enkovich Ilya Committed by Kirill Yukhin

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
parent 8f940ee6
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> 2012-04-18 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_node_name): Remove. * cgraph.c (cgraph_node_name): Remove.
......
...@@ -1228,7 +1228,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ...@@ -1228,7 +1228,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
# Assume modern glibc # Assume modern glibc
default_gnu_indirect_function=yes default_gnu_indirect_function=yes
if test x$enable_targets = xall; then 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" tm_defines="${tm_defines} TARGET_BI_ARCH=1"
tmake_file="${tmake_file} i386/t-linux64" tmake_file="${tmake_file} i386/t-linux64"
x86_multilibs="${with_multilib_list}" x86_multilibs="${with_multilib_list}"
...@@ -1263,7 +1263,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ...@@ -1263,7 +1263,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
;; ;;
esac esac
else 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 fi
;; ;;
i[34567]86-*-knetbsd*-gnu) i[34567]86-*-knetbsd*-gnu)
...@@ -1285,7 +1285,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-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" i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
case ${target} in case ${target} in
x86_64-*-linux*) 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 # Assume modern glibc
default_gnu_indirect_function=yes default_gnu_indirect_function=yes
;; ;;
......
...@@ -39,17 +39,23 @@ along with GCC; see the file COPYING3. If not see ...@@ -39,17 +39,23 @@ along with GCC; see the file COPYING3. If not see
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #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 #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. */ /* Similar to standard GNU userspace, but adding -ffast-math support. */
#undef ENDFILE_SPEC #define GNU_USER_TARGET_MATHFILE_SPEC \
#define ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
%{mpc32:crtprec32.o%s} \ %{mpc32:crtprec32.o%s} \
%{mpc64:crtprec64.o%s} \ %{mpc64:crtprec64.o%s} \
%{mpc80:crtprec80.o%s} \ %{mpc80:crtprec80.o%s}"
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
GNU_USER_TARGET_MATHFILE_SPEC " " \
GNU_USER_TARGET_ENDFILE_SPEC
/* Put all *tf routines in libgcc. */ /* Put all *tf routines in libgcc. */
#undef LIBGCC2_HAS_TF_MODE #undef LIBGCC2_HAS_TF_MODE
......
...@@ -75,14 +75,16 @@ along with GCC; see the file COPYING3. If not see ...@@ -75,14 +75,16 @@ along with GCC; see the file COPYING3. If not see
{ "link_emulation", GNU_USER_LINK_EMULATION },\ { "link_emulation", GNU_USER_LINK_EMULATION },\
{ "dynamic_linker", GNU_USER_DYNAMIC_LINKER } { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
#undef LINK_SPEC #define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
-dynamic-linker %(dynamic_linker)} \ -dynamic-linker %(dynamic_linker)} \
%{static:-static}}" %{static:-static}}"
#undef LINK_SPEC
#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
/* A C statement (sans semicolon) to output to the stdio stream /* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named FILE the assembler definition of uninitialized global DECL named
NAME whose size is SIZE bytes and alignment is ALIGN bytes. NAME whose size is SIZE bytes and alignment is ALIGN bytes.
......
...@@ -53,8 +53,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -53,8 +53,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{" SPEC_X32 ":--x32} \ %{" SPEC_X32 ":--x32} \
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
#undef LINK_SPEC #define GNU_USER_TARGET_LINK_SPEC \
#define LINK_SPEC "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
%{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
%{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
%{shared:-shared} \ %{shared:-shared} \
...@@ -66,6 +66,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -66,6 +66,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{" SPEC_X32 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKERX32 "}} \ %{" SPEC_X32 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKERX32 "}} \
%{static:-static}}" %{static:-static}}"
#undef LINK_SPEC
#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
#if TARGET_64BIT_DEFAULT #if TARGET_64BIT_DEFAULT
#if TARGET_BI_ARCH == 2 #if TARGET_BI_ARCH == 2
#define MULTILIB_DEFAULTS { "mx32" } #define MULTILIB_DEFAULTS { "mx32" }
......
/* 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment