pkgsrc/devel/libtool/patches/patch-ag
skrll 2ade3dfe16 Update libtool to a newer snapshot.
Notable changes are:

	* Fix memory leak in libltdl
	* Handle large dependency_libs entries in .la files better
	* Integration of a lot of the NetBSD changes
2001-06-14 14:55:45 +00:00

44 lines
1.4 KiB
Text

$NetBSD: patch-ag,v 1.3 2001/06/14 14:55:48 skrll Exp $
--- ltcf-cxx.sh.orig Wed May 23 05:05:06 2001
+++ ltcf-cxx.sh
@@ -383,7 +383,23 @@
esac
;;
netbsd*)
- # NetBSD uses g++ - do we need to do anything?
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ # Surely {pre|post}dep_objects should be added here!
+ archive_cmds='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ # Determine if we need to override the c++rt0 that is
+ # picked up by analysing output_verbose_link_cmds
+ if test -f ${PREFIX}/lib/c++rt0/c++rt0.o.PIC; then
+ cpprt0_file="${PREFIX}/lib/c++rt0/c++rt0.o.PIC"
+ else
+ cpprt0_file=
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpathvar_var=no
+ fi
+ # Workaround for some pre-1.5 ELF toolchains
+ output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L" | sed -e "s/-lgcc -lc -lgcc//"'
;;
osf3*)
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
@@ -982,6 +998,14 @@
esac
done
+
+ case "$host_os" in
+ netbsd*)
+ if test -n "$cpprt0_file"; then
+ predep_objects=`eval echo $predep_objects | sed -e 's:/usr/lib/c++rt0.o:$cpprt0_file:'`
+ fi
+ ;;
+ esac
# Clean up.
rm -f a.out