X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=binutils%2Fconfigure.com;fp=binutils%2Fconfigure.com;h=f199163feda473518fee2ceb0f8df973103d1391;hp=99463d5ecdb31acd488520fe5ba0a306b546238e;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/binutils/configure.com b/binutils/configure.com index 99463d5..f199163 100644 --- a/binutils/configure.com +++ b/binutils/configure.com @@ -5,15 +5,14 @@ $! 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|") -$! +$ arch=F$GETSYI("ARCH_NAME") +$ arch=F$EDIT(arch,"LOWERCASE") +$ write sys$output "Configuring binutils for ''arch' target" $! $! Generate config.h $! -$ create []config.h -/* config.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ +$ create config.h +/* config.h. Generated automatically by configure.com */ /* Is the type time_t defined in ? */ #define HAVE_TIME_T_IN_TIME_H 1 /* Is the type time_t defined in ? */ @@ -22,12 +21,8 @@ $ create []config.h #define HAVE_GOOD_UTIME_H 1 /* Whether fprintf must be declared even if is included. */ #define NEED_DECLARATION_FPRINTF 1 -/* Whether sbrk must be declared even if is included. */ -#undef NEED_DECLARATION_SBRK /* Do we need to use the b modifier when opening binary files? */ /* #undef USE_BINARY_FOPEN */ -/* Define if you have the sbrk function. */ -/* #undef HAVE_SBRK 1 */ /* Define if you have the utimes function. */ #define HAVE_UTIMES 1 /* Define if you have the header file. */ @@ -42,35 +37,73 @@ $ create []config.h #define HAVE_SYS_FILE_H 1 /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 -$ write sys$output "Generated `config.h'" +/* Alloca. */ +#ifdef __DECC +#include +#define C_alloca(x) __ALLOCA(x) +#endif +$! +$! 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 + """" +$ close tfile +$ write sys$output "Created `config.h'" $! -$! Edit VERSION in makefile.vms-in +$ write sys$output "Generate binutils build.com" $! -$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input - - []makefile.vms-in /output=[]makefile.vms +$ create build.com $DECK -! -! Get VERSION from configure.in -! - mfile := CREATE_BUFFER("mfile", "CONFIGURE.IN"); - rang := CREATE_RANGE(BEGINNING_OF(mfile), END_OF(mfile)); - match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(binutils, ', 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); - POSITION(BEGINNING_OF(match_pos)); - ERASE(match_pos); - COPY_TEXT(vers); - WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); - QUIT -$ EOD -$ write sys$output "Created `makefile.vms'" +$ 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