public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] undefined reference to `environment'
@ 2017-08-28 22:59 Joe Hershberger
  2017-08-29 20:16 ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2017-08-28 22:59 UTC (permalink / raw)
  To: u-boot

Hi Simon / Tom,

It seems the SH4 build is failing with the current trunk. Or at least
my test build is failing and the change seems to have nothing to do
with the failure.

https://travis-ci.org/jhershbe/u-boot/jobs/269330102

Cheers,
-Joe

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-28 22:59 [U-Boot] undefined reference to `environment' Joe Hershberger
@ 2017-08-29 20:16 ` Simon Glass
  2017-08-29 20:20   ` Thomas Petazzoni
  2017-08-29 20:50   ` Thomas Petazzoni
  0 siblings, 2 replies; 9+ messages in thread
From: Simon Glass @ 2017-08-29 20:16 UTC (permalink / raw)
  To: u-boot

+Thomas

Hi Joe,

On 29 August 2017 at 06:59, Joe Hershberger <joe.hershberger@ni.com> wrote:
> Hi Simon / Tom,
>
> It seems the SH4 build is failing with the current trunk. Or at least
> my test build is failing and the change seems to have nothing to do
> with the failure.
>
> https://travis-ci.org/jhershbe/u-boot/jobs/269330102

A bisect shows this came in with:

f40ad66f (refs/bisect/bad) arch/sh: don't bring common/env_embedded.o
into the link

Thomas, could you please take a look?

>
> Cheers,
> -Joe

Regards,
Simon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 20:16 ` Simon Glass
@ 2017-08-29 20:20   ` Thomas Petazzoni
  2017-08-29 20:50   ` Thomas Petazzoni
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2017-08-29 20:20 UTC (permalink / raw)
  To: u-boot

Hello,

On Wed, 30 Aug 2017 04:16:39 +0800, Simon Glass wrote:

> Hi Joe,
> 
> On 29 August 2017 at 06:59, Joe Hershberger <joe.hershberger@ni.com> wrote:
> > Hi Simon / Tom,
> >
> > It seems the SH4 build is failing with the current trunk. Or at least
> > my test build is failing and the change seems to have nothing to do
> > with the failure.
> >
> > https://travis-ci.org/jhershbe/u-boot/jobs/269330102  
> 
> A bisect shows this came in with:
> 
> f40ad66f (refs/bisect/bad) arch/sh: don't bring common/env_embedded.o
> into the link
> 
> Thomas, could you please take a look?

Sure, I'll have a look. I guess I should be able to reproduce by
building ms7722se_defconfig ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 20:16 ` Simon Glass
  2017-08-29 20:20   ` Thomas Petazzoni
@ 2017-08-29 20:50   ` Thomas Petazzoni
  2017-08-29 21:18     ` Tom Rini
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-08-29 20:50 UTC (permalink / raw)
  To: u-boot

Hello,

On Wed, 30 Aug 2017 04:16:39 +0800, Simon Glass wrote:

> A bisect shows this came in with:
> 
> f40ad66f (refs/bisect/bad) arch/sh: don't bring common/env_embedded.o
> into the link
> 
> Thomas, could you please take a look?

env/embedded.o is missing in the link. It is added to extra-y by:

extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o

I dumped extra-y right after this line, and it does contain embedded.o.
However, it does not get added to the link stage.

Why is this an extra-$() rather than an obj-$() ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 20:50   ` Thomas Petazzoni
@ 2017-08-29 21:18     ` Tom Rini
  2017-08-29 22:07       ` Thomas Petazzoni
  2017-09-13 22:29       ` Thomas Petazzoni
  0 siblings, 2 replies; 9+ messages in thread
From: Tom Rini @ 2017-08-29 21:18 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 29, 2017 at 4:50 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 30 Aug 2017 04:16:39 +0800, Simon Glass wrote:
>
>> A bisect shows this came in with:
>>
>> f40ad66f (refs/bisect/bad) arch/sh: don't bring common/env_embedded.o
>> into the link
>>
>> Thomas, could you please take a look?
>
> env/embedded.o is missing in the link. It is added to extra-y by:
>
> extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o
>
> I dumped extra-y right after this line, and it does contain embedded.o.
> However, it does not get added to the link stage.
>
> Why is this an extra-$() rather than an obj-$() ?

So there's something extra funny going on in the linking.  See
https://patchwork.ozlabs.org/patch/806263/ which I have included, but
haven't been able to push out.

-- 
Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 21:18     ` Tom Rini
@ 2017-08-29 22:07       ` Thomas Petazzoni
  2017-08-30  1:50         ` Bin Meng
  2017-09-13 22:29       ` Thomas Petazzoni
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-08-29 22:07 UTC (permalink / raw)
  To: u-boot

Hello,

On Tue, 29 Aug 2017 17:18:24 -0400, Tom Rini wrote:

> So there's something extra funny going on in the linking.  See
> https://patchwork.ozlabs.org/patch/806263/ which I have included, but
> haven't been able to push out.

At this point, I don't think it's the correct fix. I don't see why it
should be the responsibility of the linker script to include
env/embedded.o. Almost no other architecture has env/embedded.o
referenced in its linker script. Only a few m68k platforms, with custom
linker script in their include/configs/.h file include env/embedded.o
in their linker script, plus one Freescale platform.

Again, changing extra- to obj- in env/Makefile also fixes the issue.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 22:07       ` Thomas Petazzoni
@ 2017-08-30  1:50         ` Bin Meng
  0 siblings, 0 replies; 9+ messages in thread
From: Bin Meng @ 2017-08-30  1:50 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 30, 2017 at 6:07 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 29 Aug 2017 17:18:24 -0400, Tom Rini wrote:
>
>> So there's something extra funny going on in the linking.  See
>> https://patchwork.ozlabs.org/patch/806263/ which I have included, but
>> haven't been able to push out.
>
> At this point, I don't think it's the correct fix. I don't see why it
> should be the responsibility of the linker script to include
> env/embedded.o. Almost no other architecture has env/embedded.o
> referenced in its linker script. Only a few m68k platforms, with custom
> linker script in their include/configs/.h file include env/embedded.o
> in their linker script, plus one Freescale platform.
>
> Again, changing extra- to obj- in env/Makefile also fixes the issue.

Yep, looks to me obj- is the correct way to fix.

Regards,
Bin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-08-29 21:18     ` Tom Rini
  2017-08-29 22:07       ` Thomas Petazzoni
@ 2017-09-13 22:29       ` Thomas Petazzoni
  2017-09-14  2:42         ` Tom Rini
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-09-13 22:29 UTC (permalink / raw)
  To: u-boot

Hello,

On Tue, 29 Aug 2017 17:18:24 -0400, Tom Rini wrote:

> > env/embedded.o is missing in the link. It is added to extra-y by:
> >
> > extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o
> >
> > I dumped extra-y right after this line, and it does contain embedded.o.
> > However, it does not get added to the link stage.
> >
> > Why is this an extra-$() rather than an obj-$() ?  
> 
> So there's something extra funny going on in the linking.  See
> https://patchwork.ozlabs.org/patch/806263/ which I have included, but
> haven't been able to push out.

How did you end up solving this problem? As I said, I don't think
https://patchwork.ozlabs.org/patch/806263/ is the correct solution.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] undefined reference to `environment'
  2017-09-13 22:29       ` Thomas Petazzoni
@ 2017-09-14  2:42         ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2017-09-14  2:42 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 14, 2017 at 12:29:11AM +0200, Thomas Petazzoni wrote:

> Hello,
> 
> On Tue, 29 Aug 2017 17:18:24 -0400, Tom Rini wrote:
> 
> > > env/embedded.o is missing in the link. It is added to extra-y by:
> > >
> > > extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o
> > >
> > > I dumped extra-y right after this line, and it does contain embedded.o.
> > > However, it does not get added to the link stage.
> > >
> > > Why is this an extra-$() rather than an obj-$() ?  
> > 
> > So there's something extra funny going on in the linking.  See
> > https://patchwork.ozlabs.org/patch/806263/ which I have included, but
> > haven't been able to push out.
> 
> How did you end up solving this problem? As I said, I don't think
> https://patchwork.ozlabs.org/patch/806263/ is the correct solution.

It wasn't my favorite patch but I wouldn't have let the original in if
I had noticed the fail-to-build in the first place.  So coming up with a
better rework (and understanding of) why only that combination of
settings was failing without forcing env/embedded.o being linked in is
on the TODO list somewhere.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170913/dd5cb280/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-09-14  2:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28 22:59 [U-Boot] undefined reference to `environment' Joe Hershberger
2017-08-29 20:16 ` Simon Glass
2017-08-29 20:20   ` Thomas Petazzoni
2017-08-29 20:50   ` Thomas Petazzoni
2017-08-29 21:18     ` Tom Rini
2017-08-29 22:07       ` Thomas Petazzoni
2017-08-30  1:50         ` Bin Meng
2017-09-13 22:29       ` Thomas Petazzoni
2017-09-14  2:42         ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox