OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [tags/] [eco32-0.26/] [lcc/] [etc/] [irix.c] - Diff between revs 4 and 270

Only display areas with differences | Details | Blame | View Log

Rev 4 Rev 270
/* SGI big endian MIPSes running IRIX 6.2 at CS Dept., Princeton University */
/* SGI big endian MIPSes running IRIX 6.2 at CS Dept., Princeton University */
 
 
#include <string.h>
#include <string.h>
 
 
static char rcsid[] = "$Id: irix.c,v 1.11 2000/01/06 22:25:58 drh Exp $";
static char rcsid[] = "$Id: irix.c,v 1.11 2000/01/06 22:25:58 drh Exp $";
 
 
#ifndef LCCDIR
#ifndef LCCDIR
#define LCCDIR "/usr/local/lib/lcc/"
#define LCCDIR "/usr/local/lib/lcc/"
#endif
#endif
#ifndef LIBDIR
#ifndef LIBDIR
#define LIBDIR "/usr/lib/"
#define LIBDIR "/usr/lib/"
#endif
#endif
 
 
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
char inputs[256] = "";
char inputs[256] = "";
char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1",
char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1",
        "-DLANGUAGE_C",
        "-DLANGUAGE_C",
        "-DMIPSEB",
        "-DMIPSEB",
        "-DSYSTYPE_SVR4",
        "-DSYSTYPE_SVR4",
        "-D_LONGLONG",          /* some SGI header files assume this */
        "-D_LONGLONG",          /* some SGI header files assume this */
        "-D_CFE",
        "-D_CFE",
        "-D_LANGUAGE_C",
        "-D_LANGUAGE_C",
        "-D_MIPSEB",
        "-D_MIPSEB",
        "-D_MIPS_FPSET=16",
        "-D_MIPS_FPSET=16",
        "-D_MIPS_ISA=_MIPS_ISA_MIPS1",
        "-D_MIPS_ISA=_MIPS_ISA_MIPS1",
        "-D_MIPS_SIM=_MIPS_SIM_ABI32",
        "-D_MIPS_SIM=_MIPS_SIM_ABI32",
        "-D_MIPS_SZINT=32",
        "-D_MIPS_SZINT=32",
        "-D_MIPS_SZLONG=32",
        "-D_MIPS_SZLONG=32",
        "-D_MIPS_SZPTR=32",
        "-D_MIPS_SZPTR=32",
        "-D_SGI_SOURCE",
        "-D_SGI_SOURCE",
        "-D_SVR4_SOURCE",
        "-D_SVR4_SOURCE",
        "-D_SYSTYPE_SVR4",
        "-D_SYSTYPE_SVR4",
        "-D__host_mips",
        "-D__host_mips",
        "-D__mips=1",
        "-D__mips=1",
        "-D__sgi",
        "-D__sgi",
        "-D__unix",
        "-D__unix",
        "-Dhost_mips",
        "-Dhost_mips",
        "-Dmips",
        "-Dmips",
        "-Dsgi",
        "-Dsgi",
        "-Dunix",
        "-Dunix",
        "$1", "$2", "$3", 0 };
        "$1", "$2", "$3", 0 };
char *com[] =  { LCCDIR "rcc", "-target=mips/irix", "$1", "$2", "$3", "", 0 };
char *com[] =  { LCCDIR "rcc", "-target=mips/irix", "$1", "$2", "$3", "", 0 };
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
        "-I/usr/include", 0 };
        "-I/usr/include", 0 };
char *as[] = { "/usr/bin/as", "-32", "-o", "$3", "$1", "-nocpp", "-KPIC", "$2", 0 };
char *as[] = { "/usr/bin/as", "-32", "-o", "$3", "$1", "-nocpp", "-KPIC", "$2", 0 };
char *ld[] = { "/usr/bin/ld", "-require_dynamic_link", "_rld_new_interface", "-32",
char *ld[] = { "/usr/bin/ld", "-require_dynamic_link", "_rld_new_interface", "-32",
        "-elf", "-_SYSTYPE_SVR4", "-Wx,-G", "0", "-g0", "-KPIC", "-dont_warn_unused",
        "-elf", "-_SYSTYPE_SVR4", "-Wx,-G", "0", "-g0", "-KPIC", "-dont_warn_unused",
        "-o", "$3", LIBDIR "crt1.o", "-L/usr/local/lib",
        "-o", "$3", LIBDIR "crt1.o", "-L/usr/local/lib",
        "$1", "$2", "", "-L" LCCDIR, "-llcc", "-lc", "-lm", LIBDIR "crtn.o", 0
        "$1", "$2", "", "-L" LCCDIR, "-llcc", "-lc", "-lm", LIBDIR "crtn.o", 0
};
};
 
 
extern char *concat(char *, char *);
extern char *concat(char *, char *);
 
 
int option(char *arg) {
int option(char *arg) {
        if (strncmp(arg, "-lccdir=", 8) == 0) {
        if (strncmp(arg, "-lccdir=", 8) == 0) {
                cpp[0] = concat(&arg[8], "/cpp");
                cpp[0] = concat(&arg[8], "/cpp");
                include[0] = concat("-I", concat(&arg[8], "/include"));
                include[0] = concat("-I", concat(&arg[8], "/include"));
                com[0] = concat(&arg[8], "/rcc");
                com[0] = concat(&arg[8], "/rcc");
                ld[18] = concat("-L", &arg[8]);
                ld[18] = concat("-L", &arg[8]);
        } else if (strcmp(arg, "-g") == 0)
        } else if (strcmp(arg, "-g") == 0)
                ;
                ;
        else if (strcmp(arg, "-p") == 0)
        else if (strcmp(arg, "-p") == 0)
                ld[13] = LIBDIR "mcrt1.o";
                ld[13] = LIBDIR "mcrt1.o";
        else if (strcmp(arg, "-b") == 0)
        else if (strcmp(arg, "-b") == 0)
                ;
                ;
        else
        else
                return 0;
                return 0;
        return 1;
        return 1;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.