]> gcc.gnu.org Git - gcc.git/blame - gcc/make-l2.com
Change the location of the Sun bundled C compiler (for backup defaults).
[gcc.git] / gcc / make-l2.com
CommitLineData
948c37aa
RS
1$! Set the def dir to proper place for use in batch. Works for interactive too.
2$flnm = f$enviroment("PROCEDURE") ! get current procedure name
3$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
948c37aa
RS
4$!
5$! Command file to build libgcc2.olb. You should only run this once you
6$! have the current compiler installed, otherwise some of the builtins will
7$! not be recognized. Once you have built libgcc2.olb, you can merge this
8$! with gnu_cc:[000000]gcclib.olb
9$!
5944b57e
CH
10$! All of the source code is assumed to be in libgcc2.c, and a list of the
11$! modules that we need from there is in libgcc2.list (which is generated
12$! when config-gcc.com is run).
13$!
82f9fd12
RS
14$if f$search("gcc-cc1.exe").eqs.""
15$ then
16$ gcc_cc1:=$gnu_cc:[000000]gcc-cc1
17$ if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).eqs."1" then goto nocompile
18$ else
19$ gcc_cc1:=$sys$disk:[]gcc-cc1
20$ endif
6ab6f071 21$!
82f9fd12
RS
22$if f$search("gcc-cpp.exe").eqs.""
23$ then
24$ gcc_cpp:=$gnu_cc:[000000]gcc-cpp
25$ if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).eqs."1" then goto nocompile
5944b57e 26$ Version:='f$trnlnm("GNU_CC_VERSION")'
82f9fd12
RS
27$ else
28$ gcc_cpp:=$sys$disk:[]gcc-cpp
5944b57e
CH
29$ open ifile$ version.opt
30$ read ifile$ line
31$ close ifile$
32$ Version=line-"ident="""-"""
82f9fd12
RS
33$ endif
34$!
35$gcc_as:=$gnu_cc:[000000]gcc-as
36$cpp_file:=sys$scratch:gcc_'f$getjpi(0,"pid")'.cpp
37$s_file:=sys$scratch:gcc_'f$getjpi(0,"pid")'.s
7f211789
RS
38$!
39$set symbol/scope=(nolocal,noglobal)
40$!
82f9fd12
RS
41$goto compile
42$!
43$nocompile:
44$write sys$error "You must have gcc version 2 in order to build libgcc2."
45$exit 0
6ab6f071
RS
46$!
47$compile:
948c37aa 48$lib/create libgcc2.olb
5944b57e
CH
49$on error then goto c_err
50$on control_y then goto c_err
51$open ifile$ libgcc2.list
52$loop: read ifile$ line/end=c_done
53$!
54$i=0
55$loop1:
56$flnm=f$element(i," ",line)
57$i=i+1
58$if flnm.eqs."" then goto loop
59$if flnm.eqs." " then goto loop
60$!
61$flnm = "L"+flnm
62$if flnm.eqs."L_exit" then goto loop1
b47bae41 63$write sys$output "$ gcc/debug/define=""''flnm'"" LIBGCC2.C"
5944b57e
CH
64$!
65$objname = flnm
66$if flnm.eqs."L_builtin_New" then objname = "L_builtin_nnew"
82f9fd12
RS
67$!
68$! We do this by hand, since the VMS compiler driver does not have a way
69$! of specifying an alternate location for the compiler executables.
70$!
5944b57e 71$ gcc_cpp "-I[]" "-I[.CONFIG]" "-D''flnm'" LIBGCC2.C 'cpp_file'
7f211789 72$ gcc_cc1 'cpp_file' -dumpbase 'objname' -
82f9fd12
RS
73 -quiet -mgnu -g "-O1" -mvaxc-alignment -o 's_file'
74$ delete/nolog 'cpp_file';
5944b57e 75$ gcc_as "-vGNU CC V''Version'" 's_file' -o 'objname'.OBJ
b47bae41
RS
76$! Assemble again, preserving lowercase symbol names this time.
77$ gcc_as "-vGNU CC V''Version'" -h3 's_file' -o 'objname'-c.OBJ
82f9fd12
RS
78$ delete/nolog 's_file';
79$!
b47bae41
RS
80$ library libgcc2.olb 'objname'.obj,'objname'-c.obj
81$ delete/nolog 'objname'.obj;,'objname'-c.obj;
5944b57e
CH
82$!
83$goto loop1
84$!
85$goto loop
86$!
87$! In case of error or abort, go here (In order to close file).
88$!
89$c_err: !'f$verify(0)
90$close ifile$
91$ exit %x2c
92$!
93$c_done:
94$close ifile$
This page took 0.08182 seconds and 5 git commands to generate.