From c92971182c73984955fc66a62d82bef3b083b271 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 6 Jun 2010 21:00:34 +0200 Subject: fixed tcc (limits.h problems and linking dynamic libraries on Linux) --- TODOS | 6 +++++- makefiles/gmake/compiler.mk | 4 +++- makefiles/gmake/depend.mk | 2 +- makefiles/gmake/libs.mk | 5 +++++ src/port/limits.h | 6 +++++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/TODOS b/TODOS index 5c75ff9..d2c44ef 100644 --- a/TODOS +++ b/TODOS @@ -2,10 +2,14 @@ - make install installs the testlib, split in two - check if we can get variable symbols on Windows - find solution for char *, TCHAR unicode and friends - - fix shared library linking for tcc and for pcc + - fix shared library linking for pcc - threading - handle detached and joinable threads correctly on Windows - add conditional variables (thread + mutex + conditional will suffice for now) +- core porting + - PATH_MAX defined in a hard way or fetched from limits.h, not + good, add probing for fpathconf and friends and test on + all platforms again \ No newline at end of file diff --git a/makefiles/gmake/compiler.mk b/makefiles/gmake/compiler.mk index ec3a05a..b62496f 100644 --- a/makefiles/gmake/compiler.mk +++ b/makefiles/gmake/compiler.mk @@ -159,9 +159,11 @@ endif ifeq "$(COMPILER)" "tcc" COMPILE_FLAGS = \ - -Wall -Werror + -Wall -Werror -Wunsupported -Wwrite-strings -g -bt 20 endif +CCPP = tcc + # end of tcc section # start of icc section diff --git a/makefiles/gmake/depend.mk b/makefiles/gmake/depend.mk index eb832e7..cb6556c 100644 --- a/makefiles/gmake/depend.mk +++ b/makefiles/gmake/depend.mk @@ -30,7 +30,7 @@ ifeq "$(COMPILER)" "tcc" %.d : %.c @echo Generating dependencies for $< - @makedepend -DMAKE_DEPENDENCIES $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) -I/usr/lib/tcc/include -f - $< > $@ + @makedepend -DMAKE_DEPENDENCIES $(PLATFORM_COMPILE_FLAGS) -D__TINYC__ $(INCLUDE_DIRS) -I/usr/lib/tcc/include -f - $< > $@ endif diff --git a/makefiles/gmake/libs.mk b/makefiles/gmake/libs.mk index 08899c3..c8f77a6 100644 --- a/makefiles/gmake/libs.mk +++ b/makefiles/gmake/libs.mk @@ -10,8 +10,13 @@ # ifeq "$(PLATFORM)" "LINUX" +ifeq "$(COMPILER)" "gcc" SO_FLAGS = -shared -Wl,-soname,$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR) endif +ifeq "$(COMPILER)" "tcc" +SO_FLAGS = -shared +endif +endif ifeq "$(PLATFORM)" "SUNOS" ifeq "$(COMPILER)" "gcc" diff --git a/src/port/limits.h b/src/port/limits.h index c4116c1..68c7ebc 100644 --- a/src/port/limits.h +++ b/src/port/limits.h @@ -23,7 +23,11 @@ #ifdef __PCC__ #define PATH_MAX 255 #else +#ifdef __TINYC__ +#define PATH_MAX 255 +#else #include -#endif +#endif /* ifdef __TINYC__ */ +#endif /* ifdef __PCC__ */ #endif /* ifndef __LIMITS_H */ -- cgit v1.2.3-54-g00ecf