Subject: finding the linker with gcc3
To: None <email@example.com>
From: James K. Lowden <firstname.lastname@example.org>
Date: 03/28/2004 02:22:11
I am using gcc3-c++-3.3.2 and have had some problems because
/usr/pkg/gcc3/bin/c++ was using /usr/bin/ld instead of /usr/pkg/bin/ld.
I had assumed pkgsrc would take steps to cause the gcc3 compilers to use
the "right" linker. Having reviewed the gcc docs, I understand there's no
"right", but I still think it's a little queer that pkgsrc compilers don't
automatically use the linker installed by pkgsrc.
Anyone who fails to tie the new compiler to the new linker is apt to trip
on "Dwarf" errors, at least on i386 machines.
I tried "ln -s /usr/pkg/bin/ld /usr/pkg/gcc3/bin/", no joy. My solution
turned on exporting COMPILER_PATH.
I'm not sure there's a good answer. It's not strictly necessary make
binutils a dependency of the gcc3 tools, and without a pkgsrc dependency
it would be irresponsible to configure gcc3 to use /usr/pkg/bin/ld. I
looked for a way to make it prefer /usr/pkg/bin/ld and fallback to
/usr/bin/ld -- which seems like it would DTRT most of the time -- but I
didn't find a way.
Perhaps a message?