This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Android hints: Set d_csh to undef in cross builds
[perl5.git] / hints / netbsd.sh
index c64be44..17a4ff6 100644 (file)
@@ -36,14 +36,16 @@ case "$osvers" in
                d_dlerror=$define
                cccdlflags="-DPIC -fPIC $cccdlflags"
                lddlflags="-shared $lddlflags"
-               # gcc 4.6 doesn't support --whole-archive, but check for it
-               # if the user chooses a new compiler later, this is pointless
-               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
+               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]*)
@@ -87,7 +89,7 @@ case "$osvers" in
        ;;
 esac
 case "$osvers" in
-0.9*|1.*|2.*|3.*|4.*|5.*)
+0.9*|1.*|2.*|3.*|4.*|5.*|6.*)
        d_getprotoent_r="$undef"
        d_getprotobyname_r="$undef"
        d_getprotobynumber_r="$undef"