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

Subversion Repositories diogenes

[/] [diogenes/] [trunk/] [compiler/] [lcc-4.2/] [etc/] [solaris.c] - Blame information for rev 236

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 fellnhofer
/* SPARCs running Solaris 2.5.1 at CS Dept., Princeton University */
2
 
3
#include <string.h>
4
 
5
static char rcsid[] = "$Id: solaris.c,v 1.1.1.1 1998-09-14 20:36:32 fellnhofer Exp $";
6
 
7
#ifndef LCCDIR
8
#define LCCDIR "/usr/local/lib/lcc/"
9
#endif
10
#ifndef SUNDIR
11
#define SUNDIR "/opt/SUNWspro/SC4.2/lib/"
12
#endif
13
 
14
char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
15
char inputs[256] = "";
16
char *cpp[] = { LCCDIR "cpp",
17
        "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix",
18
        "$1", "$2", "$3", 0 };
19
char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
20
        "-I/usr/include", 0 };
21
char *com[] = { LCCDIR "rcc", "-target=sparc/solaris",
22
        "$1", "$2", "$3", 0 };
23
char *as[] = { "/usr/ccs/bin/as", "-Qy", "-s", "-o", "$3", "$1", "$2", 0 };
24
char *ld[] = { "/usr/ccs/bin/ld", "-o", "$3", "$1",
25
        SUNDIR "crti.o", SUNDIR "crt1.o",
26
        SUNDIR "values-xa.o", "$2", "",
27
        "-Y", "P," SUNDIR ":/usr/ccs/lib:/usr/lib", "-Qy",
28
        "-L" LCCDIR, "-llcc", "-lm", "-lc", SUNDIR "crtn.o", 0 };
29
 
30
extern char *concat(char *, char *);
31
 
32
int option(char *arg) {
33
        if (strncmp(arg, "-lccdir=", 8) == 0) {
34
                cpp[0] = concat(&arg[8], "/cpp");
35
                include[0] = concat("-I", concat(&arg[8], "/include"));
36
                ld[12] = concat("-L", &arg[8]);
37
                com[0] = concat(&arg[8], "/rcc");
38
        } else if (strcmp(arg, "-g") == 0)
39
                ;
40
        else if (strcmp(arg, "-p") == 0) {
41
                ld[5] = SUNDIR "mcrt1.o";
42
                ld[10] = "P," SUNDIR "libp:/usr/ccs/lib/libp:/usr/lib/libp:"
43
                         SUNDIR ":/usr/ccs/lib:/usr/lib";
44
        } else if (strcmp(arg, "-b") == 0)
45
                ;
46
        else if (strncmp(arg, "-ld=", 4) == 0)
47
                ld[0] = &arg[4];
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.