Print this page
3900 illumos will not build against gcc compiled perl
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/perl/contrib/Sun/Solaris/Exacct/File/Makefile.PL
+++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Exacct/File/Makefile.PL
1 1 #
2 2 # Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
3 3 #
4 4
5 5 #
6 6 # Makefile.PL for ::Exacct::File
7 7 #
8 8
9 9 # See ../Makefile.PL for an explanation of the linker flag manipulations.
10 10
11 -require 5.8.4;
11 +require 5.0010;
12 12 use strict;
13 13 use warnings;
14 14 use ExtUtils::MakeMaker;
15 15
16 16 #
17 17 # Some later versions of ExtUtils::MakeMaker are broken,
18 18 # and complain about function redefinitions in the child Makefile.PLs.
19 19 # Stop the warnings.
20 20 #
21 21 no warnings qw(redefine);
22 22
23 23 our (@defines, @man3pods);
24 24
25 25 #
26 26 # MakeMaker overrides.
27 27 #
28 28 package MY;
29 29 no warnings qw(once);
30 30
31 31 #
32 32 # Overrides that are common to both the ON and non-ON build environments.
33 33 #
34 34
35 35 #
36 36 # Suppress the setting of LD_RUN_PATH, as it isn't necessary.
37 37 #
38 38
39 39 sub const_loadlibs
40 40 {
41 41 my $self = shift(@_);
42 42 delete($self->{LD_RUN_PATH});
43 43 return($self->SUPER::const_loadlibs(@_));
44 44 }
45 45
46 46 sub dynamic_lib
47 47 {
48 48 my $self = shift(@_);
49 49 my $txt = $self->SUPER::dynamic_lib(@_);
50 50 $txt =~ s/LD_RUN_PATH=\S*\s*//;
51 51 return($txt);
52 52 }
53 53
54 54 #
55 55 # ON-specific overrides.
56 56 #
57 57 if (exists($ENV{CODEMGR_WS}) && exists($ENV{ENVCPPFLAGS1})) {
58 58 #
59 59 # Override postamble and replace it with one that explicitly records
60 60 # the dependency between File.c (generated from File.xs by xsubpp)
61 61 # and the FileDefs.xi file (generated from sys/exacct_catalog.h by
62 62 # extract_defines). Note we have to mimic the -I processing done by cc
63 63 # to find the correct version of the file, as we want the copy from the
64 64 # proto area rather than /usr/include. This ensures that the constant
65 65 # values exported by the perl module stay up-to date with the
66 66 # corresponding #defines.
67 67 #
68 68 *postamble = sub {
69 69 return <<'EOF';
70 70 EXACCT_H:sh= \
71 71 for dir in $ENVCPPFLAGS1 $ENVCPPFLAGS2 $ENVCPPFLAGS3 $ENVCPPFLAGS4 \
72 72 /usr/include; do \
73 73 dir=`expr $dir : '^-I\(.*\)$' \| $dir`; \
74 74 file="$dir/exacct.h"; \
75 75 test -f $file && echo $file && break; \
76 76 done;
77 77
78 78 File.c: FileDefs.xi
79 79
80 80 FileDefs.xi: ../extract_defines $(EXACCT_H)
81 81 $(PERL) ../extract_defines File $@ $(EXACCT_H)
82 82 EOF
83 83 };
84 84
85 85 # Enable/disable debugging as required.
86 86 @main::defines = ( DEFINE => '-DEXACCT_DEBUG' )
87 87 if (! exists($ENV{RELEASE_BUILD}));
88 88
89 89 # Don't install POD pages for ON.
90 90 @main::man3pods = ( MAN3PODS => {} );
91 91
92 92 #
93 93 # Non-ON overrides.
94 94 #
95 95 } else {
96 96 #
97 97 # Override postamble and replace it with one that explicitly records
98 98 # the dependency between File.c (generated from File.xs by xsubpp)
99 99 # and the FileDefs.xi file (generated from /usr/include/exacct.h by
100 100 # extract_defines). This ensures # that the constant values exported
101 101 # by the perl module stay up-to date with the corresponding #defines.
102 102 #
103 103 *postamble = sub {
104 104 return <<'EOF';
105 105 EXACCT_H = /usr/include/exacct.h
106 106
107 107 File.c: FileDefs.xi
108 108
109 109 FileDefs.xi: ../extract_defines $(EXACCT_H)
110 110 $(PERL) ../extract_defines File $@ $(EXACCT_H)
111 111 EOF
112 112 };
113 113
114 114 # Install the POD documentation for non-ON builds.
115 115 my $man3pfx = '$(INST_MAN3DIR)/Sun::Solaris::Exacct';
116 116 @main::man3pods = (
117 117 MAN3PODS => { '../pod/File.pod' =>
118 118 $man3pfx . '::File.$(MAN3EXT)' }
119 119 );
120 120 }
121 121
122 122 #
123 123 # Having set everything up, write the Makefile.
124 124 #
125 125 package main;
126 126
127 127 WriteMakefile(
128 128 NAME => 'Sun::Solaris::Exacct::File',
129 129 VERSION_FROM => 'File.pm',
130 130 H => [ '../exacct_common.xh' ],
131 131 TYPEMAPS => [ '../typemap' ],
132 132 @defines,
133 133 @man3pods,
134 134 dynamic_lib => { OTHERLDFLAGS =>
135 135 '-h $(DLBASE).$(DLEXT) ' .
136 136 '-R\$$ORIGIN/.. $(INST_ARCHAUTODIR)/../Exacct.so'
137 137 },
138 138 realclean => { FILES => 'FileDefs.xi' },
139 139 );
↓ open down ↓ |
118 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX