Print this page
7170 ENABLE_PERL64 multiarch builds
reviewed by: Andrew Stormont <andyjstormont@gmail.com>
reviewed by: Lauri Tirkkonen <lotheac@iki.fi>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/perl/Makefile.targ
          +++ new/usr/src/cmd/perl/Makefile.targ
↓ open down ↓ 5 lines elided ↑ open up ↑
   6    6  #
   7    7  # A full copy of the text of the CDDL should have accompanied this
   8    8  # source.  A copy of the CDDL is also available via the Internet at
   9    9  # http://www.illumos.org/license/CDDL.
  10   10  #
  11   11  #
  12   12  # Copyright (c) 2014 Racktop Systems.
  13   13  # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
  14   14  #
  15   15  
  16      -# Link against libc as perl solaris specs
       16 +# Link against libc as per solaris specs
  17   17  $(PERLEXT):= LDLIBS += -lc
       18 +$(PERLEXT64):= LDLIBS += -lc
  18   19  
  19   20  # Allow for undefined symbols satisfied by perl
  20   21  $(PERLEXT):= ZDEFS =
       22 +$(PERLEXT64):= ZDEFS =
  21   23  
  22   24  $(ROOTPERLEXT) := FILEMODE = 0555
  23   25  $(ROOTPERLMOD) := FILEMODE = 0444
       26 +$(ROOTPERLEXT64) := FILEMODE = 0555
       27 +$(ROOTPERLMOD64) := FILEMODE = 0444
  24   28  
  25   29  # CFLAGS for perl, specifically.
  26   30  PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
  27   31          -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
       32 +PCFLAGS64= -m64 -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE64_SOURCE \
       33 +        -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
  28   34  
  29      -$(MACH):
       35 +$(MACH) $(MACH64):
  30   36          $(INS.dir)
  31   37  
       38 +# Sorry about this...
       39 +# BUILD.SO doesn't have distinct versions like COMPILE.c/COMPILE64.c does.
       40 +# To that end - we're defining BUILD64.SO here.
       41 +BUILD64.SO=       $(CC) $(CFLAGS64) -o $@ $(GSHARED) $(DYNFLAGS) \
       42 +                $(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS)
       43 +
  32   44  $(PERLEXT): $(MACH)/$(MODULE).o
  33   45          $(BUILD.SO) $(MACH)/$(MODULE).o
  34   46  
       47 +$(PERLEXT64): $(MACH64)/$(MODULE).o
       48 +        $(BUILD64.SO) $(MACH64)/$(MODULE).o
       49 +
       50 +# NOTE: With later version of Perl, we need to define PERL_EUPXS_ALWAYS_EXPORT
       51 +# which is a backward-compatibility definition for the assumes-5.10 stuff here.
  35   52  $(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
  36   53          $(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
  37   54  
       55 +$(MACH64)/$(MODULE).o: $(MACH64)/$(MODULE).c
       56 +        $(COMPILE64.c) $(PCFLAGS64) $(C_PICFLAGS) -I$(PERLINCDIR64) $< -o $@
       57 +
  38   58  $(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs 
  39      -        $(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
       59 +        ISALIST=$(MACH) $(XSUBPP) $(XSUBPPFLAGS) $(MODULE).xs >$@
  40   60  
  41      -$(ROOTPERLMODDIR):
       61 +$(MACH64)/$(MODULE).c: $(MACH64) $(MODULE).xs
       62 +        ISALIST=$(MACH64) $(XSUBPP) $(XSUBPPFLAGS) $(MODULE).xs >$@
       63 +
       64 +$(ROOTPERLMODDIR) $(ROOTPERLMODDIR64):
  42   65          $(INS.dir)
  43   66  
  44   67  $(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
  45   68          $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
  46   69  
  47      -$(ROOTPERLEXTDIR):
       70 +$(ROOTPERLMOD64): $(ROOTPERLMODDIR64) $(MODULE).pm
       71 +        $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
       72 +
       73 +$(ROOTPERLEXTDIR) $(ROOTPERLEXTDIR64):
  48   74          $(INS.dir)
  49   75  
  50   76  $(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
       77 +        $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
       78 +
       79 +$(ROOTPERLEXT64): $(ROOTPERLEXTDIR64) $(MACH64)/$(MODULE).so
  51   80          $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX