This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Native Itanium VMS port


Hi,

with the following patch it is now easy to build binutils natively on
Alpha and Itanium VMS.  Except for two minor adjustments in bfd, it only
modifies DCL scripts.

Unless someone objects, I plan to commit this patch tomorrow.

Tristan.

2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* setup.com: Ported to Itanium VMS.  Can also build using DCL scripts.

bfd/
2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* configure.com: Ported to Itanium VMS.  Now generates a build.com
	to build without make.
	* hosts/alphavms.h: Add a prototype for stpcpy.
	* vms.c: Add a missing include for Alpha VMS.
	* elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.

binutils/
2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* configure.com: Ported to Itanium VMS.  Create build.com DCL script.

gas/
2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* configure.com: Ported to Itanium VMS.  Create build.com DCL script.

libiberty/
2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* configure.com: New file to create build.com DCL script for
	Itanium VMS or Alpha VMS.

opcodes/
2009-08-31  Tristan Gingold  <gingold@adacore.com>

	* configure.com: New file to create build.com DCL script for
	Itanium VMS or Alpha VMS.

diff -c -r1.3 setup.com
*** setup.com	25 May 2009 13:31:05 -0000	1.3
--- setup.com	31 Aug 2009 15:28:28 -0000
***************
*** 1,14 ****
- $! setup files for openVMS/Alpha
  $!
! $ define aout [-.INCLUDE.AOUT]
! $ define coff [-.INCLUDE.COFF]
! $ define elf [-.INCLUDE.ELF]
! $ define nlm [-.INCLUDE.NLM]
! $ define opcode [-.INCLUDE.OPCODE]
  $!
! $! Build procedures
! $!
! $! Note: you need make 3.76
  $ MAKE="gmake_3_76"
  $ OPT=
  $!
--- 1,7 ----
  $!
! $! Build procedure
  $!
! $! Note: you need a DCL-compatible gnu make.
  $ MAKE="gmake_3_76"
  $ OPT=
  $!
***************
*** 16,38 ****
  $ then
  $    set def [.bfd]
  $    @configure
  $    set def [-.binutils]
  $    @configure
  $    set def [-.gas]
  $    @configure
  $    set def [-]
  $ endif
! $ if (P1 .EQS. "MAKE") .OR. (P1 .EQS. "ALL")
  $ then
  $   set def [.bfd]
! $   'MAKE "ARCH=ALPHA" "OPT=''OPT'"
  $   set def [-.libiberty]
! $   'MAKE "ARCH=ALPHA" "OPT=''OPT'"
  $   set def [-.opcodes]
! $   'MAKE "ARCH=ALPHA" "OPT=''OPT'"
  $   set def [-.binutils]
! $   'MAKE "ARCH=ALPHA" "OPT=''OPT'"
  $   set def [-.gas]
! $   'MAKE "ARCH=ALPHA" "OPT=''OPT'"
  $   set def [-]
! $ endif
\ No newline at end of file
--- 9,51 ----
  $ then
  $    set def [.bfd]
  $    @configure
+ $    set def [-.libiberty]
+ $    @configure
+ $    set def [-.opcodes]
+ $    @configure
  $    set def [-.binutils]
  $    @configure
  $    set def [-.gas]
  $    @configure
  $    set def [-]
  $ endif
! $ if (P1 .EQS. "BUILD") .OR. (P1 .EQS. "ALL")
! $ then
! $   set def [.bfd]
! $   @build
! $   set def [-.libiberty]
! $   @build
! $   set def [-.opcodes]
! $   @build
! $   set def [-.binutils]
! $   @build
! $   set def [-.gas]
! $   @build
! $   set def [-]
! $ endif
! $ if P1 .EQS. "MAKE"
  $ then
+ $   ARCH=F$GETSYI("ARCH_NAME")
+ $   ARCH=F$EDIT(arch,"UPCASE")
  $   set def [.bfd]
! $   'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
  $   set def [-.libiberty]
! $   'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
  $   set def [-.opcodes]
! $   'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
  $   set def [-.binutils]
! $   'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
  $   set def [-.gas]
! $   'MAKE "ARCH=''ARCH'" "OPT=''OPT'"
  $   set def [-]
! $ endif
Index: bfd/configure.com
===================================================================
RCS file: /cvs/src/src/bfd/configure.com,v
retrieving revision 1.2
diff -c -r1.2 configure.com
*** bfd/configure.com	14 Nov 2008 09:57:33 -0000	1.2
--- bfd/configure.com	31 Aug 2009 15:28:28 -0000
***************
*** 1,18 ****
  $!
! $! This file configures the bfd library for use with openVMS (Alpha and Vax)
  $!
  $! We do not use the configure script, since we do not have /bin/sh
  $! 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|")
  $!
! $if arch .eqs. "Alpha"
  $then
! $ write sys$output "Configuring for Alpha target"
! $ target = "alpha"
  $!
  $! copy bfd-in2.h to bfd.h, replacing @ macros
  $!
--- 1,22 ----
  $!
! $! This file configures the bfd library for use with openVMS.
  $!
  $! We do not use the configure script, since we do not have /bin/sh
  $! to execute it.
  $!
  $! Written by Klaus K"ampf (kkaempf@rmi.de)
+ $! Rewritten by Tristan Gingold (gingold@adacore.com)
  $!
! $ arch=F$GETSYI("ARCH_NAME")
! $ arch=F$EDIT(arch,"LOWERCASE")
! $if arch .eqs. "alpha" then target = "alpha"
! $if arch .eqs. "ia64" then target = "ia64"
  $!
! $if (arch .eqs. "alpha") .or. (arch .eqs. "ia64")
  $then
! $!
! $ write sys$output "Configuring BFD for ''target' target"
! $!
  $!
  $! copy bfd-in2.h to bfd.h, replacing @ macros
  $!
***************
*** 23,28 ****
--- 27,33 ----
  !  Copy file, changing lines with macros (@@)
  !
  !
+    set (success,off);
     vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
     rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
     match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
***************
*** 111,116 ****
--- 116,127 ----
        ERASE(match_pos);
        COPY_TEXT('bfd_vma ufile_ptr');
     ENDIF;
+    match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang);
+    IF match_pos <> 0 THEN;
+       POSITION(BEGINNING_OF(match_pos));
+       ERASE(match_pos);
+       COPY_TEXT('0');
+    ENDIF;
     WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
     QUIT
  $  EOD
***************
*** 122,127 ****
--- 133,139 ----
  $!
  $! copy bfd-in2.h to bfd.h, replacing @ macros
  $!
+ $ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
  $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
          []bfd-in2.h /output=[]bfd.h
  $DECK
***************
*** 129,134 ****
--- 141,147 ----
  !  Copy file, changing lines with macros (@@)
  !
  !
+    set (success,off);
     vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
     rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
     match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
***************
*** 186,195 ****
  $  EOD
  $endif
  $
- $ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
  $!
  $! create bfdver.h
  $!
  $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
          []version.h /output=[]bfdver.h
  $DECK
--- 199,208 ----
  $  EOD
  $endif
  $
  $!
  $! create bfdver.h
  $!
+ $ write sys$output "Generate `bfdver.h' from 'version.h' and `configure.in'."
  $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
          []version.h /output=[]bfdver.h
  $DECK
***************
*** 197,202 ****
--- 210,216 ----
  !  Copy file, changing lines with macros (@@)
  !
  !
+    set (success,off);
     vfile := CREATE_BUFFER("vfile", "configure.in");
     rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
     match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
***************
*** 241,251 ****
     WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
     QUIT
  $  EOD
- $ write sys$output "Generated `bfdver.h' from 'version.h' and `configure.in'."
  $!
  $!
  $! create targmatch.h
  $!
  $ open/write tfile []targmatch.h
  $ write tfile "{ """ + target + "-*-*vms*""" + ","
  $ write tfile "#if defined (SELECT_VECS)"
--- 255,265 ----
     WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
     QUIT
  $  EOD
  $!
  $!
  $! create targmatch.h
  $!
+ $ write sys$output "Generate `targmatch.h'"
  $ open/write tfile []targmatch.h
  $ write tfile "{ """ + target + "-*-*vms*""" + ","
  $ write tfile "#if defined (SELECT_VECS)"
***************
*** 255,265 ****
  $ write tfile "#endif"
  $ write tfile "},"
  $ close tfile
- $ write sys$output "Generated `targmatch.h'"
  $!
  $!
  $! create config.h
  $!
  $ create []config.h
  /* config.h-vms.  Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de.  */
  /* config.in.  Generated automatically from configure.in by autoheader.  */
--- 269,279 ----
  $ write tfile "#endif"
  $ write tfile "},"
  $ close tfile
  $!
  $!
  $! create config.h
  $!
+ $ write sys$output "Generate `config.h'"
  $ create []config.h
  /* config.h-vms.  Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de.  */
  /* config.in.  Generated automatically from configure.in by autoheader.  */
***************
*** 304,308 ****
  /* Disable NLS  */
  #undef ENABLE_NLS
  $!
! $ write sys$output "Generated `config.h'"
  
--- 318,405 ----
  /* Disable NLS  */
  #undef ENABLE_NLS
  $!
! $ write sys$output "Generate build.com"
! $!
! $ if ARCH.eqs."alpha"
! $ then
! $   create build.com
! $DECK
! $ DEFS="""SELECT_VECS=&vms_alpha_vec"","+-
!   """SELECT_ARCHITECTURES=&bfd_alpha_arch"""
! $ FILES="cpu-alpha,vms,vms-hdr,vms-gsd,vms-tir,vms-misc,"
! $EOD
! $ endif
! $ if ARCH.eqs."ia64"
! $ then
! $   create build.com
! $DECK
! $ DEFS="""SELECT_VECS=&bfd_elf64_ia64_vms_vec"","+-
!   """SELECT_ARCHITECTURES=&bfd_ia64_arch"""
! $ FILES="cpu-ia64,elf64-ia64,elf-strtab,corefile,stabs,merge,elf-eh-frame,"+-
!   "elflink,elf-attrs,dwarf1,elf64,"
! $EOD
! $ create substxx.tpu
! $DECK
!    set (success,off);
!    file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
!    found_range := CREATE_RANGE(BEGINNING_OF(file), BEGINNING_OF(file));
  
+    LOOP
+      rang := CREATE_RANGE (END_OF(found_range),END_OF(file));
+      match_pos := SEARCH_QUIETLY('NN', FORWARD, EXACT, rang);
+      EXITIF match_pos = 0;
+      POSITION(BEGINNING_OF(match_pos));
+      ERASE(match_pos);
+      COPY_TEXT('64');
+    ENDLOOP;
+    WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
+    QUIT
+ $  EOD
+ $ write sys$output "Generate elf64-ia64.c from elfxx-ia64.c"
+ $ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
+         []elfXX-ia64.c /output=[]elf64-ia64.c
+ $ write sys$output "Generate elf64-target.h from elfxx-target.h"
+ $ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
+         []elfXX-target.h /output=[]elf64-target.h
+ $ del substxx.tpu;*
+ $ copy [.hosts]alphavms.h sysdep.h
+ $ endif
+ $ append sys$input build.com
+ $DECK
+ $ DEFS=DEFS + ",""unlink=remove"",""DEBUGDIR=""""GNU$DEBUGDIR"""""""
+ $ OPT="/noopt/debug"
+ $ CFLAGS="/name=(as_is,shortened)" + -
+   "/include=([],""../"",""../include"")" + -
+   "/define=(" + DEFS + ")" + OPT
+ $ FILES=FILES + "archive,archive64,archures,bfd,bfdio,binary,cache,coffgen,"+-
+   "compress,corefile,dwarf2,elf,format,hash,ihex,init,libbfd,linker,"+-
+   "opncls,reloc,section,simple,srec,stab-syms,syms,targets,tekhex,verilog"
+ $ write sys$output "CFLAGS=",CFLAGS
+ $ cflags_libbfd="/warning=(disable=missingreturn)"
+ $ cflags_nil=""
+ $ NUM = 0
+ $ OBJS=""
+ $ LOOP:
+ $   F = F$ELEMENT(NUM,",",FILES)
+ $   IF F.EQS."," THEN GOTO END
+ $   eflags_name="cflags_''f'"
+ $   name_len=f$length(eflags_name)
+ $   dash_pos=f$locate("-",eflags_name)
+ $   if dash_pos.ne.name_len
+ $   then
+ $     eflags_name['dash_pos,1]:="_"
+ $     dash_pos=f$locate("-",eflags_name)
+ $     if dash_pos.ne.name_len then eflags_name['dash_pos,1]:="_"
+ $   endif
+ $   if f$type('eflags_name).eqs."" then eflags_name="cflags_nil"
+ $   eflags='eflags_name
+ $   write sys$output "Compiling ", F, ".c", eflags
+ $   cc 'CFLAGS 'eflags 'F.c
+ $   IF OBJS.NES."" THEN OBJS=OBJS + ","
+ $   OBJS=OBJS + F + ".obj"
+ $   NUM = NUM + 1
+ $   GOTO LOOP
+ $ END:
+ $ purge
+ $ lib/create libbfd 'OBJS
+ $EOD
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.213
diff -c -r1.213 elfxx-ia64.c
*** bfd/elfxx-ia64.c	29 Aug 2009 22:10:58 -0000	1.213
--- bfd/elfxx-ia64.c	31 Aug 2009 15:28:29 -0000
***************
*** 6031,6036 ****
--- 6031,6039 ----
  
  #undef  elf_backend_want_p_paddr_set_to_zero
  
+ #undef ELF_OSABI
+ #define ELF_OSABI			ELFOSABI_OPENVMS
+ 
  #undef  ELF_MAXPAGESIZE
  #define ELF_MAXPAGESIZE			0x10000	/* 64KB */
  
Index: bfd/makefile.vms
===================================================================
RCS file: /cvs/src/src/bfd/makefile.vms,v
retrieving revision 1.4
diff -c -r1.4 makefile.vms
*** bfd/makefile.vms	25 May 2009 12:41:46 -0000	1.4
--- bfd/makefile.vms	31 Aug 2009 15:28:29 -0000
***************
*** 12,23 ****
  ifeq ($(ARCH),ALPHA)
  HOSTFILE=alphavms.h
  TARGETOBJS = cpu-alpha.obj
! else
  HOSTFILE=vaxvms.h
  TARGETOBJS = cpu-vax.obj
  endif
  
- 
  OBJS=archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,binary.obj,\
    cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,elf.obj,\
    format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,opncls.obj,\
--- 12,27 ----
  ifeq ($(ARCH),ALPHA)
  HOSTFILE=alphavms.h
  TARGETOBJS = cpu-alpha.obj
! endif
! ifeq ($(ARCH),IA64)
! HOSTFILE=alphavms.h
! TARGETOBJS = cpu-ia64.obj
! endif
! ifeq ($(ARCH),VAX)
  HOSTFILE=vaxvms.h
  TARGETOBJS = cpu-vax.obj
  endif
  
  OBJS=archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,binary.obj,\
    cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,elf.obj,\
    format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,opncls.obj,\
***************
*** 25,50 ****
    targets.obj,tekhex.obj,verilog.obj,\
    vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS)
  
! ifeq ($(CC),gcc)
! ifeq ($(ARCH),ALPHA)
! DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\
! "HAVE_vms_alpha_vec=1")
! else
! DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
! "HAVE_vms_vax_vec=1")
  endif
- CFLAGS=/include=([],[-.include])$(DEFS)
- else
  ifeq ($(ARCH),ALPHA)
  DEFS=/define=(SELECT_VECS="&vms_alpha_vec",\
    SELECT_ARCHITECTURES="&bfd_alpha_arch",\
!   "HAVE_vms_alpha_vec=1","unlink=remove","DEBUGDIR=NULL")
! else
! DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\
!   "HAVE_vms_vax_vec=1","unlink=remove")
  endif
  OPT=/noopt/debug
! CFLAGS=/name=(as_is,shortened)/include=([],[-.include])$(DEFS)$(OPT)
  endif
  
  
--- 29,55 ----
    targets.obj,tekhex.obj,verilog.obj,\
    vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS)
  
! ifeq ($(ARCH),IA64)
! DEFS=/define=(SELECT_VECS="&vms_ia64_vec",\
!   SELECT_ARCHITECTURES="&bfd_ia64_arch",)
  endif
  ifeq ($(ARCH),ALPHA)
  DEFS=/define=(SELECT_VECS="&vms_alpha_vec",\
    SELECT_ARCHITECTURES="&bfd_alpha_arch",\
!   "HAVE_vms_alpha_vec=1")
  endif
+ ifeq ($(ARCH),VAX)
+ DEFS=/define=(SELECT_VECS="&vms_vax_vec",\
+   SELECT_ARCHITECTURES="&bfd_vax_arch",\
+   "HAVE_vms_vax_vec=1")
+ endif
+ 
+ ifeq ($(CC),gcc)
+ CFLAGS=/include=([],[-.include])$(DEFS)
+ else
  OPT=/noopt/debug
! CFLAGS=/name=(as_is,shortened)/include=([],[-.include])/define="unlink=remove"\
!  $(DEFS)$(OPT)
  endif
  
  
Index: bfd/vms.c
===================================================================
RCS file: /cvs/src/src/bfd/vms.c,v
retrieving revision 1.49
diff -c -r1.49 vms.c
*** bfd/vms.c	23 Jun 2009 13:48:38 -0000	1.49
--- bfd/vms.c	31 Aug 2009 15:28:29 -0000
***************
*** 24,29 ****
--- 24,30 ----
  
  #ifdef VMS
  #include <rms.h>
+ #include <unixlib.h>
  #include <starlet.h>
  #define RME$C_SETRFM 0x00000001
  #include <unistd.h>
Index: bfd/hosts/alphavms.h
===================================================================
RCS file: /cvs/src/src/bfd/hosts/alphavms.h,v
retrieving revision 1.7
diff -c -r1.7 alphavms.h
*** bfd/hosts/alphavms.h	14 Nov 2008 09:57:33 -0000	1.7
--- bfd/hosts/alphavms.h	31 Aug 2009 15:28:29 -0000
***************
*** 67,73 ****
  #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
  #endif
  
! extern int getpagesize PARAMS ((void));
  
  /* No intl.  */
  #define gettext(Msgid) (Msgid)
--- 67,74 ----
  #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
  #endif
  
! extern int getpagesize (void);
! extern char *stpcpy (char *, const char *);
  
  /* No intl.  */
  #define gettext(Msgid) (Msgid)
Index: binutils/configure.com
===================================================================
RCS file: /cvs/src/src/binutils/configure.com,v
retrieving revision 1.3
diff -c -r1.3 configure.com
*** binutils/configure.com	25 May 2009 13:03:24 -0000	1.3
--- binutils/configure.com	31 Aug 2009 15:28:29 -0000
***************
*** 5,12 ****
  $!
  $! 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|")
  $!
  $! Generate config.h
  $!
--- 5,13 ----
  $!
  $! Written by Klaus K"ampf (kkaempf@rmi.de)
  $!
! $ arch=F$GETSYI("ARCH_NAME")
! $ arch=F$EDIT(arch,"LOWERCASE")
! $ write sys$output "Configuring binutils for ''arch' target"
  $!
  $! Generate config.h
  $!
***************
*** 44,55 ****
  $!
  $! Add TARGET.
  $!
! $ if arch .eqs. "Alpha"
! $ then
! $   target = "vms-alpha"
! $ else
! $   target = "vms-vax"
! $ endif
  $!
  $ open/append tfile config.h
  $ write tfile "#define TARGET """ + target + """"
--- 45,53 ----
  $!
  $! Add TARGET.
  $!
! $ 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,60 ****
--- 56,112 ----
  $!
  $ 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
\ No newline at end of file
Index: gas/configure.com
===================================================================
RCS file: /cvs/src/src/gas/configure.com,v
retrieving revision 1.1
diff -c -r1.1 configure.com
*** gas/configure.com	25 May 2009 13:11:33 -0000	1.1
--- gas/configure.com	31 Aug 2009 15:28:29 -0000
***************
*** 4,30 ****
  $! do not have /bin/sh to execute it.
  $!
  $!
! $ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)	! vax==1, alpha==2
! $ arch = f$element(arch_indx,"|","|VAX|Alpha|")
! $!
! $ if arch.eqs."Alpha"
  $ then
  $! Target specific information
! $   create targ-cpu.h
! #include "tc-alpha.h"
! $   create targ-cpu.c
! #include "tc-alpha.c"
! $   create targ-env.h
! #define TE_VMS
! #include "obj-format.h"
! $
  $! Code to handle the object file format.
! $  create obj-format.h
! #include "obj-evax.h"
! $  create obj-format.c
! #include "obj-evax.c"
! $  create atof-targ.c
  #include "atof-ieee.c"
  $  create config-vms.in
  /* config.h.  Generated by configure.com.  */
  /* Define to 1 if using `alloca.c'. */
--- 4,58 ----
  $! do not have /bin/sh to execute it.
  $!
  $!
! $ arch=F$GETSYI("ARCH_NAME")
! $ arch=F$EDIT(arch,"LOWERCASE")
! $ if arch.eqs."alpha"
! $ then
! $   format = "evax"
! $   target_alias = "alpha-dec-openvms"
! $   target_canonical = "alpha-dec-openvms"
! $ endif
! $ if arch.eqs."ia64"
  $ then
+ $   format = "elf"
+ $   target_alias = "ia64-openvms"
+ $   target_canonical = "ia64-unknown-openvms"
+ $ endif
+ $!
+ $!
+ $ write sys$output "Generate targ-cpu.[ch]"
+ $!
+ $! Target specific information
+ $ open/write outfile targ-cpu.h
+ $ write outfile "#include ""tc-''arch'.h"""
+ $ close outfile
  $! Target specific information
! $ open/write outfile targ-cpu.c
! $ write outfile "#include ""tc-''arch'.c"""
! $ close outfile
! $!
! $ write sys$output "Generate targ-env.h"
! $!
! $ create targ-env.h
! #include "te-generic.h"
! $!
! $ write sys$output "Generate obj-format.[ch]"
! $!
  $! Code to handle the object file format.
! $ open/write outfile obj-format.h
! $ write outfile "#include ""obj-''format'.h"""
! $ close outfile
! $ open/write outfile obj-format.c
! $ write outfile "#include ""obj-''format'.c"""
! $ close outfile
! $!
! $ write sys$output "Generate atof-targ.c"
! $!
! $ create atof-targ.c
  #include "atof-ieee.c"
+ $!
+ $ write sys$output "Generate gas/config.h"
+ $!
  $  create config-vms.in
  /* config.h.  Generated by configure.com.  */
  /* Define to 1 if using `alloca.c'. */
***************
*** 51,56 ****
--- 79,87 ----
  #include <builtins.h>
  #define C_alloca(x) __ALLOCA(x)
  
+ /* Define to 1 if you have the `basename' function. */
+ #define HAVE_DECL_BASENAME 1
+ 
  /* Is the prototype for getopt in <unistd.h> in the expected format? */
  #define HAVE_DECL_GETOPT 1
  
***************
*** 119,133 ****
  /* Define to 1 if you have the ANSI C header files. */
  #define STDC_HEADERS 1
  
- /* Target alias. */
- #define TARGET_ALIAS "alpha-dec-openvms"
- 
- /* Canonical target. */
- #define TARGET_CANONICAL "alpha-dec-openvms"
- 
- /* Target CPU. */
- #define TARGET_CPU "alpha"
- 
  /* Target OS. */
  #define TARGET_OS "openvms"
  
--- 150,155 ----
***************
*** 143,155 ****
  #undef YYTEXT_POINTER
  
  /* Version number of package */
- $
- $ endif
  $!
  $! Get VERSION from ../bfd/configure.in
  $!
  $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
  $DECK
     mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
     match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
     IF match_pos <> 0 THEN;
--- 165,176 ----
  #undef YYTEXT_POINTER
  
  /* Version number of package */
  $!
  $! Get VERSION from ../bfd/configure.in
  $!
  $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
  $DECK
+    set (success, off);
     mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
     match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
     IF match_pos <> 0 THEN;
***************
*** 167,172 ****
     COPY_TEXT("""");
     WRITE_FILE(file, "config.h");
     QUIT
! $  EOD
  $del/nolog config-vms.in;
  $exit
--- 188,243 ----
     COPY_TEXT("""");
     WRITE_FILE(file, "config.h");
     QUIT
! $EOD
  $del/nolog config-vms.in;
+ $ open/append outfile config.h
+ $  write outfile ""
+ $  write outfile "/* Target alias. */"
+ $  write outfile "#define TARGET_ALIAS ""''target_alias'"""
+ $  write outfile ""
+ $  write outfile "/* Canonical target. */"
+ $  write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
+ $  write outfile ""
+ $  write outfile "/* Target CPU. */"
+ $  write outfile "#define TARGET_CPU ""'arch'"""
+ $ close outfile
+ $!
+ $ write sys$output "Generate gas/build.com"
+ $!
+ $ create build.com
+ $DECK
+ $ DEFS=""
+ $ OPT="/noopt/debug"
+ $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
+  "/name=(as_is,shortened)" +-
+  "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
+ $ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
+   "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
+   "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
+   "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
+ $ LIBBFD = ",[-.bfd]libbfd.olb/lib"
+ $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
+ $ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
+ $!
+ $ write sys$output "CFLAGS=",CFLAGS
+ $ if p1.nes."LINK"
+ $ then
+ $   write sys$output "Compiling targ-cpu.c (/noopt)"
+ $   cc 'CFLAGS /noopt targ-cpu
+ $   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:
+ $ endif
+ $ purge
+ $!
+ $ write sys$output "Building as.exe"
+ $ AS_OBJS="targ-cpu," + FILES + LIBOPCODES +  LIBBFD +  LIBIBERTY
+ $ link/exe=as 'AS_OBJS
  $exit
+ 
*** /dev/null	Mon Aug 31 11:18:31 2009
--- libiberty/configure.com	Fri Aug 28 17:13:05 2009
***************
*** 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
*** /dev/null	Mon Aug 31 11:18:31 2009
--- opcodes/configure.com	Mon Aug 31 12:42:16 2009
***************
*** 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]