Print this page
3900 illumos will not build against gcc compiled perl


   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.

  23 #
  24 
  25 include ../../Makefile.cmd
  26 
  27 # To turn KEEP_STATE off the following two environment variables must be unset.
  28 KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
  29 
  30 # Perl installs files we don't want to ship, so we install to a
  31 # staging area to postprocess and install the result to $(ROOT)
  32 STAGE = $(SRC)/cmd/perl/$(PERL_VERSION)/staging
  33 
  34 PERL=/usr/perl5/$(PERL_VERSION)/bin/perl
  35 
  36 PERL_MM_ARGS = INSTALLDIRS=perl CC='$(CC)' LD='$(CC)'
  37 
  38 # Prefix for Solaris-specific extensions that are maintained by
  39 # Sun/Oracle.
  40 SUN_SOLARIS = Sun/Solaris
  41 













  42 # Add any XS extensions here.
  43 PERL_DYNAMIC_EXT = \
  44     $(SUN_SOLARIS)/Utils \
  45     $(SUN_SOLARIS)/Kstat \
  46     $(SUN_SOLARIS)/Intrs \
  47     $(SUN_SOLARIS)/Project \
  48     $(SUN_SOLARIS)/Task \
  49     $(SUN_SOLARIS)/Exacct \
  50     $(SUN_SOLARIS)/Privilege \
  51     $(SUN_SOLARIS)/Lgrp \
  52     $(SUN_SOLARIS)/Ucred
  53 
  54 # Add any pure-perl extensions here.
  55 PERL_NONXS_EXT = \
  56     $(SUN_SOLARIS)/BSM \
  57     $(SUN_SOLARIS)/PerlGcc \
  58     $(SUN_SOLARIS)/Pg
  59 
  60 PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
  61 PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
  62 



  63 all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
  64 
  65 .PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
  66 
  67 install: all
  68         for ext in $(PERL_EXT); do \
  69                 if [ -d $$ext ]; then \
  70                         ( \
  71                         cd $$ext; pwd; \
  72                         $(KEEP_STATE_OFF); $(MAKE) $(PERL_MM_ARGS) \
  73                                 DESTDIR=$(STAGE) install; \
  74                         cd $(STAGE); \
  75                         find . \( -name ".packlist" -o -name "perllocal.pod" \) \
  76                                 -exec $(RM) {} \; ; \
  77                         /usr/bin/pax -rw -pe ./*  ${ROOT} ; \
  78                         ) \
  79                 else \
  80                         /bin/false; \
  81                 fi \
  82         done


  97                 fi \
  98         done
  99 
 100 # Remove Sun/Solaris
 101 clobber:
 102         @ $(RM) -r Sun
 103 
 104 test: all
 105         for ext in $(PERL_EXT); do \
 106                 ( \
 107                 cd $$ext; pwd; \
 108                 $(KEEP_STATE_OFF); $(MAKE) test; \
 109                 ) \
 110         done
 111 
 112 #
 113 # Ensure that the extension's makefile is built before
 114 # trying to build the extension
 115 #
 116 %/Makefile: %/Makefile.PL $(PERL_CONFIGDEP)
 117         @ cd $(@D); pwd; $(PERL) $(<F) $(PERL_MM_ARGS) 2>&1 /dev/null

 118 
 119 # Pattern-matching rule for extensions.
 120 $(SUN_SOLARIS)/%: $(SUN_SOLARIS)/%/Makefile FRC
 121         @ cd $@; pwd; $(KEEP_STATE_OFF) ; \
 122                 $(PERL_MM_ARGS) $(MAKE) DESTDIR=$(STAGE) all
 123 
 124 FRC:


   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2013 Racktop Systems.
  24 #
  25 
  26 include ../../Makefile.cmd
  27 
  28 # To turn KEEP_STATE off the following two environment variables must be unset.
  29 KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
  30 
  31 # Perl installs files we don't want to ship, so we install to a
  32 # staging area to postprocess and install the result to $(ROOT)
  33 STAGE = $(SRC)/cmd/perl/$(PERL_VERSION)/staging
  34 
  35 PERL=/usr/perl5/$(PERL_VERSION)/bin/perl
  36 
  37 PERL_MM_ARGS = CC='$(CC)' LD='$(CC)'
  38 
  39 # Prefix for Solaris-specific extensions that are maintained by
  40 # Sun/Oracle.
  41 SUN_SOLARIS = Sun/Solaris
  42 
  43 # When building with gcc we don't bother with cw.  Intead we use PerlGcc to
  44 # make sure the Makefile contains options that the compiler will understand.
  45 # The version on the host could be incomplete so use the one we're building.
  46 PERL5LIB =
  47 $(__GNUC)PERL5LIB= \
  48     $(SRC)/cmd/perl/$(PERL_VERSION)/$(SUN_SOLARIS)/PerlGcc
  49 
  50 $(__GNUC)PERL_MM_ARGS = \
  51     CC='$(GCC_ROOT)/bin/gcc' \
  52     LD='$(GCC_ROOT)/bin/gcc'
  53 
  54 PERL_MM_ARGS += INSTALLDIRS=perl
  55 
  56 # Add any XS extensions here.
  57 PERL_DYNAMIC_EXT = \
  58     $(SUN_SOLARIS)/Utils \
  59     $(SUN_SOLARIS)/Kstat \
  60     $(SUN_SOLARIS)/Intrs \
  61     $(SUN_SOLARIS)/Project \
  62     $(SUN_SOLARIS)/Task \
  63     $(SUN_SOLARIS)/Exacct \
  64     $(SUN_SOLARIS)/Privilege \
  65     $(SUN_SOLARIS)/Lgrp \
  66     $(SUN_SOLARIS)/Ucred
  67 
  68 # Add any pure-perl extensions here.
  69 PERL_NONXS_EXT = \
  70     $(SUN_SOLARIS)/BSM \
  71     $(SUN_SOLARIS)/PerlGcc \
  72     $(SUN_SOLARIS)/Pg
  73 
  74 PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
  75 PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
  76 
  77 # When doing a gcc build we need to build PerGcc before the dynamic extenions.
  78 $(__GNUC)$(PERL_DYNAMIC_EXT:%=%/Makefile): $(SUN_SOLARIS)/PerlGcc/Makefile
  79 
  80 all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
  81 
  82 .PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
  83 
  84 install: all
  85         for ext in $(PERL_EXT); do \
  86                 if [ -d $$ext ]; then \
  87                         ( \
  88                         cd $$ext; pwd; \
  89                         $(KEEP_STATE_OFF); $(MAKE) $(PERL_MM_ARGS) \
  90                                 DESTDIR=$(STAGE) install; \
  91                         cd $(STAGE); \
  92                         find . \( -name ".packlist" -o -name "perllocal.pod" \) \
  93                                 -exec $(RM) {} \; ; \
  94                         /usr/bin/pax -rw -pe ./*  ${ROOT} ; \
  95                         ) \
  96                 else \
  97                         /bin/false; \
  98                 fi \
  99         done


 114                 fi \
 115         done
 116 
 117 # Remove Sun/Solaris
 118 clobber:
 119         @ $(RM) -r Sun
 120 
 121 test: all
 122         for ext in $(PERL_EXT); do \
 123                 ( \
 124                 cd $$ext; pwd; \
 125                 $(KEEP_STATE_OFF); $(MAKE) test; \
 126                 ) \
 127         done
 128 
 129 #
 130 # Ensure that the extension's makefile is built before
 131 # trying to build the extension
 132 #
 133 %/Makefile: %/Makefile.PL $(PERL_CONFIGDEP)
 134         @ cd $(@D); pwd; PERL5LIB=$(PERL5LIB) \
 135                 $(PERL) $(<F) $(PERL_MM_ARGS) 2>&1 /dev/null
 136 
 137 # Pattern-matching rule for extensions.
 138 $(SUN_SOLARIS)/%: $(SUN_SOLARIS)/%/Makefile FRC
 139         @ cd $@; pwd; $(KEEP_STATE_OFF) ; \
 140                 $(PERL_MM_ARGS) $(MAKE) DESTDIR=$(STAGE) all
 141 
 142 FRC: