From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/nand spl: link libgcc
Date: Tue, 14 Dec 2010 00:16:28 +0100 [thread overview]
Message-ID: <20101213231629.0478AD172D3@gemini.denx.de> (raw)
In-Reply-To: <20101210230051.GA30739@udp111988uds.am.freescale.net>
Dear Scott Wood,
In message <20101210230051.GA30739@udp111988uds.am.freescale.net> you wrote:
> Recent GCC (4.4+) performs out-of-line epilogues in some cases, when
> optimizing for size. It causes a link error for _restgpr_30_x (and similar)
> if libgcc is not linked.
>
> It actually increases size with very small binaries, due to the fixed size
> of the out-of-line code, and not having any functions that actually need to
> restore more than 2 or 3 registers. But I don't see a way to turn it off,
> other than asking GCC to optimize for speed -- which may also increase
> size for some boards.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> nand_spl/board/amcc/acadia/Makefile | 2 +-
> nand_spl/board/amcc/bamboo/Makefile | 2 +-
> nand_spl/board/amcc/canyonlands/Makefile | 2 +-
> nand_spl/board/amcc/kilauea/Makefile | 2 +-
> nand_spl/board/amcc/sequoia/Makefile | 2 +-
> nand_spl/board/freescale/mpc8313erdb/Makefile | 2 +-
> nand_spl/board/freescale/mpc8315erdb/Makefile | 2 +-
> nand_spl/board/sheldon/simpc8313/Makefile | 2 +-
> 8 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/nand_spl/board/amcc/acadia/Makefile b/nand_spl/board/amcc/acadia/Makefile
> index bee24bc..f8ca654 100644
> --- a/nand_spl/board/amcc/acadia/Makefile
> +++ b/nand_spl/board/amcc/acadia/Makefile
> @@ -51,7 +51,7 @@ $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
> $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
>
> $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
> - cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
> + cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
> -Map $(nandobj)u-boot-spl.map \
> -o $(nandobj)u-boot-spl
Just two questions:
Q1: Are we sure that the observed behaviour is intentional, and not
eventually unintended behaviour (well, a bug) in the new versions
of GCC? In general newer releases are supposed to provide better
optimization, but with GCC regressions seem to be more common?
Q2: What happens with older compilers, that don't need this? Is this
change a No-Op for these?
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
"It was the Law of the Sea, they said. Civilization ends at the wa-
terline. Beyond that, we all enter the food chain, and not always
right at the top." - Hunter S. Thompson
next prev parent reply other threads:[~2010-12-13 23:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-10 23:00 [U-Boot] [PATCH] powerpc/nand spl: link libgcc Scott Wood
2010-12-13 23:06 ` Kim Phillips
2010-12-14 8:09 ` Stefan Roese
2010-12-14 9:44 ` Wolfgang Denk
2010-12-13 23:16 ` Wolfgang Denk [this message]
2010-12-13 23:49 ` Scott Wood
2010-12-14 8:09 ` Stefan Roese
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=20101213231629.0478AD172D3@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