1 |
commit: 8cf1cbefbebd9cccdb1259228465ee33dd93b436 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 27 13:17:17 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 27 13:17:17 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=8cf1cbef |
7 |
|
8 |
sys-devel/gcc: point to libc.so for linker for arm |
9 |
|
10 |
Package-Manager: portage-2.2.7 |
11 |
Manifest-Sign-Key: 0xF52D4BBA |
12 |
|
13 |
--- |
14 |
.../gcc/files/gcc-4.7.3-musl-linker-path.patch | 23 ++++++++++++++++++---- |
15 |
sys-devel/gcc/gcc-4.7.3-r99.ebuild | 9 ++------- |
16 |
2 files changed, 21 insertions(+), 11 deletions(-) |
17 |
|
18 |
diff --git a/sys-devel/gcc/files/gcc-4.7.3-musl-linker-path.patch b/sys-devel/gcc/files/gcc-4.7.3-musl-linker-path.patch |
19 |
index 9128e44..d9d0df6 100644 |
20 |
--- a/sys-devel/gcc/files/gcc-4.7.3-musl-linker-path.patch |
21 |
+++ b/sys-devel/gcc/files/gcc-4.7.3-musl-linker-path.patch |
22 |
@@ -1,11 +1,26 @@ |
23 |
-diff -Nuar gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h |
24 |
+diff -Naur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h |
25 |
+--- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2014-02-26 11:35:12.955061913 +0000 |
26 |
++++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2014-02-26 11:40:46.800062073 +0000 |
27 |
+@@ -69,8 +69,8 @@ |
28 |
+ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ |
29 |
+ |
30 |
+ #undef GLIBC_DYNAMIC_LINKER |
31 |
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" |
32 |
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" |
33 |
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/usr/lib/libc.so" |
34 |
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/usr/lib/libc.so" |
35 |
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT |
36 |
+ |
37 |
+ #define GLIBC_DYNAMIC_LINKER \ |
38 |
+diff -Naur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h |
39 |
--- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 15:38:34.000000000 +0000 |
40 |
-+++ gcc-4.7.3/gcc/config/i386/linux64.h 2014-01-25 17:11:52.126098018 +0000 |
41 |
-@@ -29,5 +29,5 @@ |
42 |
++++ gcc-4.7.3/gcc/config/i386/linux64.h 2014-02-26 11:40:00.240062051 +0000 |
43 |
+@@ -28,6 +28,6 @@ |
44 |
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64" |
45 |
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" |
46 |
|
47 |
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" |
48 |
-+#define GLIBC_DYNAMIC_LINKER32 "/usr/lib/libc.so" |
49 |
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" |
50 |
++#define GLIBC_DYNAMIC_LINKER32 "/usr/lib/libc.so" |
51 |
+#define GLIBC_DYNAMIC_LINKER64 "/usr/lib/libc.so" |
52 |
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" |
53 |
|
54 |
diff --git a/sys-devel/gcc/gcc-4.7.3-r99.ebuild b/sys-devel/gcc/gcc-4.7.3-r99.ebuild |
55 |
index eb2a1a7..c4e8690 100644 |
56 |
--- a/sys-devel/gcc/gcc-4.7.3-r99.ebuild |
57 |
+++ b/sys-devel/gcc/gcc-4.7.3-r99.ebuild |
58 |
@@ -44,6 +44,8 @@ src_prepare() { |
59 |
EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" |
60 |
fi |
61 |
|
62 |
+ toolchain_src_prepare |
63 |
+ |
64 |
if use elibc_musl; then |
65 |
cd "${S}" |
66 |
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in |
67 |
@@ -55,13 +57,6 @@ src_prepare() { |
68 |
epatch "${FILESDIR}"/${P}-musl-linker-path.patch |
69 |
fi |
70 |
|
71 |
- # drop the x32 stuff once 4.7 goes stable |
72 |
- if [[ ${CTARGET} != x86_64* ]] || ! has x32 $(get_all_abis TARGET) ; then |
73 |
- EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch" |
74 |
- fi |
75 |
- |
76 |
- toolchain_src_prepare |
77 |
- |
78 |
use vanilla && return 0 |
79 |
|
80 |
[[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch |