summaryrefslogtreecommitdiff
path: root/bcc
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-03-24 21:25:23 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:29:54 +0200
commitdcc973ea3e31710429858c99d4f040334ac67c06 (patch)
tree8883b902eb18eba489957b7f03caa491fd7992a7 /bcc
parentfe22c37817ce338fbbc90b239320248c270957fa (diff)
downloaddev86-dcc973ea3e31710429858c99d4f040334ac67c06.tar.gz
Import Dev86-0.0.5.tar.gzv0.0.5
Diffstat (limited to 'bcc')
-rw-r--r--bcc/Makefile3
-rw-r--r--bcc/bcc.c21
2 files changed, 22 insertions, 2 deletions
diff --git a/bcc/Makefile b/bcc/Makefile
index eec2f83..9cc0f0a 100644
--- a/bcc/Makefile
+++ b/bcc/Makefile
@@ -9,7 +9,8 @@ include $(TOPDIR)/Make.defs
BCCDEFS=-DLOCALPREFIX="\"$(BCCHOME)\"" -DDEFARCH=0
else
CC=bcc
-LDFLAGS=-s
+CFLAGS=-Mf
+LDFLAGS=-s -M
endif
OBJS = bcc-cc1.o codefrag.o debug.o declare.o express.o exptree.o floatop.o \
diff --git a/bcc/bcc.c b/bcc/bcc.c
index 810cbcb..265553b 100644
--- a/bcc/bcc.c
+++ b/bcc/bcc.c
@@ -190,6 +190,7 @@ char **argv;
#ifdef BCC86
char *crt0;
#endif
+ char *libc = "-lc";
bool_T debug = FALSE;
bool_T echo = FALSE;
unsigned errcount = 0;
@@ -349,6 +350,24 @@ char **argv;
case 'L':
addarg(&ldargs, arg);
break;
+ case 'M':
+ switch(arg[2])
+ {
+ case 'd': /* DOS compile */
+#ifndef CCC
+ addarg(&ccargs, "-D__MSDOS__");
+#endif
+ addarg(&cppargs, "-D__MSDOS__");
+ addarg(&ldargs, "-d");
+ libc= "-ldos";
+ break;
+ case 'f': /* Caller saves+ax is first arg */
+ libc= "-lc_f";
+ addarg(&ccargs, "-f");
+ addarg(&ccargs, "-c");
+ break;
+ }
+ break;
case 'P':
addarg(&cppargs, arg + 2);
break;
@@ -642,7 +661,7 @@ char **argv;
else
#endif
{
- addarg(&ldargs, "-lc");
+ addarg(&ldargs, libc);
run((char *) NUL_PTR, f_out, &ldargs);
}
}