2009-09-01 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Tue, 1 Sep 2009 13:16:53 +0000 (13:16 +0000)
committerTristan Gingold <gingold@adacore.com>
Tue, 1 Sep 2009 13:16:53 +0000 (13:16 +0000)
* 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.

binutils/ChangeLog
binutils/configure.com
binutils/makefile.vms-in
libiberty/ChangeLog
libiberty/configure.com [new file with mode: 0644]
libiberty/makefile.vms
opcodes/ChangeLog
opcodes/configure.com [new file with mode: 0644]
opcodes/makefile.vms

index d3e679b97e12c0acae7fe6b405e1a5dd2e32464e..86a5b9699c640f4b169c277cba37e9b4e43bceb5 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-01  Tristan Gingold  <gingold@adacore.com>
+
+       * makefile.vms-in: Remove unused VERSION variable.  Remove unused
+       dependencies.
+       * configure.com: Ported to Itanium VMS.  Create build.com DCL script.
+
 2009-08-29  Martin Thuresson  <martin@mtme.org>
 
        * nlmconv.c (main): Rename variable new to new_name.
index 5ade2d4c89703c85cf8c3b5996657873559375a1..fefa7836a34fa236bcf626500087cdd82d29a67f 100644 (file)
@@ -5,8 +5,9 @@ $! to execute it.
 $!
 $! Written by Klaus K"ampf (kkaempf@rmi.de)
 $!
-$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)      ! vax==1, alpha==2
-$arch = f$element(arch_indx,"|","|VAX|Alpha|")
+$ arch=F$GETSYI("ARCH_NAME")
+$ arch=F$EDIT(arch,"LOWERCASE")
+$ write sys$output "Configuring binutils for ''arch' target"
 $!
 $! Generate config.h
 $!
@@ -44,12 +45,9 @@ $ create config.h
 $!
 $! Add TARGET.
 $!
-$ if arch .eqs. "Alpha"
-$ then
-$   target = "vms-alpha"
-$ else
-$   target = "vms-vax"
-$ endif
+$ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
+$ if arch .eqs. "alpha" then target = "vms-alpha"
+$ if arch .eqs. "vax" then target = "vms-vax"
 $!
 $ open/append tfile config.h
 $ write tfile "#define TARGET """ + target + """"
@@ -58,3 +56,57 @@ $ write sys$output "Created `config.h'"
 $!
 $ copy makefile.vms-in makefile.vms
 $ write sys$output "Created `makefile.vms'"
+$!
+$ write sys$output "Generate binutils build.com"
+$!
+$ create build.com
+$DECK
+$ DEFS=""
+$ OPT="/noopt/debug"
+$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
+ "/name=(as_is,shortened)" +-
+ "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
+$ BFDLIB = ",[-.bfd]libbfd.olb/lib"
+$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
+$ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
+$ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
+$ BULIBS_FILES = ",bucomm,version,filemode"
+$ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
+   BULIBS_FILES + DEBUG_FILES
+$!
+$ write sys$output "CFLAGS=",CFLAGS
+$ if p1.nes."LINK"
+$ then
+$   NUM = 0
+$   LOOP:
+$     F = F$ELEMENT(NUM,",",ALL_FILES)
+$     IF F.EQS."," THEN GOTO END
+$     write sys$output "Compiling ", F, ".c"
+$     cc 'CFLAGS 'F.c
+$     NUM = NUM + 1
+$     GOTO LOOP
+$   END:
+$ endif
+$ purge
+$!
+$ write sys$output "Building nm.exe"
+$ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
+$ link/exe=nm 'NM_OBJS
+$!
+$ write sys$output "Building strings.exe"
+$ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
+$ link/exe=strings 'STRINGS_OBJS
+$!
+$ write sys$output "Building size.exe"
+$ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
+$ link/exe=size 'SIZE_OBJS
+$!
+$ write sys$output "Building addr2line.exe"
+$ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
+$ link/exe=addr2line 'ADDR2LINE_OBJS
+$!
+$ write sys$output "Building objdump.exe"
+$ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
+   BFDLIB + OPCODES + LIBIBERTY
+$ link/exe=objdump 'OBJDUMP_OBJS
+$EOD
index 8e597c933df7ecd0f73b8dc8e9184e46fd56f7cc..bea886ae2a4a822867433206b97a8d7495d21013 100644 (file)
@@ -7,9 +7,6 @@
 #
 #
 
-# Distribution version, filled in by configure.com
-VERSION=@VERSION@
-
 ifeq ($(CC),gcc)
 DEFS=
 CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
@@ -17,14 +14,13 @@ LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0
 else
 DEFS=
 OPT=/noopt/debug
-CFLAGS=$(OPT)/include=([],[-.include],[-.bfd])$(DEFS)\
+CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
  /name=(as_is,shortened)\
  /prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
-LIBS=,sys$$library:vaxcrtl.olb/lib
 endif
 
-BFDLIB = [-.bfd]libbfd.olb/lib
-BFDLIB_DEP = [-.bfd]libbfd.olb
+LIBBFD = [-.bfd]libbfd.olb/lib
+LIBBFD_DEP = [-.bfd]libbfd.olb
 LIBIBERTY_DEP = [-.libiberty]libiberty.olb
 LIBIBERTY = [-.libiberty]libiberty.olb/lib
 OPCODES_DEP = [-.opcodes]libopcodes.olb
@@ -34,10 +30,10 @@ DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj
 
 WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj
 
-BULIBS = []bucomm.obj,version.obj,filemode.obj
+BULIBS = bucomm.obj,version.obj,filemode.obj
 
-ADDL_DEPS = $(BULIBS),$(BFDLIB_DEP),$(LIBIBERTY_DEP)
-ADDL_LIBS = $(BULIBS),$(BFDLIB),$(LIBIBERTY)
+ADDL_DEPS = $(BULIBS),$(LIBBFD_DEP),$(LIBIBERTY_DEP)
+ADDL_LIBS = $(BULIBS),$(LIBBFD),$(LIBIBERTY)
 
 SIZEOBJS = $(ADDL_DEPS),size.obj
 
@@ -52,39 +48,24 @@ OBJDUMPOBJS = $(ADDL_DEPS),objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(OPCODES_DEP)
 all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe
 
 size.exe: $(SIZEOBJS)
-       link/exe=$@ size.obj,$(ADDL_LIBS)$(LIBS)
+       link/exe=$@ size.obj,$(ADDL_LIBS)
 
 strings.exe: $(STRINGSOBJS)
-       link/exe=$@ strings.obj,$(ADDL_LIBS)$(LIBS)
+       link/exe=$@ strings.obj,$(ADDL_LIBS)
 
 nm.exe: $(NMOBJS)
-       link/exe=$@ nm.obj,$(ADDL_LIBS)$(LIBS)
+       link/exe=$@ nm.obj,$(ADDL_LIBS)
 
 addr2line.exe: $(ADDR2LINEOBJS)
-       link/exe=$@ addr2line.obj,$(ADDL_LIBS)$(LIBS)
+       link/exe=$@ addr2line.obj,$(ADDL_LIBS)
 
 objdump.exe: $(OBJDUMPOBJS)
-       link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(BFDLIB),$(OPCODES),$(ADDL_LIBS)$(LIBS)
+       link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(LIBBFD),$(OPCODES),$(ADDL_LIBS)
 
 config.h:
        $$ @configure
        $(MAKE) -f makefile.vms "CC=$(CC)"
 
-[-.bfd]libbfd.olb:
-       $(CD) [-.bfd]
-       $(MAKE) -f makefile.vms "CC=$(CC)"
-       $(CD) [-.binutils]
-
-[-.libiberty]libiberty.olb:
-       $(CD) [-.libiberty]
-       $(MAKE) -f makefile.vms "CC=$(CC)"
-       $(CD) [-.binutils]
-
-[-.opcodes]libopcodes.olb:
-       $(CD) [-.opcodes]
-       $(MAKE) -f makefile.vms "CC=$(CC)"
-       $(CD) [-.binutils]
-
 clean:
        $$ purge
        $(RM) *.obj;
index 8698a2d3acc74347366dd847aa54b70a56c27742..3950158793db96f4e8651241e3fe1fa2c0cc6338 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-01  Tristan Gingold  <gingold@adacore.com>
+
+       * makefile.vms (OBJS): Add stpcpy.
+       * configure.com: New file to create build.com DCL script for
+       Itanium VMS or Alpha VMS.
+
 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/libiberty/configure.com b/libiberty/configure.com
new file mode 100644 (file)
index 0000000..0301829
--- /dev/null
@@ -0,0 +1,38 @@
+$!
+$! This file configures the libiberty library for use with openVMS.
+$!
+$! We do not use the configure script, since we do not have /bin/sh
+$! to execute it.
+$!
+$! Written by Tristan Gingold (gingold@adacore.com)
+$!
+$!
+$!
+$ copy config.h-vms config.h
+$!
+$ write sys$output "Generate libiberty build.com"
+$!
+$ create build.com
+$DECK
+$ FILES="getopt,obstack,xexit,xmalloc,hex,getopt1,cplus-dem,cp-demangle,"+-
+    "cp-demint,asprintf,vasprintf,mkstemps,concat,getruntime,getpagesize,"+-
+    "getpwd,xstrerror,xmemdup,xstrdup,xatexit,choose-temp,fnmatch,objalloc,"+-
+    "safe-ctype,hashtab,lbasename,argv,lrealpath,make-temp-file,"+-
+    "stpcpy,unlink-if-ordinary"
+$ OPT="/noopt/debug/warnings=disable=(missingreturn)"
+$ CFLAGS=OPT + "/include=([],[-.include])/name=(as_is,shortened)" +-
+ "/define=(HAVE_CONFIG_H=1)" +-
+ "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
+$ write sys$output "CFLAGS=",CFLAGS
+$ NUM = 0
+$ LOOP:
+$   F = F$ELEMENT(NUM,",",FILES)
+$   IF F.EQS."," THEN GOTO END
+$   write sys$output "Compiling ", F, ".c"
+$   cc 'CFLAGS 'F.c
+$   NUM = NUM + 1
+$   GOTO LOOP
+$ END:
+$ purge
+$ lib/create libiberty 'FILES
+$EOD
index 2f45f69a2aeb718a5a53f618aa34b11288bd083f..e273cf03ca12fa055d979595bbc4fcadf02d39e8 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Makefile for libiberty under openVMS/Alpha
+# Makefile for libiberty under openVMS
 #
 # For use with gnu-make for vms
 #
@@ -13,7 +13,7 @@ OBJS=getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\
     concat.obj,getruntime.obj,getpagesize.obj,getpwd.obj,xstrerror.obj,\
     xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,\
     objalloc.obj,safe-ctype.obj,hashtab.obj,lbasename.obj,argv.obj,\
-    lrealpath.obj,make-temp-file.obj,unlink-if-ordinary.obj
+    lrealpath.obj,make-temp-file.obj,stpcpy.obj,unlink-if-ordinary.obj
 
 ifeq ($(CC),gcc)
 CFLAGS=/include=([],[-.include])
index 96c3036c0685fbe5d245ce1af360943071847424..6eb2be46315ab99f8b234f0c66971d3ed023f581 100644 (file)
@@ -1,3 +1,10 @@
+2009-09-01  Tristan Gingold  <gingold@adacore.com>
+
+       * 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.
+
 2009-08-29  Martin Thuresson  <martin@mtme.org>
 
        * cris-dis.c (bytes_to_skip): Update code to use new name.
diff --git a/opcodes/configure.com b/opcodes/configure.com
new file mode 100644 (file)
index 0000000..a97bd9b
--- /dev/null
@@ -0,0 +1,51 @@
+$!
+$! This file configures the opcodes library for use with openVMS.
+$!
+$! We do not use the configure script, since we do not have /bin/sh
+$! to execute it.
+$!
+$! Written by Tristan Gingold (gingold@adacore.com)
+$!
+$ arch=F$GETSYI("ARCH_NAME")
+$ arch=F$EDIT(arch,"LOWERCASE")
+
+$!
+$ write sys$output "Generate opcodes/build.com"
+$!
+$ if arch.eqs."ia64"
+$ then
+$   create build.com
+$DECK
+$ FILES="ia64-dis,ia64-opc"
+$ DEFS="""ARCH_ia64"""
+$EOD
+$ endif
+$ if arch.eqs."alpha"
+$ then
+$   create build.com
+$DECK
+$ FILES="alpha-dis,alpha-opc"
+$ DEFS="""ARCH_alpha"""
+$EOD
+$ endif
+$!
+$ append sys$input build.com
+$DECK
+$ FILES=FILES + ",dis-init,dis-buf,disassemble"
+$ OPT="/noopt/debug"
+$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])/name=(as_is,shortened)" + -
+  "/define=(" + DEFS + ")"
+$ write sys$output "CFLAGS=",CFLAGS
+$ NUM = 0
+$ LOOP:
+$   F = F$ELEMENT(NUM,",",FILES)
+$   IF F.EQS."," THEN GOTO END
+$   write sys$output "Compiling ", F, ".c"
+$   cc 'CFLAGS 'F.c
+$   NUM = NUM + 1
+$   GOTO LOOP
+$ END:
+$ purge
+$ lib/create libopcodes 'FILES
+$EOD
+$exit
index 41599d9fd8484c768d3557532086c52a1b8eb5af..d11d54f665acb8a517e6579f2dc9ee79a24a8f64 100644 (file)
@@ -1,43 +1,42 @@
 #
-# Makefile for libopcodes under openVMS VAX and Alpha
+# Makefile for libopcodes under openVMS
 #
 # For use with gnu-make for vms
 #
 # Created by Klaus K"ampf, kkaempf@progis.de
 #
 #
+
+ifeq ($(ARCH),IA64)
+OBJS=ia64-dis.obj,ia64-opc.obj
+ARCHDEF="ARCH_ia64"
+endif
 ifeq ($(ARCH),ALPHA)
-OBJS=alpha-dis.obj,alpha-opc.obj,dis-init.obj,dis-buf.obj,disassemble.obj
-FORMAT=OBJ_EVAX
+OBJS=alpha-dis.obj,alpha-opc.obj
 ARCHDEF="ARCH_alpha"
-else
-OBJS=vax-dis.obj,dis-buf.obj,disassemble.obj
-FORMAT=OBJ_VAX
+endif
+ifeq ($(ARCH),VAX)
+OBJS=vax-dis.obj
 ARCHDEF="ARCH_vax"
 endif
 
+OBJS:=$(OBJS),dis-init.obj,dis-buf.obj,disassemble.obj
+
 ifeq ($(CC),gcc)
-DEFS=/define=($(FORMAT))
+DEFS=/define=($(ARCHDEF))
 CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
 else
-DEFS=/define=($(FORMAT))
+DEFS=/define=($(ARCHDEF))
 OPT=/noopt/debug
-CFLAGS=$(OPT)/include=([],[-.include],[-.bfd])$(DEFS)\
+CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
  /name=(as_is,shortened)
 endif
 
-libopcodes.olb: sysdep.h $(OBJS)
+libopcodes.olb: $(OBJS)
        purge
        lib/create libopcodes *.obj
 
-disassemble.obj: disassemble.c
-       $(CC)$(CFLAGS)/define=($(ARCHDEF)) $<
-
-sysdep.h: [-.bfd.hosts]$(ARCH)vms.h
-       $(CP) $< $@
-
 clean:
        $$ purge
        $(RM) *.obj;
-       $(RM) sysdep.h;
        $(RM) libopcodes.olb;