source: trunk/dports/cross/arm-apple-darwin-binutils/files/patch-libtool-driver @ 28059

Last change on this file since 28059 was 28059, checked in by landonf@…, 13 years ago

Include my patch for libtool support. Fixes linking of dylibs/bundles using static archives, eg:

arm-apple-darwin-cc -dynamiclib -o test.dylib input.a

Patch submitted to upstream, see:

http://developer.berlios.de/bugs/?func=detailbug&bug_id=11802&group_id=8664

File size: 2.5 KB
Line 
1Index: cctools/include/mach/machine.h
2===================================================================
3--- cctools/include/mach/machine.h      (revision 118)
4+++ cctools/include/mach/machine.h      (working copy)
5@@ -296,6 +296,7 @@
6 #define CPU_SUBTYPE_ARM_A440           ((cpu_subtype_t) 3)
7 #define CPU_SUBTYPE_ARM_M4             ((cpu_subtype_t) 4)
8 #define CPU_SUBTYPE_ARM_A680           ((cpu_subtype_t) 5)
9+#define CPU_SUBTYPE_ARM_1176JZ         ((cpu_subtype_t) 6)
10 
11 /*
12  *     MC88000 subtypes
13Index: cctools/misc/libtool.c
14===================================================================
15--- cctools/misc/libtool.c      (revision 118)
16+++ cctools/misc/libtool.c      (working copy)
17@@ -2369,7 +2369,7 @@
18            if((archs[i].arch_flag.cputype & CPU_ARCH_ABI64) == CPU_ARCH_ABI64)
19                add_execute_list("ld64");
20            else
21-               add_execute_list("ld");
22+               add_execute_list("arm-apple-darwin-ld"); // XXX run our own arm-aware linker for non-ABI64 targets.
23            if(narchs != 0 && cmd_flags.arch_only_flag.name == NULL)
24                add_execute_list("-arch_multiple");
25            if(archs != NULL){
26Index: cctools/as/arm.c
27===================================================================
28--- cctools/as/arm.c    (revision 118)
29+++ cctools/as/arm.c    (working copy)
30@@ -161,8 +161,8 @@
31  *   Uninteresting machine-dependent boilerplate code
32  * ------------------------------------------------------------------------- */
33 
34-const cpu_type_t md_cputype = 12;
35-const cpu_type_t md_cpusubtype = 6;
36+const cpu_type_t md_cputype = CPU_TYPE_ARM;
37+const cpu_type_t md_cpusubtype = CPU_SUBTYPE_ARM_1176JZ;
38 const enum byte_sex md_target_byte_sex = LITTLE_ENDIAN_BYTE_SEX;
39 
40 const char md_comment_chars[] = "@";
41Index: cctools/libstuff/arch.c
42===================================================================
43--- cctools/libstuff/arch.c     (revision 118)
44+++ cctools/libstuff/arch.c     (working copy)
45@@ -62,7 +62,7 @@
46     { "m88k",   CPU_TYPE_MC88000, CPU_SUBTYPE_MC88000_ALL },
47     { "i860",   CPU_TYPE_I860,    CPU_SUBTYPE_I860_ALL },
48     { "veo",    CPU_TYPE_VEO,     CPU_SUBTYPE_VEO_ALL },
49-    { "arm",    CPU_TYPE_ARM,     12 },
50+    { "arm",    CPU_TYPE_ARM,     CPU_SUBTYPE_ARM_1176JZ },
51     /* specific architecture implementations */
52     { "ppc601", CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_601 },
53     { "ppc603", CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_603 },
54@@ -88,7 +88,6 @@
55     { "hppa7100LC", CPU_TYPE_HPPA,  CPU_SUBTYPE_HPPA_7100LC },
56     { "veo1",   CPU_TYPE_VEO,     CPU_SUBTYPE_VEO_1 },
57     { "veo2",   CPU_TYPE_VEO,     CPU_SUBTYPE_VEO_2 },
58-    { "arm",    CPU_TYPE_ARM,       12 },
59     { NULL,    0,                0 }
60 };
61 
Note: See TracBrowser for help on using the repository browser.