Re: Force to not use system ld / compiling on AIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dolphinling <lists@xxxxxxxxxxxxxxx> writes:

> On 03/16/2010 10:55 AM, Ian Lance Taylor wrote:
>> It is extremely strange that the -B option would not work.  I have no
>> explanation for that.  What happens when you link with -Wl,-debug?
>> That should show you the exact name which the collect2 linker wrapper
>> invokes.  What name is that?
>
> It prints out the following, among a lot of other stuff
>
> collect2 version 3.3.2
> ld_file_name        = /usr/bin/ld
> c_file_name         = /usr/bin/g++
> nm_file_name        = /users/a/g/aguertin/local/bin/nm
> strip_file_name     = /users/a/g/aguertin/local/bin/strip
> c_file              = /tmp//ccugHvMb.c
> o_file              = /tmp//ccuW7VOd.o
> COLLECT_GCC_OPTIONS = '-B' '/users/a/g/aguertin/local/bin' '-shared-libgcc'
> COLLECT_GCC         = g++
>
>
> Above that, it prints out a bunch of search paths, and then "Looking
> for 'whatever', and ld is not one of the things it searches for.
>
> Full log attached. (This is from g++ -B $HOME/local/bin -Wl,-debug
> *.cpp, with one file defining a simple function that prints a line out
> and the other file with main, calling that function).

Thanks for sending the log.  gcc 3.3.2 is pretty old and I don't have
a copy online.  Looking at gcc 4.0, it looks like this would happen if
gcc were configured with --with-ld=/usr/bin/ld, or if gcc were
configured with the environment variable DEFAULT_LINKER set to
/usr/bin/ld.  That would override the -B option.

Otherwise I have no explanation.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux