1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
|
&begin_parameters
cpu option(-processor)name,allow(mc68020,i80860,pa7100,pa8000),=mc68020
recompile switch(-recompile),=1
rebind switch(-rebind),=1
tgt_mod option(-target_module)module_name,='(current_module)'
version option(-version)name,allow(alpha,ga),=ga
compiler option(-compiler)name,allow(cc,gcc)=cc
&end_parameters
&echo command_lines
&
& This is a VOS command macro to build Perl 5 for the Stratus VOS
& operating system. You need to have the VOS POSIX.1 support
& loaded on your system. Change the following statement, if
& necessary, to assign the correct pathname of the directory that
& contains VOS POSIX.1 support.
&
&if &version& = alpha
&then &set_string POSIX >vos_ftp_site>pub>vos>alpha>posix
&else &set_string POSIX >system>posix_object_library
&
& See if the site has VOS POSIX.1 support loaded. If not, quit now.
&
&if ^ (exists &POSIX& -directory)
&then &do
&display_line build: VOS POSIX.1 support not found. &POSIX&
&return 1
&end
&
&if &cpu& = mc68020 & &version& = ga | &cpu& = i80860 & &version& = ga
&then &do
&display_line build: "-version ga" is incompatible with "-processor mc68020 or i80860"
&return 1
&end
&
&if &compiler& = gcc & &version& = alpha
&then &do
&display_line build: "-compiler gcc" is incompatible with "-version alpha"
&return 1
&end
&
&if &compiler& = gcc & &cpu& = pa8000
&then &do
&display_line build: "-compiler gcc" is incompatible with "-processor pa8000"
&return 1
&end
&
& Set up the appropriate directory suffix for each architecture.
&
&if &cpu& = mc68020
&then &set_string obj ''
&if &cpu& = i80860
&then &set_string obj .860
&if &cpu& = pa7100
&then &set_string obj .7100
&if &cpu& = pa8000
&then &set_string obj .8000
&
&if &cpu& = mc68020
&then &set_string obj2 68k
&else &set_string obj2 (substr &obj& 2)
&
&if &cpu& = mc68020
&then &set_string bindsize -size large
&else &set_string bindsize ''
&
&if &compiler& = cc
&then &do
&set_string cpu -processor &cpu&
&set_string s .obj
&end
&else &do
&set_string cpu ''
&set_string s .o
&end
&
& Suppress several harmless compiler warning and advice messages.
& Use -list -show_include all -show_macros both_ways when debugging.
&
&set_string cflags -D_SVID_SOURCE -D_POSIX_C_SOURCE=199506L -DPERL_CORE -O4 -DPERL_NO_DEV_RANDOM
&
&if &compiler& = cc
&then &set_string cflags &cflags& '-u'
&else &set_string cflags &cflags& '-c'
&
& The following is a work-around for stcp-1437,8,9
&
&if &version& = ga
&then &set_string cflags &cflags& -D_BSD_SOURCE
&
&if &compiler& = cc
&then &set_string diag -suppress_diag 2006 2064 2065
&else &set_string diag ''
&
& The following is a work-around for stcp-1570 and GCC.
& (and for some perl errors that only cc finds)
&
&if &compiler& = gcc
&then &set_string diag &diag& -w
&else &set_string diag &diag& -w1
&
&if &version& = alpha
&then !set_library_paths include << < &POSIX&>incl &+
(master_disk)>system>include_library
&else !set_library_paths include << < &+
(master_disk)>system>stcp>include_library &+
(master_disk)>system>include_library>sysv &+
(master_disk)>system>include_library
&
&if &compiler& = gcc
&then !set_library_paths command '(current_dir)' &+
(master_disk)>system>gnu_library>bin &+
(master_disk)>system>command_library
&else !set_library_paths command '(current_dir)' &+
(master_disk)>system>command_library
&
& If requested, compile the source code.
&
&if &recompile& = 0
&then &goto CHECK_REBIND
&
& Some of the compiler invocations need more VM than
& the defaults allow. Raise the limits.
!update_process_cmd_limits -initial_total_limit 150000000 -initial_heap_limit 100000000 -no_ask
&
!&compiler& <<av.c &diag& &cpu& &cflags& -o av&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<deb.c &diag& &cpu& &cflags& -o deb&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<doio.c &diag& &cpu& &cflags& -o doio&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<doop.c &diag& &cpu& &cflags& -o doop&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<dump.c &diag& &cpu& &cflags& -o dump&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<globals.c &diag& &cpu& &cflags& -o globals&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<gv.c &diag& &cpu& &cflags& -o gv&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<hv.c &diag& &cpu& &cflags& -o hv&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<locale.c &diag& &cpu& &cflags& -o locale&s&
&if (command_status) ^= 0 &then &return
& !&compiler& <<malloc.c &diag& &cpu& &cflags& -o malloc&s&
& &if (command_status) ^= 0 &then &return
!&compiler& <<mg.c &diag& &cpu& &cflags& -o mg&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<numeric.c &diag& &cpu& &cflags& -o numeric&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<op.c &diag& &cpu& &cflags& -o op&s&
&if (command_status) ^= 0 &then &return
&
& We are essentially building miniperl for now. Until we
& get a POSIX shell on VOS we won't add any of the extensions.
&
& !link <<op.c opmini.c -delete
& &if (command_status) ^= 0 &then &return
& !&compiler& opmini.c &diag& &cpu& &cflags& -DPERL_EXTERNAL_GLOB -o opmini&s&
& &if (command_status) ^= 0 &then &return
& !unlink opmini.c
& &if (command_status) ^= 0 &then &return
&
!&compiler& <<pad.c &diag& &cpu& &cflags& -o pad&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<perl.c &diag& &cpu& &cflags& -o perl&s& &+
-DARCHLIB="/system/ported/lib/perl5/5.8.8/&obj2&" &+
-DARCHLIB_EXP="/system/ported/lib/perl5/5.8.8/&obj2&" &+
-DSITEARCH="/system/ported/lib/perl5/site_perl/5.8.8/&obj2&" &+
-DSITEARCH_EXP="/system/ported/lib/perl5/site_perl/5.8.8/&obj2&" &+
-DARCHNAME="&obj2&"
&if (command_status) ^= 0 &then &return
!&compiler& <<perlapi.c &diag& &cpu& &cflags& -o perlapi&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<perlio.c &diag& &cpu& &cflags& -o perlio&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<perly.c &diag& &cpu& &cflags& -o perly&s&
&if (command_status) ^= 0 &then &return
& compiling pp.c for the PA-RISC hits compiler bug pcg-98; avoid it.
& The bug is fixed in VOS 14.1.0 and all later releases.
&if (index (string &cpu&) pa) > 0 & (module_info os_release) < 'VOS Release 14.1.0'
&then !&compiler& <<pp.c &diag& &cpu& &cflags& -no_schedule -o pp&s&
&else !&compiler& <<pp.c &diag& &cpu& &cflags& -o pp&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<pp_ctl.c &diag& &cpu& &cflags& -o pp_ctl&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<pp_hot.c &diag& &cpu& &cflags& -o pp_hot&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<pp_pack.c &diag& &cpu& &cflags& -o pp_pack&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<pp_sort.c &diag& &cpu& &cflags& -o pp_sort&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<pp_sys.c &diag& &cpu& &cflags& -o pp_sys&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<reentr.c &diag& &cpu& &cflags& -o reentr&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<regcomp.c &diag& &cpu& &cflags& -o regcomp&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<regexec.c &diag& &cpu& &cflags& -o regexec&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<run.c &diag& &cpu& &cflags& -o run&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<scope.c &diag& &cpu& &cflags& -o scope&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<sv.c &diag& &cpu& &cflags& -o sv&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<taint.c &diag& &cpu& &cflags& -o taint&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<toke.c &diag& &cpu& &cflags& -o toke&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<universal.c &diag& &cpu& &cflags& -o universal&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<utf8.c &diag& &cpu& &cflags& -o utf8&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<util.c &diag& &cpu& &cflags& -o util&s&
&if (command_status) ^= 0 &then &return
!&compiler& <<xsutils.c &diag& &cpu& &cflags& -o xsutils&s&
&if (command_status) ^= 0 &then &return
!&compiler& <vos.c &diag& &cpu& &cflags& -o vos&s&
&if (command_status) ^= 0 &then &return
&if &version& = alpha
&then &do
!&compiler& <vos_dummies.c &cpu& -O4 -o vos_dummies&s&
&if (command_status) ^= 0 &then &return
&end
&
&if &compiler& = gcc
&then &do
&if (exists -file perl.a) &then !delete_file perl.a
!ar rc perl.a av.o deb.o doio.o doop.o dump.o globals.o gv.o hv.o locale.o &+
mg.o numeric.o op.o pad.o perl.o perlapi.o perlio.o perly.o pp.o pp_ctl.o &+
pp_hot.o pp_pack.o pp_sort.o pp_sys.o reentr.o regcomp.o regexec.o run.o &+
scope.o sv.o taint.o toke.o universal.o utf8.o util.o vos.o xsutils.o
!delete_file *.o -no_ask -brief
&end
&else &do
!&compiler& <<miniperlmain.c &diag& &cpu& &cflags& -o miniperlmain&s&
&if (command_status) ^= 0 &then &return
&end
&
& If requested, bind the executable program module.
&
&label CHECK_REBIND
&if &rebind& = 0
&then &return
&
&if (exists -directory (master_disk)>system>tcp_os>object_library.&obj2&)
&then &set_string tcp_objlib (master_disk)>system>tcp_os>object_library.&obj2&
&else &set_string tcp_objlib (master_disk)>system>tcp_os>object_library
&
&if (exists -directory (master_disk)>system>stcp>object_library.&obj2&)
&then &set_string stcp_objlib (master_disk)>system>stcp>object_library.&obj2&
&else &set_string stcp_objlib (master_disk)>system>stcp>object_library
&
&if (exists -directory (master_disk)>system>object_library.&obj2&)
&then &set_string objlib (master_disk)>system>object_library.&obj2&
&else &set_string objlib (master_disk)>system>object_library
&
&if (exists -directory (master_disk)>system>c_object_library.&obj2&)
&then &set_string c_objlib (master_disk)>system>c_object_library.&obj2&
&else &set_string c_objlib (master_disk)>system>c_object_library
&
&if (exists -directory (master_disk)>system>posix_object_library.&obj2&)
&then &set_string posix_objlib (master_disk)>system>posix_object_library.&obj2&
&else &set_string posix_objlib (master_disk)>system>posix_object_library
&
&if &version& = alpha
&then !set_library_paths object . &tcp_objlib& &+
&POSIX&>c>sysv_runtime>obj&obj& &+
&POSIX&>c>runtime>obj&obj& &+
&c_objlib& &objlib&
&else !set_library_paths object . &stcp_objlib& &+
&stcp_objlib&>common &+
&stcp_objlib&>net &+
&stcp_objlib&>sbsd &+
&stcp_objlib&>socket &+
&posix_objlib&>sysv &+
&posix_objlib&>bsd &+
&posix_objlib& &+
&c_objlib& &objlib&
&if &compiler& = gcc
&then &do
&set_string cflags (before &$cflags& -c)
!&compiler& <<miniperlmain.c perl.a &diag& &cpu& &cflags& -o perl.pm
&if (command_status) ^= 0 &then &return
!delete_file perl.a
&end
&else &do
&if &version& = alpha
&then !bind -control <perl.bind vos_dummies &+
&tcp_objlib&>tcp_runtime &tcp_objlib&>tcp_gethost &+
&cpu& -target_module &tgt_mod& &bindsize& -map
&else !bind -control <perl.bind &cpu& -target_module &tgt_mod& -map
&if (command_status) ^= 0 &then &return
&end
!delete_file *&s& -no_ask -brief
|