Thread View: comp.sys.sgi.misc
1 messages
1 total messages
Started by Patric Beuthen
Mon, 27 Jul 1998 00:00
gcc-wrapper for multiple OS - FOLLOW UP
Author: Patric Beuthen
Date: Mon, 27 Jul 1998 00:00
Date: Mon, 27 Jul 1998 00:00
66 lines
3174 bytes
3174 bytes
Hi,
here is some additional information - I was asked for it. Maybe this is
enough and one of you can point me to the mistake.
Hi xxx,
you are right. I just thought many other poeple (try to) manage things
like that.
The option '-R' is not available under IRIX. So I searched the ld
and CC manpages for a similar option. It deals with 'runtime linkting -
I
was told'. The Solaris script is not mine. What I found was the '-rpath'
and I'm not quiet sure if it really works:
pb@habakuk:/tmp_mnt/KM/hiwis/pb [507] gcc -v
Reading specs from /opt/gnu/6.4/lib/gcc-lib/mips-sgi-irix6.4/2.8.1/specs
gcc version 2.8.1
The hint I was given was ' -Wl,$option'. But using it, it tells me:
pb@habakuk:/tmp_mnt/KM/hiwis/pb [518] ./g++ -v
Reading specs from /opt/gnu/6.4/lib/gcc-lib/mips-sgi-irix6.4/2.8.1/specs
gcc version 2.8.1
ld -call_shared -no_unresolved -init __do_global_ctors -fini
__do_global_dtors -_SYSTYPE_SVR4 -n32 /usr/lib32/mips3/crt1.o
/opt/gnu/6.4/lib/gcc-lib/mips-sgi-irix6.4/2.8.1/crtbegin.o
-L/opt/gnu/6.4/lib/gcc-lib/mips-sgi-irix6.4/2.8.1
-L/opt/gnu/6.4/mips-sgi-irix6.4/lib -L/opt/gnu/6.4/lib -L/opt/gnu/lib
-lstdc++ -lm -dont_warn_unused -lgcc -warn_unused -L/usr/lib32/mips3
-L/usr/lib32 -dont_warn_unused -lc -warn_unused -dont_warn_unused -lgcc
-warn_unused /opt/gnu/6.4/lib/gcc-lib/mips-sgi-irix6.4/2.8.1/crtend.o
/usr/lib32/mips3/crtn.o
ld32: ERROR 33: Unresolved text symbol "main" -- 1st referenced by
/usr/lib32/mips3/crt1.o.
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: INFO 152: Output file removed because of error.
Of course the linker has nothing to do - the option only should let him
know where to get the libs when he needs them.
Sorry, this is everything I know.
Patric.
--------------------------------------------
Hi,
a shell-script in a NFS Network-Environment that checks the OS-type and
gives you the corresponding gcc/g++ with its libs is a very good idea.
In the following is one that works under SOLARIS. It is called
gcc-wrapper and symlinks gcc and g++ link to it:
#!/usr/local/bin/bash
GCC=/opt/gnu/`uname -r`/bin/`basename $0`
$GCC "$@" -L/opt/gnu/lib -R/opt/gnu/lib
But its doesn't work that way under IRIX (we have 6.2 and 6.4 -- when is
6.5 coming?)):
#!/usr/local/bin/bash
GCC=/opt/gnu/`uname -r`/bin/`basename $0`
$GCC "$@" -rpath /opt/gnu/`uname -r`/lib
# $GCC "$@" -Wl,-L/opt/gnu/lib # -L/opt/gnu/`uname -r`/lib
Maybe one of you solved a similar problem and can tell me how to do it.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads