summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorDrew Moseley <drew_moseley@mentor.com>2014-04-03 18:39:32 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-05 23:24:01 +0100
commite4ec48a2e07e8bdc66c1c3b594208ce74f076377 (patch)
treeaafb35fea31143de6479b2e8e69c3a604677e6a9 /meta/recipes-core
parent32acba5f62106bb7c04fc3b38ea4a2f04bd0ad18 (diff)
downloadpoky-e4ec48a2e07e8bdc66c1c3b594208ce74f076377.tar.gz
busybox: Specify '-nostdlib' when linking to a .o file.
Ensure that linking to the built-in.a file uses the 'nostlib' option. Submitted to busybox mailing list here: http://lists.busybox.net/pipermail/busybox/2014-March/080730.html This has been accepted into upstream busybox so it will not be needed for future versions. (From OE-Core rev: fdfff57304e6641ef5a8db0fb456bfd46bf1e2dd) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch40
-rw-r--r--meta/recipes-core/busybox/busybox_1.22.1.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch b/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch
new file mode 100644
index 0000000000..3da38bb4ca
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch
@@ -0,0 +1,40 @@
1From 28389e59701c2408e87e886c358f8e1766c677f7 Mon Sep 17 00:00:00 2001
2From: Drew Moseley <drew_moseley@mentor.com>
3Date: Sat, 29 Mar 2014 11:13:16 -0400
4Subject: [PATCH] build system: Specify '-nostldlib' when linking to .o files.
5
6For certain cross build scenarios the LD variable is overridden
7to use the gcc executive to ensure all the target tuning parameters
8are used. In these cases, the executive errors out as shown below
9but since this step is only linking to a .o file the standard libs
10are not needed.
11
12 $ make LD=gcc applets/built-in.o
13 LD applets/built-in.o
14 /usr/bin/ld: cannot find -lgcc_s
15 /usr/bin/ld: cannot find -lgcc_s
16 collect2: ld returned 1 exit status
17 make[1]: *** [applets/built-in.o] Error 1
18 make: *** [applets_dir] Error 2
19
20Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
21---
22 scripts/Makefile.build | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/scripts/Makefile.build b/scripts/Makefile.build
26index 5685b5b..eba69f6 100644
27--- a/scripts/Makefile.build
28+++ b/scripts/Makefile.build
29@@ -256,7 +256,7 @@ ifdef builtin-target
30 quiet_cmd_link_o_target = LD $@
31 # If the list of objects to link is empty, just create an empty built-in.o
32 cmd_link_o_target = $(if $(strip $(obj-y)),\
33- $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\
34+ $(LD) -nostdlib $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\
35 rm -f $@; $(AR) rcs $@)
36
37 $(builtin-target): $(obj-y) FORCE
38--
391.7.9.5
40
diff --git a/meta/recipes-core/busybox/busybox_1.22.1.bb b/meta/recipes-core/busybox/busybox_1.22.1.bb
index ffc9435398..782752c2aa 100644
--- a/meta/recipes-core/busybox/busybox_1.22.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.22.1.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
27 file://inetd.conf \ 27 file://inetd.conf \
28 file://inetd \ 28 file://inetd \
29 file://login-utilities.cfg \ 29 file://login-utilities.cfg \
30 file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
30" 31"
31 32
32SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e" 33SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"