summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-06-06 22:02:56 +0200
committerAndreas Baumann <abaumann@yahoo.com>2010-06-06 22:02:56 +0200
commitcd1d6378a2b53021b0be2b17eca63d7c47931822 (patch)
tree4cffdc60100cdf81dde0c3402008e6dd641a8bad
parentf7869fb25b4e43f3c3ee0fe956de6d65c8d8de62 (diff)
downloadwolfbones-cd1d6378a2b53021b0be2b17eca63d7c47931822.tar.gz
wolfbones-cd1d6378a2b53021b0be2b17eca63d7c47931822.tar.bz2
fixed pcc on linux (gengetopt and generated code, __attribute__ infection of header files)
-rw-r--r--include/wolf/port/sys.h4
-rw-r--r--makefiles/gmake/compiler.mk4
-rw-r--r--makefiles/gmake/libs.mk9
-rw-r--r--tests/daemon/GNUmakefile9
4 files changed, 18 insertions, 8 deletions
diff --git a/include/wolf/port/sys.h b/include/wolf/port/sys.h
index 6994d13..98661a6 100644
--- a/include/wolf/port/sys.h
+++ b/include/wolf/port/sys.h
@@ -343,10 +343,12 @@
#define __PRETTY_FUNCTION__ __func__
#define _VA_LIST_DEFINED
-#define __THROW
#define __const const
#define __USER_LABEL_PREFIX__
+/* all GNUish macros should be ignored */
+#define __attribute__(X)
+
#endif /* defined __PCC__ **/
#endif /* ifndef WOLF_SYS_H */
diff --git a/makefiles/gmake/compiler.mk b/makefiles/gmake/compiler.mk
index aab45d2..08677a5 100644
--- a/makefiles/gmake/compiler.mk
+++ b/makefiles/gmake/compiler.mk
@@ -207,9 +207,11 @@ endif
ifeq "$(COMPILER)" "pcc"
COMPILE_FLAGS = \
- --fatal-warnings
+ --fatal-warnings -g
endif
+CCPP = pcc
+
# end of pcc section
# set flags for threading support using POSIX threads. This is completly different
diff --git a/makefiles/gmake/libs.mk b/makefiles/gmake/libs.mk
index c8f77a6..cf0ad08 100644
--- a/makefiles/gmake/libs.mk
+++ b/makefiles/gmake/libs.mk
@@ -10,11 +10,14 @@
#
ifeq "$(PLATFORM)" "LINUX"
-ifeq "$(COMPILER)" "gcc"
-SO_FLAGS = -shared -Wl,-soname,$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)
-endif
ifeq "$(COMPILER)" "tcc"
SO_FLAGS = -shared
+else
+ifeq "$(COMPILER)" "pcc"
+SO_FLAGS = -shared -Wl,-soname,$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)
+else
+SO_FLAGS = -shared -Wl,-soname,$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)
+endif
endif
endif
diff --git a/tests/daemon/GNUmakefile b/tests/daemon/GNUmakefile
index d352fbd..2971c08 100644
--- a/tests/daemon/GNUmakefile
+++ b/tests/daemon/GNUmakefile
@@ -26,12 +26,15 @@ GETTEXT_TRIGGERS = _ gettext_noop gettext
# ABa: currently a special rule for cmdline.c as gengetopt is not
# completly fixed yet
testd_cmdline.h : testd.ggo
- gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $<
+ gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $< && \
+ sed 's/#include <stdio.h>/#include "port\/stdio.h"/g' < $@ > _tmp && mv _tmp $@
+
testd_cmdline.c : testd.ggo
- gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $<
+ gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $< && \
+ sed 's/#include <stdio.h>/#include "port\/stdio.h"/g' < $@ > _tmp && mv _tmp $@
testd_cmdline.o : testd_cmdline.c testd_cmdline.h
- $(CC) -c -o $@ $<
+ $(CC) $(INCLUDE_DIRS) -c -o $@ $<
testd: $(TOPDIR)/src/libwolf.a testd_cmdline.o