Support building with clang on SunOS and 64bit hosts

--------------CB0FD20654961F25A5381D1F
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Hello,
Attached patch allows Perl to be built with clang and on 64bit SunOS hosts.
This patch has been used in pkgsrc to provide packages on Illumos based
distributions for some time.

http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/patches/patch-hints_solaris__2.sh?only_with_tag=MAIN


Sevan

--------------CB0FD20654961F25A5381D1F
Content-Type: text/x-patch;
 name="0001-Support-SunOS-clang-fixes-64-bit-build.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0001-Support-SunOS-clang-fixes-64-bit-build.patch"

=46rom 823428e1c313690d1a4cf447bd0f660bfb36987a Mon Sep 17 00:00:00 2001
From: Sevan Janiyan <venture37@geeklan.co.uk>
Date: Tue, 30 Oct 2018 13:07:21 +0000
Subject: Support SunOS/clang, fixes 64-bit build.

---
 hints/solaris_2.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index ba368e6f3b..46a7eb0bee 100644
--- a/hints/solaris_2.sh
+++ b/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=3Dv9 -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=3D"$lddlflags -G -m64" ;;
+			2.?|2.10) lddlflags=3D"$lddlflags -shared -m64" ;;
 			*) lddlflags=3D"$lddlflags -shared -m64" ;;
 		esac
 		;;
--=20
2.17.0


--------------CB0FD20654961F25A5381D1F--
0
venture37
10/30/2018 1:25:25 PM
perl.perl5.porters 47406 articles. 0 followers. Follow

5 Replies
18 Views

Similar Articles

[PageSpeed] 30

On 10/30/18 9:25 AM, Sevan Janiyan wrote:
> Hello,
> Attached patch allows Perl to be built with clang and on 64bit SunOS hosts.
> This patch has been used in pkgsrc to provide packages on Illumos based
> distributions for some time.
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/patches/patch-hints_solaris__2.sh?only_with_tag=MAIN
> 
> 
> Sevan
> 

Would it be possible to set up a smoke testing rig on this platform so 
that we can both evaluate this patch and, more importantly, evaluate the 
impact of changes in Perl 5 blead on this platform going forward?

Thank you very much.
Jim Keenan
0
jkeenan
10/30/2018 2:26:32 PM
Hi James,

On 10/30/18 2:26 PM, James E Keenan wrote:
> Would it be possible to set up a smoke testing rig on this platform so
> that we can both evaluate this patch and, more importantly, evaluate the
> impact of changes in Perl 5 blead on this platform going forward?

Yes, I'm trying to get something organised at the moment.


Sevan
0
venture37
10/30/2018 2:29:43 PM
--Sig_/=fZ=gaTbn2HeWomJbeT5YyI
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 30 Oct 2018 13:25:25 +0000, Sevan Janiyan
<venture37@geeklan.co.uk> wrote:

> @@ -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=3D"$lddlflags -G -m64" ;;
> +			2.?|2.10) lddlflags=3D"$lddlflags -shared -m64" ;;
>  			*) lddlflags=3D"$lddlflags -shared -m64" ;;
>  		esac
>  		;;

Could anyone with Solaris knowledge confirm that this will also work on
older Solaris (without clang)?

--=20
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

--Sig_/=fZ=gaTbn2HeWomJbeT5YyI
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJb2I7dAAoJEAOhR6E+XcCYZ6IH/1L9IiZfSaKoDg387yImW9gY
7Cq198AdrHBajMJwkXlsQTyEkmnmRoWYcalTqJCw7ENKTY+eKYf8Zf3FsfFGOulx
qgen3N0ajpv0riv7Own8M89Z8gqarG0F91VOdKSGpvEV1GA6C+kHbuKo5BNKPYnc
OsxZjBu+pQM07iZqEIp4eu+hlV8hrR5HT/kPMxmN8dG0ZI6kLIWNp8NLIXnk1jfu
a+RV0syr3b7fTu5nUPFmMmZE/9Qyng12c+GOCyHfWYE7YpicI2ldGWcWKWRvRzeS
u1s5yEcKNjUqO2aJ+QZw8Rm4Qr0CX1qKEhKXvdbJwXZhgDUMEqwdlvazYcsCB3w=
=hF2Q
-----END PGP SIGNATURE-----

--Sig_/=fZ=gaTbn2HeWomJbeT5YyI--
0
h
10/30/2018 5:03:17 PM
--Sig_/xpu6xGScvrG=y13vP0yyCIX
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 30 Oct 2018 13:25:25 +0000, Sevan Janiyan
<venture37@geeklan.co.uk> wrote:

> Hello,
> Attached patch allows Perl to be built with clang and on 64bit SunOS host=
s.
> This patch has been used in pkgsrc to provide packages on Illumos based
> distributions for some time.
>=20
> http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/patches/patch-hints=
_solaris__2.sh?only_with_tag=3DMAIN

FWIW as this is a change to just the hint file, any commiter confident
enough that it wont break other Solaris configurations can apply. There
is no need to backport any of this to meta.

> Sevan

Thanks for your work!

--=20
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

--Sig_/xpu6xGScvrG=y13vP0yyCIX
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJb2I+EAAoJEAOhR6E+XcCYuAgH/3wmsFuF9I95UxZ9wG+xN2Kg
d7r7A2sAjtDxnr6f0dGMXyZ7aBwUXcO+YAeVrMm94yzySTC46x92xJ1QxD/4hlq9
SiSO0PJEczWUDB2mPyAwrcc/blprwO0HLJJjj+pozkQcx92nNAKUDQwXcm+SIZM+
ey4q4RWhJgoZRG+nACUyN76p68O6aI5Ozbn5uUSYXNnZdO8ZGdM27GQu2sgxD9CP
DH9XEwKTv/3i6vpP76bomj+SfEuJ2/T/u2ndVhHlN4TMVa72Eic2ws4eDVM3vAoe
yIo3AUASfS1PwhW7YJDeMdIVwnBosSRevKAk6B9NjjCq16s4hX3JGg8njgT5gcE=
=5jLp
-----END PGP SIGNATURE-----

--Sig_/xpu6xGScvrG=y13vP0yyCIX--
0
h
10/30/2018 5:05:45 PM
On 10/30/18 1:05 PM, H.Merijn Brand wrote:
> On Tue, 30 Oct 2018 13:25:25 +0000, Sevan Janiyan
> <venture37@geeklan.co.uk> wrote:
> 
>> Hello,
>> Attached patch allows Perl to be built with clang and on 64bit SunOS hosts.
>> This patch has been used in pkgsrc to provide packages on Illumos based
>> distributions for some time.
>>
>> http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/patches/patch-hints_solaris__2.sh?only_with_tag=MAIN
> 
> FWIW as this is a change to just the hint file, any commiter confident
> enough that it wont break other Solaris configurations can apply. There
> is no need to backport any of this to meta.
> 
>> Sevan
> 
> Thanks for your work!
> 

A little bit off topic:

1.  We currently only have one smoke-testing rig on Solaris, set up by 
Carlos Guevara++.  He does separate runs with gcc-6.4.0 and g++-6.4.0. 
When testing a given SHA, the gcc run PASSes but the g++ run fails 
either during Configure (c) or during make (m), depending on ... well, I 
don't know what it depends on.  See, e.g.,

gcc: http://perl5.test-smoke.org/report/73152
g++: http://perl5.test-smoke.org/report/73165

2.  While we have many smoke test reports where the OS is reported as 
"Solaris", we have only had 1 report in 6 years where the OS is reported 
as "sunos".  I don't know enough about either to say what the difference 
is or whether that's important.

Thank you very much.
Jim Keenan
0
jkeenan
10/30/2018 5:56:51 PM
Reply: