X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/2a6abc0ef9cf5fdfbc698e8c38a9360f018ec7a3..1abe70d82a813f037be793cff289f7444508418b:/hints/netbsd.sh diff --git a/hints/netbsd.sh b/hints/netbsd.sh index 11fa30c..445680d 100644 --- a/hints/netbsd.sh +++ b/hints/netbsd.sh @@ -35,7 +35,17 @@ case "$osvers" in d_dlopen=$define d_dlerror=$define cccdlflags="-DPIC -fPIC $cccdlflags" - lddlflags="--whole-archive -shared $lddlflags" + lddlflags="-shared $lddlflags" + cat >UU/cc.cbu <<'EOCBU' +# gcc 4.6 doesn't support --whole-archive, but it's required for the +# system gcc to build correctly, so check for it +echo 'int f(void) { return 0; }' >try.c +if ${cc:-cc} $cccdlflags -c try.c -otry.o 2>&1 && + ${cc:-cc} --whole-archive $lddlflags try.o -otry.so 2>&1 ; then + lddlflags="--whole-archive $lddlflags" +fi +rm try.c try.o try.so 2>/dev/null +EOCBU rpathflag="-Wl,-rpath," case "$osvers" in 1.[0-5]*) @@ -79,7 +89,9 @@ case "$osvers" in ;; esac case "$osvers" in -0.9*|1.*|2.*|3.*|4.*) +0.8*) + ;; +*) d_getprotoent_r="$undef" d_getprotobyname_r="$undef" d_getprotobynumber_r="$undef" @@ -90,25 +102,28 @@ case "$osvers" in d_getservbyport_r="$undef" d_setservent_r="$undef" d_endservent_r="$undef" - d_getprotoent_r_proto="$undef" - d_getprotobyname_r_proto="$undef" - d_getprotobynumber_r_proto="$undef" - d_setprotoent_r_proto="$undef" - d_endprotoent_r_proto="$undef" - d_getservent_r_proto="$undef" - d_getservbyname_r_proto="$undef" - d_getservbyport_r_proto="$undef" - d_setservent_r_proto="$undef" - d_endservent_r_proto="$undef" - ;; -esac - -# @20070922: setlocale() doesn't support LC_COLLATE and LC_NUMERIC -case "$osvers" in -2.*|3.*|4.*) - # next two lines should start at column 0 -locale_cflags='ccflags="$ccflags -DNO_LOCALE_COLLATE -DNO_LOCALE_NUMERIC"' -sv_cflags='ccflags="$ccflags -DNO_LOCALE_COLLATE"' + d_gethostbyname_r="$undef" + d_gethostbyaddr2_r="$undef" + d_gethostbyaddr_r="$undef" + d_sethostent_r="$undef" + d_gethostent_r="$undef" + d_endhostent_r="$undef" + d_getprotoent_r_proto="0" + d_getprotobyname_r_proto="0" + d_getprotobynumber_r_proto="0" + d_setprotoent_r_proto="0" + d_endprotoent_r_proto="0" + d_getservent_r_proto="0" + d_getservbyname_r_proto="0" + d_getservbyport_r_proto="0" + d_setservent_r_proto="0" + d_endservent_r_proto="0" + d_gethostbyname_r_proto="0" + d_gethostbyaddr2_r_proto="0" + d_gethostbyaddr_r_proto="0" + d_sethostent_r_proto="0" + d_endhostent_r_proto="0" + d_gethostent_r_proto="0" ;; esac @@ -163,7 +178,7 @@ $define|true|[yY]*) fi unset lpthread - # several reentrant functions are embeded in libc, but haven't + # several reentrant functions are embedded in libc, but haven't # been added to the header files yet. Let's hold off on using # them until they are a valid part of the API case "$osvers" in @@ -230,3 +245,23 @@ case `uname -m` in sparc) d_semctl_semid_ds=undef ;; esac +# malloc wrap works +case "$usemallocwrap" in +'') usemallocwrap='define' ;; +esac + +# don't use perl malloc by default +case "$usemymalloc" in +'') usemymalloc=n ;; +esac + +# NetBSD 6 defines the *at() functions in libc, but either doesn't +# implement them, or implements them only for AT_FDCWD +case "$osver" in +[1-6].*) + d_unlinkat="$undef" + d_renameat="$undef" + d_linkat="$undef" + d_fchmodat="$undef" + ;; +esac