gcc & linker question (Solaris 10)


 
Thread Tools Search this Thread
Operating Systems Solaris gcc & linker question (Solaris 10)
# 1  
Old 09-05-2008
gcc & linker question (Solaris 10)

Hi,

I'm confused about the GCC & Linking process could somebody please briefly explain?

I have GCC 3.4.6 installed from SunFreeware. Reading the narrative alongside the package states "It was compiled to use the SUN assembler and loader usually in /usr/ccs/bin if the SUNW developer packages are installed."

SUNW developer packaes are installed and ld / as / ar are in the relevant /usr/ccs/bin directory.

I also have the GNUbinutils package installed which installs ld / as / ar in /usr/local/bin. this /usr/local/bin dir precedes / usr/ccs/bin in my $PATH.

When installing third party applications, i commonly see:
./configure \
--with-gnu-ld \
--with-gnu-as \
which i specify & the applications install and work okay, however:

checking config.log shows

Reading specs from /usr/local/lib etc etc etc
Configure with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin

whats going on?

Thanks

Nick
# 2  
Old 09-09-2008
Understand fully now that this Gcc uses Gas and that /usr/ccs/bin/as was never ever used at all.
Sunfreeware's compilers are severely out of date. Try the compiler from Nevada build 22 or later instead. I don't know offhand whether we're going to patch this in S10 but if it turns out that there are real problems with using gas (and I'm not at all convinced that this problem is real) then we would ikely do so. In any case I am actively interested in making sure that the gcc we ship with Solaris works, and if you can help us characterise the bug(s) here, if any, I will work to get them fixed
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

I am new & I have a question about patchadd in Solaris 11

Hi guys, I am really new to Solaris. My question is about the patching package management. Now I was provided some old packages within that there are hard-coded codes written with commands like "patchadd", so anyway I can make them work with Solaris 11? Cheers! (8 Replies)
Discussion started by: ethanzhou
8 Replies

2. Programming

Gcc linker search path order

I have a build where I wish to link against and load a specific version of a library and a different version of the same library is installed on the system. I'm using a -L option to point to the version that I wish to link against but gcc still seems to choose the installed version. Is there a way... (4 Replies)
Discussion started by: Richard Johnson
4 Replies

3. Programming

gcc linker address

Hai, I have two (Pgm1.c and Pgm2.c) simple programs, which is compiled using gcc. Now we have two exe's (Pgm1 and Pgm2). When i executed the nm Pgm1 and nm Pgm2, in the listed symbols the address of main is same for both programs (08048344 T main) at run time also. Doubt: 1) What is this... (3 Replies)
Discussion started by: rajamohan
3 Replies

4. Programming

GCC: Choose my own linker

Hi, I do not use the default linker, and instead us another one and pass this argument -Wl,--dynamic-linker=<path to linker> to gcc when compiling. However, what happens if the linker is not under /lib and /lib64 and I am not able to create a symlink to the linker in /lib or /lib64 due to no... (2 Replies)
Discussion started by: Shompis
2 Replies

5. Solaris

Building cdrkit on Solaris 8 generates a linker problem

I'm trying to build cdrkit-1.1.9 but have the same problem with 1.1.6 as well. The reason I need cdrkit is that it has an extended Joilet that mkisofs doesn't have but if anyone has another program that can provide this that might be a work around I can use. The problem I'm having is when I... (1 Reply)
Discussion started by: dxk3355
1 Replies

6. Programming

XWindows programming + gcc linker options

Im trying to compile some code that involves using X-Windows based functions (XDisplayName() and XOpenDisplay() ), however each time I run the compiler, Im getting a problem with the linker. The linker says that both XDisplayName() and XOpenDisplay() are unresolved text symbols. Is there a... (1 Reply)
Discussion started by: JamesGoh
1 Replies

7. UNIX for Advanced & Expert Users

gcc & make error- Help please

Folks; I'm trying to install gcc-3.4.6 & install SWIG tool on Solaris 10 (Sparc), but when i try to run make for gcc i got this error below: make: Fatal error: Command failed for target `all-gcc' and when i try to run "make install" to install swig, i got this error: *** Error code 2... (10 Replies)
Discussion started by: moe2266
10 Replies

8. Shell Programming and Scripting

gcc question

Hi, I am trying to compile a .c file but in the pre-processor directives I want to include a file that I have put together myself (#include "file.h"). How can I accomplish this? (3 Replies)
Discussion started by: sanchopansa
3 Replies

9. UNIX for Dummies Questions & Answers

Emacs & GCC not installed by default?

I just installed SUSE Linux 10.0 on my computer but when I typed " emacs & " and " gcc -c main.c" in the terminal, those programs couldn't be found. So the Linux install package does not install those programs by default? (2 Replies)
Discussion started by: whutes
2 Replies

10. Programming

CC LInker Error UNIX Sun Solaris

Hi Together, while compiling my program with CC I get the following Error message from the Linker: Undefined first referenced symbol in file std::basic_string<char,std::char_traits<char>,std::allocator<char>... (2 Replies)
Discussion started by: nik
2 Replies
Login or Register to Ask a Question