From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common: Link with GCC instead of LD
Date: Thu, 01 Nov 2012 01:00:04 +0100 [thread overview]
Message-ID: <20121101000004.97D43200209@gemini.denx.de> (raw)
In-Reply-To: <201211010045.40817.marex@denx.de>
Dear Marek,
In message <201211010045.40817.marex@denx.de> you wrote:
>
> > > 2) You can enable LTO eventually -- long term plan -- which proved can
> > > shrink the code size a bit
> >
> > Do you have a workign example? You know, we don;t like adding dead
> > code...
>
> We've been digging with Albert, but nothing we can release just yet. This is a
> groundwork patch.
Dead code, which will not be added, then.
> > > 3) Usage of LLVM/CLANG is now much more straightforward
> >
> > Please elucidate?
>
> Now you can simply replace gcc with clang and that _should_ work. Sure, I expect
> more work will be needed here, but this patch gives you all the ground to do
> that.
I. e. it's all speculation only? Such doesn't by much...
> > > 4) Binutils usually lag behind the GCC development a bit, by using GCC to
> > > do the link, we can remedy this problem
> >
> > Grrrrghhhg. I lost you here. By not calling ld directly (where we
> > know exactly what we are doing), but through a (somewhat unknown) GCC
> > framework, we can magicly adjust any (claimed - by you) version
> > differences? I cannot parse this.
>
> GCC can do all the optimization magic (LTO ...) and then just let linker do the
> linking.
You were talking about "Binutils usually lag behind the GCC
development". Now I would like you to explain how "by using GCC to do
the link, we can remedy this problem".
You fail to provide any such explanation.
> > > But actually, the 2) is the most important part. LTO will hopefully help
> > > us optimize U-Boot for size even better than it is now. But that will
> > > still need much more research. So this is only a patch that shall
> > > prepare the groundwork for this further research.
> >
> > As is, it's just unused or dead code that adds a lot of complexity and
> > buys nothing. Please submit as part of a patch series that makes
> > successfull (and tested) use of LTO.
>
> No, I won't, I don't have that part ready yet.
Then please _re_submit when you have the rest that actually needs any
such changes.
> Besides, the sandbox target already uses gcc linking. Shall we also convert it
> to use LD instead then ?
Note that sandbox is actually very different, in such as it really
tried to implement a standard onforming C program, running in a
standard C execution environment. This is totally different from the
bare metal code we have on any real hardware.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The most difficult thing in the world is to know how to do a thing
and to watch someone else doing it wrong, without commenting.
-- T.H. White
next prev parent reply other threads:[~2012-11-01 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 16:32 [U-Boot] [PATCH] common: Link with GCC instead of LD Marek Vasut
2012-10-31 19:51 ` Andreas Bießmann
2012-10-31 20:52 ` Marek Vasut
2012-10-31 22:36 ` Wolfgang Denk
2012-10-31 22:48 ` Tom Rini
2012-10-31 23:28 ` Wolfgang Denk
2012-10-31 23:39 ` Tom Rini
2012-10-31 22:51 ` Marek Vasut
2012-10-31 23:32 ` Wolfgang Denk
2012-10-31 23:45 ` Marek Vasut
2012-11-01 0:00 ` Wolfgang Denk [this message]
2012-11-01 0:06 ` Marek Vasut
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=20121101000004.97D43200209@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/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