Can't build correctly working crosscompiler with 4.3.0. 4.2.1 worked like charm

Denys Vlasenko vda.linux@googlemail.com
Wed Apr 16 17:07:00 GMT 2008


On Wednesday 16 April 2008 17:43, Daniel Jacobowitz wrote:
> On Wed, Apr 16, 2008 at 05:21:55PM +0200, Denys Vlasenko wrote:
> > Maybe gcc can use paths relative to executable's location?
> > readlink("/proc/self/exe") and all that.
> > It will make gcc installation movable without rebuilding.
> 
> It already does.  That's exactly what the code causing you a problem
> is for.  So if you don't try to work around the lack of a feature
> which is in fact present, everything will just work :-)
> 
> It's configured to live in /usr/bin.  So from there it searches
> ../app*/lib/gcc/wherever to find cc1.  When it discovers that you ran
> it from /usr/app*/bin instead (by following the symlink to the real
> binary), it searches /usr/app*/bin/../app*/lib/gcc/wherever.  But
> cc1's not there.

Cool! Giving it a try...



Meanwhile: I decided to get rid of paths in as/ld invocations
by specifying as/ld names without any paths:

--with-gnu-ld                                   \
--with-ld="$CROSS-ld"                           \
--with-gnu-as                                   \
--with-as="$CROSS-as"                           \

and it works, I only need to patch configure to not "test x $with_ld"
as that won't work.

I tested in and it works.

The patch is below. Do you think it makes sense?
--
vda

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.2.3.with_as_ld.patch
Type: text/x-diff
Size: 1282 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080416/52dc7b62/attachment.bin>


More information about the Gcc mailing list