diff options
author | gary.robertson@linaro.org <gary.robertson@linaro.org> | 2015-04-13 23:19:00 -0500 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2015-08-03 09:06:59 -0700 |
commit | 6d78face5638608c538748977824550e73f5d2e3 (patch) | |
tree | c32fa3a18f9ab79533ee51aa1c4f389b6f394378 | |
parent | 1235f48667b4876add09f062b40891ac85c7a782 (diff) | |
download | meta-openembedded-6d78face5638608c538748977824550e73f5d2e3.tar.gz |
libhugetlbfs: x86 - don't link against host libs
An earlier patch from Chunrong Guo <B40290@freescale.com> fixed the
linker command scripts in ldscripts to comment out hard-coded paths
for the linker search directories. This allows the command line
to specifiy the proper paths without being overridden.
However, the 32-bit ix86 scripts evidently were added after this
earlier patch was created and were not corrected by it - so here
we simply duplicate the technique in the earlier patch and extend it
to correct the linker scripts for 32-bit ix86 builds.
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch | 48 | ||||
-rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch new file mode 100644 index 000000000..959574ed3 --- /dev/null +++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-x86-avoid-host-library-search-in-cross-dev.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From b028ae9f43111677056f2661c800096f1994b687 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Gary S. Robertson" <gary.robertson@linaro.org> | ||
3 | Date: Mon, 13 Apr 2015 14:41:15 -0500 | ||
4 | Subject: [PATCH] libhugetlbfs: x86 avoid host library search in cross-dev | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe-core specific] | ||
7 | |||
8 | The ldscripts for 32-bit ix86 architectures were not corrected by the earlier | ||
9 | patch from Chunrong Guo <B40290@freescale.com>... presumably they were added | ||
10 | after that patch was created. Here we extend the same technique to include | ||
11 | the 32-bit ix86 linker scripts, so the command line variables can set the | ||
12 | linker search directories rather than using hard-coded paths in the ldscripts. | ||
13 | |||
14 | Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> | ||
15 | --- | ||
16 | ldscripts/elf_i386.xB | 2 +- | ||
17 | ldscripts/elf_i386.xBDT | 2 +- | ||
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/ldscripts/elf_i386.xB b/ldscripts/elf_i386.xB | ||
21 | index 43fe51c..b852781 100644 | ||
22 | --- a/ldscripts/elf_i386.xB | ||
23 | +++ b/ldscripts/elf_i386.xB | ||
24 | @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", | ||
25 | "elf32-i386") | ||
26 | OUTPUT_ARCH(i386) | ||
27 | ENTRY(_start) | ||
28 | -SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); | ||
29 | +/*SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ | ||
30 | INPUT(-lhugetlbfs); | ||
31 | /* Do we need any of these for elf? | ||
32 | __DYNAMIC = 0; */ | ||
33 | diff --git a/ldscripts/elf_i386.xBDT b/ldscripts/elf_i386.xBDT | ||
34 | index d72aebe..b25e225 100644 | ||
35 | --- a/ldscripts/elf_i386.xBDT | ||
36 | +++ b/ldscripts/elf_i386.xBDT | ||
37 | @@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", | ||
38 | "elf32-i386") | ||
39 | OUTPUT_ARCH(i386) | ||
40 | ENTRY(_start) | ||
41 | -SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); | ||
42 | +/*SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");*/ | ||
43 | INPUT(-lhugetlbfs); | ||
44 | /* Do we need any of these for elf? | ||
45 | __DYNAMIC = 0; */ | ||
46 | -- | ||
47 | 1.9.1 | ||
48 | |||
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index f05229be5..3b8612fb7 100644 --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | |||
@@ -22,6 +22,7 @@ SRC_URI = " \ | |||
22 | file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ | 22 | file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ |
23 | file://0001-Extend-arm32-support-to-include-BE-variants.patch \ | 23 | file://0001-Extend-arm32-support-to-include-BE-variants.patch \ |
24 | file://0001-Makefile-Recognize-all-ix86-arches.patch \ | 24 | file://0001-Makefile-Recognize-all-ix86-arches.patch \ |
25 | file://0001-x86-avoid-host-library-search-in-cross-dev.patch \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | S = "${WORKDIR}/git" | 28 | S = "${WORKDIR}/git" |