Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit fb79246

Browse files
2009-09-01 Tristan Gingold <[email protected]>
* makefile.vms: Adjust include pathes. Remove useless vaxctrl library. * configure.com: Ported to Itanium VMS. Create build.com DCL script. Make edit silent.
1 parent e06ae0d commit fb79246

File tree

5 files changed

+144
-52
lines changed

5 files changed

+144
-52
lines changed

Diff for: ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2009-09-01 Tristan Gingold <[email protected]>
2+
3+
* setup.com: Ported to Itanium VMS. Can also build using DCL scripts.
4+
Remove logical names.
5+
16
2009-08-31 Dave Korn <[email protected]>
27

38
* ltmain.sh (func_normal_abspath): New function.

Diff for: gas/ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2009-09-01 Tristan Gingold <[email protected]>
2+
3+
* makefile.vms: Adjust include pathes. Remove useless vaxctrl
4+
library.
5+
* configure.com: Ported to Itanium VMS. Create build.com DCL script.
6+
Make edit silent.
7+
18
2009-09-01 Jie Zhang <[email protected]>
29

310
* config/bfin-parse.y (asm_1): Only PREG and DREG are allowed

Diff for: gas/configure.com

+100-29
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,55 @@ $! files for a VMS system. We do not use the configure script, since we
44
$! do not have /bin/sh to execute it.
55
$!
66
$!
7-
$ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
8-
$ arch = f$element(arch_indx,"|","|VAX|Alpha|")
9-
$!
10-
$ if arch.eqs."Alpha"
7+
$ arch=F$GETSYI("ARCH_NAME")
8+
$ arch=F$EDIT(arch,"LOWERCASE")
9+
$ if arch.eqs."alpha"
10+
$ then
11+
$ format = "evax"
12+
$ target_alias = "alpha-dec-openvms"
13+
$ target_canonical = "alpha-dec-openvms"
14+
$ endif
15+
$ if arch.eqs."ia64"
1116
$ then
17+
$ format = "elf"
18+
$ target_alias = "ia64-openvms"
19+
$ target_canonical = "ia64-unknown-openvms"
20+
$ endif
21+
$!
22+
$!
23+
$ write sys$output "Generate targ-cpu.[ch]"
24+
$!
25+
$! Target specific information
26+
$ open/write outfile targ-cpu.h
27+
$ write outfile "#include ""tc-''arch'.h"""
28+
$ close outfile
1229
$! Target specific information
13-
$ create targ-cpu.h
14-
#include "tc-alpha.h"
15-
$ create targ-cpu.c
16-
#include "tc-alpha.c"
17-
$ create targ-env.h
18-
#define TE_VMS
19-
#include "obj-format.h"
20-
$
30+
$ open/write outfile targ-cpu.c
31+
$ write outfile "#include ""tc-''arch'.c"""
32+
$ close outfile
33+
$!
34+
$ write sys$output "Generate targ-env.h"
35+
$!
36+
$ create targ-env.h
37+
#include "te-generic.h"
38+
$!
39+
$ write sys$output "Generate obj-format.[ch]"
40+
$!
2141
$! Code to handle the object file format.
22-
$ create obj-format.h
23-
#include "obj-evax.h"
24-
$ create obj-format.c
25-
#include "obj-evax.c"
26-
$ create atof-targ.c
42+
$ open/write outfile obj-format.h
43+
$ write outfile "#include ""obj-''format'.h"""
44+
$ close outfile
45+
$ open/write outfile obj-format.c
46+
$ write outfile "#include ""obj-''format'.c"""
47+
$ close outfile
48+
$!
49+
$ write sys$output "Generate atof-targ.c"
50+
$!
51+
$ create atof-targ.c
2752
#include "atof-ieee.c"
53+
$!
54+
$ write sys$output "Generate gas/config.h"
55+
$!
2856
$ create config-vms.in
2957
/* config.h. Generated by configure.com. */
3058
/* Define to 1 if using `alloca.c'. */
@@ -51,6 +79,9 @@ $ create config-vms.in
5179
#include <builtins.h>
5280
#define C_alloca(x) __ALLOCA(x)
5381

82+
/* Define to 1 if you have the `basename' function. */
83+
#define HAVE_DECL_BASENAME 1
84+
5485
/* Is the prototype for getopt in <unistd.h> in the expected format? */
5586
#define HAVE_DECL_GETOPT 1
5687

@@ -119,15 +150,6 @@ $ create config-vms.in
119150
/* Define to 1 if you have the ANSI C header files. */
120151
#define STDC_HEADERS 1
121152

122-
/* Target alias. */
123-
#define TARGET_ALIAS "alpha-dec-openvms"
124-
125-
/* Canonical target. */
126-
#define TARGET_CANONICAL "alpha-dec-openvms"
127-
128-
/* Target CPU. */
129-
#define TARGET_CPU "alpha"
130-
131153
/* Target OS. */
132154
#define TARGET_OS "openvms"
133155

@@ -143,13 +165,12 @@ $ create config-vms.in
143165
#undef YYTEXT_POINTER
144166

145167
/* Version number of package */
146-
$
147-
$ endif
148168
$!
149169
$! Get VERSION from ../bfd/configure.in
150170
$!
151171
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
152172
$DECK
173+
set (success, off);
153174
mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
154175
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
155176
IF match_pos <> 0 THEN;
@@ -167,6 +188,56 @@ $DECK
167188
COPY_TEXT("""");
168189
WRITE_FILE(file, "config.h");
169190
QUIT
170-
$ EOD
191+
$EOD
171192
$del/nolog config-vms.in;
193+
$ open/append outfile config.h
194+
$ write outfile ""
195+
$ write outfile "/* Target alias. */"
196+
$ write outfile "#define TARGET_ALIAS ""''target_alias'"""
197+
$ write outfile ""
198+
$ write outfile "/* Canonical target. */"
199+
$ write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
200+
$ write outfile ""
201+
$ write outfile "/* Target CPU. */"
202+
$ write outfile "#define TARGET_CPU ""'arch'"""
203+
$ close outfile
204+
$!
205+
$ write sys$output "Generate gas/build.com"
206+
$!
207+
$ create build.com
208+
$DECK
209+
$ DEFS=""
210+
$ OPT="/noopt/debug"
211+
$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
212+
"/name=(as_is,shortened)" +-
213+
"/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
214+
$ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
215+
"expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
216+
"input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
217+
"listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
218+
$ LIBBFD = ",[-.bfd]libbfd.olb/lib"
219+
$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
220+
$ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
221+
$!
222+
$ write sys$output "CFLAGS=",CFLAGS
223+
$ if p1.nes."LINK"
224+
$ then
225+
$ write sys$output "Compiling targ-cpu.c (/noopt)"
226+
$ cc 'CFLAGS /noopt targ-cpu
227+
$ NUM = 0
228+
$ LOOP:
229+
$ F = F$ELEMENT(NUM,",",FILES)
230+
$ IF F.EQS."," THEN GOTO END
231+
$ write sys$output "Compiling ", F, ".c"
232+
$ cc 'CFLAGS 'F.c
233+
$ NUM = NUM + 1
234+
$ GOTO LOOP
235+
$ END:
236+
$ endif
237+
$ purge
238+
$!
239+
$ write sys$output "Building as.exe"
240+
$ AS_OBJS="targ-cpu," + FILES + LIBOPCODES + LIBBFD + LIBIBERTY
241+
$ link/exe=as 'AS_OBJS
172242
$exit
243+

Diff for: gas/makefile.vms

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66
#CC=gcc
77
CC=cc
8-
ARCH=ALPHA
98

109
ifeq ($(CC),gcc)
1110
DEFS=
@@ -16,10 +15,9 @@ else
1615
#DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA")
1716
OPT=/noopt/debug
1817
CFLAGS=/names=(as_is,shortened)\
19-
/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)$(OPT)\
18+
/include=([],[-.bfd],[.config],"../include","../")$(DEFS)$(OPT)\
2019
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
2120
#LFLAGS=/debug/map=as.map
22-
LIBS=,sys$$library:vaxcrtl.olb/lib
2321
endif
2422

2523
OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
@@ -30,10 +28,8 @@ OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
3028
macro.obj,ehopt.obj,dw2gencfi.obj,dwarf2dbg.obj,remap.obj
3129

3230
LIBIBERTY = [-.libiberty]libiberty.olb
33-
3431
LIBBFD = [-.bfd]libbfd.olb
3532
LIBOPCODES = [-.opcodes]libopcodes.olb
36-
BFDDEP = [-.bfd]bfd.h
3733

3834
all: as.exe
3935

Diff for: setup.com

+31-18
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,51 @@
1-
$! setup files for openVMS/Alpha
21
$!
3-
$ define aout [-.INCLUDE.AOUT]
4-
$ define coff [-.INCLUDE.COFF]
5-
$ define elf [-.INCLUDE.ELF]
6-
$ define nlm [-.INCLUDE.NLM]
7-
$ define opcode [-.INCLUDE.OPCODE]
2+
$! Build procedure
83
$!
9-
$! Build procedures
10-
$!
11-
$! Note: you need make 3.76
12-
$ MAKE="gmake_3_76"
13-
$ OPT=
4+
$! Note: you need a DCL-compatible gnu make.
5+
$ MAKE="make381"
6+
$ OPT=""
147
$!
158
$ if (P1 .EQS. "CONFIGURE") .OR. (P1 .EQS. "ALL")
169
$ then
1710
$ set def [.bfd]
1811
$ @configure
12+
$ set def [-.libiberty]
13+
$ @configure
14+
$ set def [-.opcodes]
15+
$ @configure
1916
$ set def [-.binutils]
2017
$ @configure
2118
$ set def [-.gas]
2219
$ @configure
2320
$ set def [-]
2421
$ endif
25-
$ if (P1 .EQS. "MAKE") .OR. (P1 .EQS. "ALL")
22+
$ if (P1 .EQS. "BUILD") .OR. (P1 .EQS. "ALL")
23+
$ then
24+
$ set def [.bfd]
25+
$ @build
26+
$ set def [-.libiberty]
27+
$ @build
28+
$ set def [-.opcodes]
29+
$ @build
30+
$ set def [-.binutils]
31+
$ @build
32+
$ set def [-.gas]
33+
$ @build
34+
$ set def [-]
35+
$ endif
36+
$ if P1 .EQS. "MAKE"
2637
$ then
38+
$ ARCH=F$GETSYI("ARCH_NAME")
39+
$ ARCH=F$EDIT(arch,"UPCASE")
2740
$ set def [.bfd]
28-
$ 'MAKE "ARCH=ALPHA" "OPT=''OPT'"
41+
$ 'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
2942
$ set def [-.libiberty]
30-
$ 'MAKE "ARCH=ALPHA" "OPT=''OPT'"
43+
$ 'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
3144
$ set def [-.opcodes]
32-
$ 'MAKE "ARCH=ALPHA" "OPT=''OPT'"
45+
$ 'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
3346
$ set def [-.binutils]
34-
$ 'MAKE "ARCH=ALPHA" "OPT=''OPT'"
47+
$ 'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
3548
$ set def [-.gas]
36-
$ 'MAKE "ARCH=ALPHA" "OPT=''OPT'"
49+
$ 'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
3750
$ set def [-]
38-
$ endif
51+
$ endif

0 commit comments

Comments
 (0)