aboutsummaryrefslogtreecommitdiff
path: root/gcc/make-l2.com
diff options
context:
space:
mode:
authormycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>1992-04-20 19:15:26 +0000
committermycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>1992-04-20 19:15:26 +0000
commit629a5b0f8a9ddcf4b27467ff89cac230cffba34a (patch)
tree5f272458cd3f166d0e69580e638a5f6bb76cc68f /gcc/make-l2.com
parent004dc5878bb82a2402909814b57568b675c80e85 (diff)
entered into RCS
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@807 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/make-l2.com')
-rw-r--r--gcc/make-l2.com83
1 files changed, 42 insertions, 41 deletions
diff --git a/gcc/make-l2.com b/gcc/make-l2.com
index a4e45c6079a..736377ba0ba 100644
--- a/gcc/make-l2.com
+++ b/gcc/make-l2.com
@@ -7,6 +7,10 @@ $! 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
$!
+$! All of the 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).
+$!
$if f$search("gcc-cc1.exe").eqs.""
$ then
$ gcc_cc1:=$gnu_cc:[000000]gcc-cc1
@@ -19,8 +23,13 @@ $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$
+$ Version=line-"ident="""-"""
$ endif
$!
$gcc_as:=$gnu_cc:[000000]gcc-as
@@ -37,55 +46,47 @@ $exit 0
$!
$compile:
$lib/create libgcc2.olb
-$call compile_libgcc2 "L_muldi3"
-$call compile_libgcc2 "L_divdi3"
-$call compile_libgcc2 "L_moddi3"
-$call compile_libgcc2 "L_udivdi3"
-$call compile_libgcc2 "L_umoddi3"
-$call compile_libgcc2 "L_negdi2"
-$call compile_libgcc2 "L_lshrdi3"
-$call compile_libgcc2 "L_lshldi3"
-$call compile_libgcc2 "L_ashldi3"
-$call compile_libgcc2 "L_ashrdi3"
-$call compile_libgcc2 "L_udivmoddi4"
-$call compile_libgcc2 "L_cmpdi2"
-$call compile_libgcc2 "L_ucmpdi2"
-$call compile_libgcc2 "L_floatdidf"
-$call compile_libgcc2 "L_floatdisf"
-$call compile_libgcc2 "L_fixunsdfsi"
-$call compile_libgcc2 "L_fixunssfsi"
-$call compile_libgcc2 "L_fixunsdfdi"
-$call compile_libgcc2 "L_fixdfdi"
-$call compile_libgcc2 "L_fixunssfdi"
-$call compile_libgcc2 "L_fixsfdi"
-$call compile_libgcc2 "L_varargs"
-$call compile_libgcc2 "L_eprintf"
-$call compile_libgcc2 "L_builtin_new"
-$call compile_libgcc2 "L_builtin_New" L_builtin_nnew
-$call compile_libgcc2 "L_builtin_del"
-$call compile_libgcc2 "L_bb"
-$call compile_libgcc2 "L_shtab"
-$call compile_libgcc2 "L_clear_cache"
-$call compile_libgcc2 "L_trampoline"
-$call compile_libgcc2 "L__main"
-$!call compile_libgcc2 "L_exit"
-$exit
-$!
-$compile_libgcc2:
-$subroutine
-$objname = p1
-$if p2.nes."" then objname = p2
+$on error then goto c_err
+$on control_y then goto c_err
+$open ifile$ libgcc2.list
+$loop: read ifile$ line/end=c_done
+$!
+$i=0
+$loop1:
+$flnm=f$element(i," ",line)
+$i=i+1
+$if flnm.eqs."" then goto loop
+$if flnm.eqs." " then goto loop
+$!
+$flnm = "L"+flnm
+$if flnm.eqs."L_exit" then goto loop1
+$write sys$output "$ gcc/debug/define=''flnm' LIBGCC2.C"
+$!
+$objname = flnm
+$if flnm.eqs."L_builtin_New" then objname = "L_builtin_nnew"
$!
$! 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_cpp "-I[]" "-I[.CONFIG]" "-D''flnm'" LIBGCC2.C 'cpp_file'
$ gcc_cc1 'cpp_file' -dumpbase 'objname' -
-quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
$ delete/nolog 'cpp_file';
-$ gcc_as 's_file' -o 'objname'.OBJ
+$ gcc_as "-vGNU CC V''Version'" 's_file' -o 'objname'.OBJ
$ delete/nolog 's_file';
$!
$lib libgcc2.olb 'objname'.obj
$del 'objname'.obj;/nolog
-$endsubroutine
+$!
+$goto loop1
+$!
+$goto loop
+$!
+$! In case of error or abort, go here (In order to close file).
+$!
+$c_err: !'f$verify(0)
+$close ifile$
+$ exit %x2c
+$!
+$c_done:
+$close ifile$