summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-06-06 21:00:34 +0200
committerAndreas Baumann <abaumann@yahoo.com>2010-06-06 21:00:34 +0200
commitc92971182c73984955fc66a62d82bef3b083b271 (patch)
tree6af871c5d2c53930f7d62629aec54346576d6373
parent7ff343817893038aec7a6116827f39d95e202d9a (diff)
downloadwolfbones-c92971182c73984955fc66a62d82bef3b083b271.tar.gz
wolfbones-c92971182c73984955fc66a62d82bef3b083b271.tar.bz2
fixed tcc (limits.h problems and linking dynamic libraries on Linux)
-rw-r--r--TODOS6
-rw-r--r--makefiles/gmake/compiler.mk4
-rw-r--r--makefiles/gmake/depend.mk2
-rw-r--r--makefiles/gmake/libs.mk5
-rw-r--r--src/port/limits.h6
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 <limits.h>
-#endif
+#endif /* ifdef __TINYC__ */
+#endif /* ifdef __PCC__ */
#endif /* ifndef __LIMITS_H */