old-cross-binutils/bfd/configure.com
Tristan Gingold d387240a63 bfd/
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.
2008-11-14 09:57:35 +00:00

308 lines
9.7 KiB
Text
Raw Blame History

$!
$! 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
$!
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
[]bfd-in2.h /output=[]bfd.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;
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT(vers);
ENDIF;
match_pos := SEARCH_QUIETLY('@wordsize@', 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_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));
ERASE(match_pos);
COPY_TEXT('__DECC');
SPLIT_LINE;
COPY_TEXT('#include <ints.h>');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('int64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', 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_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
$
$else
$
$ write sys$output "Configuring for Vax target"
$ target = "vax"
$!
$! copy bfd-in2.h to bfd.h, replacing @ macros
$!
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
[]bfd-in2.h /output=[]bfd.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;
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT(vers);
ENDIF;
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('32');
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_64_BIT_DEFINED@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('__DECC');
SPLIT_LINE;
COPY_TEXT('#include <ints.h>');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('int64');
ENDIF;
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
IF match_pos <> 0 THEN;
POSITION(BEGINNING_OF(match_pos));
ERASE(match_pos);
COPY_TEXT('uint64');
ENDIF;
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
QUIT
$ 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
!
! 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
$!
$ open/write tfile []targmatch.h
$ write tfile "{ """ + target + "-*-*vms*""" + ","
$ write tfile "#if defined (SELECT_VECS)"
$ write tfile "SELECT_VECS"
$ write tfile "#else"
$ write tfile "UNSUPPORTED_TARGET"
$ 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. */
/* Whether malloc must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_MALLOC */
/* Whether free must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_FREE */
/* Define if you have a working `mmap' system call. */
/* #define HAVE_MMAP 1 */
/* Do we need to use the b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Name of host specific header file to include in trad-core.c. */
/* #undef TRAD_HEADER */
/* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
/* #undef HAVE_SYS_PROCFS_H */
/* Do we really want to use mmap if it's available? */
/* #undef USE_MMAP */
/* Define if you have the fcntl function. */
#define HAVE_FCNTL 1
/* Define if you have the getpagesize function. */
#define HAVE_GETPAGESIZE 1
/* Define if you have the madvise function. */
#define HAVE_MADVISE 1
/* Define if you have the mprotect function. */
#define HAVE_MPROTECT 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <time.h> header file. */
#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'"