From 962455827119e72298326dc61829680f3b4463db Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 22 Jun 2006 15:26:30 +0000 Subject: gcc/ * config/m68k/uclinux.h (STARTFILE_SPEC): Use Scrt1.o instead of crt1.o for shared libraries. (LIB_SPEC): Remove -elf2flt and -shared-lib-id 0 options. (LINK_SPEC): Map -mshared-library-id=N to -shared-lib-id N. Provide a default -shared-lib-id of 0. (TARGET_OS_CPP_BUILTINS): Define __GXX_MERGED_TYPEINFO_NAMES=0 for -mid-shared-library. (DRIVER_SELF_SPECS): Map unadorned PIC options to -msep-data. * config/m68k/t-uclinux (MULTILIB_OPTIONS): Add -msep-data and -mid-shared-library multilibs. (MULTILIB_DIRNAMES): Update accordingly. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/coldfire-4_1@114889 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog.csl | 15 +++++++++++++++ gcc/config/m68k/t-uclinux | 4 ++-- gcc/config/m68k/uclinux.h | 39 ++++++++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index c57633524a9..a9c25562d4a 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,18 @@ +2006-06-22 Richard Sandiford + + gcc/ + * config/m68k/uclinux.h (STARTFILE_SPEC): Use Scrt1.o instead of + crt1.o for shared libraries. + (LIB_SPEC): Remove -elf2flt and -shared-lib-id 0 options. + (LINK_SPEC): Map -mshared-library-id=N to -shared-lib-id N. + Provide a default -shared-lib-id of 0. + (TARGET_OS_CPP_BUILTINS): Define __GXX_MERGED_TYPEINFO_NAMES=0 + for -mid-shared-library. + (DRIVER_SELF_SPECS): Map unadorned PIC options to -msep-data. + * config/m68k/t-uclinux (MULTILIB_OPTIONS): Add -msep-data and + -mid-shared-library multilibs. + (MULTILIB_DIRNAMES): Update accordingly. + 2006-06-21 Richard Sandiford * acinclude.m4 (GLIBCXX_ENABLE_C99): Use -lm for link tests in diff --git a/gcc/config/m68k/t-uclinux b/gcc/config/m68k/t-uclinux index 01e631f99b2..60c9a6255ac 100644 --- a/gcc/config/m68k/t-uclinux +++ b/gcc/config/m68k/t-uclinux @@ -15,8 +15,8 @@ xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c # crti and crtn are provided by uClibc. EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o -MULTILIB_OPTIONS = mcpu=5206e/mcpu=5207/mcpu=5211/mcpu=5307/mcpu=532x/mcpu=5407 -MULTILIB_DIRNAMES = m5206e m5207 m5211 m5307 m532x m5407 +MULTILIB_OPTIONS = mcpu=5206e/mcpu=5207/mcpu=5211/mcpu=5307/mcpu=532x/mcpu=5407 msep-data/mid-shared-library +MULTILIB_DIRNAMES = m5206e m5207 m5211 m5307 m532x m5407 msep-data mid-shared-library MULTILIB_EXCEPTIONS = LIBGCC = stmp-multilib diff --git a/gcc/config/m68k/uclinux.h b/gcc/config/m68k/uclinux.h index c2681ce2a80..90e9101be8f 100644 --- a/gcc/config/m68k/uclinux.h +++ b/gcc/config/m68k/uclinux.h @@ -22,7 +22,9 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC -#define STARTFILE_SPEC "crt1.o%s crti.o%s crtbegin.o%s" +#define STARTFILE_SPEC \ +"%{mshared-library-id=0|!mshared-library-id=*: crt1.o%s ;: Scrt1.o%s} \ + crti.o%s crtbegin.o%s" #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s crtn.o%s" @@ -30,23 +32,30 @@ Boston, MA 02110-1301, USA. */ /* Override the default LIB_SPEC from gcc.c. We don't currently support profiling, or libg.a. */ #undef LIB_SPEC -#define LIB_SPEC "\ -%{mid-shared-library:-R libc.gdb%s -elf2flt -shared-lib-id 0} -lc \ -" +#define LIB_SPEC \ +"%{mid-shared-library:-R libc.gdb%s} -lc" /* Default to using -elf2flt with no options. */ #undef LINK_SPEC -#define LINK_SPEC "%{!elf2flt*:-elf2flt}" +#define LINK_SPEC \ +"%{!elf2flt*:-elf2flt} \ + %{mid-shared-library: \ + %{mshared-library-id=*:-shared-lib-id %*;:-shared-lib-id 0}}" #undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS (); \ - builtin_define ("__uClinux__"); \ - if (TARGET_ID_SHARED_LIBRARY) \ - builtin_define ("__ID_SHARED_LIBRARY__"); \ - } \ +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + LINUX_TARGET_OS_CPP_BUILTINS (); \ + builtin_define ("__uClinux__"); \ + if (TARGET_ID_SHARED_LIBRARY) \ + { \ + builtin_define ("__ID_SHARED_LIBRARY__"); \ + /* Shared libraries and executables do not share \ + typeinfo names. */ \ + builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \ + } \ + } \ while (0) /* The uclinux binary format relies on relocations against a segment being @@ -54,3 +63,7 @@ Boston, MA 02110-1301, USA. */ sections. */ #undef M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P #define M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1 + +/* -msep-data is the default PIC mode on this target. */ +#define DRIVER_SELF_SPECS \ + "%{fpie|fPIE|fpic|fPIC:%{!msep-data:%{!mid-shared-library: -msep-data}}}" -- cgit v1.2.3