blob: 90d128f703ab73c040ea14d50536c942b7c0c727 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
$NetBSD: patch-aa,v 1.3 1999/02/14 21:14:04 tron Exp $
--- ltconfig.orig Fri Mar 20 09:00:29 1998
+++ ltconfig Sun Feb 14 17:49:16 1999
@@ -808,7 +808,12 @@
netbsd*)
# Tested with NetBSD 1.2 ld
- archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ if $CC -E - -dM </dev/null | grep -q __ELF__; then
+ archive_cmds='$LD -shared -o $lib$libobjs' # ELF
+ else
+ archive_cmds='$LD -Bshareable -o $lib$libobjs' # a.out
+ cpprt0=/usr/lib/c++rt0.o
+ fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -1181,8 +1186,15 @@
netbsd* | openbsd*)
version_type=sunos
- library_names_spec='${libname}${release}.so.$versuffix'
- finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ if $CC -E - -dM </dev/null | grep -q __ELF__; then
+ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so'
+ soname_spec='${libname}${release}.so.$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ else
+ library_names_spec='${libname}${release}.so.$versuffix'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD/OpenBSD (a.out) ld.so'
+ fi
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -1482,6 +1494,9 @@
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# C++ startup code
+cpprt0="$cpprt0"
EOF
|