diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-29 16:35:50 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-29 16:35:50 +0000 |
commit | 54bb64fbe8d743332bb0db61c134ecc15f4ebad1 (patch) | |
tree | 6dbe0080708b237eae8a1799f1ffc73557ea0f1e | |
parent | c3faca2458e212d326ecabf0e6e6cd8a135a60c6 (diff) | |
download | gcc-54bb64fbe8d743332bb0db61c134ecc15f4ebad1.tar.gz |
gcc:
* config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all.
Handle tuning for bi-arch i[34567]86-*-linux* like that for
i[34567]86-*-solaris2.1[0-9]*.
* config/i386/linux64.h (TARGET_VERSION, MULTILIB_DEFAULTS):
Define conditionally depending on TARGET_64BIT_DEFAULT.
(SPEC_32, SPEC_64): Define.
(LINK_SPEC): Use them.
* doc/install.texi (--enable-targets=all): Document for x86-linux.
libcpp:
* configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
depending on --enable-targets=all.
* configure: Regenerate.
fixincludes:
* inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on x86_64.
* fixincl.x: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118147 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | fixincludes/ChangeLog | 5 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 24 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 1 | ||||
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config.gcc | 30 | ||||
-rw-r--r-- | gcc/config/i386/linux64.h | 22 | ||||
-rw-r--r-- | gcc/doc/install.texi | 2 | ||||
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rwxr-xr-x | libcpp/configure | 7 | ||||
-rw-r--r-- | libcpp/configure.ac | 7 |
10 files changed, 98 insertions, 17 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 5697703dd97..51a66abcdd9 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,8 @@ +2006-10-29 Joseph Myers <joseph@codesourcery.com> + + * inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on x86_64. + * fixincl.x: Regenerate. + 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Makefile.in: Added empty "pdf" target. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 3c1716f79ce..23ffffd154e 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Saturday October 7, 2006 at 12:32:06 PM EDT + * It has been AutoGen-ed Sunday October 29, 2006 at 04:32:11 PM UTC * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Oct 7 12:32:07 EDT 2006 +/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Oct 29 16:32:11 UTC 2006 * * You must regenerate it. Use the ./genfixes script. * @@ -26,7 +26,8 @@ * * You may 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. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -216,10 +217,13 @@ tSCC* apzAab_Fd_Zero_Asm_Posix_Types_HMachs[] = { */ tSCC zAab_Fd_Zero_Asm_Posix_Types_HBypass0[] = "} while"; +tSCC zAab_Fd_Zero_Asm_Posix_Types_HBypass1[] = + "x86_64"; -#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT 1 +#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT 2 static tTestDesc aAab_Fd_Zero_Asm_Posix_Types_HTests[] = { - { TT_NEGREP, zAab_Fd_Zero_Asm_Posix_Types_HBypass0, (regex_t*)NULL }, }; + { TT_NEGREP, zAab_Fd_Zero_Asm_Posix_Types_HBypass0, (regex_t*)NULL }, + { TT_NEGREP, zAab_Fd_Zero_Asm_Posix_Types_HBypass1, (regex_t*)NULL }, }; /* * Fix Command Arguments for Aab_Fd_Zero_Asm_Posix_Types_H @@ -8183,7 +8187,7 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 243 +#define REGEX_COUNT 244 #define MACH_LIST_SIZE_LIMIT 261 #define FIX_COUNT 201 diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 015391594f9..b36a8f5b4dd 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -140,6 +140,7 @@ fix = { files = asm/posix_types.h; mach = 'i[34567]86-*-linux*'; bypass = '} while'; + bypass = 'x86_64'; /* * Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83328632961..431c7cd23b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2006-10-29 Joseph Myers <joseph@codesourcery.com> + + * config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all. + Handle tuning for bi-arch i[34567]86-*-linux* like that for + i[34567]86-*-solaris2.1[0-9]*. + * config/i386/linux64.h (TARGET_VERSION, MULTILIB_DEFAULTS): + Define conditionally depending on TARGET_64BIT_DEFAULT. + (SPEC_32, SPEC_64): Define. + (LINK_SPEC): Use them. + * doc/install.texi (--enable-targets=all): Document for x86-linux. + 2006-10-29 Richard Guenther <rguenther@suse.de> * config/i386/i386-protos.h (ix86_expand_round): Declare. diff --git a/gcc/config.gcc b/gcc/config.gcc index 7545c38f17a..bbe82f069c9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1077,10 +1077,34 @@ i[34567]86-*-coff*) i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu) # Intel 80386's running GNU/* # with ELF format using glibc 2 - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h" + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h" case ${target} in - i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h i386/knetbsd-gnu.h" ;; - i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;; + i[34567]86-*-linux*) + if test x$enable_targets = xall; then + tm_file="${tm_file} i386/x86-64.h i386/linux64.h" + tm_defines="${tm_defines} TARGET_BI_ARCH=1" + tmake_file="${tmake_file} i386/t-linux64" + need_64bit_hwint=yes + # FIXME: -m64 for i[34567]86-*-* should be allowed just + # like -m32 for x86_64-*-*. + case X"${with_cpu}" in + Xgeneric|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx) + ;; + X) + with_cpu=generic + ;; + *) + echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 + echo "generic nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2 + exit 1 + ;; + esac + else + tm_file="${tm_file} i386/linux.h" + fi + ;; + i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;; + i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;; esac tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtfm t-dfprules" ;; diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h index cc8ed16f229..2d0c7bf90f2 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -19,7 +19,11 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#if TARGET_64BIT_DEFAULT #define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)"); +#else +#define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)"); +#endif #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -52,14 +56,22 @@ Boston, MA 02110-1301, USA. */ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +#if TARGET_64BIT_DEFAULT +#define SPEC_32 "m32" +#define SPEC_64 "!m32" +#else +#define SPEC_32 "!m64" +#define SPEC_64 "m64" +#endif + #undef LINK_SPEC -#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ +#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{m32:%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ - %{!m32:%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \ + %{" SPEC_32 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ + %{" SPEC_64 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \ %{static:-static}}" /* Similar to standard Linux, but adding -ffast-math support. */ @@ -68,7 +80,11 @@ Boston, MA 02110-1301, USA. */ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" +#if TARGET_64BIT_DEFAULT #define MULTILIB_DEFAULTS { "m64" } +#else +#define MULTILIB_DEFAULTS { "m32" } +#endif #undef NEED_INDICATE_EXEC_STACK #define NEED_INDICATE_EXEC_STACK 1 diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 5a32b605d8f..3bd6a5bc57b 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1154,7 +1154,7 @@ powerpc-linux for powerpc64-linux, only generates 32-bit code. This option enables the 32-bit target to be a bi-arch compiler, which is useful when you want a bi-arch compiler that defaults to 32-bit, and you are building a bi-arch or multi-arch binutils in a combined tree. -Currently, this option only affects powerpc-linux. +Currently, this option only affects powerpc-linux and x86-linux. @item --enable-secureplt This option enables @option{-msecure-plt} by default for powerpc-linux. diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index ae87e0ea92a..b861abe3ea7 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2006-10-29 Joseph Myers <joseph@codesourcery.com> + + * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux* + depending on --enable-targets=all. + * configure: Regenerate. + 2006-10-12 Jakub Jelinek <jakub@redhat.com> PR preprocessor/28709 diff --git a/libcpp/configure b/libcpp/configure index 2b944b37f7c..496f1fccf25 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -8246,6 +8246,13 @@ case $target in sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \ sh[123456789l]*-*-*) need_64bit_hwint=yes ;; + i[34567]86-*-linux*) + if test "x$enable_targets" = xall; then + need_64bit_hwint=yes + else + need_64bit_hwint=no + fi + ;; *) need_64bit_hwint=no ;; esac diff --git a/libcpp/configure.ac b/libcpp/configure.ac index e32d8233e44..195d6261f1a 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -130,6 +130,13 @@ case $target in sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \ sh[123456789l]*-*-*) need_64bit_hwint=yes ;; + i[34567]86-*-linux*) + if test "x$enable_targets" = xall; then + need_64bit_hwint=yes + else + need_64bit_hwint=no + fi + ;; *) need_64bit_hwint=no ;; esac |