Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 15/17] busybox: Use CC instead of bare LD to be the Linker
Date: Tue, 01 Sep 2015 22:17:34 +0100	[thread overview]
Message-ID: <1441142254.24871.22.camel@linuxfoundation.org> (raw)
In-Reply-To: <96e447b0dad1a139b68ee85780055379147ba40f.1440446289.git.raj.khem@gmail.com>

On Mon, 2015-08-24 at 13:03 -0700, Khem Raj wrote:
> This patch was on mailing list, another patch to make sure -r is not
> passed directly but via -Wl switch is added.
> 
> This was exposed when using clang and gold linker, clang does not have
> -r switch to do relocatable objects and problem happens specific to OE
> becuase we use LD = CC
> 
> now what happens is that busybox assumes that linker will be called
> directly, and hence sprinkles linkers options in its kbuild system which
> aggregate into LDFLAGS, some of these options are happily ignored by gcc
> as well but it passes -r options rightly to linker so it all works,
> however when using clang, this falls apart since -r is not known option
> for clang so it drops this option and all obects which should be
> partially linked becomes ET_EXEC and when they are added to final link
> then gold starts to get confused
> 
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld:
> error: applets/built-in.o: unsupported ELF file type 2
> clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

This breaks DISTRO=poky-lsb:

http://errors.yoctoproject.org/Errors/Details/15705/

(searching for busybox shows many other versions of this too)

Cheers,

Richard



  reply	other threads:[~2015-09-01 21:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 20:03 [PATCH 00/17] systemd upgrade, distribute->setuptools and clang fixes Khem Raj
2015-08-24 20:03 ` [PATCH 01/17] systemd: Upgrade 219 -> 224 Khem Raj
2015-09-01 21:15   ` Richard Purdie
2015-09-01 23:45     ` Khem Raj
2015-09-02  7:15       ` Richard Purdie
2015-08-24 20:03 ` [PATCH 02/17] core-image-minimal: Add 4M extra space when using systemd Khem Raj
2015-08-24 20:03 ` [PATCH 03/17] systemd: Cache/define tool paths for target Khem Raj
2015-08-24 20:03 ` [PATCH 04/17] kernel-arch: Force BFD kernel when using gcc for linking Khem Raj
2015-08-24 20:03 ` [PATCH 05/17] sysvinit: Fix makefile bug found with clang Khem Raj
2015-08-24 20:03 ` [PATCH 06/17] alsa-lib: Lift the limitation to use gcc only cross compiler Khem Raj
2015-08-24 20:03 ` [PATCH 07/17] json-c: Include math_compat.c for NAN/INF values Khem Raj
2015-08-24 20:03 ` [PATCH 08/17] libvorbis: Update libvorbis_1.3.4.bb -> libvorbis_1.3.5.bb Khem Raj
2015-08-24 20:03 ` [PATCH 09/17] psplash: Turn psplash_fb_plot_pixel() into static inline Khem Raj
2015-08-24 20:03 ` [PATCH 10/17] mdadm: Upgrade mdadm_3.3.2.bb -> mdadm_3.3.4.bb Khem Raj
2015-08-24 20:03 ` [PATCH 11/17] bitbake.conf: Define fallback DISTRO_NAME Khem Raj
2015-08-24 20:03 ` [PATCH 12/17] systemd: Remove exporting special CPP Khem Raj
2015-08-24 20:03 ` [PATCH 13/17] diffstat: Add TOOLCHAIN_OPTIONS to Linker calls Khem Raj
2015-08-24 20:03 ` [PATCH 14/17] liburcu: Fix atomic function parameter types in calls Khem Raj
2015-08-24 20:03 ` [PATCH 15/17] busybox: Use CC instead of bare LD to be the Linker Khem Raj
2015-09-01 21:17   ` Richard Purdie [this message]
2015-09-01 23:55     ` Khem Raj
2015-09-09  5:55       ` Khem Raj
2015-08-24 20:03 ` [PATCH 16/17] python-distribute, python-setuptools: Migrate to good old python-setuptools Khem Raj
2015-08-25 16:26   ` Burton, Ross
2015-08-25 17:55     ` Khem Raj
2015-08-25 19:06     ` Khem Raj
2015-08-25 20:34     ` Khem Raj
2015-08-25 20:46       ` Richard Purdie
2015-08-25 21:35         ` Khem Raj
2015-08-26  1:45     ` Khem Raj
2015-08-24 20:03 ` [PATCH 17/17] classes, conf: Remove python-distribute refrences Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441142254.24871.22.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox