This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [09/25] Specs cleanup: CRIS
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: gcc-patches at gcc dot gnu dot org, hp at axis dot com
- Date: Fri, 14 Jan 2011 18:08:42 +0000 (UTC)
- Subject: Re: [09/25] Specs cleanup: CRIS
- References: <201101140132.p0E1WOKN019853@ignucius.se.axis.com>
On Fri, 14 Jan 2011, Hans-Peter Nilsson wrote:
> > * cris/linux.h had specs passing -rpath-link options in some cases
> > (-B, or not -nostdlib). This is not needed for any properly
> > configured cross toolchain (for GNU/Linux targets, that means using
> > a sysroot).
>
> A sysroot configuration is not (should not be) mandatory for a
> working cross-toolchain; no particular configure options at all
> should be needed besides the --target option. I understand
> the confusion seeing that "down" in a port though. I traced
> this to
> <http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01004.html>.
Since glibc installs a linker script as libc.so, with absolute paths in it
that need to be interpreted relative to the sysroot, you're not going to
have non-sysroot configurations working well without editing that linker
script at least.
> > And if it were appropriate, it should be done for all
> > GNU/Linux targets since there is nothing meaningfully CRIS-specific
> > about it.
>
> Definitely. I think there should be a generic GNU/Linux
> "%{B*:-rpath-link %* }".
Whereas I think there should be no specs conditional on -B options at all.
That's the wrong level for -B options to operate. They change various
paths in gcc.c, and those paths are then used to determine the expansion
of specs such as %D. It's quite possible something should output
-rpath-link options in some cases - but this should be using the paths in
gcc.c, independent of whether they came from -B options, rather than a
%{B*:} spec.
--
Joseph S. Myers
joseph@codesourcery.com