diff options
Diffstat (limited to 'gcc/config/m68k/uclinux.h')
-rw-r--r-- | gcc/config/m68k/uclinux.h | 39 |
1 files changed, 26 insertions, 13 deletions
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}}}" |