Link tests after GCC_NO_EXECUTABLES

Rask Ingemann Lambertsen rask@sygehus.dk
Wed Nov 28 16:06:00 GMT 2007


On Wed, Nov 28, 2007 at 08:10:18AM +0000, Richard Sandiford wrote:
> 
> This may no longer be relevant given the rest of the thread, but for the
> record: what you describe is indeed how things used to work before the
> libtool upgrade.  (Although as Rask points out, linking never actually
> failed for "int main () { return 0; }" without a -T option for MIPS;
> it just gave a warning that __start was undefined and that the entry
> point was being set to some built-in value.  I think both Dan and I
> thought it should be an error instead, but that didn't fly...)

This is the error message (which we still get):
warning: cannot find entry symbol _start; defaulting to 0000000000400040

> However, with the libtool upgrade, the shl_load test failed for MIPS
> in the same way as it did for Bernd on Blackfin.  Rask got around this
> by adding a "-T" option for the simulator board in top-level configure.

   Not quite; I arranged for configure to add -L and -B options pointing
into the newlib, libgloss and libgloss/cpu directories when configuring
subdirectories, and it happens only if you build newlib. If you get a link
error with the default -T option, there's still no dice. sparc-unknown-elf
is an example of such a target, but most *-elf targets build out of the box
as long as they can find their newlib and libgloss bits.

> I still object to this approach for the reasons we discussed before,
> but I didn't have time to come up with an alternative of my own,
> so I didn't make a fuss.  It did at least get an unpatched libstdc++-v3
> building again.

   It is not just libstdc++-v3, it is also libgfortran, libobjc, libjava and
libffi. Maybe also libssp and libiberty.

> If Jie has a patch that gets us around the shl_load failure, I'd be glad
> for us to go that route, and go back to not using the -T simulator options,
> if that's possible.  Especially if we can do it before 4.3 is out, since
> 4.3 will then keep to the precedent set by earlier releases, and not set
> a new precedent of its own.

   I'm not against it in principle, but in practice, configuring target
libraries without linking is very fragile and has been broken more often
than not. Unless someone voluteers to battle with autoconf and libtool every
time it breaks, I'd very much prefer to keep the -L and -B options.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year



More information about the Gcc-patches mailing list