X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vos%2Fbuild.cm;h=4bdd976c7b5e55ee9dd069a042dc6aec7c2b2884;hb=78d3e1bf81e401020937b98d17bdfe2107623029;hp=f749538231adee5024130bf1e07691d6c92374ea;hpb=5b8c1387d8b2fe34154451bb2cea5895305c0541;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vos/build.cm b/vos/build.cm index f749538..4bdd976 100644 --- a/vos/build.cm +++ b/vos/build.cm @@ -4,6 +4,7 @@ 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 & @@ -31,6 +32,12 @@ &return 1 &end & +&if &compiler& = gcc & &version& = alpha +&then &do + &display_line build: "-compiler gcc" is incompatible with "-version alpha" + &return 1 + &end +& & Set up the appropriate directory suffix for each architecture. & &if &cpu& = mc68020 @@ -46,58 +53,94 @@ &then &set_string obj2 .68k &else &set_string obj2 &obj& & +&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 & -& If requested, compile the source code. +& Suppress several harmless compiler warning and advice messages. +& Use -list -show_include all -show_macros both_ways when debugging. & -&if &recompile& = 0 -&then &goto CHECK_REBIND +&set_string cflags -D_SVID_SOURCE -D_POSIX_C_SOURCE=199506L -DPERL_CORE -O4 +& +&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 (exists *.obj -link) -&then !unlink *.obj -no_ask -brief -& -& Suppress several harmless compiler warning and advice messages. -& Use -list -show_include all -show_macros both_ways when debugging. +&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 & -&set_string cflags '-u -O4 -D_POSIX_C_SOURCE=199506L -DPERL_CORE' +& If requested, compile the source code. & -& The following is a work-around for stcp-1437,8,9 +&if &recompile& = 0 +&then &goto CHECK_REBIND & -&if &version& = ga -&then &set_string cflags &cflags& -D_BSD_SOURCE +& Some of the compiler invocations need more VM than +& the defaults allow. Raise the limits. +!update_process_cmd_limits -initial_total_limit 100000000 -no_ask & -!cc < 0 & (module_info os_release) < 'VOS Release 14.1.0' -&then !cc <net &+ &stcp_objlib&>sbsd &+ &stcp_objlib&>socket &+ + &posix_objlib&>sysv &+ &posix_objlib&>bsd &+ &posix_objlib& &+ &c_objlib& &objlib& -&if &version& = alpha -&then !bind -control tcp_runtime &tcp_objlib&>tcp_gethost &+ - &cpu& -target_module &tgt_mod& -map -&else !bind -control