From cb0e7c25ac0539aec449245cf8df16df7dfb0ea4 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 25 May 2009 13:11:33 +0000 Subject: [PATCH] 2009-05-25 Tristan Gingold * makefile.vms: New file to compile gas on VMS. * configure.com: New file to do configuration on VMS with DCL. --- gas/ChangeLog | 6 ++ gas/configure.com | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ gas/makefile.vms | 58 ++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 gas/configure.com create mode 100644 gas/makefile.vms diff --git a/gas/ChangeLog b/gas/ChangeLog index dd07399..e3d6b2b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2009-05-05 Tristan Gingold + + * makefile.vms: New file to compile gas on VMS. + + * configure.com: New file to do configuration on VMS with DCL. + 2009-05-23 Richard Sandiford * config/tc-mips.c (nops_for_vr4130): Don't check noreorder_p. diff --git a/gas/configure.com b/gas/configure.com new file mode 100644 index 0000000..7d02cf3 --- /dev/null +++ b/gas/configure.com @@ -0,0 +1,172 @@ +$! configure.com +$! This file sets things up to build gas on a VMS system to generate object +$! files for a VMS system. We do not use the configure script, since we +$! do not have /bin/sh to execute it. +$! +$! +$ 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 +$! Target specific information +$ create targ-cpu.h +#include "tc-alpha.h" +$ create targ-cpu.c +#include "tc-alpha.c" +$ create targ-env.h +#define TE_VMS +#include "obj-format.h" +$ +$! Code to handle the object file format. +$ create obj-format.h +#include "obj-evax.h" +$ create obj-format.c +#include "obj-evax.c" +$ create atof-targ.c +#include "atof-ieee.c" +$ create config-vms.in +/* config.h. Generated by configure.com. */ +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Default architecture. */ +#undef DEFAULT_ARCH + +/* Default emulation. */ +#define DEFAULT_EMULATION "" + +/* Supported emulations. */ +#define EMULATIONS + +/* Define if you want run-time sanity checks. */ +#undef ENABLE_CHECKING + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 +#include +#define C_alloca(x) __ALLOCA(x) + +/* Is the prototype for getopt in in the expected format? */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#undef HAVE_DECL_VSNPRINTF + +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `remove' function. */ +#define HAVE_REMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `unlink' function. */ +#undef HAVE_UNLINK + +/* Name of package */ +#define PACKAGE "gas" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Target alias. */ +#define TARGET_ALIAS "alpha-dec-openvms" + +/* Canonical target. */ +#define TARGET_CANONICAL "alpha-dec-openvms" + +/* Target CPU. */ +#define TARGET_CPU "alpha" + +/* Target OS. */ +#define TARGET_OS "openvms" + +/* Target vendor. */ +#define TARGET_VENDOR "dec" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#define WORDS_BIGENDIAN 1 + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Version number of package */ +$ +$ endif +$! +$! Get VERSION from ../bfd/configure.in +$! +$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input +$DECK + mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in"); + match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile); + IF match_pos <> 0 THEN; + POSITION(BEGINNING_OF(match_pos)); + ERASE(match_pos); + vers := CURRENT_LINE-")"; + ELSE; + vers := "unknown"; + ENDIF; + + file := CREATE_BUFFER("file", "config-vms.in"); + POSITION(END_OF(file)); + COPY_TEXT("#define VERSION """); + COPY_TEXT(vers); + COPY_TEXT(""""); + WRITE_FILE(file, "config.h"); + QUIT +$ EOD +$del/nolog config-vms.in; +$exit diff --git a/gas/makefile.vms b/gas/makefile.vms new file mode 100644 index 0000000..b645b59 --- /dev/null +++ b/gas/makefile.vms @@ -0,0 +1,58 @@ +# +# makefile for gas +# +# Created by Klaus Kaempf, kkaempf@progis.de +# +#CC=gcc +CC=cc +ARCH=ALPHA + +ifeq ($(CC),gcc) +DEFS= +CFLAGS=/include=([],[-.bfd],[.config],[-.include],[-])$(DEFS) +LFLAGS= +LIBS=,GNU_CC_LIBRARY:libgcc/lib,sys$$library:vaxcrtl.olb/lib,GNU_CC_LIBRARY:crt0.obj +else +#DEFS=/define=("VMS_DEBUG","DEBUG2","DEBUG3","DEBUG5","DEBUG_SYMS","DEBUG_ALPHA") +OPT=/noopt/debug +CFLAGS=/names=(as_is,shortened)\ + /include=([],[-.bfd],[.config],[-.include],[-])$(DEFS)$(OPT)\ + /prefix=(all,except=("getopt","optarg","optopt","optind","opterr")) +#LFLAGS=/debug/map=as.map +LIBS=,sys$$library:vaxcrtl.olb/lib +endif + +OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\ + cond.obj,depend.obj,expr.obj,flonum-konst.obj,\ + flonum-copy.obj,flonum-mult.obj,frags.obj,hash.obj,input-file.obj,\ + input-scrub.obj,literal.obj,messages.obj,output-file.obj,read.obj,\ + subsegs.obj,symbols.obj,write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,\ + macro.obj,ehopt.obj,dw2gencfi.obj,dwarf2dbg.obj,remap.obj + +LIBIBERTY = [-.libiberty]libiberty.olb + +LIBBFD = [-.bfd]libbfd.olb +LIBOPCODES = [-.opcodes]libopcodes.olb +BFDDEP = [-.bfd]bfd.h + +all: as.exe + +as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY) + link$(LFLAGS)/exe=$@ $(OBJS),$(LIBOPCODES)/lib,$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS) + +ifneq ($(CC),gcc) +# Work-around a DEC-C bug. +targ-cpu.obj: targ-cpu.c targ-cpu.h + $(COMPILE.c) /noopt/obj=$@ $< +endif + +clean: + $$ purge + $(RM) *.obj; + $(RM) *.exe; + $(RM) atof-targ.c; + $(RM) obj-format.c; + $(RM) obj-format.h; + $(RM) targ-env.h; + $(RM) targ-cpu.h; + $(RM) targ-cpu.c; -- 2.7.4