This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Targetting Sparc/Solaris


Nathan Kidd wrote:
Sam Brightman wrote:
Here is the tail of the build log:

/mnt/build/xgcc-4.1-build/sparc-sun-solaris2.9/gcc/./gcc/xgcc
-B/mnt/build/xgcc-4.1-build/sparc-sun-solaris2.9/gcc/./gcc/
-B/mnt/build/xgcc-4.1/sparc-sun-solaris2.9/sparc-sun-solaris2.9/bin/
-B/mnt/build/xgcc-4.1/sparc-sun-solaris2.9/sparc-sun-solaris2.9/lib/
...
-Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o
./libgcc_s.so.1.tmp  libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o
...
/mnt/build/xgcc-4.1/sparc-sun-solaris2.9/bin/sparc-sun-solaris2.9-ld:
skipping incompatible /usr/lib/libc.so when searching for -lc
/mnt/build/xgcc-4.1/sparc-sun-solaris2.9/bin/sparc-sun-solaris2.9-ld:
cannot find -lc

Following the notes I had, you should have a solaris 2.9 libc under /mnt/build/xgcc-4.1/sparc-sun-solaris2.9/sparc-sun-solaris2.9/usr/lib/

E.g. on my system:

$ ls -l /xgcc-4.1/sparc-sun-solaris2.8/sparc-sun-solaris2.8/usr/lib/libc.*
-rw-r--r--  1 nathan staff 1788084 Dec  9  2002 libc.a
lrwxrwxrwx  1 nathan staff      11 Oct  5  2006 libc.so -> ./libc.so.1
-rwxr-xr-x  1 nathan staff 1157888 Dec  9  2002 libc.so.1

Questions to ask yourself:


1. Do you have the proper libc in that location?
2. Does your build try looking in that location? (e.g. use 'truss' to
find out what which libc.so files sparc-sun-solaris2.9-ld tries to open).

I should have noticed/noted that despite the link being broken in


/mnt/build/xgcc-4.1/sparc-sun-solaris2.9/sparc-sun-solaris2.9/usr/lib/

the /usr/lib/libc.so it was trying instead is of course the same one that should have been in the tree. So even after sorting out the library structure it was the same error. I tried the elflink.c patch I mentioned but still had the same problem. So either it is the 2.11/2.9 incompatibility you mentioned or else the wrong architecture? These libraries, being from my host, are Intel. I think that last command is trying to make something to do with libgcc, which presumably should be cross-compiled targetting Sparc. So maybe I need Sparc libs in the aforementioned directory? Sorry, there are so many stages and directories I'm pretty confused now.

As in my previous post, it would be tricky to get the libs from the target machine. Is there any hope that compiling the earliest OpenSolaris ones from source would work somehow? I'm thinking maybe the process needs to do bootstrapping in some way like crosstools does.

--
sam brightman

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]