Patchworkβ [oe,05/12] no need to set LD nowadays

login
register
about
Submitter Bernhard Reutner-Fischer
Date 2010-02-08 21:14:26
Message ID <1265663673-16312-6-git-send-email-rep.dot.nop@gmail.com>
Download mbox | patch
Permalink /patch/1550/
State Changes Requested
Headers show

Comments

Bernhard Reutner-Fischer - 2010-02-08 21:14:26
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 recipes/busybox/busybox.inc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Phil Blundell - 2010-02-08 21:56:26
On Mon, 2010-02-08 at 22:14 +0100, Bernhard Reutner-Fischer wrote:
>  # Use gcc for linking so LDFLAGS actually makes sense
> -LD = "${CC} -nostdlib"
> +#LD = "${CC} -nostdlib"
>  

Thanks for the patch.  When you say "nowadays", do you know which actual
versions of busybox this is true for?  Is this definitely correct for
all the versions that we have in the .dev tree?

Also, if that line is genuinely no longer required, you might as well
just delete it.  There is no point in leaving commented-out cruft in
these recipes indefinitely.

p.
Koen Kooi - 2010-02-09 08:10:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08-02-10 22:14, Bernhard Reutner-Fischer wrote:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
>  recipes/busybox/busybox.inc |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
> index 7f67f47..c80b3bd 100644
> --- a/recipes/busybox/busybox.inc
> +++ b/recipes/busybox/busybox.inc
> @@ -66,7 +66,7 @@ RDEPENDS_${PN}-syslog += "${PN}"
>  RDEPENDS_${PN}-udhcpd += "${PN}"
>  
>  # Use gcc for linking so LDFLAGS actually makes sense
> -LD = "${CC} -nostdlib"
> +#LD = "${CC} -nostdlib"

We have an scm, so you can just delete both the statement and comment.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLcRh2MkyGM64RGpERApVjAJ0X74dRU/v8yAyQvqhcqrCz9v1LwgCfZ52X
tRQfra5kwqse4cUBbK04+60=
=q9ca
-----END PGP SIGNATURE-----
Bernhard Reutner-Fischer - 2010-02-09 08:50:19
On Mon, Feb 08, 2010 at 09:56:26PM +0000, Phil Blundell wrote:
>On Mon, 2010-02-08 at 22:14 +0100, Bernhard Reutner-Fischer wrote:
>>  # Use gcc for linking so LDFLAGS actually makes sense
>> -LD = "${CC} -nostdlib"
>> +#LD = "${CC} -nostdlib"
>>  
>
>Thanks for the patch.  When you say "nowadays", do you know which actual
>versions of busybox this is true for?  Is this definitely correct for

busybox >= 1.4.0 switched to kbuild, i.e.
make CROSS_COMPILE=alpha-linux- EXTRA_CFLAGS=-fwhatever \
EXTRA_LDFLAGS=-Wl,--warn-multiple-gp

For the usual case you'd either set CONFIG_CROSS_COMPILER_PREFIX in the
.config or pass CC down to make.

If you happen to have an odd host compiler then you want those too:
HOSTCC=ccc HOSTCFLAGS="-ieee" make ....

>all the versions that we have in the .dev tree?

It seems that the .dev tree has 1.2.1, 1.2.2, 1.3.1 still in there but
i, personally would strongly advise against using those (same for the
standalone tinylogin, but that's a different thing and not relevant
right now).
>
>Also, if that line is genuinely no longer required, you might as well
>just delete it.  There is no point in leaving commented-out cruft in
>these recipes indefinitely.

The ancient cruft versions made me leave in that comment.
Phil Blundell - 2010-02-09 08:56:50
On Tue, 2010-02-09 at 09:50 +0100, Bernhard Reutner-Fischer wrote:
> It seems that the .dev tree has 1.2.1, 1.2.2, 1.3.1 still in there but
> i, personally would strongly advise against using those (same for the
> standalone tinylogin, but that's a different thing and not relevant
> right now).

As long as those versions are there, I don't think it would be
acceptable to check in a patch to busybox.inc which would delete them.
Leaving the ${LD} setting as a comment doesn't really help with that.

If you wanted to generate a new patch which added the ${LD} setting to
the individual recipes that still require it, and simultaneously delete
it from busybox.inc, then I think that would be fine. 

p.
Bernhard Reutner-Fischer - 2010-02-10 16:48:29
On Tue, Feb 09, 2010 at 08:56:50AM +0000, Phil Blundell wrote:
>On Tue, 2010-02-09 at 09:50 +0100, Bernhard Reutner-Fischer wrote:
>> It seems that the .dev tree has 1.2.1, 1.2.2, 1.3.1 still in there but
>> i, personally would strongly advise against using those (same for the
>> standalone tinylogin, but that's a different thing and not relevant
>> right now).
>
>As long as those versions are there, I don't think it would be
>acceptable to check in a patch to busybox.inc which would delete them.
>Leaving the ${LD} setting as a comment doesn't really help with that.
>
>If you wanted to generate a new patch which added the ${LD} setting to
>the individual recipes that still require it, and simultaneously delete
>it from busybox.inc, then I think that would be fine. 

Ack, i retract this patch for now.
Thanks,

Patch

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 7f67f47..c80b3bd 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -66,7 +66,7 @@  RDEPENDS_${PN}-syslog += "${PN}"
 RDEPENDS_${PN}-udhcpd += "${PN}"
 
 # Use gcc for linking so LDFLAGS actually makes sense
-LD = "${CC} -nostdlib"
+#LD = "${CC} -nostdlib"
 
 inherit cml1 update-rc.d
 
@@ -78,6 +78,7 @@  do_configure () {
 
 do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS
+	export EXTRA_CFLAGS="$CFLAGS"
 	base_do_compile
 }