$!
|
$!
|
$! This file configures the bfd library for use with openVMS.
|
$! This file configures the bfd library for use with openVMS.
|
$!
|
$!
|
$! We do not use the configure script, since we do not have /bin/sh
|
$! We do not use the configure script, since we do not have /bin/sh
|
$! to execute it.
|
$! to execute it.
|
$!
|
$!
|
$! Written by Klaus K"ampf (kkaempf@rmi.de)
|
$! Written by Klaus K"ampf (kkaempf@rmi.de)
|
$! Rewritten by Tristan Gingold (gingold@adacore.com)
|
$! Rewritten by Tristan Gingold (gingold@adacore.com)
|
$!
|
$!
|
$ arch=F$GETSYI("ARCH_NAME")
|
$ arch=F$GETSYI("ARCH_NAME")
|
$ arch=F$EDIT(arch,"LOWERCASE")
|
$ arch=F$EDIT(arch,"LOWERCASE")
|
$if arch .eqs. "alpha" then target = "alpha"
|
$if arch .eqs. "alpha" then target = "alpha"
|
$if arch .eqs. "ia64" then target = "ia64"
|
$if arch .eqs. "ia64" then target = "ia64"
|
$!
|
$!
|
$if (arch .eqs. "alpha") .or. (arch .eqs. "ia64")
|
$if (arch .eqs. "alpha") .or. (arch .eqs. "ia64")
|
$then
|
$then
|
$!
|
$!
|
$ write sys$output "Configuring BFD for ''target' target"
|
$ write sys$output "Configuring BFD for ''target' target"
|
$!
|
$!
|
$!
|
$!
|
$! copy bfd-in2.h to bfd.h, replacing @ macros
|
$! copy bfd-in2.h to bfd.h, replacing @ macros
|
$!
|
$!
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
[]bfd-in2.h /output=[]bfd.h
|
[]bfd-in2.h /output=[]bfd.h
|
$DECK
|
$DECK
|
!
|
!
|
! Copy file, changing lines with macros (@@)
|
! Copy file, changing lines with macros (@@)
|
!
|
!
|
!
|
!
|
set (success,off);
|
set (success,off);
|
vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
|
vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
vers := CURRENT_LINE-")";
|
vers := CURRENT_LINE-")";
|
ELSE;
|
ELSE;
|
vers := "unknown";
|
vers := "unknown";
|
ENDIF;
|
ENDIF;
|
|
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
|
|
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT(vers);
|
COPY_TEXT(vers);
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('64');
|
COPY_TEXT('64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@bfd_default_target_size@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@bfd_default_target_size@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('64');
|
COPY_TEXT('64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('0');
|
COPY_TEXT('0');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_LONG_LONG@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_LONG_LONG@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('0');
|
COPY_TEXT('0');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('0');
|
COPY_TEXT('0');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('__DECC');
|
COPY_TEXT('__DECC');
|
SPLIT_LINE;
|
SPLIT_LINE;
|
COPY_TEXT('#include ');
|
COPY_TEXT('#include ');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('int64');
|
COPY_TEXT('int64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('uint64');
|
COPY_TEXT('uint64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('uint64');
|
COPY_TEXT('uint64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('bfd_signed_vma');
|
COPY_TEXT('bfd_signed_vma');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('unsigned @bfd_file_ptr@ ufile_ptr', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('unsigned @bfd_file_ptr@ ufile_ptr', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('bfd_vma ufile_ptr');
|
COPY_TEXT('bfd_vma ufile_ptr');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('0');
|
COPY_TEXT('0');
|
ENDIF;
|
ENDIF;
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
QUIT
|
QUIT
|
$ EOD
|
$ EOD
|
$
|
$
|
$else
|
$else
|
$
|
$
|
$ write sys$output "Configuring for Vax target"
|
$ write sys$output "Configuring for Vax target"
|
$ target = "vax"
|
$ target = "vax"
|
$!
|
$!
|
$! copy bfd-in2.h to bfd.h, replacing @ macros
|
$! copy bfd-in2.h to bfd.h, replacing @ macros
|
$!
|
$!
|
$ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
|
$ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
[]bfd-in2.h /output=[]bfd.h
|
[]bfd-in2.h /output=[]bfd.h
|
$DECK
|
$DECK
|
!
|
!
|
! Copy file, changing lines with macros (@@)
|
! Copy file, changing lines with macros (@@)
|
!
|
!
|
!
|
!
|
set (success,off);
|
set (success,off);
|
vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
|
vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
vers := CURRENT_LINE-")";
|
vers := CURRENT_LINE-")";
|
ELSE;
|
ELSE;
|
vers := "unknown";
|
vers := "unknown";
|
ENDIF;
|
ENDIF;
|
|
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
|
|
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT(vers);
|
COPY_TEXT(vers);
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('32');
|
COPY_TEXT('32');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('0');
|
COPY_TEXT('0');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('__DECC');
|
COPY_TEXT('__DECC');
|
SPLIT_LINE;
|
SPLIT_LINE;
|
COPY_TEXT('#include ');
|
COPY_TEXT('#include ');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('int64');
|
COPY_TEXT('int64');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('uint64');
|
COPY_TEXT('uint64');
|
ENDIF;
|
ENDIF;
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
QUIT
|
QUIT
|
$ EOD
|
$ EOD
|
$endif
|
$endif
|
$
|
$
|
$!
|
$!
|
$! create bfdver.h
|
$! create bfdver.h
|
$!
|
$!
|
$ write sys$output "Generate `bfdver.h' from 'version.h' and `configure.in'."
|
$ write sys$output "Generate `bfdver.h' from 'version.h' and `configure.in'."
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
|
[]version.h /output=[]bfdver.h
|
[]version.h /output=[]bfdver.h
|
$DECK
|
$DECK
|
!
|
!
|
! Copy file, changing lines with macros (@@)
|
! Copy file, changing lines with macros (@@)
|
!
|
!
|
!
|
!
|
set (success,off);
|
set (success,off);
|
vfile := CREATE_BUFFER("vfile", "configure.in");
|
vfile := CREATE_BUFFER("vfile", "configure.in");
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
vers := CURRENT_LINE-")";
|
vers := CURRENT_LINE-")";
|
ELSE;
|
ELSE;
|
vers := "unknown";
|
vers := "unknown";
|
ENDIF;
|
ENDIF;
|
versnum := vers - "." - ".";
|
versnum := vers - "." - ".";
|
|
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
|
|
|
match_pos := SEARCH_QUIETLY('@bfd_version@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@bfd_version@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT(versnum);
|
COPY_TEXT(versnum);
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@bfd_version_string@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@bfd_version_string@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('"');
|
COPY_TEXT('"');
|
COPY_TEXT(vers);
|
COPY_TEXT(vers);
|
COPY_TEXT('"');
|
COPY_TEXT('"');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@bfd_version_package@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@bfd_version_package@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('"(GNU Binutils) "');
|
COPY_TEXT('"(GNU Binutils) "');
|
ENDIF;
|
ENDIF;
|
match_pos := SEARCH_QUIETLY('@report_bugs_to@', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('@report_bugs_to@', FORWARD, EXACT, rang);
|
IF match_pos <> 0 THEN;
|
IF match_pos <> 0 THEN;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('""');
|
COPY_TEXT('""');
|
ENDIF;
|
ENDIF;
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
QUIT
|
QUIT
|
$ EOD
|
$ EOD
|
$!
|
$!
|
$!
|
$!
|
$! create targmatch.h
|
$! create targmatch.h
|
$!
|
$!
|
$ write sys$output "Generate `targmatch.h'"
|
$ write sys$output "Generate `targmatch.h'"
|
$ open/write tfile []targmatch.h
|
$ open/write tfile []targmatch.h
|
$ write tfile "{ """ + target + "-*-*vms*""" + ","
|
$ write tfile "{ """ + target + "-*-*vms*""" + ","
|
$ write tfile "#if defined (SELECT_VECS)"
|
$ write tfile "#if defined (SELECT_VECS)"
|
$ write tfile "SELECT_VECS"
|
$ write tfile "SELECT_VECS"
|
$ write tfile "#else"
|
$ write tfile "#else"
|
$ write tfile "UNSUPPORTED_TARGET"
|
$ write tfile "UNSUPPORTED_TARGET"
|
$ write tfile "#endif"
|
$ write tfile "#endif"
|
$ write tfile "},"
|
$ write tfile "},"
|
$ close tfile
|
$ close tfile
|
$!
|
$!
|
$!
|
$!
|
$! create config.h
|
$! create config.h
|
$!
|
$!
|
$ write sys$output "Generate `config.h'"
|
$ write sys$output "Generate `config.h'"
|
$ create []config.h
|
$ create []config.h
|
/* config.h-vms. Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de. */
|
/* config.h-vms. Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de. */
|
/* config.in. Generated automatically from configure.in by autoheader. */
|
/* config.in. Generated automatically from configure.in by autoheader. */
|
/* Whether malloc must be declared even if is included. */
|
/* Whether malloc must be declared even if is included. */
|
/* #undef NEED_DECLARATION_MALLOC */
|
/* #undef NEED_DECLARATION_MALLOC */
|
/* Whether free must be declared even if is included. */
|
/* Whether free must be declared even if is included. */
|
/* #undef NEED_DECLARATION_FREE */
|
/* #undef NEED_DECLARATION_FREE */
|
/* Define if you have a working `mmap' system call. */
|
/* Define if you have a working `mmap' system call. */
|
/* #define HAVE_MMAP 1 */
|
/* #define HAVE_MMAP 1 */
|
/* Do we need to use the b modifier when opening binary files? */
|
/* Do we need to use the b modifier when opening binary files? */
|
/* #undef USE_BINARY_FOPEN */
|
/* #undef USE_BINARY_FOPEN */
|
/* Name of host specific header file to include in trad-core.c. */
|
/* Name of host specific header file to include in trad-core.c. */
|
/* #undef TRAD_HEADER */
|
/* #undef TRAD_HEADER */
|
/* Define only if is available *and* it defines prstatus_t. */
|
/* Define only if is available *and* it defines prstatus_t. */
|
/* #undef HAVE_SYS_PROCFS_H */
|
/* #undef HAVE_SYS_PROCFS_H */
|
/* Do we really want to use mmap if it's available? */
|
/* Do we really want to use mmap if it's available? */
|
/* #undef USE_MMAP */
|
/* #undef USE_MMAP */
|
/* Define if you have the fcntl function. */
|
/* Define if you have the fcntl function. */
|
#define HAVE_FCNTL 1
|
#define HAVE_FCNTL 1
|
/* Define if you have the getpagesize function. */
|
/* Define if you have the getpagesize function. */
|
#define HAVE_GETPAGESIZE 1
|
#define HAVE_GETPAGESIZE 1
|
/* Define if you have the madvise function. */
|
/* Define if you have the madvise function. */
|
#define HAVE_MADVISE 1
|
#define HAVE_MADVISE 1
|
/* Define if you have the mprotect function. */
|
/* Define if you have the mprotect function. */
|
#define HAVE_MPROTECT 1
|
#define HAVE_MPROTECT 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_FCNTL_H 1
|
#define HAVE_FCNTL_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_STDDEF_H 1
|
#define HAVE_STDDEF_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_STRINGS_H 1
|
#define HAVE_STRINGS_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_SYS_FILE_H 1
|
#define HAVE_SYS_FILE_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_TIME_H 1
|
#define HAVE_TIME_H 1
|
/* Define if you have the header file. */
|
/* Define if you have the header file. */
|
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
/* Disable NLS */
|
/* Disable NLS */
|
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
$!
|
$!
|
$ write sys$output "Copy sysdep.h"
|
$ write sys$output "Copy sysdep.h"
|
$ copy [.hosts]alphavms.h sysdep.h
|
$ copy [.hosts]alphavms.h sysdep.h
|
$
|
$
|
$ write sys$output "Generate build.com"
|
$ write sys$output "Generate build.com"
|
$!
|
$!
|
$ if ARCH.eqs."alpha"
|
$ if ARCH.eqs."alpha"
|
$ then
|
$ then
|
$ create build.com
|
$ create build.com
|
$DECK
|
$DECK
|
$ DEFS="""SELECT_VECS=&vms_alpha_vec"","+-
|
$ DEFS="""SELECT_VECS=&vms_alpha_vec"","+-
|
"""SELECT_ARCHITECTURES=&bfd_alpha_arch"""
|
"""SELECT_ARCHITECTURES=&bfd_alpha_arch"""
|
$ FILES="cpu-alpha,vms,vms-hdr,vms-gsd,vms-tir,vms-misc,"
|
$ FILES="cpu-alpha,vms,vms-hdr,vms-gsd,vms-tir,vms-misc,"
|
$EOD
|
$EOD
|
$ endif
|
$ endif
|
$ if ARCH.eqs."ia64"
|
$ if ARCH.eqs."ia64"
|
$ then
|
$ then
|
$ create build.com
|
$ create build.com
|
$DECK
|
$DECK
|
$ DEFS="""SELECT_VECS=&bfd_elf64_ia64_vms_vec"","+-
|
$ DEFS="""SELECT_VECS=&bfd_elf64_ia64_vms_vec"","+-
|
"""SELECT_ARCHITECTURES=&bfd_ia64_arch"""
|
"""SELECT_ARCHITECTURES=&bfd_ia64_arch"""
|
$ FILES="cpu-ia64,elf64-ia64,elf-strtab,corefile,stabs,merge,elf-eh-frame,"+-
|
$ FILES="cpu-ia64,elf64-ia64,elf-strtab,corefile,stabs,merge,elf-eh-frame,"+-
|
"elflink,elf-attrs,dwarf1,elf64,"
|
"elflink,elf-attrs,dwarf1,elf64,"
|
$EOD
|
$EOD
|
$ create substxx.tpu
|
$ create substxx.tpu
|
$DECK
|
$DECK
|
set (success,off);
|
set (success,off);
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
|
found_range := CREATE_RANGE(BEGINNING_OF(file), BEGINNING_OF(file));
|
found_range := CREATE_RANGE(BEGINNING_OF(file), BEGINNING_OF(file));
|
|
|
LOOP
|
LOOP
|
rang := CREATE_RANGE (END_OF(found_range),END_OF(file));
|
rang := CREATE_RANGE (END_OF(found_range),END_OF(file));
|
match_pos := SEARCH_QUIETLY('NN', FORWARD, EXACT, rang);
|
match_pos := SEARCH_QUIETLY('NN', FORWARD, EXACT, rang);
|
EXITIF match_pos = 0;
|
EXITIF match_pos = 0;
|
POSITION(BEGINNING_OF(match_pos));
|
POSITION(BEGINNING_OF(match_pos));
|
ERASE(match_pos);
|
ERASE(match_pos);
|
COPY_TEXT('64');
|
COPY_TEXT('64');
|
ENDLOOP;
|
ENDLOOP;
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
|
QUIT
|
QUIT
|
$ EOD
|
$ EOD
|
$ write sys$output "Generate elf64-ia64.c from elfxx-ia64.c"
|
$ write sys$output "Generate elf64-ia64.c from elfxx-ia64.c"
|
$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
|
$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
|
[]elfXX-ia64.c /output=[]elf64-ia64.c
|
[]elfXX-ia64.c /output=[]elf64-ia64.c
|
$ write sys$output "Generate elf64-target.h from elfxx-target.h"
|
$ write sys$output "Generate elf64-target.h from elfxx-target.h"
|
$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
|
$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu -
|
[]elfXX-target.h /output=[]elf64-target.h
|
[]elfXX-target.h /output=[]elf64-target.h
|
$ del substxx.tpu;*
|
$ del substxx.tpu;*
|
$ endif
|
$ endif
|
$ append sys$input build.com
|
$ append sys$input build.com
|
$DECK
|
$DECK
|
$ DEFS=DEFS + ",""unlink=remove"",""DEBUGDIR=""""GNU$DEBUGDIR:"""""""
|
$ DEFS=DEFS + ",""unlink=remove"",""DEBUGDIR=""""GNU$DEBUGDIR:"""""""
|
$ OPT="/noopt/debug"
|
$ OPT="/noopt/debug"
|
$ CFLAGS="/name=(as_is,shortened)" + -
|
$ CFLAGS="/name=(as_is,shortened)" + -
|
"/include=([],""../"",""../include"")" + -
|
"/include=([],""../"",""../include"")" + -
|
"/define=(" + DEFS + ")" + OPT
|
"/define=(" + DEFS + ")" + OPT
|
$ FILES=FILES + "archive,archive64,archures,bfd,bfdio,binary,cache,coffgen,"+-
|
$ FILES=FILES + "archive,archive64,archures,bfd,bfdio,binary,cache,coffgen,"+-
|
"compress,corefile,dwarf2,elf,format,hash,ihex,init,libbfd,linker,"+-
|
"compress,corefile,dwarf2,elf,format,hash,ihex,init,libbfd,linker,"+-
|
"opncls,reloc,section,simple,srec,stab-syms,syms,targets,tekhex,verilog"
|
"opncls,reloc,section,simple,srec,stab-syms,syms,targets,tekhex,verilog"
|
$ write sys$output "CFLAGS=",CFLAGS
|
$ write sys$output "CFLAGS=",CFLAGS
|
$ cflags_libbfd="/warning=(disable=missingreturn)"
|
$ cflags_libbfd="/warning=(disable=missingreturn)"
|
$ cflags_nil=""
|
$ cflags_nil=""
|
$ NUM = 0
|
$ NUM = 0
|
$ OBJS=""
|
$ OBJS=""
|
$ LOOP:
|
$ LOOP:
|
$ F = F$ELEMENT(NUM,",",FILES)
|
$ F = F$ELEMENT(NUM,",",FILES)
|
$ IF F.EQS."," THEN GOTO END
|
$ IF F.EQS."," THEN GOTO END
|
$ eflags_name="cflags_''f'"
|
$ eflags_name="cflags_''f'"
|
$ name_len=f$length(eflags_name)
|
$ name_len=f$length(eflags_name)
|
$ dash_pos=f$locate("-",eflags_name)
|
$ dash_pos=f$locate("-",eflags_name)
|
$ if dash_pos.ne.name_len
|
$ if dash_pos.ne.name_len
|
$ then
|
$ then
|
$ eflags_name['dash_pos,1]:="_"
|
$ eflags_name['dash_pos,1]:="_"
|
$ dash_pos=f$locate("-",eflags_name)
|
$ dash_pos=f$locate("-",eflags_name)
|
$ if dash_pos.ne.name_len then eflags_name['dash_pos,1]:="_"
|
$ if dash_pos.ne.name_len then eflags_name['dash_pos,1]:="_"
|
$ endif
|
$ endif
|
$ if f$type('eflags_name).eqs."" then eflags_name="cflags_nil"
|
$ if f$type('eflags_name).eqs."" then eflags_name="cflags_nil"
|
$ eflags='eflags_name
|
$ eflags='eflags_name
|
$ write sys$output "Compiling ", F, ".c", eflags
|
$ write sys$output "Compiling ", F, ".c", eflags
|
$ cc 'CFLAGS 'eflags 'F.c
|
$ cc 'CFLAGS 'eflags 'F.c
|
$ IF OBJS.NES."" THEN OBJS=OBJS + ","
|
$ IF OBJS.NES."" THEN OBJS=OBJS + ","
|
$ OBJS=OBJS + F + ".obj"
|
$ OBJS=OBJS + F + ".obj"
|
$ NUM = NUM + 1
|
$ NUM = NUM + 1
|
$ GOTO LOOP
|
$ GOTO LOOP
|
$ END:
|
$ END:
|
$ purge
|
$ purge
|
$ lib/create libbfd 'OBJS
|
$ lib/create libbfd 'OBJS
|
$EOD
|
$EOD
|
|
|