From 65a06c77cbff9bc84b7be08103b1a483cda9d9d2 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Fri, 14 Mar 2003 17:57:15 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'V9_1_24mdk'. --- mdk-stage1/dietlibc/diet.c | 112 --------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 mdk-stage1/dietlibc/diet.c (limited to 'mdk-stage1/dietlibc/diet.c') diff --git a/mdk-stage1/dietlibc/diet.c b/mdk-stage1/dietlibc/diet.c deleted file mode 100644 index 1de6befc8..000000000 --- a/mdk-stage1/dietlibc/diet.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include - -/* goal: - * when invoked as - * "diet gcc -c t.c" - * exec - * "gcc -I/path/to/dietlibc/include -c t.c" - * - * when invoked as - * "diet sparc-linux-gcc -o t t.o" - * exec - * "sparc-linux-gcc -nostdlib -static -o t t.o /path/to/dietlibc/bin-sparc/start.o /path/to/dietlibc/bin-sparc/dietlibc.a" -*/ - -void error(const char *message) { - write(2,message,strlen(message)); - exit(1); -} - -int main(int argc,char *argv[]) { - int link=0; - int compile=0; - char diethome[]=DIETHOME; - char platform[1000]=DIETHOME "/bin-"; - char *nostdlib="-nostdlib"; - char *libgcc="-lgcc"; - char dashL[1000]="-L"; - int i; - - if (argc<2) { - error("usage: diet [gcc command line]\n" - "e.g. diet gcc -c t.c\n" - "or diet sparc-linux-gcc -o foo foo.c bar.o\n"); - } - { - char *tmp=strchr(argv[1],0)-2; - char *tmp2; - char *cc=argv[1]; - if (tmp90) error("platform name too long!\n"); - memmove(platform+len,argv[1],tmp2-cc); - platform[tmp2-cc+len]=0; -/* printf("found platform %s\n",platform); */ - } else { -#ifdef __sparc__ - strcat(platform,"sparc"); -#endif -#ifdef __ppc__ - strcat(platform,"ppc"); -#endif -#ifdef __i386__ - strcat(platform,"i386"); -#endif -#ifdef __alpha__ - strcat(platform,"alpha"); -#endif -#ifdef __arm__ - strcat(platform,"arm"); -#endif -#ifdef __mips__ - strcat(platform,"mips"); -#endif - } - strcat(dashL,platform); - if (!strcmp(tmp,"cc")) { - char **newargv; - char **dest; - char *a,*b,*c; -/* we need to add -I... if the command line contains -c, -S or -E */ - for (i=2; i