xref: /netbsd-src/external/gpl3/binutils.old/dist/binutils/configure.com (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos$!
275fd0b74Schristos$! This file configures binutils for use with openVMS/Alpha
375fd0b74Schristos$! We do not use the configure script, since we do not have /bin/sh
475fd0b74Schristos$! to execute it.
575fd0b74Schristos$!
6*e992f068Schristos$!   Copyright (C) 2012-2022 Free Software Foundation, Inc.
775fd0b74Schristos$!
875fd0b74Schristos$! This file is free software; you can redistribute it and/or modify
975fd0b74Schristos$! it under the terms of the GNU General Public License as published by
1075fd0b74Schristos$! the Free Software Foundation; either version 3 of the License, or
1175fd0b74Schristos$! (at your option) any later version.
1275fd0b74Schristos$!
1375fd0b74Schristos$! This program is distributed in the hope that it will be useful,
1475fd0b74Schristos$! but WITHOUT ANY WARRANTY; without even the implied warranty of
1575fd0b74Schristos$! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1675fd0b74Schristos$! GNU General Public License for more details.
1775fd0b74Schristos$!
1875fd0b74Schristos$! You should have received a copy of the GNU General Public License
1975fd0b74Schristos$! along with this program; see the file COPYING3.  If not see
2075fd0b74Schristos$! <http://www.gnu.org/licenses/>.
2175fd0b74Schristos$!
2275fd0b74Schristos$! Written by Klaus K"ampf (kkaempf@rmi.de)
2375fd0b74Schristos$!
2475fd0b74Schristos$ arch=F$GETSYI("ARCH_NAME")
2575fd0b74Schristos$ arch=F$EDIT(arch,"LOWERCASE")
2675fd0b74Schristos$ write sys$output "Configuring binutils for ''arch' target"
2775fd0b74Schristos$!
2875fd0b74Schristos$! Generate config.h
2975fd0b74Schristos$!
3075fd0b74Schristos$ create config.h
3175fd0b74Schristos/* config.h.  Generated automatically by configure.com  */
3275fd0b74Schristos/* Is the type time_t defined in <time.h>?  */
3375fd0b74Schristos#define HAVE_TIME_T_IN_TIME_H 1
3475fd0b74Schristos/* Is the type time_t defined in <sys/types.h>?  */
3575fd0b74Schristos#define HAVE_TIME_T_IN_TYPES_H 1
3675fd0b74Schristos/* Does <utime.h> define struct utimbuf?  */
3775fd0b74Schristos#define HAVE_GOOD_UTIME_H 1
3875fd0b74Schristos/* Whether fprintf must be declared even if <stdio.h> is included.  */
3975fd0b74Schristos#define NEED_DECLARATION_FPRINTF 1
4075fd0b74Schristos/* Do we need to use the b modifier when opening binary files?  */
4175fd0b74Schristos/* #undef USE_BINARY_FOPEN */
4275fd0b74Schristos/* Define if you have the utimes function.  */
4375fd0b74Schristos#define HAVE_UTIMES 1
4475fd0b74Schristos/* Define if you have the <fcntl.h> header file.  */
4575fd0b74Schristos#define HAVE_FCNTL_H 1
4675fd0b74Schristos/* Define if you have the <stdlib.h> header file.  */
4775fd0b74Schristos#define HAVE_STDLIB_H 1
4875fd0b74Schristos/* Define if you have the <string.h> header file.  */
4975fd0b74Schristos#define HAVE_STRING_H 1
5075fd0b74Schristos/* Define if you have the <strings.h> header file.  */
5175fd0b74Schristos#define HAVE_STRINGS_H 1
5275fd0b74Schristos/* Define if you have the <sys/file.h> header file.  */
5375fd0b74Schristos#define HAVE_SYS_FILE_H 1
5475fd0b74Schristos/* Define if you have the <unistd.h> header file.  */
5575fd0b74Schristos#define HAVE_UNISTD_H 1
5675fd0b74Schristos
5775fd0b74Schristos/* Alloca.  */
5875fd0b74Schristos#ifdef __DECC
5975fd0b74Schristos#include <builtins.h>
6075fd0b74Schristos#define C_alloca(x) __ALLOCA(x)
6175fd0b74Schristos#endif
6275fd0b74Schristos/* Name of package */
6375fd0b74Schristos#define PACKAGE "binutils"
6475fd0b74Schristos
6575fd0b74Schristos/* Define to the address where bug reports for this package should be sent. */
6675fd0b74Schristos#define PACKAGE_BUGREPORT ""
6775fd0b74Schristos
6875fd0b74Schristos/* Define to the full name of this package. */
6975fd0b74Schristos#define PACKAGE_NAME ""
7075fd0b74Schristos
7175fd0b74Schristos/* Define to the full name and version of this package. */
7275fd0b74Schristos#define PACKAGE_STRING ""
7375fd0b74Schristos
7475fd0b74Schristos/* Define to the one symbol short name of this package. */
7575fd0b74Schristos#define PACKAGE_TARNAME ""
7675fd0b74Schristos
7775fd0b74Schristos/* Define to the home page for this package. */
7875fd0b74Schristos#define PACKAGE_URL ""
7975fd0b74Schristos
8075fd0b74Schristos/* Define to the version of this package. */
8175fd0b74Schristos#define PACKAGE_VERSION ""
8275fd0b74Schristos$!
8375fd0b74Schristos$! Add TARGET.
8475fd0b74Schristos$!
8575fd0b74Schristos$ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
8675fd0b74Schristos$ if arch .eqs. "alpha" then target = "vms-alpha"
8775fd0b74Schristos$ if arch .eqs. "vax" then target = "vms-vax"
8875fd0b74Schristos$!
8975fd0b74Schristos$ open/append tfile config.h
9075fd0b74Schristos$ write tfile "#define TARGET """ + target + """"
9175fd0b74Schristos$ close tfile
9275fd0b74Schristos$ write sys$output "Created `config.h'"
9375fd0b74Schristos$!
9475fd0b74Schristos$ write sys$output "Generate binutils build.com"
9575fd0b74Schristos$!
9675fd0b74Schristos$ create build.com
9775fd0b74Schristos$DECK
9875fd0b74Schristos$ DEFS=""
9975fd0b74Schristos$ OPT="/noopt/debug"
10075fd0b74Schristos$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
10175fd0b74Schristos "/name=(as_is,shortened)" +-
10275fd0b74Schristos "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
10375fd0b74Schristos$ BFDLIB = ",[-.bfd]libbfd.olb/lib"
10475fd0b74Schristos$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
10575fd0b74Schristos$ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
10675fd0b74Schristos$ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
10775fd0b74Schristos$ BULIBS_FILES = ",bucomm,version,filemode"
10875fd0b74Schristos$ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
10975fd0b74Schristos   BULIBS_FILES + DEBUG_FILES
11075fd0b74Schristos$!
11175fd0b74Schristos$ write sys$output "CFLAGS=",CFLAGS
11275fd0b74Schristos$ if p1.nes."LINK"
11375fd0b74Schristos$ then
11475fd0b74Schristos$   NUM = 0
11575fd0b74Schristos$   LOOP:
11675fd0b74Schristos$     F = F$ELEMENT(NUM,",",ALL_FILES)
11775fd0b74Schristos$     IF F.EQS."," THEN GOTO END
11875fd0b74Schristos$     write sys$output "Compiling ", F, ".c"
11975fd0b74Schristos$     cc 'CFLAGS 'F.c
12075fd0b74Schristos$     NUM = NUM + 1
12175fd0b74Schristos$     GOTO LOOP
12275fd0b74Schristos$   END:
12375fd0b74Schristos$ endif
12475fd0b74Schristos$ purge
12575fd0b74Schristos$!
12675fd0b74Schristos$ write sys$output "Building nm.exe"
12775fd0b74Schristos$ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
12875fd0b74Schristos$ link/exe=nm 'NM_OBJS
12975fd0b74Schristos$!
13075fd0b74Schristos$ write sys$output "Building strings.exe"
13175fd0b74Schristos$ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
13275fd0b74Schristos$ link/exe=strings 'STRINGS_OBJS
13375fd0b74Schristos$!
13475fd0b74Schristos$ write sys$output "Building size.exe"
13575fd0b74Schristos$ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
13675fd0b74Schristos$ link/exe=size 'SIZE_OBJS
13775fd0b74Schristos$!
13875fd0b74Schristos$ write sys$output "Building addr2line.exe"
13975fd0b74Schristos$ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
14075fd0b74Schristos$ link/exe=addr2line 'ADDR2LINE_OBJS
14175fd0b74Schristos$!
14275fd0b74Schristos$ write sys$output "Building objdump.exe"
14375fd0b74Schristos$ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
14475fd0b74Schristos   BFDLIB + OPCODES + LIBIBERTY
14575fd0b74Schristos$ link/exe=objdump 'OBJDUMP_OBJS
14675fd0b74Schristos$EOD
147