GCC for SPARC and use of GNU ld

From the documentation on Porting, it says that GCC for SPARC was compiled to use the Solaris linker. Is there a way to reset GCC so it will use the GNU ld?

Am running:

- Solaris 10 6/06 with up to date patches on a SF T2000

- have GNU ld installed in /opt/binutils/

- GCC For SPARC Systems (standard install)

When compiling (working on getting Samba installed) I receive an error when it tried to run ld, as it wanted to use option "-E". The ./configure setup recognized that I have GNU ld, but when gmake is run, the compiler requests /usr/ccs/bin/ld, which does not recognize the "-E" option.

Have tried several methods to make it point to the /opt/binutils directory, short of completely moving the /usr/ccs directory. Does anyone have a way or suggestion to work around this problem?

Thanks,

Jace

[856 byte] By [Jace444] at [2007-12-4]
# 1
Have you tried to put /usr/ccs/bin before your /opt/binutils in PATH?That might make your configuration script recognize Solaris linkerbefore GNU ld.Chih-Hung
chihhung at 2007-7-7 > top of java,Open Source Technologies,OpenSPARC...
# 2

Have setup PATH so /usr/ccs/bin in front of /opt/binutils/bin. This uses the Solaris linker instead of the GNU linker. However, this does not use the GNU linker, which is my goal.

Is there a source version of the GCC for SPARC from Cool Tools? This would allow a user to specify what linker they want to use.

Jace

Jace444 at 2007-7-7 > top of java,Open Source Technologies,OpenSPARC...
# 3

The source code is available at

www.sun.com/downloads

Click -> Development Tools

Click -> GCC For SPARC System 4.0.3

Click -> Download GCCFSS

Login to the download center.

Accept the license (GPL)

Click -> Source Files to GCC For SPARC Systems, English

The current package gccfss_src.tar.gz

should have 24218612 bytes.

Please be aware that some features might not work with GNU linker.

chihhung at 2007-7-7 > top of java,Open Source Technologies,OpenSPARC...
# 4

Once you download the sources of GCCfss you can try to build it with the default flags:

http://cooltools.sunsource.net/gcc/faq.html#q_5

After that you can try reconfiguring to use gnu ld, but there is no guarantee that gnu ld will work properly. For sure you'll not be able to use comdat and gotdata functionality of GCCfss, so you may see some weird errors during linking with gnu ld.

alexey_ at 2007-7-7 > top of java,Open Source Technologies,OpenSPARC...