aboutsummaryrefslogtreecommitdiff
path: root/gcc/make-l2.com
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-12-07 18:42:52 -0700
committerJeff Law <law@gcc.gnu.org>1997-12-07 18:42:52 -0700
commit14cd4d23c89e2d88420d7e8c70d7ce66aa22db30 (patch)
treedd22e385b3dae9a0e496ba4cc1c0886e5b4296f9 /gcc/make-l2.com
parent0fb9f1c39b7a4ad17bbdacaab965df67daf4c7c5 (diff)
downloadgcc-14cd4d23c89e2d88420d7e8c70d7ce66aa22db30.zip
gcc-14cd4d23c89e2d88420d7e8c70d7ce66aa22db30.tar.gz
gcc-14cd4d23c89e2d88420d7e8c70d7ce66aa22db30.tar.bz2
Updates from gcc-2.8 test tarball to current gcc-2.8 tarball.
From-SVN: r17002
Diffstat (limited to 'gcc/make-l2.com')
-rw-r--r--gcc/make-l2.com106
1 files changed, 78 insertions, 28 deletions
diff --git a/gcc/make-l2.com b/gcc/make-l2.com
index 28a5c86..93694c8 100644
--- a/gcc/make-l2.com
+++ b/gcc/make-l2.com
@@ -1,38 +1,47 @@
-$! 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")'
+$! make-l2.com -- VMS build procedure for libgcc2.
+$
+$! Change working directory to the location of this command procedure.
+$ flnm = f$enviroment("PROCEDURE") !get current procedure name
+$ set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
$!
-$ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
-$ arch = f$element(arch_indx,"|","|vax|alpha|")
-$!
-$! Command file to build libgcc2.olb. You should only run this once you
+$! 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:[000000]gcclib.olb
+$! with gnu_cc:[000000]gcclib.olb
$!
-$! All of the source code is assumed to be in libgcc2.c, and a list of the
+$! All of the C source code is assumed to be in libgcc2.c, and a list of the
$! modules that we need from there is in libgcc2.list (which is generated
-$! when config-gcc.com is run).
+$! when vmsconfig.com is run). The C++ source is found in the [.cp.inc]
+$! directory and managed via libgcc2-cxx.list.
$!
-$if f$search("gcc-cc1.exe").eqs.""
-$ then
-$ gcc-cc1:=$gnu_cc_library:gcc-cc1
-$ else
+$ 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
+$ endif
$!
-$if f$search("gcc-cpp.exe").eqs.""
-$ then
-$ gcc_cpp:=$gnu_cc_library:gcc-cpp
-$ else
+$ 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
+$ Version:='f$trnlnm("GNU_CC_VERSION")'
+$ else
$ gcc_cpp:=$sys$disk:[]gcc-cpp
$ open ifile$ version.opt
$ read ifile$ line
$ close ifile$
-$ endif
+$ Version=line - "ident=""" - """
+$ endif
$!
-$ gcc_as:=$gnu_root:[bin]as
-$ cpp_file:=sys$scratch:gcc_'f$getjpi(0,"pid")'.cpp
+$ if f$search("gcc-cc1plus.exe").eqs.""
+$ then gcc_cxx = "$gnu_cc:[000000]gcc-cc1plus"
+$ else gcc_cxx = "$sys$disk:[]gcc-cc1plus"
+$ 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
$!
$set symbol/scope=(nolocal,noglobal)
@@ -40,9 +49,12 @@ $!
$lib/create libgcc2.olb
$on error then goto c_err
$on control_y then goto c_err
+$
+$if f$trnlnm("IFILE$").nes."" then close/noLog ifile$
$open ifile$ libgcc2.list
-$loop: read ifile$ line/end=c_done
+$loop:
$!
+$read ifile$ line/end=c_done
$i=0
$loop1:
$flnm=f$element(i," ",line)
@@ -64,11 +76,11 @@ $ if arch .eqs. "alpha"
$ then
$ gcc_cpp "-D__IEEE_FLOAT" "-I[]" "-I[.config]" "-I[.ginclude]" "-D''flnm'" libgcc2.c 'cpp_file'
$ gcc_cc1 'cpp_file' -dumpbase 'objname' -
- -quiet -mgas "-O1" -mfloat-ieee -o 's_file'
+ -quiet -mgas "-O1" -mfloat-ieee -o 's_file'
$ else
$ gcc_cpp "-I[]" "-I[.config]" "-I[.ginclude]" "-D''flnm'" libgcc2.c 'cpp_file'
$ gcc_cc1 'cpp_file' -dumpbase 'objname' -
- -quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
+ -quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
$ endif
$ delete/nolog 'cpp_file';
$ gcc_as 's_file' -o 'objname'.OBJ
@@ -87,13 +99,51 @@ $!
$!
$goto loop1
$!
-$goto loop
-$!
$! In case of error or abort, go here (In order to close file).
$!
-$c_err: !'f$verify(0)
+$c_err: !'f$verify(0)
$close ifile$
$ exit %x2c
$!
$c_done:
$close ifile$
+$
+$
+$ EXIT
+$ !gcc-2.8.0: C++ libgcc2 code disabled since it's not adequately tested
+$
+$!
+$ p1 = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7+" "+p8
+$ p1 = " " + f$edit(p1,"COMPRESS,TRIM,UPCASE") + " "
+$! (note: substring locations can only be equal when neither string is present)
+$ if f$locate(" CC1PLUS ",p1).eq.f$locate(" CXX ",p1) then goto cxx_done
+$ if f$search("libgcc2-cxx.list").eqs."" then goto cxx_done
+$!
+$ open/read ifile$ libgcc2-cxx.list
+$cxx_line_loop:
+$ read ifile$ line/end=cxx_done
+$ i = 0
+$cxx_file_loop:
+$ flnm = f$element(i,",",line)
+$ i = i + 1
+$ if flnm.eqs."" .or. flnm.eqs."," then goto cxx_line_loop
+$ write sys$output "$ gcc/plus/debug ''flnm'.cc"
+$ objname = flnm
+$!
+$ gcc_cpp -+ "-I[]" "-I[.ginclude]" "-I[.cp.inc]" [.cp]'flnm'.cc 'cpp_file'
+$ gcc_cxx 'cpp_file' -dumpbase 'objname' -fexceptions -
+ -quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
+$ delete/nolog 'cpp_file';
+$ gcc_as "-vGNU CC V''Version'" 's_file' -o 'objname'.OBJ
+$! Assemble again, preserving lowercase symbol names this time.
+$ gcc_as "-vGNU CC V''Version'" -h3 's_file' -o 'objname'-c.OBJ
+$ delete/nolog 's_file';
+$
+$ library libgcc2.olb 'objname'.obj,'objname'-c.obj
+$ delete/nolog 'objname'.obj;,'objname'-c.obj;
+$!
+$ goto cxx_file_loop
+$!
+$cxx_done:
+$ close ifile$
+$ exit