source: trunk/binutils/gas/make-gas.com@ 2912

Last change on this file since 2912 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 5.1 KB
Line 
1$!make-gas.com
2$! Set the def dir to proper place for use in batch. Works for interactive to.
3$flnm = f$enviroment("PROCEDURE") ! get current procedure name
4$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
5$v = 'f$verify(0)'
6$!
7$! Command file to build a GNU assembler on VMS
8$!
9$! If you are using a version of GCC that supports global constants
10$! you should remove the define="const=" from the gcc lines.
11$!
12$! Caution: Versions 1.38.1 and earlier had a bug in the handling of
13$! some static constants. If you are using such a version of the
14$! assembler, and you wish to compile without the "const=" hack,
15$! you should first build this version *with* the "const="
16$! definition, and then use that assembler to rebuild it without the
17$! "const=" definition. Failure to do this will result in an assembler
18$! that will mung floating point constants.
19$!
20$! Note: The version of gas shipped on the GCC VMS tapes has been patched
21$! to fix the above mentioned bug.
22$!
23$ !The gcc-vms driver was modified to use `-1' quite some time ago,
24$ !so don't echo this text any more...
25$ !write sys$output "If this assembler is going to be used with GCC 1.n, you"
26$ !write sys$output "need to modify the driver to supply the -1 switch to gas."
27$ !write sys$output "This is required because of a small change in how global"
28$ !write sys$output "constant variables are handled. Failure to include this"
29$ !write sys$output "will result in linker warning messages about mismatched
30$ !write sys$output "psect attributes."
31$!
32$ gas_host="vms"
33$ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
34$ arch = f$element(arch_indx,"|","|VAX|Alpha|")
35$ if arch.eqs."VAX"
36$ then
37$ cpu_type="vax"
38$ obj_format="vms"
39$ atof="vax"
40$ else
41$ cpu_type="alpha"
42$ obj_format="evax"
43$ atof="ieee"
44$ endif
45$ emulation="generic"
46$!
47$ COPY = "copy/noLog"
48$!
49$ C_DEFS :="""VMS"""
50$! C_DEFS :="""VMS""","""const="""
51$ C_INCLUDES = "/Include=([],[.config],[-.include],[-.include.aout])"
52$ C_FLAGS = "/noVerbose/Debug" + c_includes
53$!
54$!
55$ on error then goto bail
56$ if f$search("[-.libiberty]liberty.olb").eqs.""
57$ then @[-.libiberty]vmsbuild.com
58$ write sys$output "Now building gas."
59$ endif
60$ if "''p1'" .eqs. "LINK" then goto Link
61$!
62$! This helps gcc 1.nn find the aout/* files.
63$!
64$ aout_dev = f$parse(flnm,,,"DEVICE")
65$ tmp = aout_dev - ":"
66$if f$trnlnm(tmp).nes."" then aout_dev = f$trnlnm(tmp)
67$ aout_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
68 - "GAS]" + "INCLUDE.AOUT.]" - "]["
69$assign 'aout_dir' aout/tran=conc
70$ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
71 - "GAS]" + "INCLUDE.OPCODE.]" - "]["
72$assign 'opcode_dir' opcode/tran=conc
73$!
74$ set verify
75$!
76$ gcc 'c_flags'/Define=('C_DEFS')/Object=[]tc-'cpu_type'.obj [.config]tc-'cpu_type'.c
77$ gcc 'c_flags'/Define=('C_DEFS')/Object=[]obj-'obj_format'.obj [.config]obj-'obj_format'.c
78$ gcc 'c_flags'/Define=('C_DEFS')/Object=[]atof-'atof'.obj [.config]atof-'atof'.c
79$ gcc 'c_flags'/Define=('C_DEFS') app.c
80$ gcc 'c_flags'/Define=('C_DEFS') as.c
81$ gcc 'c_flags'/Define=('C_DEFS') atof-generic.c
82$ gcc 'c_flags'/Define=('C_DEFS') bignum-copy.c
83$ gcc 'c_flags'/Define=('C_DEFS') cond.c
84$ gcc 'c_flags'/Define=('C_DEFS') depend.c
85$ gcc 'c_flags'/Define=('C_DEFS') dwarf2dbg.c
86$ gcc 'c_flags'/Define=('C_DEFS') ehopt.c
87$ gcc 'c_flags'/Define=('C_DEFS') expr.c
88$ gcc 'c_flags'/Define=('C_DEFS') flonum-konst.c
89$ gcc 'c_flags'/Define=('C_DEFS') flonum-copy.c
90$ gcc 'c_flags'/Define=('C_DEFS') flonum-mult.c
91$ gcc 'c_flags'/Define=('C_DEFS') frags.c
92$ gcc 'c_flags'/Define=('C_DEFS') hash.c
93$ gcc 'c_flags'/Define=('C_DEFS') input-file.c
94$ gcc 'c_flags'/Define=('C_DEFS') input-scrub.c
95$ gcc 'c_flags'/Define=('C_DEFS') literal.c
96$ gcc 'c_flags'/Define=('C_DEFS') messages.c
97$ gcc 'c_flags'/Define=('C_DEFS') output-file.c
98$ gcc 'c_flags'/Define=('C_DEFS') read.c
99$ gcc 'c_flags'/Define=('C_DEFS') subsegs.c
100$ gcc 'c_flags'/Define=('C_DEFS') symbols.c
101$ gcc 'c_flags'/Define=('C_DEFS') write.c
102$ gcc 'c_flags'/Define=('C_DEFS') listing.c
103$ gcc 'c_flags'/Define=('C_DEFS') ecoff.c
104$ gcc 'c_flags'/Define=('C_DEFS') stabs.c
105$ gcc 'c_flags'/Define=('C_DEFS') sb.c
106$ gcc 'c_flags'/Define=('C_DEFS') macro.c
107$link:
108$!'f$verify(0)'
109$ if f$trnlnm("IFILE$").nes."" then close/noLog ifile$
110$ create gcc-as.opt
111!
112! Linker options file for GNU assembler
113!
114$ open/Append ifile$ gcc-as.opt
115$ write ifile$ "tc-''cpu_type'.obj"
116$ write ifile$ "obj-''obj_format'.obj"
117$ write ifile$ "atof-''atof'.obj"
118$ COPY sys$input: ifile$:
119app.obj,-
120as.obj,-
121atof-generic.obj,-
122bignum-copy.obj,-
123cond.obj,-
124depend.obj,-
125dwarf2dbg.obj,-
126ehopt.obj,-
127expr.obj,-
128flonum-konst.obj,-
129flonum-copy.obj,-
130flonum-mult.obj,-
131frags.obj,-
132hash.obj,-
133input-file.obj,-
134input-scrub.obj,-
135literal.obj,-
136messages.obj,-
137output-file.obj,-
138read.obj,-
139subsegs.obj,-
140symbols.obj,-
141write.obj,-
142listing.obj,-
143ecoff.obj,-
144stabs.obj,-
145sb.obj,-
146macro.obj,-
147[-.libiberty]liberty.olb/Lib
148gnu_cc:[000000]gcclib.olb/Lib,sys$library:vaxcrtl.olb/Lib
149! Tell linker exactly what psect attributes we want -- match VAXCRTL.
150psect_attr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt
151$ close ifile$
152$ set verify=(Proc,noImag)
153$ link/noMap/Exec=gcc-as.exe gcc-as.opt/Opt,version.opt/Opt
154$!
155$bail: exit $status + 0*f$verify(v) !'f$verify(0)'
Note: See TracBrowser for help on using the repository browser.