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

Commit e06ae0d

Browse files
2009-09-01 Tristan Gingold <[email protected]>
* makefile.vms: Ported to Itanium VMS. Remove useless targets and dependencies. Remove unused FORMAT variable. * configure.com: New file to create build.com DCL script for Itanium VMS or Alpha VMS.
1 parent 11d7327 commit e06ae0d

File tree

9 files changed

+197
-57
lines changed

9 files changed

+197
-57
lines changed

binutils/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2009-09-01 Tristan Gingold <[email protected]>
2+
3+
* makefile.vms-in: Remove unused VERSION variable. Remove unused
4+
dependencies.
5+
* configure.com: Ported to Itanium VMS. Create build.com DCL script.
6+
17
2009-08-29 Martin Thuresson <[email protected]>
28

39
* nlmconv.c (main): Rename variable new to new_name.

binutils/configure.com

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ $! to execute it.
55
$!
66
$! Written by Klaus K"ampf ([email protected])
77
$!
8-
$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
9-
$arch = f$element(arch_indx,"|","|VAX|Alpha|")
8+
$ arch=F$GETSYI("ARCH_NAME")
9+
$ arch=F$EDIT(arch,"LOWERCASE")
10+
$ write sys$output "Configuring binutils for ''arch' target"
1011
$!
1112
$! Generate config.h
1213
$!
@@ -44,12 +45,9 @@ $ create config.h
4445
$!
4546
$! Add TARGET.
4647
$!
47-
$ if arch .eqs. "Alpha"
48-
$ then
49-
$ target = "vms-alpha"
50-
$ else
51-
$ target = "vms-vax"
52-
$ endif
48+
$ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
49+
$ if arch .eqs. "alpha" then target = "vms-alpha"
50+
$ if arch .eqs. "vax" then target = "vms-vax"
5351
$!
5452
$ open/append tfile config.h
5553
$ write tfile "#define TARGET """ + target + """"
@@ -58,3 +56,57 @@ $ write sys$output "Created `config.h'"
5856
$!
5957
$ copy makefile.vms-in makefile.vms
6058
$ write sys$output "Created `makefile.vms'"
59+
$!
60+
$ write sys$output "Generate binutils build.com"
61+
$!
62+
$ create build.com
63+
$DECK
64+
$ DEFS=""
65+
$ OPT="/noopt/debug"
66+
$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
67+
"/name=(as_is,shortened)" +-
68+
"/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
69+
$ BFDLIB = ",[-.bfd]libbfd.olb/lib"
70+
$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
71+
$ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
72+
$ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
73+
$ BULIBS_FILES = ",bucomm,version,filemode"
74+
$ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
75+
BULIBS_FILES + DEBUG_FILES
76+
$!
77+
$ write sys$output "CFLAGS=",CFLAGS
78+
$ if p1.nes."LINK"
79+
$ then
80+
$ NUM = 0
81+
$ LOOP:
82+
$ F = F$ELEMENT(NUM,",",ALL_FILES)
83+
$ IF F.EQS."," THEN GOTO END
84+
$ write sys$output "Compiling ", F, ".c"
85+
$ cc 'CFLAGS 'F.c
86+
$ NUM = NUM + 1
87+
$ GOTO LOOP
88+
$ END:
89+
$ endif
90+
$ purge
91+
$!
92+
$ write sys$output "Building nm.exe"
93+
$ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
94+
$ link/exe=nm 'NM_OBJS
95+
$!
96+
$ write sys$output "Building strings.exe"
97+
$ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
98+
$ link/exe=strings 'STRINGS_OBJS
99+
$!
100+
$ write sys$output "Building size.exe"
101+
$ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
102+
$ link/exe=size 'SIZE_OBJS
103+
$!
104+
$ write sys$output "Building addr2line.exe"
105+
$ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
106+
$ link/exe=addr2line 'ADDR2LINE_OBJS
107+
$!
108+
$ write sys$output "Building objdump.exe"
109+
$ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
110+
BFDLIB + OPCODES + LIBIBERTY
111+
$ link/exe=objdump 'OBJDUMP_OBJS
112+
$EOD

binutils/makefile.vms-in

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,20 @@
77
#
88
#
99

10-
# Distribution version, filled in by configure.com
11-
VERSION=@VERSION@
12-
1310
ifeq ($(CC),gcc)
1411
DEFS=
1512
CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
1613
LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
1714
else
1815
DEFS=
1916
OPT=/noopt/debug
20-
CFLAGS=$(OPT)/include=([],[-.include],[-.bfd])$(DEFS)\
17+
CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
2118
/name=(as_is,shortened)\
2219
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
23-
LIBS=,sys$$library:vaxcrtl.olb/lib
2420
endif
2521

26-
BFDLIB = [-.bfd]libbfd.olb/lib
27-
BFDLIB_DEP = [-.bfd]libbfd.olb
22+
LIBBFD = [-.bfd]libbfd.olb/lib
23+
LIBBFD_DEP = [-.bfd]libbfd.olb
2824
LIBIBERTY_DEP = [-.libiberty]libiberty.olb
2925
LIBIBERTY = [-.libiberty]libiberty.olb/lib
3026
OPCODES_DEP = [-.opcodes]libopcodes.olb
@@ -34,10 +30,10 @@ DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj
3430

3531
WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
3632

37-
BULIBS = []bucomm.obj,version.obj,filemode.obj
33+
BULIBS = bucomm.obj,version.obj,filemode.obj
3834

39-
ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
40-
ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
35+
ADDL_DEPS = $(BULIBS),$(LIBBFD_DEP),$(LIBIBERTY_DEP)
36+
ADDL_LIBS = $(BULIBS),$(LIBBFD),$(LIBIBERTY)
4137

4238
SIZEOBJS = $(ADDL_DEPS),size.obj
4339

@@ -52,39 +48,24 @@ OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
5248
all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe
5349

5450
size.exe: $(SIZEOBJS)
55-
link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
51+
link/exe=$@ size.obj,$(ADDL_LIBS)
5652

5753
strings.exe: $(STRINGSOBJS)
58-
link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
54+
link/exe=$@ strings.obj,$(ADDL_LIBS)
5955

6056
nm.exe: $(NMOBJS)
61-
link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
57+
link/exe=$@ nm.obj,$(ADDL_LIBS)
6258

6359
addr2line.exe: $(ADDR2LINEOBJS)
64-
link/exe=$@ addr2line.obj,$(ADDL_LIBS)$(LIBS)
60+
link/exe=$@ addr2line.obj,$(ADDL_LIBS)
6561

6662
objdump.exe: $(OBJDUMPOBJS)
67-
link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
63+
link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(LIBBFD),$(OPCODES),$(ADDL_LIBS)
6864

6965
config.h:
7066
$$ @configure
7167
$(MAKE) -f makefile.vms "CC=$(CC)"
7268

73-
[-.bfd]libbfd.olb:
74-
$(CD) [-.bfd]
75-
$(MAKE) -f makefile.vms "CC=$(CC)"
76-
$(CD) [-.binutils]
77-
78-
[-.libiberty]libiberty.olb:
79-
$(CD) [-.libiberty]
80-
$(MAKE) -f makefile.vms "CC=$(CC)"
81-
$(CD) [-.binutils]
82-
83-
[-.opcodes]libopcodes.olb:
84-
$(CD) [-.opcodes]
85-
$(MAKE) -f makefile.vms "CC=$(CC)"
86-
$(CD) [-.binutils]
87-
8869
clean:
8970
$$ purge
9071
$(RM) *.obj;

libiberty/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2009-09-01 Tristan Gingold <[email protected]>
2+
3+
* makefile.vms (OBJS): Add stpcpy.
4+
* configure.com: New file to create build.com DCL script for
5+
Itanium VMS or Alpha VMS.
6+
17
2009-08-24 Ralf Wildenhues <[email protected]>
28

39
* configure.ac (AC_PREREQ): Bump to 2.64.

libiberty/configure.com

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
$!
2+
$! This file configures the libiberty library for use with openVMS.
3+
$!
4+
$! We do not use the configure script, since we do not have /bin/sh
5+
$! to execute it.
6+
$!
7+
$! Written by Tristan Gingold ([email protected])
8+
$!
9+
$!
10+
$!
11+
$ copy config.h-vms config.h
12+
$!
13+
$ write sys$output "Generate libiberty build.com"
14+
$!
15+
$ create build.com
16+
$DECK
17+
$ FILES="getopt,obstack,xexit,xmalloc,hex,getopt1,cplus-dem,cp-demangle,"+-
18+
"cp-demint,asprintf,vasprintf,mkstemps,concat,getruntime,getpagesize,"+-
19+
"getpwd,xstrerror,xmemdup,xstrdup,xatexit,choose-temp,fnmatch,objalloc,"+-
20+
"safe-ctype,hashtab,lbasename,argv,lrealpath,make-temp-file,"+-
21+
"stpcpy,unlink-if-ordinary"
22+
$ OPT="/noopt/debug/warnings=disable=(missingreturn)"
23+
$ CFLAGS=OPT + "/include=([],[-.include])/name=(as_is,shortened)" +-
24+
"/define=(HAVE_CONFIG_H=1)" +-
25+
"/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
26+
$ write sys$output "CFLAGS=",CFLAGS
27+
$ NUM = 0
28+
$ LOOP:
29+
$ F = F$ELEMENT(NUM,",",FILES)
30+
$ IF F.EQS."," THEN GOTO END
31+
$ write sys$output "Compiling ", F, ".c"
32+
$ cc 'CFLAGS 'F.c
33+
$ NUM = NUM + 1
34+
$ GOTO LOOP
35+
$ END:
36+
$ purge
37+
$ lib/create libiberty 'FILES
38+
$EOD

libiberty/makefile.vms

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Makefile for libiberty under openVMS/Alpha
2+
# Makefile for libiberty under openVMS
33
#
44
# For use with gnu-make for vms
55
#
@@ -13,7 +13,7 @@ OBJS=getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\
1313
concat.obj,getruntime.obj,getpagesize.obj,getpwd.obj,xstrerror.obj,\
1414
xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,\
1515
objalloc.obj,safe-ctype.obj,hashtab.obj,lbasename.obj,argv.obj,\
16-
lrealpath.obj,make-temp-file.obj,unlink-if-ordinary.obj
16+
lrealpath.obj,make-temp-file.obj,stpcpy.obj,unlink-if-ordinary.obj
1717

1818
ifeq ($(CC),gcc)
1919
CFLAGS=/include=([],[-.include])

opcodes/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2009-09-01 Tristan Gingold <[email protected]>
2+
3+
* makefile.vms: Ported to Itanium VMS. Remove useless targets and
4+
dependencies. Remove unused FORMAT variable.
5+
* configure.com: New file to create build.com DCL script for
6+
Itanium VMS or Alpha VMS.
7+
18
2009-08-29 Martin Thuresson <[email protected]>
29

310
* cris-dis.c (bytes_to_skip): Update code to use new name.

opcodes/configure.com

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
$!
2+
$! This file configures the opcodes library for use with openVMS.
3+
$!
4+
$! We do not use the configure script, since we do not have /bin/sh
5+
$! to execute it.
6+
$!
7+
$! Written by Tristan Gingold ([email protected])
8+
$!
9+
$ arch=F$GETSYI("ARCH_NAME")
10+
$ arch=F$EDIT(arch,"LOWERCASE")
11+
12+
$!
13+
$ write sys$output "Generate opcodes/build.com"
14+
$!
15+
$ if arch.eqs."ia64"
16+
$ then
17+
$ create build.com
18+
$DECK
19+
$ FILES="ia64-dis,ia64-opc"
20+
$ DEFS="""ARCH_ia64"""
21+
$EOD
22+
$ endif
23+
$ if arch.eqs."alpha"
24+
$ then
25+
$ create build.com
26+
$DECK
27+
$ FILES="alpha-dis,alpha-opc"
28+
$ DEFS="""ARCH_alpha"""
29+
$EOD
30+
$ endif
31+
$!
32+
$ append sys$input build.com
33+
$DECK
34+
$ FILES=FILES + ",dis-init,dis-buf,disassemble"
35+
$ OPT="/noopt/debug"
36+
$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])/name=(as_is,shortened)" + -
37+
"/define=(" + DEFS + ")"
38+
$ write sys$output "CFLAGS=",CFLAGS
39+
$ NUM = 0
40+
$ LOOP:
41+
$ F = F$ELEMENT(NUM,",",FILES)
42+
$ IF F.EQS."," THEN GOTO END
43+
$ write sys$output "Compiling ", F, ".c"
44+
$ cc 'CFLAGS 'F.c
45+
$ NUM = NUM + 1
46+
$ GOTO LOOP
47+
$ END:
48+
$ purge
49+
$ lib/create libopcodes 'FILES
50+
$EOD
51+
$exit

opcodes/makefile.vms

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,42 @@
11
#
2-
# Makefile for libopcodes under openVMS VAX and Alpha
2+
# Makefile for libopcodes under openVMS
33
#
44
# For use with gnu-make for vms
55
#
66
# Created by Klaus K"ampf, [email protected]
77
#
88
#
9+
10+
ifeq ($(ARCH),IA64)
11+
OBJS=ia64-dis.obj,ia64-opc.obj
12+
ARCHDEF="ARCH_ia64"
13+
endif
914
ifeq ($(ARCH),ALPHA)
10-
OBJS=alpha-dis.obj,alpha-opc.obj,dis-init.obj,dis-buf.obj,disassemble.obj
11-
FORMAT=OBJ_EVAX
15+
OBJS=alpha-dis.obj,alpha-opc.obj
1216
ARCHDEF="ARCH_alpha"
13-
else
14-
OBJS=vax-dis.obj,dis-buf.obj,disassemble.obj
15-
FORMAT=OBJ_VAX
17+
endif
18+
ifeq ($(ARCH),VAX)
19+
OBJS=vax-dis.obj
1620
ARCHDEF="ARCH_vax"
1721
endif
1822

23+
OBJS:=$(OBJS),dis-init.obj,dis-buf.obj,disassemble.obj
24+
1925
ifeq ($(CC),gcc)
20-
DEFS=/define=($(FORMAT))
26+
DEFS=/define=($(ARCHDEF))
2127
CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
2228
else
23-
DEFS=/define=($(FORMAT))
29+
DEFS=/define=($(ARCHDEF))
2430
OPT=/noopt/debug
25-
CFLAGS=$(OPT)/include=([],[-.include],[-.bfd])$(DEFS)\
31+
CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
2632
/name=(as_is,shortened)
2733
endif
2834

29-
libopcodes.olb: sysdep.h $(OBJS)
35+
libopcodes.olb: $(OBJS)
3036
purge
3137
lib/create libopcodes *.obj
3238

33-
disassemble.obj: disassemble.c
34-
$(CC)$(CFLAGS)/define=($(ARCHDEF)) $<
35-
36-
sysdep.h: [-.bfd.hosts]$(ARCH)vms.h
37-
$(CP) $< $@
38-
3939
clean:
4040
$$ purge
4141
$(RM) *.obj;
42-
$(RM) sysdep.h;
4342
$(RM) libopcodes.olb;

0 commit comments

Comments
 (0)