aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-05-25 13:11:33 +0000
committerTristan Gingold <gingold@adacore.com>2009-05-25 13:11:33 +0000
commitcb0e7c25ac0539aec449245cf8df16df7dfb0ea4 (patch)
tree50bcd1bf3b38190cb3f677f76519d34cfc8c1c49 /gas
parent84983b1a4e53a4a7c791f281fdd9b911a1309d2f (diff)
downloadgdb-cb0e7c25ac0539aec449245cf8df16df7dfb0ea4.zip
gdb-cb0e7c25ac0539aec449245cf8df16df7dfb0ea4.tar.gz
gdb-cb0e7c25ac0539aec449245cf8df16df7dfb0ea4.tar.bz2
2009-05-25 Tristan Gingold <gingold@adacore.com>
* makefile.vms: New file to compile gas on VMS. * configure.com: New file to do configuration on VMS with DCL.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/configure.com172
-rw-r--r--gas/makefile.vms58
3 files changed, 236 insertions, 0 deletions
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 <gingold@adacore.com>
+
+ * 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 <rdsandiford@googlemail.com>
* 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 <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 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;