Commit eeeb91c5 by Klaus Kaempf Committed by Jeff Law

am-alpha.h: Don't include alloca for OPEN_VMS.

        * am-alpha.h: Don't include alloca for OPEN_VMS.
        * alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Define.
        * alpha/xm-vms.h (INCLUDE_DEFAULTS): Define.
        (GCC_INCLUDE_DIR): Define
        * make-cc.com, make-cccp.com, make-cc1.com: Removed.
        * makefile.vms: New file.
        * alpha/vms.h (CPP_PREDEFINES): Remove -Dalpha.
        * alpha.c (output_prolog): Output '.name' directive
        for minimal traceback information.
        * alpha.c (output_prolog): Don't prepend entry point symbols
        with '$' on OPEN_VMS.

From-SVN: r17546
parent abff8e06
Thu Jan 29 01:28:14 1998 Klaus Kaempf <kkaempf@progis.de>
* am-alpha.h: Don't include alloca for OPEN_VMS.
* alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Define.
* alpha/xm-vms.h (INCLUDE_DEFAULTS): Define.
(GCC_INCLUDE_DIR): Define
* make-cc.com, make-cccp.com, make-cc1.com: Removed.
* makefile.vms: New file.
* alpha/vms.h (CPP_PREDEFINES): Remove -Dalpha.
* alpha.c (output_prolog): Output '.name' directive
for minimal traceback information.
* alpha.c (output_prolog): Don't prepend entry point symbols
with '$' on OPEN_VMS.
Thu Jan 29 00:25:35 1998 David S. Miller <davem@tanya.rutgers.edu>
Jeffrey A Law (law@cygnus.com)
......
......@@ -2776,7 +2776,7 @@ output_prolog (file, size)
fprintf (file, "\t.ent ");
assemble_name (file, alpha_function_name);
fprintf (file, "\n");
sprintf (entry_label, "$%s..en", alpha_function_name);
sprintf (entry_label, "%s..en", alpha_function_name);
ASM_OUTPUT_LABEL (file, entry_label);
inside_function = TRUE;
......@@ -2910,10 +2910,20 @@ output_prolog (file, size)
fprintf (file, "\t.prologue\n");
readonly_section ();
fprintf (file, "\t.align 3\n");
assemble_name (file, alpha_function_name); fputs ("..na:\n", file);
fputs ("\t.ascii \"", file);
assemble_name (file, alpha_function_name);
fputs ("\\0\"\n", file);
link_section ();
fprintf (file, "\t.align 3\n");
fputs ("\t.name ", file);
assemble_name (file, alpha_function_name);
fputs ("..na\n", file);
ASM_OUTPUT_LABEL (file, alpha_function_name);
fprintf (file, "\t.pdesc $");
fprintf (file, "\t.pdesc ");
assemble_name (file, alpha_function_name);
fprintf (file, "..en,%s\n", is_stack_procedure ? "stack" : "reg");
alpha_need_linkage (alpha_function_name, 1);
......@@ -4015,7 +4025,7 @@ alpha_write_linkage (stream)
if (lptr->kind == KIND_LOCAL)
{
/* Local and used, build linkage pair. */
fprintf (stream, "\t.quad $%s..en\n", lptr->name);
fprintf (stream, "\t.quad %s..en\n", lptr->name);
fprintf (stream, "\t.quad %s\n", lptr->name);
}
else
......
......@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-Dalpha -D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
"-D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
-Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
#undef CPP_SPEC
......
......@@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */
#if defined(__GNUC__) && !defined(USE_C_ALLOCA)
#define alloca __builtin_alloca
#else
#if !defined(_WIN32) && !defined(USE_C_ALLOCA)
#if !defined(_WIN32) && !defined(USE_C_ALLOCA) && !defined(OPEN_VMS)
#include <alloca.h>
#else
extern void *alloca ();
......
/* Configuration for GNU C-compiler for openVMS/Alpha.
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Klaus Kaempf (kkaempf@progis.de).
This file is part of GNU CC.
......@@ -51,9 +51,23 @@ Boston, MA 02111-1307, USA. */
#define VMS
#endif
#define GCC_INCLUDE_DIR ""
/* Specify the list of include file directories. */
#define INCLUDE_DEFAULTS \
{ \
{ "GNU_GXX_INCLUDE:", "G++", 1, 1 }, \
{ "GNU_CC_INCLUDE:", "GCC", 0, 0 }, \
{ ".", 0, 0, 1 }, \
{ 0, 0, 0, 0 } \
}
/* Define a local equivalent (sort of) for unlink */
#define unlink remove
#define NEED_ATEXIT
#define HAVE_VPRINTF
#define HAVE_PUTENV
#define HAVE_STRERROR
#define NO_SYS_PARAMS_H /* Don't have <sys/params.h> */
#define NO_STAB_H /* Don't have <stab.h> */
......@@ -63,16 +77,11 @@ Boston, MA 02111-1307, USA. */
#define HAVE_STDLIB_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STRING_H 1
#define HAVE_LIMITS_H 1
#define HAVE_STDDEF_H 1
#define HAVE_TIME_H 1
#define STDC_HEADERS 1
/* Use ANSI/SYSV style byte manipulation routines instead of BSD ones. */
#define bcopy(s,d,n) memcpy((d),(s),(n))
#define bzero(d,n) memset((d),0,(n))
#define bcmp(l,r,n) memcmp((l),(r),(n))
#define index strchr
#define rindex strrchr
#define HAVE_CPP_STRINGIFY 1
#if __STDC__
extern void *alloca (size_t);
......@@ -82,5 +91,3 @@ extern char *alloca (unsigned int);
#define OBJECT_SUFFIX ".obj"
#define EXECUTABLE_SUFFIX ".exe"
#define DIR_SEPARATOR ']'
#define PATH_SEPARATOR ','
$v='f$verify(0) !make-cccp.com
$!
$! Build the GNU C preprocessor on VMS.
$!
$! Usage:
$! $ @make-cccp.com [compiler] [link-only]
$!
$! where [compiler] is one of "GNUC", "VAXC", "DECC";
$! default when none specified is "GNUC",
$! and where [link-only] is "LINK" or omitted.
$! If both options are specified, the compiler must come first.
$!
$ if f$type(gcc_debug).eqs."INTEGER" then if gcc_debug.and.1 then set verify
$
$ p1 = f$edit(p1,"UPCASE,TRIM")
$ if p1.eqs."" then p1 = "GNUC"
$!
$! Compiler-specific setup (assume GNU C, then override as necessary):
$!
$ CC = "gcc"
$ CFLAGS = "/Opt=2/Debug/noVerbos"
$ LIBS = "gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr"
$ if p1.nes."GNUC"
$ then
$ CC = "cc"
$ CFLAGS = "/noOpt" !disable optimizer when bootstrapping with native cc
$ if p1.eqs."VAXC"
$ then
$ if f$trnlnm("DECC$CC_DEFAULT").nes."" then CC = "cc/VAXC"
$ LIBS = "alloca.obj,sys$library:vaxcrtl.olb/Libr"
$ define/noLog SYS SYS$LIBRARY:
$ else
$ if p1.eqs."DECC"
$ then
$ if f$trnlnm("DECC$CC_DEFAULT").nes."" then CC = "cc/DECC"
$ CC = CC + "/Prefix=All"
$ LIBS = "alloca.obj" !DECC$SHR will be found implicitly by linker
$ define/noLog SYS DECC$LIBRARY_INCLUDE:
$ else
$ if p1.nes."LINK"
$ then
$ type sys$input: /Output=sys$error:
$DECK
[compiler] argument should be one of "GNUC", "VAXC", or "DECC".
Usage:
$ @make-cccp.com [compiler] [link-only]
$EOD
$ exit %x1000002C + 0*f$verify(v) !%SYSTEM-F-ABORT
$ endif !!LINK
$ endif !DECC
$ endif !VAXC
$ endif !!GNUC
$
$!
$! Other setup:
$!
$ LDFLAGS = "/noMap"
$ PARSER = "bison"
$ RENAME = "rename/New_Version"
$ LINK = "link"
$ echo = "write sys$output"
$
$!!!!!!!
$! Nothing beyond this point should need any local configuration changes.
$!!!!!!!
$
$! Set the default directory to the same place as this command procedure.
$ flnm = f$enviroment("PROCEDURE") !get current procedure name
$ set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
$
$ if p1.eqs."LINK" .or. p2.eqs."LINK" then goto Link
$ echo " Building the preprocessor."
$
$! Compile the simplest file first, to catch problem with compiler setup early.
$ set verify
$ 'CC''CFLAGS' version.c
$!'f$verify(0)
$
$ set verify
$ 'CC''CFLAGS' cccp.c
$!'f$verify(0)
$
$! Compile preprocessor's parser, possibly making it with yacc first.
$ if f$search("CEXP.C").nes."" then -
if f$cvtime(f$file_attributes("CEXP.C","RDT")).ges.-
f$cvtime(f$file_attributes("CEXP.Y","RDT")) then goto skip_yacc
$ set verify
$ 'PARSER' cexp.y
$ 'RENAME' cexp_tab.c cexp.c
$!'f$verify(0)
$skip_yacc:
$ echo " (Ignore any warning about not finding file ""bison.simple"".)"
$ set verify
$ 'CC''CFLAGS' cexp.c
$ 'CC''CFLAGS'/Define="PREFIX=""_dummy_""" prefix.c
$!'f$verify(0)
$
$! In case there's no builtin alloca support, use the C simulation.
$ if f$locate("alloca.obj",f$edit(LIBS,"lowercase")).lt.f$length(LIBS)
$ then
$ set verify
$ 'CC''CFLAGS'/Incl=[]/Defi=("HAVE_CONFIG_H","STACK_DIRECTION=(-1)") alloca.c
$!'f$verify(0)
$ endif
$!
$
$Link:
$ echo " Linking the preprocessor."
$ set verify
$ 'LINK''LDFLAGS'/Exe=gcc-cpp.exe -
cccp.obj,cexp.obj,prefix.obj,version.obj,version.opt/Opt,-
'LIBS'
$!'f$verify(0)
$!
$! Done
$!
$ exit 1+0*f$verify(v)
$! make-gcc.com -- VMS build procedure for GNU CC.
$!
$! Usage:
$! $ @make-gcc.com [host-compiler] [component list]
$!
$! where [host-compiler] is one of "GNUC", "VAXC", "DECC";
$! default when none specified is "GNUC",
$! and where [component list] is space separated list beginning
$! with "CC1" and optionally followed by "CC1PLUS"; default if
$! nothing is specified is "CC1" (the C compiler); choosing
$! "CC1PLUS" (the C++ compiler) without also specifying "CC1"
$! will not work. (See make-cc1.com for other potential component
$! values; but unless you're developing or debugging the compiler
$! suite itself, the two above are the only ones of interest.)
$!
$! For a "stage 2" or subsequent build, always specify GNUC as
$! the host compiler.
$!
$! Note:
$! Even though it is possible to build with VAX C or DEC C,
$! a prior version of the gcc-vms binary distribution is still
$! required to be able to use the newly built GNU CC compiler(s),
$! because the gcc source distribution does not supply the driver
$! program which the DCL command "GCC" implements or the C header
$! files and gcclib support library.
$!
$
$!
$! Change working directory to the location of this procedure.
$!
$ flnm = f$enviroment("PROCEDURE") !get current procedure name
$ set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
$
$!
$! First, we build the preprocessor.
$!
$ @make-cccp.com 'p1' 'p2'
$!
$! To install it, copy the resulting GCC-CPP.EXE to the GNU_CC:[000000]
$! directory.
$!
$
$!
$! Now we build the C compiler. To build the C++ compiler too, use
$! $ @make-gcc GNUC cc1 cc1plus
$! when invoking this command procedure. Note that you should not
$! do this for a "stage 1" build.
$!
$ @make-cc1.com 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'
$!
$! To install it (them), copy the resulting GCC-CC1.EXE (and GCC-CC1PLUS.EXE)
$! to the GNU_CC:[000000] directory.
$!
$
$!
$! Now we build the `libgcc2' support library. It will need to be merged
$! with the existing gcclib.olb library.
$!
$ @make-l2.com 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'
$!
$! To install, save a backup copy of GNU_CC:[000000]GCCLIB.OLB somewhere,
$! then update the original using the newly created LIBGCC2.OLB via
$! $ library/Obj libgcc2.olb /Extract=*/Output=libgcc2.obj
$! $ library/Obj gnu_cc:[000000]gcclib.olb libgcc2.obj /Replace
$!
$! Depending upon how old your present gcclib library is, you might have
$! to delete some modules, such as `eprintf' and `new', to avoid conflicting
$! symbols from obsolete routines. After deleting any such modules, just
$! repeat the `library/replace' step.
$!
$ exit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment