This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11890] Building cross gcc-3.3.1 for sparc-sun-solaris2.6 fails
- From: "dhazeghi at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Aug 2003 18:48:21 -0000
- Subject: [Bug target/11890] Building cross gcc-3.3.1 for sparc-sun-solaris2.6 fails
- References: <20030812032921.11890.sampo@symlabs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11890
------- Additional Comments From dhazeghi at yahoo dot com 2003-08-18 18:48 -------
Regarding rpath, it looks like the quickest workaround is to hack the gcc specs file:
edit gcc/specs lines which reference link_arch*. Add -rpath-link /path/to/necessary/libs to each
link_arch* line, right before -Y. Alternatively, if all you want to do is link standard 32 bit
applications, you can just do this for link_arch_default. My link_arch_default looks something like
this:
*link_arch_default:
%{G:-G} %{YP,*} %{R*} %{compat-bsd: %{!YP,*:%{p|pg:-rpath-link /tmp/dara/sparc-sun-
solaris2.8/sysroot/lib/ -Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib}
%{!p:%{!pg:-rpath-link /tmp/dara/sparc-sun-solaris2.8/sysroot/lib/ -Y P,/usr/ucblib:/usr/ccs/
lib:/usr/lib}}} -R /usr/ucblib} %{!compat-bsd: %{!YP,*:%{p|pg:-rpath-link /tmp/dara/
sparc-sun-solaris2.8/sysroot/lib/ -Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib}
%{!p:%{!pg: -rpath-link /tmp/dara/sparc-sun-solaris2.8/sysroot/lib/ -Y P,/usr/ccs/lib:/usr/lib}}}}
After doing this, you should no longer need to pass -Wl... Note that for 32bit and 64bit link_arch
you _will_ need to specify different -rpath-link paths, since sparcv9 has its libs in the sparcv9
subdirectory. Doing so I can successfully build a Linux x Solaris cross compiler that will build C
and C++ programs (and said programs appear to run fine).