]> git.pld-linux.org Git - packages/crossm68k-gcc.git/blame - crossm68k-gcc-specs.patch
- outdated
[packages/crossm68k-gcc.git] / crossm68k-gcc-specs.patch
CommitLineData
1b8f31c8 1From: Bernardo Innocenti <bernie@develer.com>
2
3Adjusts the linker invocation for multilib targets built
4with -mid-shared-library.
5
6FIXME: this patch messes up the common m68k-elf target configuration.
7uClinux specific stuff ought to be moved to its own target (m68k-*-uclinux*).
8
9diff -Nru gcc-3.3.1.orig/gcc/config/m68k/m68020-elf.h gcc-3.3.1/gcc/config/m68k/m68020-elf.h
10--- gcc-3.3.1.orig/gcc/config/m68k/m68020-elf.h 2001-12-11 19:21:03.000000000 +0100
11+++ gcc-3.3.1/gcc/config/m68k/m68020-elf.h 2003-07-25 17:52:20.000000000 +0200
12@@ -21,13 +21,46 @@
13
14 /* This comment is here to see if it will keep Sun's cpp from dying. */
15
16-/* We need to override the default specs from elfos.h. This suppresses the
17- loading of crt0.o by gcc's default linker spec. For embedded targets crt0
18- now comes from the linker script. */
19-
20+/* Undo the empty definition of STARTFILE_SPEC from m68kemb.h so we'll
21+ pick the default from gcc.c (just link crt0.o from multilib dir) */
22 #undef STARTFILE_SPEC
23-#define STARTFILE_SPEC "crtbegin.o%s"
24
25-#define LIB_SPEC "-lc"
26+/* Override the default LIB_SPEC from gcc.c. We don't currently support
27+ profiling, or libg.a. */
28+
29+#undef LIB_SPEC
30+#define LIB_SPEC "\
31+%{mid-shared-library:-R libc.gdb%s -elf2flt -shared-lib-id 0} -lc \
32+"
33+
34+/* we don't want a .eh_frame section */
35+#define EH_FRAME_IN_DATA_SECTION
36+
37+/* ??? Quick hack to get constructors working. Make this look more like a
38+ COFF target, so the existing dejagnu/libgloss support works. A better
39+ solution would be to make the necessary dejagnu and libgloss changes so
40+ that we can use normal the ELF constructor mechanism. */
41+#undef INIT_SECTION_ASM_OP
42+#undef FINI_SECTION_ASM_OP
43+#undef ENDFILE_SPEC
44+#define ENDFILE_SPEC ""
45+
46+/* Bring in standard linux defines
47+ FIXME: move in some separate header along with other uClinux stuff */
48+#define TARGET_OS_CPP_BUILTINS() \
49+ do \
50+ { \
51+ builtin_define ("__uClinux__"); \
52+ builtin_define_std ("linux"); \
53+ builtin_define_std ("unix"); \
54+ builtin_define ("__gnu_linux__"); \
55+ builtin_assert ("system=posix"); \
56+ if (flag_pic) \
57+ { \
58+ builtin_define ("__PIC__"); \
59+ builtin_define ("__pic__"); \
60+ } \
61+ } \
62+ while (0)
63
64 /* end of m68020-elf.h */
65diff -Nru gcc-3.3.1.orig/gcc/config/m68k/m68kemb.h gcc-3.3.1/gcc/config/m68k/m68kemb.h
66--- gcc-3.3.1.orig/gcc/config/m68k/m68kemb.h 2001-12-11 19:21:03.000000000 +0100
67+++ gcc-3.3.1/gcc/config/m68k/m68kemb.h 2003-07-25 00:43:55.000000000 +0200
68@@ -48,8 +48,10 @@
69 /* Override the default LIB_SPEC from gcc.c. We don't currently support
70 profiling, or libg.a. */
71
72-#undef LIB_SPEC
73-#define LIB_SPEC "-lc"
74+#undef LIB_SPEC
75+#define LIB_SPEC "\
76+-lc \
77+"
78
79 /* Make this be null, since we want the crt0.o to come from the linker
80 script */
81diff -Nru gcc-3.3.1.orig/gcc/config/m68k/t-m68kelf gcc-3.3.1/gcc/config/m68k/t-m68kelf
82--- gcc-3.3.1.orig/gcc/config/m68k/t-m68kelf 2003-07-25 00:35:34.000000000 +0200
83+++ gcc-3.3.1/gcc/config/m68k/t-m68kelf 2003-07-25 00:43:55.000000000 +0200
84@@ -25,7 +25,5 @@
85 LIBGCC = stmp-multilib
86 INSTALL_LIBGCC = install-multilib
87
88-# from ../t-svr4
89-EXTRA_PARTS=crtbegin.o crtend.o
90-# no pic for now
91-#CRTSTUFF_T_CFLAGS=-fpic
92+# We don't use crtbegin.o and crtend.o
93+EXTRA_PARTS =
This page took 0.129018 seconds and 4 git commands to generate.