From 80cf2e08cc4ae44ac8d15d62191a867f2a60b162 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 10 May 2011 15:41:47 +0100 Subject: config.gcc (libgcc_tm_file): Define instead of including files from ../../libgcc/config/ in tm_file. gcc: * config.gcc (libgcc_tm_file): Define instead of including files from ../../libgcc/config/ in tm_file. * configure.ac (libgcc_tm_file_list, libgcc_tm_include_list): Define. * configure: Regenerate. * Makefile.in (libgcc_tm_file_list, libgcc_tm_include_list, libgcc_tm.h, cs-libgcc_tm.h): New. (TM_H): Include libgcc_tm.h and $(libgcc_tm_file_list). (clean): Remove libgcc_tm.h. * config/arm/symbian.h (RENAME_LIBRARY): Remove. * mkconfig.sh: Include libgcc_tm.h in tm.h if USED_FOR_TARGET. * system.h (DECLARE_LIBRARY_RENAMES): Poison. libgcc: * config/arm/symbian-lib.h: New. From-SVN: r173619 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/Makefile.in | 13 +++++++++++-- gcc/config.gcc | 21 +++++++++++++++------ gcc/config/arm/symbian.h | 7 +------ gcc/configure | 15 +++++++++++++-- gcc/configure.ac | 9 +++++++++ gcc/mkconfig.sh | 13 +++++++++---- gcc/system.h | 4 ++++ 8 files changed, 77 insertions(+), 20 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6453217..d1da16a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2011-05-10 Joseph Myers + + * config.gcc (libgcc_tm_file): Define instead of including files + from ../../libgcc/config/ in tm_file. + * configure.ac (libgcc_tm_file_list, libgcc_tm_include_list): + Define. + * configure: Regenerate. + * Makefile.in (libgcc_tm_file_list, libgcc_tm_include_list, + libgcc_tm.h, cs-libgcc_tm.h): New. + (TM_H): Include libgcc_tm.h and $(libgcc_tm_file_list). + (clean): Remove libgcc_tm.h. + * config/arm/symbian.h (RENAME_LIBRARY): Remove. + * mkconfig.sh: Include libgcc_tm.h in tm.h if USED_FOR_TARGET. + * system.h (DECLARE_LIBRARY_RENAMES): Poison. + 2011-05-10 Georg-Johann Lay PR target/48896 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 078ecbc..3be33a2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -484,6 +484,8 @@ md_file=$(srcdir)/config/@md_file@ tm_file_list=@tm_file_list@ tm_include_list=@tm_include_list@ tm_defines=@tm_defines@ +libgcc_tm_file_list=@libgcc_tm_file_list@ +libgcc_tm_include_list=@libgcc_tm_include_list@ tm_p_file_list=@tm_p_file_list@ tm_p_include_list=@tm_p_include_list@ build_xm_file_list=@build_xm_file_list@ @@ -840,7 +842,8 @@ CONFIG_H = config.h $(host_xm_file_list) TCONFIG_H = tconfig.h $(xm_file_list) TM_P_H = tm_p.h $(tm_p_file_list) GTM_H = tm.h $(tm_file_list) insn-constants.h -TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H) +TM_H = $(GTM_H) libgcc_tm.h $(libgcc_tm_file_list) insn-flags.h \ + $(OPTIONS_H) # Variables for version information. BASEVER := $(srcdir)/BASE-VER # 4.x.y @@ -1687,6 +1690,7 @@ config.h: cs-config.h ; @true bconfig.h: cs-bconfig.h ; @true tconfig.h: cs-tconfig.h ; @true tm.h: cs-tm.h ; @true +libgcc_tm.h: cs-libgcc_tm.h ; @true tm_p.h: cs-tm_p.h ; @true cs-config.h: Makefile @@ -1709,6 +1713,11 @@ cs-tm.h: Makefile HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \ $(SHELL) $(srcdir)/mkconfig.sh tm.h +cs-libgcc_tm.h: Makefile + TARGET_CPU_DEFAULT="" \ + HEADERS="$(libgcc_tm_include_list)" DEFINES="" \ + $(SHELL) $(srcdir)/mkconfig.sh libgcc_tm.h + cs-tm_p.h: Makefile TARGET_CPU_DEFAULT="" \ HEADERS="$(tm_p_include_list)" DEFINES="" \ @@ -4464,7 +4473,7 @@ clean: mostlyclean lang.clean -rm -f libgcc.a libgcc_eh.a libgcov.a -rm -f libgcc_s* -rm -f libunwind* - -rm -f config.h tconfig.h bconfig.h tm_p.h tm.h + -rm -f config.h tconfig.h bconfig.h tm_p.h tm.h libgcc_tm.h -rm -f options.c options.h optionlist -rm -f cs-* -rm -f doc/*.dvi diff --git a/gcc/config.gcc b/gcc/config.gcc index f7876b8..f87f125 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -84,6 +84,12 @@ # build-directory files by prefixing them with "./". # All other files should relative to $srcdir/config. # +# libgcc_tm_file A list of target macro files used only for code +# built for the target, not the host. These files +# are relative to $srcdir/../libgcc/config and +# must not have the same names as files in +# $srcdir/config. +# # tm_p_file Location of file with declarations for functions # in $out_file. # @@ -206,6 +212,7 @@ fortran_target_objs= target_has_targetcm=no tm_defines= xm_defines= +libgcc_tm_file= # Set this to force installation and use of collect2. use_collect2= # Set this to override the default target model. @@ -794,7 +801,7 @@ arm*-*-linux*) # ARM GNU/Linux with ELF case ${target} in arm*-*-linux-*eabi) tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" - tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h" + libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h" tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc" # Define multilib configuration for arm-linux-androideabi. case ${target} in @@ -822,7 +829,7 @@ arm*-*-uclinux*) # ARM ucLinux case ${target} in arm*-*-uclinux*eabi) tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h" - tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h" + libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h" tmake_file="$tmake_file arm/t-bpabi" # The BPABI long long divmod functions return a 128-bit value in # registers r0-r3. Correctly modeling that requires the use of @@ -846,7 +853,7 @@ arm*-*-eabi* | arm*-*-symbianelf* ) need_64bit_hwint=yes default_use_cxa_atexit=yes tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h" - tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h" + libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h" tmake_file="arm/t-arm arm/t-arm-elf" case ${target} in arm*-*-eabi*) @@ -856,6 +863,7 @@ arm*-*-eabi* | arm*-*-symbianelf* ) ;; arm*-*-symbianelf*) tm_file="${tm_file} arm/symbian.h" + libgcc_tm_file="$libgcc_tm_file arm/symbian-lib.h" # We do not include t-bpabi for Symbian OS because the system # provides its own implementation of the BPABI functions. tmake_file="${tmake_file} arm/t-symbian" @@ -954,13 +962,13 @@ fr30-*-elf) ;; frv-*-elf) tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" - tm_file="${tm_file} ../../libgcc/config/frv/frv-abi.h" + libgcc_tm_file="${libgcc_tm_file} frv/frv-abi.h" tmake_file=frv/t-frv ;; frv-*-*linux*) tm_file="dbxelf.h elfos.h ${tm_file} \ gnu-user.h linux.h glibc-stdint.h frv/linux.h" - tm_file="${tm_file} ../../libgcc/config/frv/frv-abi.h" + libgcc_tm_file="${libgcc_tm_file} frv/frv-abi.h" tmake_file="${tmake_file} frv/t-frv frv/t-linux" ;; moxie-*-elf) @@ -2197,7 +2205,8 @@ rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*) extra_headers=altivec.h ;; rx-*-elf*) - tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} ../../libgcc/config/rx/rx-abi.h" + tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" + libgcc_tm_file="${libgcc_tm_file} rx/rx-abi.h" tmake_file="${tmake_file} rx/t-rx" ;; s390-*-linux*) diff --git a/gcc/config/arm/symbian.h b/gcc/config/arm/symbian.h index ff233a8..b24c6ec7 100644 --- a/gcc/config/arm/symbian.h +++ b/gcc/config/arm/symbian.h @@ -1,5 +1,5 @@ /* Configuration file for Symbian OS on ARM processors. - Copyright (C) 2004, 2005, 2007, 2008 + Copyright (C) 2004, 2005, 2007, 2008, 2011 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC @@ -71,11 +71,6 @@ #define SUBTARGET_ASM_FLOAT_SPEC \ "%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}" -/* SymbianOS provides the BPABI routines in a separate library. - Therefore, we do not need to define any of them in libgcc. */ -#undef RENAME_LIBRARY -#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) /* empty */ - /* Define the __symbian__ macro. */ #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ diff --git a/gcc/configure b/gcc/configure index dea2a16..fe21f86 100755 --- a/gcc/configure +++ b/gcc/configure @@ -618,6 +618,8 @@ xm_include_list xm_file_list tm_p_include_list tm_p_file_list +libgcc_tm_include_list +libgcc_tm_file_list tm_defines tm_include_list tm_file_list @@ -11233,6 +11235,13 @@ for f in $tm_file; do esac done +libgcc_tm_file_list= +libgcc_tm_include_list= +for f in $libgcc_tm_file; do + libgcc_tm_file_list="${libgcc_tm_file_list} \$(srcdir)/../libgcc/config/$f" + libgcc_tm_include_list="${libgcc_tm_include_list} ../libgcc/config/$f" +done + tm_p_file_list= tm_p_include_list= for f in $tm_p_file; do @@ -17505,7 +17514,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17508 "configure" +#line 17517 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17611,7 +17620,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17614 "configure" +#line 17623 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26223,6 +26232,8 @@ fi + + # Echo link setup. if test x${build} = x${host} ; then if test x${host} = x${target} ; then diff --git a/gcc/configure.ac b/gcc/configure.ac index 5fa5d07..3f51efd 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1638,6 +1638,13 @@ for f in $tm_file; do esac done +libgcc_tm_file_list= +libgcc_tm_include_list= +for f in $libgcc_tm_file; do + libgcc_tm_file_list="${libgcc_tm_file_list} \$(srcdir)/../libgcc/config/$f" + libgcc_tm_include_list="${libgcc_tm_include_list} ../libgcc/config/$f" +done + tm_p_file_list= tm_p_include_list= for f in $tm_p_file; do @@ -4773,6 +4780,8 @@ AC_SUBST(thread_file) AC_SUBST(tm_file_list) AC_SUBST(tm_include_list) AC_SUBST(tm_defines) +AC_SUBST(libgcc_tm_file_list) +AC_SUBST(libgcc_tm_include_list) AC_SUBST(tm_p_file_list) AC_SUBST(tm_p_include_list) AC_SUBST(xm_file_list) diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh index d56df8c..d96af1d 100644 --- a/gcc/mkconfig.sh +++ b/gcc/mkconfig.sh @@ -1,6 +1,7 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2006, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2006, 2007, 2010, 2011 +# Free Software Foundation, Inc. # This file is part of GCC. # GCC is free software; you can redistribute it and/or modify @@ -19,7 +20,7 @@ # Generate gcc's various configuration headers: -# config.h, tconfig.h, bconfig.h, tm.h, and tm_p.h. +# config.h, tconfig.h, bconfig.h, tm.h, libgcc_tm.h, and tm_p.h. # $1 is the file to generate. DEFINES, HEADERS, and possibly # TARGET_CPU_DEFAULT are expected to be set in the environment. @@ -88,8 +89,9 @@ if [ -n "$HEADERS" ]; then fi # If this is tm.h, now include insn-flags.h only if IN_GCC is defined -# but neither GENERATOR_FILE nor USED_FOR_TARGET is defined. (Much of -# this is temporary.) +# but neither GENERATOR_FILE nor USED_FOR_TARGET is defined. Also +# include libgcc_tm.h if USED_FOR_TARGET is defined. (Much of this is +# temporary.) case $output in tm.h ) @@ -97,6 +99,9 @@ case $output in #if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET # include "insn-flags.h" #endif +#ifdef USED_FOR_TARGET +# include "libgcc_tm.h" +#endif EOF ;; esac diff --git a/gcc/system.h b/gcc/system.h index 147801b..a57df7c 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -761,6 +761,10 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; CAN_DEBUG_WITHOUT_FP UNLIKELY_EXECUTED_TEXT_SECTION_NAME \ HOT_TEXT_SECTION_NAME LEGITIMATE_CONSTANT_P +/* Target macros only used for code built for the target, that have + moved to libgcc-tm.h. */ + #pragma GCC poison DECLARE_LIBRARY_RENAMES + /* Other obsolete target macros, or macros that used to be in target headers and were not used, and may be obsolete or may never have been used. */ -- cgit v1.1