[nhc-bugs] Linker flags and nhc98
Roland Dowdeswell
elric@imrryr.org
Mon, 09 Dec 2002 00:31:34 -0500
I have been using nhc98 on my systems for a while and I've noticed
a couple of things that would fit quite nicely in the nhc98 script.
The first is the ability to pass a -static to the linker to create
statically linked executables. This is helpful in a number of
situations, mainly on my web server which I run chroot'ed and so
it doesn't have access to as many libraries.
The other is the ability to specify the -rpath, the runtime linker
path. For this, I used the standard C syntax, i.e. -Wl,foo will
pass foo to the linker. The inclusion of this syntax will allow
for many other linker options to be passed in as well.
Please consider the attached patch.
Thanks,
--
Roland Dowdeswell http://www.Imrryr.ORG/~elric/
Index: nhc98.inst
===================================================================
RCS file: /cvs/nhc/script/nhc98.inst,v
retrieving revision 1.38
diff -u -r1.38 nhc98.inst
--- nhc98.inst 2002/11/04 15:21:12 1.38
+++ nhc98.inst 2002/12/09 05:30:19
@@ -203,12 +203,14 @@
;;
-H* ) HEAP=`echo $1 | cut -c3-` ;;
-[Ll]*) EXTRALIB=$EXTRALIB" "$1;;
+ -Wl,*) LDFLAGS=$LDFLAGS" "$1;;
-i* ) CINCDIRS=$CINCDIRS" -I"`echo $1 | cut -c3-`
HINCDIRS=$HINCDIRS" -I"`echo $1 | cut -c3-` ;;
-I* ) CINCDIRS=$CINCDIRS" "$1
# HINCDIRS=$HINCDIRS" "`filepath $1` ;;
HINCDIRS=$HINCDIRS" "$1 ;;
-s ) LDFLAGS=$LDFLAGS" "$1;;
+ -static) LDFLAGS=$LDFLAGS" "$1;;
# -P* ) GREENCARDOPTS=$GREENCARDOPTS" "`filepath $1`
# COMPFLAGS=$COMPFLAGS" "`filepath $1`;;
-P* ) GREENCARDOPTS=$GREENCARDOPTS" "$1