From cd1d6378a2b53021b0be2b17eca63d7c47931822 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 6 Jun 2010 22:02:56 +0200 Subject: fixed pcc on linux (gengetopt and generated code, __attribute__ infection of header files) --- include/wolf/port/sys.h | 4 +++- makefiles/gmake/compiler.mk | 4 +++- makefiles/gmake/libs.mk | 9 ++++++--- tests/daemon/GNUmakefile | 9 ++++++--- 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 /#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 /#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 -- cgit v1.2.3-54-g00ecf