On 12/7/2011 8:22 AM, Ali Bahrami wrote:
On 12/07/11 09:18, Rich Burridge wrote:
On 12/07/2011 08:16 AM, Ali Bahrami wrote:
On 12/07/11 09:02, Rich Burridge wrote:
$ LD_OPTIONS=-Dargs gcc -m64 /tmp/t.c
...
debug: arg[2] option=-Y: option-argument:
P,/usr/sfw/lib/64:/lib/64:/usr/lib/64
...
debug: arg[13] option=-L: option-argument: /lib/amd64
debug: arg[14] option=-L: option-argument: /usr/lib/amd64
Aren't the [13-14] arguments redundant, given argument [2]? Since
-L takes precedence over -Y,P, it might even be self-defeating,
since we'll end up looking in these places before /usr/sfw?
The 64-bit gcc installed on my system does the same thing, so this
isn't something you've caused.
George could you respond to this please?
gcc-45 does the same thing so it appears to be standard behavior in 64
bit mode. I have been looking at the code to try to figure out what is
going on but no luck yet.
Thanks.
George, while you're looking, I'm also curious about these lines:
debug: arg[11] option=-L: option-argument:
/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64
debug: arg[12] option=-L: option-argument:
/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/../../../amd64
These are the standard locations where gcc installs its libraries along
with other interesting files like the startup routines. The gcc-3 build
moves the libraries to /usr/sfw/lib during package creation. In the
case of gcc-45, we leave the libraries alone and add the appropriate
links in /usr/lib.
I'm sure they're OK, but wonder why they are -L options instead of being
part of the -Y,P default list. Given that gcc is willing to change the
default list, why would it ever use -L options?
GCC can be configured as a cross compiler or a native compiler. It also
provides support for multiple versions installed simultaneously, e.g.
"gcc -V 3.4.3 ..." or "gcc -V 4.5.2 ...". To support these scenarios,
the platform/version specific library locations need to be searched
before the standard locations.
George
Thanks...
- Ali
_______________________________________________
userland-discuss mailing list
userland-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/userland-discuss