Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FreeBSD/Linux Cross Compiler FUBAR




I think I found it... with Linux, anyway /lib/libc.so is a text file with
pointers to some relevant bits.  once I installed the libfiles from my
redhat box onto the freebsd machine in /usr/local/i386-redhat-linux/lib, I
needed to edit the libc.so in there and change the paths.  That fixed most
of it.

Also, with gcc, you have to:

./configure --target=i386-redhat-linux
--with-local-prefix=/usr/local/i386-redhat-linux

that seems to get through to the point where one of the gcc configure
scripts actually says, "cannot run test program while cross compiling" !!

bah, bah BAH gcc.  now I'll have to go in and play with the configure script
to get it past that point... I wonder if I'm still missing something, or
what?  the with-local-prefix thing wasn't in gnu's crosscompiler
instructions (what little there is), and neither is this.

I'll post a full writeup when I finally make it all work.

-----------------------------------------------------
Scott M. Stone <sstone@example.com>
Senior Technical Consultant - UNIX and Networking
Taos, the Sysadmin Company - Santa Clara, CA


-----Original Message-----
From: Stephen J. Turnbull [mailto:turnbull@example.com]
Sent: Wednesday, June 27, 2001 5:19 PM
To: Scott Stone
Cc: 'tlug@example.com'
Subject: FreeBSD/Linux Cross Compiler FUBAR


>>>>> "Scott" == Scott Stone <SStone@example.com> writes:

    Scott> 2.  binutils:  ./configure --target=i386-redhat-linux

IIRC

1. You need to tell configure that it's a cross-compiler.  I seem to
   recall there were situations where $target!=$host wasn't enough.
   That should be fixed by now, but cross compiles are hard.
2. Maybe you need to tell it explicitly --host=freebsd?  Check for
   that, anyway.
3. ./configure --usage might be of some help, there's plenty of doc
   with GCC, and there's the cross-compile FAQ (used to be at Cygnus).

    Scott> Here's where the problem comes in.  As soon as it gets to
    Scott> stage2 and wants to use the "xgcc" stage1 compiler, it
    Scott> starts calling the crosslinker to try

Dunno why this is happening.  It shouldn't be using the cross-linker
here.  It should be using the native linker.  Stage 2 is still hosted
on freebsd, no?  Maybe you need to use the --build flag to tell it the
second stage is also on freebsd?  But that would be stupid (ie, a
bug), it should assume $build=$host=config.guess().

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."

-----------------------------------------------------------------------
Next Technical Meeting:  Sat, July 14 13:30- 
Next Nomikai Meeting:    Fri, Aug  10 19:30-  Tengu Tokyo Eki-Mae
-----------------------------------------------------------------------
more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links