From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/swupdate: fix build issue with some toolchains
Date: Tue, 27 Oct 2015 09:04:02 +0100 [thread overview]
Message-ID: <1445933042.18019.8.camel@embedded.rocks> (raw)
In-Reply-To: <20151026230404.1501048e@free-electrons.com>
Dear Thomas,
On Mo, 2015-10-26 at 23:04 +0100, Thomas Petazzoni wrote:
> Dear J?rg Krause,
>
> On Mon, 26 Oct 2015 22:15:51 +0100, J?rg Krause wrote:
>
> > +# Using 'ld' directly for the 'builtin-target' in Makefile.build
> > to compile a
> > +# set of object files into one object file does not work for some
> > toolchains
> > +# (x86_64 and mips64) leading to different kind of relocation
> > errors. By
> > +# passing the below values for 'LD' and 'ldflags-y', we ensure
> > that 'gcc' is
> > +# used to compile the 'builtin-target' target.
> > ?define SWUPDATE_BUILD_CMDS
> > - $(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D)
> > + $(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) \
> > + LD="$(TARGET_CC)" ldflags-y="-Wl,-r -nostdlib"
> > ?endef
>
> But shouldn't upstream be fixed to use gcc instead of ld? Using ld
> directly is normally not a good idea.
On second thought, yes.
swupdate uses simplified Kbuild files from the Linux Kernel so I was
not sure about touching the existing Makefiles. But there are some
benefits to prefer gcc over ld for partial linking.
I'll prepare a patch for upstream. Usually, Stefano (swupdate
maintainer) reviews patches near-time. If he accepts, we can backport
from upstream, right?
Best regards
J?rg Krause
next prev parent reply other threads:[~2015-10-27 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 21:15 [Buildroot] [PATCH 1/1] package/swupdate: fix build issue with some toolchains Jörg Krause
2015-10-26 22:04 ` Thomas Petazzoni
2015-10-27 8:04 ` Jörg Krause [this message]
2015-10-27 8:26 ` Thomas Petazzoni
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=1445933042.18019.8.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=buildroot@busybox.net \
/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