mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andre Naujoks <nautsch2@googlemail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: barebox compilation with gcc 4.5.2 and ptxdist
Date: Thu, 28 Jul 2011 15:15:34 +0200	[thread overview]
Message-ID: <4E3160F6.3090105@googlemail.com> (raw)
In-Reply-To: <20110728115234.GV20587@pengutronix.de>

Am 28.07.2011 13:52, schrieb Sascha Hauer:
> On Wed, Jul 27, 2011 at 11:50:12AM +0200, Andre Naujoks wrote:
>> Am 27.07.2011 08:40, schrieb Andre Naujoks:
>>> Am 26.07.2011 16:20, schrieb Marc Kleine-Budde:
>>>> On 07/26/2011 03:56 PM, Andre Naujoks wrote:
>>>>> Hello.
>>>>>
>>>>> We are currently trying to compile a barebox with the git version of
>>>>> ptxdist and the git version of the OSELAS generic Toolchain for powerpc.
>>>>>
>>>>> Also the current 2011.07.0 release of barebox.
>>>>>
>>>>> We are having some problems during the build, which I think are a result
>>>>> of some changes in gcc's optimizations (since 4.4.something). GCC uses
>>>>> some functions on the ppc platform to optimze the size of the resulting
>>>>> binary, which are only present in the libgcc.a.
>>>>>
>>>>> The compile stage works fine up tp the last linker step:
>>>>>
>>>>>   CC      arch/ppc/lib/time.o
>>>>>   AS      arch/ppc/lib/misc.o
>>>>>   CC      arch/ppc/lib/ppclinux.o
>>>>>   CC      arch/ppc/lib/board_data.o
>>>>>   LD      arch/ppc/lib/built-in.o
>>>>>   LD      barebox
>>>>> common/built-in.o: In function `mapset':
>>>>> hush.c:(.text.mapset+0x44): undefined reference to `_restgpr_30_x'
>>>>> common/built-in.o: In function `syntax_err':
>>>>> hush.c:(.text.syntax_err+0x34): undefined reference to `_restgpr_30_x'
>>>>> common/built-in.o: In function `done_command':
>>>>> hush.c:(.text.done_command+0x94): undefined reference to `_restgpr_29_x'
>>>>> common/built-in.o: In function `done_pipe':
>>>>> hush.c:(.text.done_pipe+0x5c): undefined reference to `_restgpr_29_x'
>>>>> common/built-in.o: In function `is_assignment':
>>>>> hush.c:(.text.is_assignment+0x8c): undefined reference to `_restgpr_27_x'
>>>>> common/built-in.o: In function `b_addchr':
>>>>> hush.c:(.text.b_addchr+0x8c): undefined reference to `_restgpr_28_x'
>>>>> common/built-in.o: In function `b_addqchr':
>>>>> hush.c:(.text.b_addqchr+0x78): undefined reference to `_restgpr_29_x'
>>>>> ...
>>>>>
>>>>>
>>>>> This goes on for a few pages.
>>>>>
>>>>> As far as I can see, the possibilities I have here, is to either
>>>>> integrate the missing functions out of the gcc sources into barebox, or
>>>>> make barebox link with libgcc, which seems surprisingly difficult, due
>>>>> to the unfamiliar (to me) build process. A simple LDFLAGS_barebox+=-l..
>>>>> -L.. did not help here.
>>>>>
>>>>> Am I right with this assumption, or am I missing something else here?
>>>>
>>>> We don't want to link barebox against libgcc, that's bad style. I
>>>> suggest to port arch/powerpc/lib/crtsavres.S from the linux kernel to
>>>> barebox.
>>>
>>> Thanks. I will give this a shot and see how far I get. If it works I
>>> will come back with a patch.
>>
>> Hi.
>>
>> With a little help from a collegue, we came up with the patches in the
>> followong mails. Basically the kernel files without the 64 bit parts.
>>
>> The second patch was another part of libgcc, which seemed to fit best in
>> the misc.S file, which was already present.
> 
> Applied to -master.

Thats great. Thanks!

Andre

> 
> Thanks
>  Sascha
> 


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2011-07-28 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 13:56 Andre Naujoks
2011-07-26 14:20 ` Marc Kleine-Budde
2011-07-26 14:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-27  6:40   ` Andre Naujoks
2011-07-27  9:50     ` Andre Naujoks
2011-07-27  9:51       ` [PATCH 1/2] " Andre Naujoks
2011-07-27  9:53         ` Andre Naujoks
2011-07-27  9:51       ` [PATCH 2/2] " Andre Naujoks
2011-07-28 11:52       ` Sascha Hauer
2011-07-28 13:15         ` Andre Naujoks [this message]

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=4E3160F6.3090105@googlemail.com \
    --to=nautsch2@googlemail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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