diff options
-rw-r--r-- | gas/configure.com | 172 | ||||
-rw-r--r-- | gas/makefile.vms | 58 | ||||
-rw-r--r-- | libiberty/ChangeLog | 10 | ||||
-rw-r--r-- | libiberty/config.h-vms | 22 | ||||
-rw-r--r-- | libiberty/makefile.vms | 18 |
5 files changed, 262 insertions, 18 deletions
diff --git a/gas/configure.com b/gas/configure.com new file mode 100644 index 0000000000..7d02cf38b7 --- /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 <builtins.h> +#define C_alloca(x) __ALLOCA(x) + +/* Is the prototype for getopt in <unistd.h> 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 <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the <limits.h> 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 <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> 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 0000000000..b645b59b41 --- /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; diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 5b36aa2489..850979abb9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,13 @@ +2009-05-25 Tristan Gingold <gingold@adacore.com> + + * config.h-vms: Rewritten. Define configure macros. + Use DEC-C builtin alloca. + + * makefile.vms (OBJS): Update list. + (OPT): New variable. + (CFLAGS): Update compilation flags. + (libiberty.olb): Do not depend on alloca-conf.h anymore. + 2009-05-19 Ian Lance Taylor <iant@google.com> Ben Elliston <bje@au.ibm.com> diff --git a/libiberty/config.h-vms b/libiberty/config.h-vms index ccac6a2bcc..d84453101e 100644 --- a/libiberty/config.h-vms +++ b/libiberty/config.h-vms @@ -1,13 +1,11 @@ -#ifndef NEED_strerror -#define NEED_strerror -#endif -#ifndef NEED_basename -#define NEED_basename -#endif -#ifndef NEED_psignal -#define NEED_psignal -#endif -#ifndef NEED_on_exit -#define NEED_on_exit -#endif +/* This is -*- C -*- */ +#define HAVE_STDLIB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +/* Cheat: use vms builtin alloca. */ +#ifdef __DECC +#define C_alloca(x) __ALLOCA(x) +#endif diff --git a/libiberty/makefile.vms b/libiberty/makefile.vms index 6a7dd45718..2f45f69a2a 100644 --- a/libiberty/makefile.vms +++ b/libiberty/makefile.vms @@ -7,19 +7,25 @@ # # -OBJS=bcopy.obj,bcmp.obj,getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\ - getopt1.obj,cplus-dem.obj,strncasecmp.obj,strcasecmp.obj,strdup.obj,\ - concat.obj,getruntime.obj,getpagesize.obj,alloca.obj,xstrerror.obj,\ - xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,objalloc.obj +OBJS=getopt.obj,obstack.obj,xexit.obj,xmalloc.obj,hex.obj,\ + getopt1.obj,cplus-dem.obj,cp-demangle.obj,cp-demint.obj,\ + asprintf.obj vasprintf.obj,mkstemps.obj,\ + concat.obj,getruntime.obj,getpagesize.obj,getpwd.obj,xstrerror.obj,\ + xmemdup.obj,xstrdup.obj,xatexit.obj,choose-temp.obj,fnmatch.obj,\ + objalloc.obj,safe-ctype.obj,hashtab.obj,lbasename.obj,argv.obj,\ + lrealpath.obj,make-temp-file.obj,unlink-if-ordinary.obj ifeq ($(CC),gcc) CFLAGS=/include=([],[-.include]) else # assume dec c -CFLAGS=/noopt/debug/include=([],[-.include])/define=("const=")/warnings=disable=(missingreturn,implicitfunc) +OPT=/noopt/debug/warnings=disable=(missingreturn) +CFLAGS=$(OPT)/include=([],[-.include])/name=(as_is,shortened)\ + /define=(HAVE_CONFIG_H=1)\ + /prefix=(all,except=("getopt","optarg","optopt","optind","opterr")) endif -libiberty.olb: config.h alloca-conf.h $(OBJS) +libiberty.olb: config.h $(OBJS) purge lib/create libiberty *.obj |