⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vmsconfig.com

📁 GUN开源阻止下的编译器GCC
💻 COM
📖 第 1 页 / 共 2 页
字号:
$ !$ !	Set up to compile GCC on VAX/VMS$ !$! Set the def dir to proper place for use in batch. Works for interactive too.$flnm = f$enviroment("PROCEDURE")     ! get current procedure name$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'$ !$set symbol/scope=(nolocal,noglobal)$if f$trnlnm("IFILE$").nes."" then close/noLog ifile$$ !$ echo = "write sys$output"$ !$ if f$search("config.h") .nes. "" then delete config.h.*$ copy [.config.vax]xm-vms.h []config.h$ echo "Linked `config.h' to `[.config.vax]xm-vms.h'.$ !$ if f$search("tconfig.h") .nes. "" then delete tconfig.h.*$ create []tconfig.h$DECK/* tconfig.h == config.h :: target and host configurations are the same */#include "config.h"$EOD$ echo "Created `tconfig.h'.$ !$ if f$search("hconfig.h") .nes. "" then delete hconfig.h.*$ create []hconfig.h$DECK/* hconfig.h == config.h :: host and target configurations are the same */#include "config.h"$EOD$ echo "Created `hconfig.h'.$ !$ if f$search("tm.h") .nes. "" then delete tm.h.*$!! copy [.config.vax]vms.h []tm.h$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -        [.config.vax]vms.h /output=[]tm.h$DECK!!  Copy file, changing lines of the form!	#include "vax/*"!  into!	#include "config-*"!   file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));   targ := LINE_BEGIN & '#include' & SPAN(ASCII(32)+ASCII(9)) & '"vax/';   rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));   LOOP      incl := SEARCH_QUIETLY(targ, FORWARD, EXACT, rang);      EXITIF incl = 0;      POSITION(BEGINNING_OF(incl));      ERASE(incl);      COPY_TEXT('#include "config-');      rang := CREATE_RANGE(END_OF(incl), END_OF(file));   ENDLOOP;   WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));   QUIT$EOD$ echo "Generated `tm.h' from `[.config.vax]vms.h'.$ !$	!crude hack to allow compiling from [.cp] subdirectory$ if f$search("config-vax.h") .nes. "" then delete config-vax.h;*$ copy [.config.vax]vax.h []config-vax.h$ echo "Linked `config-vax.h' to `[.config.vax]vax.h' for `tm.h'."$ !$ call make_lang_incl "options.h"$ !$ call make_lang_incl "specs.h"$ !$ if f$search("vax.md") .nes. "" then delete vax.md;*$ copy [.config.vax]vax.md []vax.md$ echo "Copied `vax.md' from `[.config.vax]vax.md'."$ !$ if f$search("aux-output.c") .nes. "" then delete aux-output.c.*$ copy [.config.vax]vax.c []aux-output.c$ echo "Linked `aux-output.c' to `[.config.vax]vax.c'.$ !$!$!$! Create the file version.opt, which helps identify the executable.$!$search version.c version_string,"="/match=and/output=t.tmp$open ifile$ t.tmp$read ifile$ line$close ifile$$delete t.tmp;$ijk=f$locate("""",line)+1$line=f$extract(ijk,f$length(line)-ijk,line)$ijk=f$locate("""",line)$line=f$extract(0,ijk,line)$ijk=f$locate("\n",line)$line=f$extract(0,ijk,line)$!$i=0$loop:$elm=f$element(i," ",line)$if elm.eqs."" then goto no_ident$if (elm.les."9").and.(elm.ges."0") then goto write_ident$i=i+1$goto loop$!$no_ident:$elm="?.??"$!$!$write_ident:$open ifile$ version.opt/write$write ifile$ "ident="+""""+elm+""""$close ifile$$purge version.opt$!$!$! create linker options files that lists all of the components for all$! possible compilers.  We do this by editing the file Makefile.in, and $! generating the relevant files from it.$!$!$! Make a copy of the makefile if the sources are on a disk that is NFS $!    mounted on a unix machine.$if f$search("Makefile.in").eqs."" .and. f$search("$M$akefile.in").nes."" -	then copy $M$akefile.in Makefile.in$! This should be automated across all front-end subdirectories.$!    For now, it's hardcoded.$if f$search("[.cp]Makefile.in").eqs."" .and. f$search("[.cp]$M$akefile.in").nes."" -	then copy [.cp]$M$akefile.in [.cp]Makefile.in$!$!$echo "Now processing Makefile.in to generate linker option files."$edit/TPU/noJournal/noSection/noDisplay/Command=sys$input: Makefile.in!!VARIABLE makefile_buf, opt_file_buf, complist_buf, extra_compilers; ! Globals.!!PROCEDURE process_makefile( )  !  ! Interpret Makefile.in and subsidiary Make-lang.in templates.  !  LOCAL range1, cmark, makefilename;  makefilename	  := GET_INFO (COMMAND_LINE, 'FILE_NAME'); ! "Makefile.in"  makefile_buf	  := CREATE_BUFFER ("makefile", makefilename);  opt_file_buf	  := CREATE_BUFFER ("opt_file");  complist_buf	  := CREATE_BUFFER ("complist");  extra_compilers := CREATE_ARRAY;  !  SET (NO_WRITE, makefile_buf, ON);	! Used as workspace; don't save it.  SET (OUTPUT_FILE, complist_buf, "compilers.list");  !  ! Make some textual substitutions.  !  configure_makefile ();  !  ! Collect a list of supported compilers (``COMPILERS=xxx'' macro).  !  identify_compilers ();  !  ! Plus other known compilers described by Make-lang.in makefile fragments.  ! Add new entries as needed; args are (target name, subdirectory name).  !  additional_compiler ("cc1plus", "cp");  !  WRITE_FILE (complist_buf);		! Now save "compilers.list".  !  ! Add to this list, as required.  The file "Makefile.in" is searched for  ! a tag that looks like "LINE_BEGIN + 'tag + (optional space) + "="".  ! The contents are assumed to be a list of object files, and from this  ! list a VMS linker options file is generated.  !  generate_option_file ("OBJS",      "=", "independent.opt");  generate_option_file ("LIB2FUNCS", "=", "libgcc2.list");  generate_option_file ("BC_ALL",    "=", "bc_all.list");  generate_option_file ("BI_OBJ",    "=", "bi_all.opt");  !  ! Now change OBJS in the Makefile, so each language specific options file  ! does not pick up all of the language independent files.  !  POSITION (BEGINNING_OF (makefile_buf));  COPY_TEXT ("OBJS=");	! New copy with empty value, seen before real OBJS.  SPLIT_LINE;  !  ! Lastly, process each compiler-specific object dependency list.  !  POSITION (BEGINNING_OF (complist_buf));  LOOP    cmark := MARK (NONE);    EXITIF (cmark = END_OF (complist_buf));    ! The current line contains the name of a compiler target, such as "cc1".    MESSAGE (CURRENT_LINE);	! Give some interactive feedback.    generate_option_file (CURRENT_LINE, ":", CURRENT_LINE + "-objs.opt");    POSITION (cmark);    MOVE_VERTICAL (1);		! Go to the next line.  ENDLOOP;ENDPROCEDURE; !process_makefile!!PROCEDURE process_objc_lib( )  !  ! Interpret objc/Makefile, after finishing the top makefile.  !  ON_ERROR    [TPU$_OPENIN]:      MESSAGE ("Cannot load objc/Makefile for ""ObjClib""; skipping it.");      RETURN;  ENDON_ERROR;  ERASE (makefile_buf);			!discard top Makefile  POSITION (END_OF (makefile_buf));  READ_FILE ("[.objc]Makefile");	!load objc one  MESSAGE ("objclib");  pat_replace (ASCII(9), " ");		!change any <tab> to <space>  generate_option_file ("OBJC_O", "=", "objc-objs.opt");  POSITION (BEGINNING_OF (makefile_buf));  ! Join any continuation lines; we want the header list to be one line.  pat_replace ("\" & LINE_END, );  generate_option_file ("OBJC_H", "=", "objc-hdrs.list");ENDPROCEDURE; !process_objc_lib!!PROCEDURE configure_makefile( )  !  ! Plug in some values normally handled by `configure'.  Rather than  ! replacing the dummy entries, insert the real entries before them.  !  POSITION (BEGINNING_OF (makefile_buf));  COPY_TEXT ("target=vax-vms");			SPLIT_LINE;  COPY_TEXT ("out_file=aux-output.c");		SPLIT_LINE;	! vax/vax.c  COPY_TEXT ("out_object_file=aux-output.o");	SPLIT_LINE;	! aux-output.obj  COPY_TEXT ("md_file=vax.md");			SPLIT_LINE;	! vax/vax.md  COPY_TEXT ("tm_file=tm.h");			SPLIT_LINE;	! vax/tm-vms.hENDPROCEDURE; !configure_makefile!!PROCEDURE identify_compilers( )  !  ! Retrieve the list of supported compilers from Makefile.in, and put them  ! into file "compilers.list", one per line, for subsequent access from DCL.  !  LOCAL range1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -