diff --git a/binutils/.Sanitize b/binutils/.Sanitize index 2ff4c5388c6..a9e0beb33e2 100644 --- a/binutils/.Sanitize +++ b/binutils/.Sanitize @@ -45,10 +45,10 @@ budbg.h coffdump.c coffgrok.c coffgrok.h -config.h-vms config.in configure configure.bat +configure.com configure.in cxxfilt.man dlltool.c diff --git a/binutils/config.h-vms b/binutils/config.h-vms deleted file mode 100644 index bfe56d8bef1..00000000000 --- a/binutils/config.h-vms +++ /dev/null @@ -1,49 +0,0 @@ -/* config.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ - -/* Is the type time_t defined in ? */ -#define HAVE_TIME_T_IN_TIME_H 1 - -/* Is the type time_t defined in ? */ -#define HAVE_TIME_T_IN_TYPES_H 1 - -/* Does define struct utimbuf? */ -#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. */ -#define HAVE_SBRK 1 - -/* Define if you have the utimes function. */ -#define HAVE_UTIMES 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -#if __GNUC__ -#define _bfd_generic_get_section_contents_in_window _bfd_generic_get_win_section_cont -#define _elf_section_from_bfd_section _bfd_elf_sec_from_bfd_sec -#endif diff --git a/binutils/configure.com b/binutils/configure.com new file mode 100644 index 00000000000..9e35c766297 --- /dev/null +++ b/binutils/configure.com @@ -0,0 +1,78 @@ +$! +$! This file configures binutils for use with openVMS/Alpha +$! We do not use the configure script, since we do not have /bin/sh +$! to execute it. +$! +$! Written by Klaus K"ampf (kkaempf@progis.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. "VAX" +$then +$ write sys$output "Target VAX not supported." +$ exit 2 +$endif +$! +$! +$! Generate config.h +$! +$ create []config.h +/* config.h. Generated automatically by configure. */ +/* config.in. Generated automatically from configure.in by autoheader. */ +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TIME_H 1 +/* Is the type time_t defined in ? */ +#define HAVE_TIME_T_IN_TYPES_H 1 +/* Does define struct utimbuf? */ +#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. */ +#define HAVE_SBRK 1 +/* Define if you have the utimes function. */ +#define HAVE_UTIMES 1 +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 +/* Define if you have the header file. */ +#define HAVE_SYS_FILE_H 1 +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 +$ write sys$output "Generated `config.h'" +$! +$! +$! Edit VERSION in makefile.vms +$! +$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input - + []makefile.vms /output=[]makefile.vms +$DECK +! +! Get VERSION from Makefile.in +! + mfile := CREATE_BUFFER("mfile", "Makefile.in"); + rang := CREATE_RANGE(BEGINNING_OF(mfile), END_OF(mfile)); + v_pos := SEARCH_QUIETLY('VERSION=', FORWARD, EXACT, rang); + POSITION(BEGINNING_OF(v_pos)); + vers := CURRENT_LINE; + IF match_pos <> 0 THEN; + 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_LINE; + COPY_TEXT(vers); + SPLIT_LINE; + ENDIF; + WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); + QUIT +$ EOD +$ write sys$output "Patched `makefile.vms'" diff --git a/binutils/makefile.vms b/binutils/makefile.vms index cf869a68bb8..5e9b2df7629 100644 --- a/binutils/makefile.vms +++ b/binutils/makefile.vms @@ -7,13 +7,19 @@ # # +# Distribution version, filled in by configure.com +VERSION= + +TARGET=""evax-alpha"" + ifeq ($(CC),gcc) -CFLAGS=/cc1="-fno-exceptions -g0"/include=([],[-.include],[-.bfd])$(DEFS) -DEFS= -LIBS=,GNU:[000000]LIBGCC2/lib,GNU:[000000]LIBGCCLIB/lib,sys$$library:vaxcrtl.olb/lib,GNU:[000000]crt0.obj +CFLAGS=/include=([],[-.include],[-.bfd])$(DEFS) +DEFS=/define=("TARGET=$(TARGET)") +LIBS=,GNU:[000000]libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU:[000000]crt0.obj else CFLAGS=/noopt/debug/include=([],[-.include],[-.bfd])$(DEFS)/warnings=disable=(missingreturn,implicitfunc) -DEFS=/define=("const=","unlink=remove",\ +DEFS=/define=("TARGET=$(TARGET)",\ +"const=","unlink=remove",\ "_bfd_generic_get_section_contents_in_window"="_bfd_generic_get_win_section_cont",\ "_bfd_elf_section_from_bfd_section"="_bfd_elf_sec_from_bfd_sec") LIBS=,sys$$library:vaxcrtl.olb/lib @@ -59,7 +65,29 @@ objdump.exe: $(OBJDUMPOBJS) version.obj: version.c - $(CC) $(CFLAGS)/define=(VERSION="""970202""") $< + $(CC) $(CFLAGS)/define=(VERSION="""$(VERSION)""") $< -config.h: config.h-vms - $(CP) $< $@ +config.h: + $$ @configure + $(MAKE) -f makefile.vms + +[-.bfd]libbfd.olb: + $(CD) [-.bfd] + $(MAKE) -f makefile.vms + $(CD) [-.binutils] + +[-.libiberty]libiberty.olb: + $(CD) [-.libiberty] + $(MAKE) -f makefile.vms + $(CD) [-.binutils] + +[-.opcodes]libopcodes.olb: + $(CD) [-.opcodes] + $(MAKE) -f makefile.vms + $(CD) [-.binutils] + +clean: + $$ purge + $(RM) *.obj; + $(RM) *.exe; + $(RM) config.h;