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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [etc/] [gcc-solaris.c] - Blame information for rev 89

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

Line No. Rev Author Line
1 4 hellwig
/* SPARCs running Solaris 2.5.1 w/GCC tools
2
   at CS Dept., Princeton University */
3
 
4
#include <string.h>
5
 
6
static char rcsid[] = "$Id: gcc-solaris.c,v 1.9 1997/05/27 23:03:40 drh Exp $";
7
 
8
#ifndef LCCDIR
9
#define LCCDIR "/usr/local/lib/lcc/"
10
#endif
11
#ifndef GCCDIR
12
#define GCCDIR "/usr/local/gnu/bin/"
13
#endif
14
#ifndef GCCLIB
15
#define GCCLIB "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/"
16
#endif
17
 
18
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
19
char inputs[256] = "";
20
char *cpp[] = { LCCDIR "cpp",
21
        "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix",
22
        "$1", "$2", "$3", 0 };
23
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
24
        "-I" GCCLIB "include", "-I/usr/include", 0 };
25
char *com[] = { LCCDIR "rcc", "-target=sparc/solaris",
26
        "$1", "$2", "$3", 0 };
27
char *as[] = { GCCDIR "as", "-f", "-o", "$3", "$1", "$2", 0 };
28
char *ld[] = { GCCDIR "ld", "-o", "$3", "$1",
29
        GCCLIB "crti.o", GCCLIB "crt1.o",
30
        GCCLIB "crtbegin.o", "$2", "", "", "-L" LCCDIR, "-llcc",
31
        "-L" GCCLIB, "-lgcc", "-lm", "-lc", "",
32
        GCCLIB "crtend.o", GCCLIB "crtn.o", 0 };
33
 
34
extern char *concat(char *, char *);
35
 
36
int option(char *arg) {
37
        if (strncmp(arg, "-lccdir=", 8) == 0) {
38
                cpp[0] = concat(&arg[8], "/cpp");
39
                include[0] = concat("-I", concat(&arg[8], "/include"));
40
                ld[10] = concat("-L", &arg[8]);
41
                com[0] = concat(&arg[8], "/rcc");
42
        } else if (strcmp(arg, "-g") == 0)
43
                ;
44
        else if (strcmp(arg, "-pg") == 0) {
45
                ld[8] = GCCLIB "gmon.o";
46
        } else if (strcmp(arg, "-b") == 0)
47
                ;
48
        else
49
                return 0;
50
        return 1;
51
}

powered by: WebSVN 2.1.0

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