2008-11-14  Tristan Gingold  <gingold@adacore.com>

	* configure.com: Handle bfd_default_target_size, BFD_HOST_LONG_LONG,
	BFD_HOST_64BIT_LONG_LONG, BFD_HOSTPTR_T, bfd_file_ptr.
	Generate bfdver.h.
	* vms-hdr.c (_bfd_vms_write_hdr): Use strdup/free instead of alloca.
	* hosts/alphavms.h: Defines macros to bypass i18n.
	* makefile.vms (OBJS): Update file list.
	(DEFS): Remove VMS_DEBUG, const, add DEBUGDIR.
	(CFLAGS): Update flags.
	* bfdio.c (real_fopen): Add code specific to VMS: extract attributes
	from modes.

binutils/
2008-11-14  Tristan Gingold  <gingold@adacore.com>

	* configure.com: Get version from configure.in of bfd.
	* makefile.vms-in (DEBUG_OBJS): Add dwarf.obj.
	(CFLAGS): Update flags.

include/
2008-11-14  Tristan Gingold  <gingold@adacore.com>

	* fopen-vms.h (FOPEN_RB): Use a single string to match the
	standard prototype.
	(FOPEN_WB): Ditto.
	(FOPEN_AB): Ditto.
	(FOPEN_RUB): Ditto.
	(FOPEN_WUB): Ditto.
	(FOPEN_AUB): Ditto.

libiberty/
2008-11-14  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (OBJS): Update objects list.
	(CFLAGS): Update.
	(libiberty.olb): Remove alloca-conf.h dependency.
	* config.h-vms: Use new macro sets, use builtin alloca.

opcodes/
2008-11-14  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (OBJS): Update list of objects.
	(DEFS): Update
	(CFLAGS): Update.
This commit is contained in:
Tristan Gingold 2008-11-14 09:57:35 +00:00
parent 9b7132d30d
commit d387240a63
16 changed files with 215 additions and 47 deletions

View File

@ -1,3 +1,16 @@
2008-11-14 Tristan Gingold <gingold@adacore.com>
* configure.com: Handle bfd_default_target_size, BFD_HOST_LONG_LONG,
BFD_HOST_64BIT_LONG_LONG, BFD_HOSTPTR_T, bfd_file_ptr.
Generate bfdver.h.
* vms-hdr.c (_bfd_vms_write_hdr): Use strdup/free instead of alloca.
* hosts/alphavms.h: Defines macros to bypass i18n.
* makefile.vms (OBJS): Update file list.
(DEFS): Remove VMS_DEBUG, const, add DEBUGDIR.
(CFLAGS): Update flags.
* bfdio.c (real_fopen): Add code specific to VMS: extract attributes
from modes.
2008-11-13 Joel Brobecker <brobecker@adacore.com>
* configure.in: Deactivate large-file support on native 32bit
@ -16,10 +29,6 @@
PR 7023
* elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
2008-11-12 Tristan Gingold <gingold@adacore.com>
* bfd.c (bfd_get_sign_extend_vma): Return 0 for mach-o.
2008-11-11 Alan Modra <amodra@bigpond.net.au>
* elf.c (assign_file_positions_for_non_load_sections): Consolidate

View File

@ -86,11 +86,37 @@ close_on_exec (FILE *file)
FILE *
real_fopen (const char *filename, const char *modes)
{
#ifdef VMS
char vms_modes[4];
char *vms_attr;
/* On VMS, fopen allows file attributes as optionnal arguments.
We need to use them but we'd better to use the common prototype.
In fopen-vms.h, they are separated from the mode with a comma.
Split here. */
vms_attr = strchr (modes, ',');
if (vms_attr == NULL)
{
/* No attributes. */
return close_on_exec (fopen (filename, modes));
}
else
{
/* Attribute found - rebuild modes. */
size_t modes_len = vms_attr - modes;
BFD_ASSERT (modes_len < sizeof (vms_modes));
memcpy (vms_modes, modes, modes_len);
vms_modes[modes_len] = 0;
return close_on_exec (fopen (filename, vms_modes, vms_attr + 1));
}
#else /* !VMS */
#if defined (HAVE_FOPEN64)
return close_on_exec (fopen64 (filename, modes));
#else
return close_on_exec (fopen (filename, modes));
#endif
#endif /* !VMS */
}
/*

View File

@ -49,12 +49,30 @@ $DECK
ERASE(match_pos);
COPY_TEXT('64');
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_default_target_size@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('0');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_LONG_LONG@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('0');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('0');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
@ -75,6 +93,24 @@ $DECK
ERASE(match_pos);
COPY_TEXT('uint64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('uint64');
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('bfd_signed_vma');
ENDIF;
match_pos := SEARCH_QUIETLY('unsigned @bfd_file_ptr@ ufile_ptr', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('bfd_vma ufile_ptr');
ENDIF;
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
QUIT
$ EOD
@ -152,6 +188,61 @@ $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
!
! Copy file, changing lines with macros (@@)
!
!
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);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
vers := CURRENT_LINE-")";
ELSE;
vers := "unknown";
ENDIF;
versnum := vers - "." - ".";
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
match_pos := SEARCH_QUIETLY('@bfd_version@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT(versnum);
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_version_string@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('"');
COPY_TEXT(vers);
COPY_TEXT('"');
ENDIF;
match_pos := SEARCH_QUIETLY('@bfd_version_package@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('"(GNU Binutils) "');
ENDIF;
match_pos := SEARCH_QUIETLY('@report_bugs_to@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('"<http://www.sourceware.org/bugzilla/>"');
ENDIF;
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
$!
@ -210,6 +301,8 @@ $ create []config.h
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Disable NLS */
#undef ENABLE_NLS
$!
$ write sys$output "Generated `config.h'"

View File

@ -34,6 +34,7 @@
#include <time.h>
#include "bfd.h"
#include "filenames.h"
#ifndef BFD_HOST_64_BIT
/* Make the basic types 64-bit quantities on the host.
@ -67,3 +68,12 @@ typedef BFD_HOST_64_BIT int64_type;
#endif
extern int getpagesize PARAMS ((void));
/* No intl. */
#define gettext(Msgid) (Msgid)
#define dgettext(Domainname, Msgid) (Msgid)
#define dcgettext(Domainname, Msgid, Category) (Msgid)
#define textdomain(Domainname) while (0) /* nothing */
#define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
#define _(String) (String)
#define N_(String) (String)

View File

@ -18,11 +18,12 @@ TARGETOBJS = cpu-vax.obj
endif
OBJS=archive.obj,archures.obj,bfd.obj,cache.obj,coffgen.obj,corefile.obj,\
format.obj,init.obj,libbfd.obj,opncls.obj,reloc.obj,section.obj,syms.obj,\
targets.obj,hash.obj,linker.obj,elf.obj,srec.obj,binary.obj,tekhex.obj,\
ihex.obj,stab-syms.obj,vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,\
vms-misc.obj,$(TARGETOBJS)
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,\
reloc.obj,section.obj,simple.obj,srec.obj,stab-syms.obj,syms.obj,\
targets.obj,tekhex.obj,\
vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS)
ifeq ($(CC),gcc)
ifeq ($(ARCH),ALPHA)
@ -30,18 +31,18 @@ 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","VMS_DEBUG")
"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","const=","VMS_DEBUG",)
"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","const=","VMS_DEBUG")
"HAVE_vms_vax_vec=1","unlink=remove","const=")
endif
CFLAGS=/noopt/debug/include=([],[-.include])$(DEFS)/warnings=disable=(missingreturn,implicitfunc,longextern)
CFLAGS=/noopt/debug/show=incl/name=(as_is,shortened)/include=([],[-.include])$(DEFS)/warnings=disable=(missingreturn,longextern)
endif

View File

@ -212,8 +212,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
char *fname, *fout, *fptr;
fptr = bfd_get_filename (abfd);
fname = alloca (strlen (fptr) + 1);
strcpy (fname, fptr);
fname = strdup (fptr);
fout = strrchr (fname, ']');
if (fout == 0)
fout = strchr (fname, ':');
@ -238,6 +237,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
*fptr = 0;
}
_bfd_vms_output_counted (abfd, fout);
free (fname);
}
else
_bfd_vms_output_counted (abfd, "NONAME");

View File

@ -1,3 +1,9 @@
2008-11-14 Tristan Gingold <gingold@adacore.com>
* configure.com: Get version from configure.in of bfd.
* makefile.vms-in (DEBUG_OBJS): Add dwarf.obj.
(CFLAGS): Update flags.
2008-11-13 Hans-Peter Nilsson <hp@axis.com>
Alan Modra <amodra@bigpond.net.au>

View File

@ -53,9 +53,9 @@ $DECK
!
! Get VERSION from configure.in
!
mfile := CREATE_BUFFER("mfile", "CONFIGURE.IN");
mfile := CREATE_BUFFER("mfile", "[-.bfd]CONFIGURE.IN");
rang := CREATE_RANGE(BEGINNING_OF(mfile), END_OF(mfile));
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(binutils, ', FORWARD, EXACT, rang);
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);

View File

@ -22,7 +22,9 @@ DEFS=/define=("TARGET=$(TARGET)")
LIBS=,gnu_cc_library:libgcc/lib,sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj
else
CFLAGS=/noopt/debug/include=([],[-.include],[-.bfd])$(DEFS)\
/warnings=disable=(missingreturn,implicitfunc,longextern)
/name=(as_is,shortened)\
/warnings=disable=(missingreturn,longextern)\
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
DEFS=/define=("TARGET=$(TARGET)","const=","unlink=remove")
LIBS=,sys$$library:vaxcrtl.olb/lib
endif
@ -34,7 +36,7 @@ LIBIBERTY = [-.libiberty]libiberty.olb/lib
OPCODES_DEP = [-.opcodes]libopcodes.olb
OPCODES = [-.opcodes]libopcodes.olb/lib
DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj
DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj
WRITE_DEBUG_OBJS = $(DEBUG_OBJS),wrstabs.obj

View File

@ -1,3 +1,13 @@
2008-11-14 Tristan Gingold <gingold@adacore.com>
* fopen-vms.h (FOPEN_RB): Use a single string to match the
standard prototype.
(FOPEN_WB): Ditto.
(FOPEN_AB): Ditto.
(FOPEN_RUB): Ditto.
(FOPEN_WUB): Ditto.
(FOPEN_AUB): Ditto.
2008-10-21 Alan Modra <amodra@bigpond.net.au>
* obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.

View File

@ -9,12 +9,12 @@
the application unable to be configured for both "same" and "binary"
variant systems. */
#define FOPEN_RB "rb","rfm=var"
#define FOPEN_WB "wb","rfm=var"
#define FOPEN_AB "ab","rfm=var"
#define FOPEN_RUB "r+b","rfm=var"
#define FOPEN_WUB "w+b","rfm=var"
#define FOPEN_AUB "a+b","rfm=var"
#define FOPEN_RB "rb,rfm=var"
#define FOPEN_WB "wb,rfm=var"
#define FOPEN_AB "ab,rfm=var"
#define FOPEN_RUB "r+b,rfm=var"
#define FOPEN_WUB "w+b,rfm=var"
#define FOPEN_AUB "a+b,rfm=var"
#define FOPEN_RT "r"
#define FOPEN_WT "w"

View File

@ -1,3 +1,10 @@
2008-11-14 Tristan Gingold <gingold@adacore.com>
* makefile.vms (OBJS): Update objects list.
(CFLAGS): Update.
(libiberty.olb): Remove alloca-conf.h dependency.
* config.h-vms: Use new macro sets, use builtin alloca.
2008-10-22 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (CPPFLAGS): Define.

View File

@ -1,13 +1,8 @@
#ifndef NEED_strerror
#define NEED_strerror
#endif
#ifndef NEED_basename
#define NEED_basename
#endif
#ifndef NEED_psignal
#define NEED_psignal
#endif
#ifndef NEED_on_exit
#define NEED_on_exit
#endif
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_LIMITS_H 1
#define HAVE_UNISTD_H 1
#define HAVE_TIMES 1
#include <builtins.h>
#define C_alloca __ALLOCA

View File

@ -8,18 +8,21 @@
#
OBJS=bcopy.obj,bcmp.obj,getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\
getopt1.obj,cplus-dem.obj,strncasecmp.obj,strcasecmp.obj,strdup.obj,\
concat.obj,getruntime.obj,getpagesize.obj,alloca.obj,xstrerror.obj,\
xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,objalloc.obj
getopt1.obj,cplus-dem.obj,cp-demangle.obj,cp-demint.obj,\
asprintf.obj vasprintf.obj,mkstemps.obj,\
concat.obj,getruntime.obj,getpagesize.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
ifeq ($(CC),gcc)
CFLAGS=/include=([],[-.include])
else
# assume dec c
CFLAGS=/noopt/debug/include=([],[-.include])/define=("const=")/warnings=disable=(missingreturn,implicitfunc)
CFLAGS=/noopt/debug/include=([],[-.include])/warnings=disable=(missingreturn)/name=(as_is,shortened)/define=(HAVE_CONFIG_H=1)/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))
endif
libiberty.olb: config.h alloca-conf.h $(OBJS)
libiberty.olb: config.h $(OBJS)
purge
lib/create libiberty *.obj

View File

@ -1,3 +1,9 @@
2008-11-14 Tristan Gingold <gingold@adacore.com>
* makefile.vms (OBJS): Update list of objects.
(DEFS): Update
(CFLAGS): Update.
2008-11-06 Chao-ying Fu <fu@mips.com>
* mips-opc.c (synciobdma, syncs, syncw, syncws): Move these

View File

@ -6,8 +6,8 @@
# Created by Klaus K"ampf, kkaempf@progis.de
#
#
ifeq ($(ARCH),alpha)
OBJS=alpha-dis.obj,alpha-opc.obj,dis-buf.obj,disassemble.obj
ifeq ($(ARCH),ALPHA)
OBJS=alpha-dis.obj,alpha-opc.obj,dis-init.obj,dis-buf.obj,disassemble.obj
FORMAT=OBJ_EVAX
ARCHDEF="ARCH_alpha"
else
@ -20,9 +20,9 @@ ifeq ($(CC),gcc)
DEFS=/define=($(FORMAT))
CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS)
else
DEFS=/define=($(FORMAT),"const=")
DEFS=/define=($(FORMAT))
CFLAGS=/noopt/debug/include=([],[-.include],[-.bfd])$(DEFS)\
/warnings=disable=(missingreturn,implicitfunc,longextern)
/name=(as_is,shortened)/warnings=disable=(missingreturn,longextern)
endif
libopcodes.olb: sysdep.h $(OBJS)