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