aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-03-30 21:29:45 +0000
committerRichard Stallman <rms@gnu.org>1992-03-30 21:29:45 +0000
commit82f9fd122dfcdcb08cb5282330bb2da240c8c851 (patch)
tree067f95229278b0e68c5d4059899d9ee23d723528 /gcc
parentc6e0e0d378cdad4aecd513f8f317723adfee6bbd (diff)
downloadgcc-82f9fd122dfcdcb08cb5282330bb2da240c8c851.zip
gcc-82f9fd122dfcdcb08cb5282330bb2da240c8c851.tar.gz
gcc-82f9fd122dfcdcb08cb5282330bb2da240c8c851.tar.bz2
*** empty log message ***
From-SVN: r637
Diffstat (limited to 'gcc')
-rw-r--r--gcc/make-gcc.com58
-rw-r--r--gcc/make-l2.com40
2 files changed, 39 insertions, 59 deletions
diff --git a/gcc/make-gcc.com b/gcc/make-gcc.com
index c9afc94..bf8cd69 100644
--- a/gcc/make-gcc.com
+++ b/gcc/make-gcc.com
@@ -5,6 +5,8 @@ $! 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)
+$!
$! First, build the preprocesor.
$!
$ @make-cccp
@@ -25,61 +27,7 @@ $! add them to gnu_cc:[000000]gcclib.olb. You may have to delete the eprintf
$! and new modules from the gnu_cc:[000000]gcclib.olb, since libgcc2 supplies
$! these same routines with different module names.
$!
-$! Set up the logical names to use the compiler that we just built.
-$!
-$ Procedure:='f$environment("PROCEDURE")'
-$ Device:='f$parse(Procedure,,,"DEVICE","NO_CONCEAL")'
-$ Directory:='f$parse(Procedure,,,"DIRECTORY","NO_CONCEAL")'
-$ Path:="''Device'''Directory'"
-$!
-$! Check for "rooted" directory specs
-$!
-$ l = 'f$length(Path)'
-$ tmp = 'f$locate(".][",Path)'
-$ if 'tmp' .ne. 'l' then goto 10$
-$ tmp = 'f$locate(".><",Path)'
-$ if 'tmp' .ne. 'l' then goto 10$
-$ goto 100$
-$!
-$! Eliminate rooted directory specs
-$!
-$ 10$:
-$ if "''f$extract(tmp,255,Path)'" .eqs. ".][000000]" then goto 20$
-$ if "''f$extract(tmp,255,Path)'" .eqs. ".><000000>" then goto 20$
-$ l = tmp + 3
-$ Path:="''f$extract(0,tmp,Path)'.''f$extract(l,255,Path)'"
-$ goto 100$
-$ 20$:
-$ l = tmp + 1
-$ Path:="''f$extract(0,tmp,Path)'''f$extract(l,1,Path)'"
-$ 100$:
-$!
-$! Calculate the prefix and suffix (used in generating desired paths)
-$!
-$ l = 'f$length(Path)' - 1
-$ Prefix:='f$Extract(0,l,Path)'
-$ Suffix:='f$extract(l,1,Path)'
-$!
-$ gnu_cc_path:="''Prefix'.''Suffix'"
-$!
-$oldgcc=f$trnlnm("GNU_CC")
-$ assign 'gnu_cc_path'/translation=concealed, -
- 'f$trnlnm("GNU_CC")/translation=concealed GNU_CC
-$!
-$! Set the version number from version.opt.
-$!
-$open ifile$ version.opt
-$read ifile$ line
-$close ifile$
-$ijk = f$locate("=",line) + 1
-$line='f$extract(ijk,255,line)
-$assign 'line' gnu_cc_version
-$!
$! Now build gcclib2.olb
$!
-$@make-l2
-$!
-$! Deassign logical names.
+$ @make-l2
$!
-$deassign gnu_cc_version
-$deassign gnu_cc
diff --git a/gcc/make-l2.com b/gcc/make-l2.com
index c9d6a3c..1853b08 100644
--- a/gcc/make-l2.com
+++ b/gcc/make-l2.com
@@ -2,15 +2,37 @@ $! 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)
+$!
$! Command file to build libgcc2.olb. You should only run this once you
$! have the current compiler installed, otherwise some of the builtins will
$! not be recognized. Once you have built libgcc2.olb, you can merge this
$! with gnu_cc:[000000]gcclib.olb
$!
-$if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).nes."1" then goto compile
+$if f$search("gcc-cc1.exe").eqs.""
+$ then
+$ gcc_cc1:=$gnu_cc:[000000]gcc-cc1
+$ if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).eqs."1" then goto nocompile
+$ else
+$ gcc_cc1:=$sys$disk:[]gcc-cc1
+$ endif
$!
-$write sys$output "This must be compiled by gcc 2.0"
-$exit
+$if f$search("gcc-cpp.exe").eqs.""
+$ then
+$ gcc_cpp:=$gnu_cc:[000000]gcc-cpp
+$ if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).eqs."1" then goto nocompile
+$ else
+$ gcc_cpp:=$sys$disk:[]gcc-cpp
+$ endif
+$!
+$gcc_as:=$gnu_cc:[000000]gcc-as
+$cpp_file:=sys$scratch:gcc_'f$getjpi(0,"pid")'.cpp
+$s_file:=sys$scratch:gcc_'f$getjpi(0,"pid")'.s
+$goto compile
+$!
+$nocompile:
+$write sys$error "You must have gcc version 2 in order to build libgcc2."
+$exit 0
$!
$compile:
$lib/create libgcc2.olb
@@ -52,7 +74,17 @@ $compile_libgcc2:
$subroutine
$objname = p1
$if p2.nes."" then objname = p2
-$gcc/include=([],[.config])/debug/define="''p1'" libgcc2.c/obj='objname'.obj
+$!
+$! We do this by hand, since the VMS compiler driver does not have a way
+$! of specifying an alternate location for the compiler executables.
+$!
+$ gcc_cpp "-I[]" "-I[.CONFIG]" "-D''p1'" LIBGCC2.C 'cpp_file'
+$ gcc_cc1 'cpp_file' -dumpbase LIBGCC2 -
+ -quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
+$ delete/nolog 'cpp_file';
+$ gcc_as 's_file' -o 'p1'.OBJ
+$ delete/nolog 's_file';
+$!
$lib libgcc2.olb 'objname'.obj
$del 'objname'.obj;/nolog
$endsubroutine