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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [etc/] [irix.c] - Blame information for rev 124

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
/* SGI big endian MIPSes running IRIX 6.2 at CS Dept., Princeton University */
2
 
3
#include <string.h>
4
 
5
static char rcsid[] = "$Id: irix.c,v 1.11 2000/01/06 22:25:58 drh Exp $";
6
 
7
#ifndef LCCDIR
8
#define LCCDIR "/usr/local/lib/lcc/"
9
#endif
10
#ifndef LIBDIR
11
#define LIBDIR "/usr/lib/"
12
#endif
13
 
14
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
15
char inputs[256] = "";
16
char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1",
17
        "-DLANGUAGE_C",
18
        "-DMIPSEB",
19
        "-DSYSTYPE_SVR4",
20
        "-D_LONGLONG",          /* some SGI header files assume this */
21
        "-D_CFE",
22
        "-D_LANGUAGE_C",
23
        "-D_MIPSEB",
24
        "-D_MIPS_FPSET=16",
25
        "-D_MIPS_ISA=_MIPS_ISA_MIPS1",
26
        "-D_MIPS_SIM=_MIPS_SIM_ABI32",
27
        "-D_MIPS_SZINT=32",
28
        "-D_MIPS_SZLONG=32",
29
        "-D_MIPS_SZPTR=32",
30
        "-D_SGI_SOURCE",
31
        "-D_SVR4_SOURCE",
32
        "-D_SYSTYPE_SVR4",
33
        "-D__host_mips",
34
        "-D__mips=1",
35
        "-D__sgi",
36
        "-D__unix",
37
        "-Dhost_mips",
38
        "-Dmips",
39
        "-Dsgi",
40
        "-Dunix",
41
        "$1", "$2", "$3", 0 };
42
char *com[] =  { LCCDIR "rcc", "-target=mips/irix", "$1", "$2", "$3", "", 0 };
43
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
44
        "-I/usr/include", 0 };
45
char *as[] = { "/usr/bin/as", "-32", "-o", "$3", "$1", "-nocpp", "-KPIC", "$2", 0 };
46
char *ld[] = { "/usr/bin/ld", "-require_dynamic_link", "_rld_new_interface", "-32",
47
        "-elf", "-_SYSTYPE_SVR4", "-Wx,-G", "0", "-g0", "-KPIC", "-dont_warn_unused",
48
        "-o", "$3", LIBDIR "crt1.o", "-L/usr/local/lib",
49
        "$1", "$2", "", "-L" LCCDIR, "-llcc", "-lc", "-lm", LIBDIR "crtn.o", 0
50
};
51
 
52
extern char *concat(char *, char *);
53
 
54
int option(char *arg) {
55
        if (strncmp(arg, "-lccdir=", 8) == 0) {
56
                cpp[0] = concat(&arg[8], "/cpp");
57
                include[0] = concat("-I", concat(&arg[8], "/include"));
58
                com[0] = concat(&arg[8], "/rcc");
59
                ld[18] = concat("-L", &arg[8]);
60
        } else if (strcmp(arg, "-g") == 0)
61
                ;
62
        else if (strcmp(arg, "-p") == 0)
63
                ld[13] = LIBDIR "mcrt1.o";
64
        else if (strcmp(arg, "-b") == 0)
65
                ;
66
        else
67
                return 0;
68
        return 1;
69
}

powered by: WebSVN 2.1.0

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