aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgrischka <grischka>2013-02-14 17:43:24 +0100
committergrischka <grischka>2013-02-14 17:43:24 +0100
commit762a43877b6edc4a586b2b41f7474eee0adcdcec (patch)
treea2c139bc1a70b2e8f2505b6c945dfbe89c21c9ef /lib
parent99b801dafc664f80910f1c4d5f492170b01c2c3c (diff)
downloadtinycc-762a43877b6edc4a586b2b41f7474eee0adcdcec.tar.gz
tinycc-762a43877b6edc4a586b2b41f7474eee0adcdcec.tar.bz2
configure: pass CONFIG_xxxDIR/PATH options via commandline
- except for CONFIG_SYSROOT and CONFIG_TCCDIR Strictly neccessary it is only for CONFIG_MULTIARCHDIR because otherwise if it's in config.h it is impossible to leave it undefined. But it is also nicer not to use these definitions for cross-compilers. - Also: lib/Makefile : include ../Makefile for CFLAGS lib/libtcc1.c : fix an issue compiling tcc with tcc on x64
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile4
-rw-r--r--lib/libtcc1.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index e125f2c..dfac0f8 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -3,7 +3,7 @@
#
TOP = ..
-include $(TOP)/config.mak
+include $(TOP)/Makefile
VPATH = $(top_srcdir)/lib $(top_srcdir)/win32/lib
ifndef TARGET
@@ -91,7 +91,7 @@ $(DIR)/%.o : %.c
$(DIR)/%.o : %.S
$(XCC) -c $< -o $@ $(XFLAGS)
$(DIR)/%$(EXESUF) : $(TOP)/win32/tools/%.c
- $(CC) -Os -s -o $@ $< $(XFLAGS) $(LDFLAGS)
+ $(CC) -o $@ $< $(XFLAGS) $(LDFLAGS)
$(OBJ) $(XAR) : $(DIR)/exists
$(DIR)/exists :
diff --git a/lib/libtcc1.c b/lib/libtcc1.c
index 946c6c8..6964cd1 100644
--- a/lib/libtcc1.c
+++ b/lib/libtcc1.c
@@ -609,8 +609,11 @@ unsigned long long __fixunsxfdi (long double a1)
/* helper functions for stdarg.h */
-#include <stdio.h>
#include <stdlib.h>
+#ifndef __TINYC__
+/* gives "incompatible types for redefinition of __va_arg" below */
+#include <stdio.h>
+#endif
enum __va_arg_type {
__va_gen_reg, __va_float_reg, __va_stack
@@ -665,7 +668,9 @@ void *__va_arg(struct __va_list_struct *ap,
return ap->overflow_arg_area - size;
default:
+#ifndef __TINYC__
fprintf(stderr, "unknown ABI type for __va_arg\n");
+#endif
abort();
}
}