--- old/usr/src/Makefile.master	lun. juil. 18 14:42:49 2016
+++ new/usr/src/Makefile.master	lun. juil. 18 14:42:49 2016
@@ -104,6 +104,7 @@
 # uncomment things in the lower Makefiles to enable the feature.
 ENABLE_IPP_PRINTING=	$(POUND_SIGN)
 ENABLE_SMB_PRINTING=	$(POUND_SIGN)
+ENABLE_PERL64=		$(POUND_SIGN)
 
 # CLOSED is the root of the tree that contains source which isn't released
 # as open source
@@ -173,8 +174,10 @@
 PERL=		/usr/bin/perl
 PERL_VERSION=	5.10.0
 PERL_PKGVERS=	-510
-PERL_ARCH =		i86pc-solaris-64int
-$(SPARC_BLD)PERL_ARCH =	sun4-solaris-64int
+PERL_ARCH=	i86pc-solaris-64int
+PERL_ARCH64=	i86pc-solaris-64
+$(SPARC_BLD)PERL_ARCH=		sun4-solaris-64int
+$(SPARC_BLD)PERL_ARCH64=	sun4-solaris-64
 PYTHON_26=	/usr/bin/python2.6
 PYTHON=		$(PYTHON_26)
 SORT=		/usr/bin/sort
--- old/usr/src/cmd/perl/Makefile.perl	lun. juil. 18 14:42:49 2016
+++ new/usr/src/cmd/perl/Makefile.perl	lun. juil. 18 14:42:49 2016
@@ -21,17 +21,31 @@
 
 PERLDIR = $(ADJUNCT_PROTO)/usr/perl5/$(PERL_VERSION)
 PERLLIBDIR = $(PERLDIR)/lib/$(PERL_ARCH)
+PERLLIBDIR64 = $(PERLDIR)/lib/$(PERL_ARCH64)
 PERLINCDIR = $(PERLLIBDIR)/CORE
+PERLINCDIR64 = $(PERLLIBDIR64)/CORE
 
 PERLMOD = $(MODULE).pm
 PERLEXT = $(MACH)/$(MODULE).so
+PERLEXT64 = $(MACH64)/$(MODULE).so
 
 ROOTPERLDIR = $(ROOT)/usr/perl5/$(PERL_VERSION)
 ROOTPERLLIBDIR = $(ROOTPERLDIR)/lib/$(PERL_ARCH)
 ROOTPERLMODDIR = $(ROOTPERLLIBDIR)/Sun/Solaris
 ROOTPERLEXTDIR = $(ROOTPERLLIBDIR)/auto/Sun/Solaris/$(MODULE)
+ROOTPERLLIBDIR64 = $(ROOTPERLDIR)/lib/$(PERL_ARCH64)
+ROOTPERLMODDIR64 = $(ROOTPERLLIBDIR64)/Sun/Solaris
+ROOTPERLEXTDIR64 = $(ROOTPERLLIBDIR64)/auto/Sun/Solaris/$(MODULE)
 
 ROOTPERLMOD = $(ROOTPERLMODDIR)/$(MODULE).pm
 ROOTPERLEXT = $(ROOTPERLEXTDIR)/$(MODULE).so
+ROOTPERLMOD64 = $(ROOTPERLMODDIR64)/$(MODULE).pm
+ROOTPERLEXT64 = $(ROOTPERLEXTDIR64)/$(MODULE).so
 
+XSUBPP = $(PERL) $(PERLDIR)/lib/ExtUtils/xsubpp \
+	-typemap $(PERLDIR)/lib/ExtUtils/typemap
+
 C99MODE = $(C99_ENABLE)
+
+CERRWARN += -_cc=-erroff=E_ATTRIBUTE_UNKNOWN
+CERRWARN += -_cc=-erroff=E_ATTRIBUTE_PARAM_UNDEFINED
--- old/usr/src/cmd/perl/Makefile.targ	lun. juil. 18 14:42:49 2016
+++ new/usr/src/cmd/perl/Makefile.targ	lun. juil. 18 14:42:49 2016
@@ -13,39 +13,68 @@
 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
-# Link against libc as perl solaris specs
+# Link against libc as per solaris specs
 $(PERLEXT):= LDLIBS += -lc
+$(PERLEXT64):= LDLIBS += -lc
 
 # Allow for undefined symbols satisfied by perl
 $(PERLEXT):= ZDEFS =
+$(PERLEXT64):= ZDEFS =
 
 $(ROOTPERLEXT) := FILEMODE = 0555
 $(ROOTPERLMOD) := FILEMODE = 0444
+$(ROOTPERLEXT64) := FILEMODE = 0555
+$(ROOTPERLMOD64) := FILEMODE = 0444
 
 # CFLAGS for perl, specifically.
 PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
 	-DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
+PCFLAGS64= -m64 -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE64_SOURCE \
+	-DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
 
-$(MACH):
+$(MACH) $(MACH64):
 	$(INS.dir)
 
+# Sorry about this...
+# BUILD.SO doesn't have distinct versions like COMPILE.c/COMPILE64.c does.
+# To that end - we're defining BUILD64.SO here.
+BUILD64.SO=       $(CC) $(CFLAGS64) -o $@ $(GSHARED) $(DYNFLAGS) \
+                $(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS)
+
 $(PERLEXT): $(MACH)/$(MODULE).o
 	$(BUILD.SO) $(MACH)/$(MODULE).o
 
+$(PERLEXT64): $(MACH64)/$(MODULE).o
+	$(BUILD64.SO) $(MACH64)/$(MODULE).o
+
+# NOTE: With later version of Perl, we need to define PERL_EUPXS_ALWAYS_EXPORT
+# which is a backward-compatibility definition for the assumes-5.10 stuff here.
 $(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
 	$(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
 
+$(MACH64)/$(MODULE).o: $(MACH64)/$(MODULE).c
+	$(COMPILE64.c) $(PCFLAGS64) $(C_PICFLAGS) -I$(PERLINCDIR64) $< -o $@
+
 $(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs 
-	$(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
+	ISALIST=$(MACH) $(XSUBPP) $(XSUBPPFLAGS) $(MODULE).xs >$@
 
-$(ROOTPERLMODDIR):
+$(MACH64)/$(MODULE).c: $(MACH64) $(MODULE).xs
+	ISALIST=$(MACH64) $(XSUBPP) $(XSUBPPFLAGS) $(MODULE).xs >$@
+
+$(ROOTPERLMODDIR) $(ROOTPERLMODDIR64):
 	$(INS.dir)
 
 $(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
 	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
 
-$(ROOTPERLEXTDIR):
+$(ROOTPERLMOD64): $(ROOTPERLMODDIR64) $(MODULE).pm
+	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
+
+$(ROOTPERLEXTDIR) $(ROOTPERLEXTDIR64):
 	$(INS.dir)
 
 $(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
+	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
+
+$(ROOTPERLEXT64): $(ROOTPERLEXTDIR64) $(MACH64)/$(MODULE).so
 	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/BSM/Makefile	lun. juil. 18 14:42:50 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/BSM/Makefile	lun. juil. 18 14:42:50 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = _BSMparse
@@ -16,7 +17,7 @@
 
 include $(SRC)/cmd/perl/Makefile.perl
 
-# Install module into arch independant directory
+# Install module into arch independent directory
 ROOTPERLMODDIR = $(ROOTPERLDIR)/lib/Sun/Solaris/BSM
 
 include $(SRC)/cmd/perl/Makefile.targ
@@ -28,4 +29,4 @@
 install: $(ROOTPERLMOD)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile	lun. juil. 18 14:42:50 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile	lun. juil. 18 14:42:50 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = Intrs
@@ -25,8 +26,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Makefile	lun. juil. 18 14:42:50 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Makefile	lun. juil. 18 14:42:50 2016
@@ -11,6 +11,7 @@
 # Copyright 2014 Gary Mills
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = Kstat
@@ -34,8 +35,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Lgrp/Makefile	lun. juil. 18 14:42:50 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Lgrp/Makefile	lun. juil. 18 14:42:50 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting. All rights reserved.
 #
 
 MODULE = Lgrp
@@ -29,8 +30,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Pg/Makefile	lun. juil. 18 14:42:50 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Pg/Makefile	lun. juil. 18 14:42:50 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = Pg
@@ -16,7 +17,7 @@
 
 include $(SRC)/cmd/perl/Makefile.perl
 
-# Install module into arch independant directory
+# Install module into arch independent directory
 ROOTPERLMODDIR = $(ROOTPERLDIR)/lib/Sun/Solaris
 
 include $(SRC)/cmd/perl/Makefile.targ
@@ -28,4 +29,4 @@
 install: $(ROOTPERLMOD)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile	lun. juil. 18 14:42:51 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Project/Makefile	lun. juil. 18 14:42:51 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = Project
@@ -29,8 +30,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Task/Makefile	lun. juil. 18 14:42:51 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Task/Makefile	lun. juil. 18 14:42:51 2016
@@ -10,6 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 MODULE = Task
@@ -25,8 +26,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Utils/Makefile	lun. juil. 18 14:42:51 2016
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Utils/Makefile	lun. juil. 18 14:42:51 2016
@@ -26,8 +26,10 @@
 .KEEP_STATE:
 
 all: $(PERLEXT) $(PERLMOD)
+$(ENABLE_PERL64)all: $(PERLEXT64)
 
 install: $(ROOTPERLEXT) $(ROOTPERLMOD)
+$(ENABLE_PERL64)install: $(ROOTPERLEXT64) $(ROOTPERLMOD64)
 
 clean clobber:
-	$(RM) -r $(MACH)
+	$(RM) -r $(MACH) $(MACH64)
--- old/usr/src/pkg/Makefile	lun. juil. 18 14:42:51 2016
+++ new/usr/src/pkg/Makefile	lun. juil. 18 14:42:51 2016
@@ -178,7 +178,9 @@
 	PKGVERS_BUILTON=$(PKGVERS_BUILTON) \
 	PKGVERS_BRANCH=$(PKGVERS_BRANCH) \
 	PKGVERS=$(PKGVERS) \
+	ENABLE_PERL64=$(ENABLE_PERL64) \
 	PERL_ARCH=$(PERL_ARCH) \
+	PERL_ARCH64=$(PERL_ARCH64) \
 	PERL_VERSION=$(PERL_VERSION) \
 	PERL_PKGVERS=$(PERL_PKGVERS)
 
--- old/usr/src/pkg/manifests/runtime-perl-module-sun-solaris.mf	lun. juil. 18 14:42:52 2016
+++ new/usr/src/pkg/manifests/runtime-perl-module-sun-solaris.mf	lun. juil. 18 14:42:52 2016
@@ -49,6 +49,26 @@
 dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Project
 dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Task
 dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Utils
+$(ENABLE_PERL64)dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)
+$(ENABLE_PERL64)dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris
+$(ENABLE_PERL64)dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto
+$(ENABLE_PERL64)dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Intrs
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Kstat
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Lgrp
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Project
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Task
+$(ENABLE_PERL64)dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Utils
 dir path=usr/perl5/$(PERL_VERSION)/lib/Sun
 dir path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris
 dir path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/BSM
@@ -72,6 +92,30 @@
     path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Task/Task.so
 file \
     path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Utils/Utils.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Intrs.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Kstat.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Lgrp.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Project.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Task.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/Sun/Solaris/Utils.pm
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Intrs/Intrs.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Kstat/Kstat.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Lgrp/Lgrp.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Project/Project.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Task/Task.so
+$(ENABLE_PERL64)file \
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH64)/auto/Sun/Solaris/Utils/Utils.so
 file path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/BSM/_BSMparse.pm
 file path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/Pg.pm
 file path=usr/share/man/man3perl/Kstat.3perl
