summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-27 22:17:57 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-27 22:17:57 +0000
commit30afd0dc34ec4b8eed82e154a076dbd7781b549e (patch)
treee8e603237905d1efa5fb63cefb61788a976818fb /hints
parent8a31060d0e98afa6004d194f5c17a527289cb541 (diff)
downloadperl-30afd0dc34ec4b8eed82e154a076dbd7781b549e.tar.gz
More NetBSD patches from Johnny Lam.
Remove the need for a $prefix setting that was added in the previous patch I sent. Also add the proper rpath options to the linker flags depending on whether we're on a ELF or a.out platform. These were tested both in a non-pkgsrc and pkgsrc build. Append to $libs instead of overwriting its value. This was causing $(LDLOADLIBS) to not get added to the dynamic_libs link command on NetBSD systems and was the cause of the GDBM problems reported. Also use '$(LDLOADLIBS)' instead of expanding its value so that it is more easily overridden in the Makefile by "make all LDLOADLIBS=...". Remove "-L/usr/local/lib" because the location of libgdbm.so is already added during the Configure process, and this spurious addition may cause the wrong libgdbm.so to be linked against as a result. p4raw-id: //depot/perl@16233
Diffstat (limited to 'hints')
-rw-r--r--hints/netbsd.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/hints/netbsd.sh b/hints/netbsd.sh
index a2a0843adc..8f79edfb8d 100644
--- a/hints/netbsd.sh
+++ b/hints/netbsd.sh
@@ -18,8 +18,6 @@ case "$osvers" in
usedl="$undef"
;;
*)
- # Note that we use the value of $prefix in this block. The user
- # should specify -Dprefix=... to the Configure script.
if [ -f /usr/libexec/ld.elf_so ]; then
d_dlopen=$define
d_dlerror=$define
@@ -27,7 +25,7 @@ case "$osvers" in
# needs __eh_alloc, __pure_virtual, and others.
# XXX This should be obsoleted by gcc-3.0.
ccdlflags="-Wl,-whole-archive -lgcc -Wl,-no-whole-archive \
- -Wl,-E -Wl,-R$prefix/lib $ccdlflags"
+ -Wl,-E $ccdlflags"
cccdlflags="-DPIC -fPIC $cccdlflags"
lddlflags="--whole-archive -shared $lddlflags"
elif [ "`uname -m`" = "pmax" ]; then
@@ -40,7 +38,6 @@ case "$osvers" in
elif [ -f /usr/libexec/ld.so ]; then
d_dlopen=$define
d_dlerror=$define
- ccdlflags="-Wl,-R$prefix/lib $ccdlflags"
# we use -fPIC here because -fpic is *NOT* enough for some of the
# extensions like Tk on some netbsd platforms (the sparc is one)
cccdlflags="-DPIC -fPIC $cccdlflags"
@@ -97,6 +94,10 @@ EOCBU
# GDBM might be here, pth might be there.
if test -d /usr/pkg/lib; then
loclibpth="$loclibpth /usr/pkg/lib"
- ldflags="$ldflags -R/usr/pkg/lib"
+ if [ -f /usr/libexec/ld.elf_so ]; then
+ ldflags="$ldflags -Wl,-R/usr/pkg/lib"
+ else
+ ldflags="$ldflags -R/usr/pkg/lib"
+ fi
fi
test -d /usr/pkg/include && locincpth="$locincpth /usr/pkg/include"