aboutsummaryrefslogtreecommitdiffstats
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 14:53:29 +0100
commitfdfff57304e6641ef5a8db0fb456bfd46bf1e2dd (patch)
tree82fef3e29a107980049b69c4d0c7aec7abc3fc67 /meta/recipes-core
parent088d2f0185da6648305b4719ee9cb0d2f2b37c6f (diff)
downloadopenembedded-core-fdfff57304e6641ef5a8db0fb456bfd46bf1e2dd.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. 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 @@
+From 28389e59701c2408e87e886c358f8e1766c677f7 Mon Sep 17 00:00:00 2001
+From: Drew Moseley <drew_moseley@mentor.com>
+Date: Sat, 29 Mar 2014 11:13:16 -0400
+Subject: [PATCH] build system: Specify '-nostldlib' when linking to .o files.
+
+For certain cross build scenarios the LD variable is overridden
+to use the gcc executive to ensure all the target tuning parameters
+are used. In these cases, the executive errors out as shown below
+but since this step is only linking to a .o file the standard libs
+are not needed.
+
+ $ make LD=gcc applets/built-in.o
+ LD applets/built-in.o
+ /usr/bin/ld: cannot find -lgcc_s
+ /usr/bin/ld: cannot find -lgcc_s
+ collect2: ld returned 1 exit status
+ make[1]: *** [applets/built-in.o] Error 1
+ make: *** [applets_dir] Error 2
+
+Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+---
+ scripts/Makefile.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile.build b/scripts/Makefile.build
+index 5685b5b..eba69f6 100644
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -256,7 +256,7 @@ ifdef builtin-target
+ quiet_cmd_link_o_target = LD $@
+ # If the list of objects to link is empty, just create an empty built-in.o
+ cmd_link_o_target = $(if $(strip $(obj-y)),\
+- $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\
++ $(LD) -nostdlib $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\
+ rm -f $@; $(AR) rcs $@)
+
+ $(builtin-target): $(obj-y) FORCE
+--
+1.7.9.5
+
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 \
file://inetd.conf \
file://inetd \
file://login-utilities.cfg \
+ file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
"
SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"