Fix Perl build on SmartOS

This commit is contained in:
Danny Wilson 2015-11-07 04:44:30 +01:00
parent 2c80e12e96
commit b19116f688
4 changed files with 48 additions and 20 deletions

View File

@ -64,6 +64,7 @@ stdenv.mkDerivation rec {
"-Dlocincpth=${libc}/include"
"-Dloclibpth=${libc}/lib"
]
++ optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads";
configureScript = "${stdenv.shell} ./Configure";

View File

@ -1,11 +1,24 @@
--- perl-5.16.2/hints/solaris_2.sh.orig 2013-02-14 19:29:49.453988140 +0000
+++ perl-5.16.2/hints/solaris_2.sh 2013-02-14 19:30:31.681631019 +0000
@@ -568,7 +568,7 @@
# ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
# fi
ldflags="$ldflags -m64"
- lddlflags="$lddlflags -G -m64"
+ lddlflags="$lddlflags -shared -m64"
$NetBSD: patch-hints_solaris__2.sh,v 1.2 2015/10/27 09:10:44 jperkin Exp $
Redo PR pkg/44999.
--- perl-5.20.2/hints/solaris_2.sh.orig 2015-05-13 20:19:29.000000000 +0000
+++ perl-5.20.2/hints/solaris_2.sh
@@ -585,7 +585,7 @@ EOM
fi
fi
case "${cc:-cc} -v 2>/dev/null" in
- *gcc*)
+ *gcc*|clang*)
echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} $ccflags -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
*"m64 is not supported"*)
@@ -622,7 +622,7 @@ EOM
# use that with Solaris 11 and later, but keep
# the old behavior for older Solaris versions.
case "$osvers" in
- 2.?|2.10) lddlflags="$lddlflags -G -m64" ;;
+ 2.?|2.10) lddlflags="$lddlflags -shared -m64" ;;
*) lddlflags="$lddlflags -shared -m64" ;;
esac
;;
*)
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"

View File

@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
"-Dlocincpth=${libc}/include"
"-Dloclibpth=${libc}/lib"
]
++ optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads";
configureScript = "${stdenv.shell} ./Configure";

View File

@ -1,11 +1,24 @@
--- perl-5.16.2/hints/solaris_2.sh.orig 2013-02-14 19:29:49.453988140 +0000
+++ perl-5.16.2/hints/solaris_2.sh 2013-02-14 19:30:31.681631019 +0000
@@ -568,7 +568,7 @@
# ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
# fi
ldflags="$ldflags -m64"
- lddlflags="$lddlflags -G -m64"
+ lddlflags="$lddlflags -shared -m64"
$NetBSD: patch-hints_solaris__2.sh,v 1.2 2015/10/27 09:10:44 jperkin Exp $
Redo PR pkg/44999.
--- perl-5.22.0/hints/solaris_2.sh.orig 2015-05-13 20:19:29.000000000 +0000
+++ perl-5.22.0/hints/solaris_2.sh
@@ -585,7 +585,7 @@ EOM
fi
fi
case "${cc:-cc} -v 2>/dev/null" in
- *gcc*)
+ *gcc*|clang*)
echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} $ccflags -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
*"m64 is not supported"*)
@@ -622,7 +622,7 @@ EOM
# use that with Solaris 11 and later, but keep
# the old behavior for older Solaris versions.
case "$osvers" in
- 2.?|2.10) lddlflags="$lddlflags -G -m64" ;;
+ 2.?|2.10) lddlflags="$lddlflags -shared -m64" ;;
*) lddlflags="$lddlflags -shared -m64" ;;
esac
;;
*)
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"