From 96cc9f7650e5af28957dcfed202cf8011c067fc3 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 6 Jun 2010 23:26:32 +0200 Subject: partially fixed on SPARC Solaris 8 --- TODOS | 5 +++-- makefiles/gmake/compiler.mk | 6 ++++-- makefiles/gmake/platform.mk | 8 ++++++++ src/GNUmakefile | 7 ------- src/port/sys_internal.h | 5 ++++- tests/library/GNUmakefile | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/TODOS b/TODOS index 976f603..2f597b0 100644 --- a/TODOS +++ b/TODOS @@ -2,6 +2,9 @@ - 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 + - Solaris 8, linking trouble with _eprintf and ilbstdc++ + (the real problem is we use the g++ linker call for + pure c libraries, not really good) - threading - handle detached and joinable threads correctly on Windows - add conditional variables (thread + mutex + conditional @@ -10,5 +13,3 @@ - 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 85414b0..8e9c978 100644 --- a/makefiles/gmake/compiler.mk +++ b/makefiles/gmake/compiler.mk @@ -27,7 +27,7 @@ GCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-minor-ver # -Wunreachable-code: doesn't work # -Wno-div-by-zero: we get NaN and friend over macros, so need for funny tricks :-) # -Wstrict-overflow=5 is relatively new, later maybe -# -fstack-protector or -fstack-protector-all: should be used, but U +# -fstack-protector or -fstack-protector-all: should be used, but I # have currently big problems to get it around compiler gcc and -lssl # probing! FIXME later # -fstack-protector-all: does something funny to the shared objects.. @@ -35,6 +35,8 @@ GCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-minor-ver # everything implied by -Wall is not explicitly specified (gcc 4.2.3) # TODO: reenable -O2 # -Waggregate-return: is for K&R code and mostly useless nowadays +# TODO: snprintf Solaris 8 and cygwin croaks on -Wfloat-equal, compilers are +# too old for diagnostic pragmas, drop -Wfloat-equal for now # compilation flags and compilers COMMON_COMPILE_FLAGS = \ @@ -43,7 +45,7 @@ COMMON_COMPILE_FLAGS = \ -pedantic -Wall -Werror \ -Wunused -Wno-import \ -Wformat -Wformat-y2k -Wformat-nonliteral -Wformat-security -Wformat-y2k \ - -Wswitch-enum -Wunknown-pragmas -Wfloat-equal \ + -Wswitch-enum -Wunknown-pragmas \ -Wundef -Wshadow -Wpointer-arith \ -Wcast-qual -Wcast-align \ -Wwrite-strings \ diff --git a/makefiles/gmake/platform.mk b/makefiles/gmake/platform.mk index aaa8846..b081a59 100644 --- a/makefiles/gmake/platform.mk +++ b/makefiles/gmake/platform.mk @@ -69,8 +69,16 @@ endif ifeq "$(PLATFORM)" "LINUX" LIBS_DL = -ldl else +ifeq "$(PLATFORM)" "SUNOS" +ifeq "$(OS_MAJOR_VERSION)" "5" +ifeq "$(OS_MINOR_VERSION)" "8" +LIBS_DL = -ldl +endif +endif +else LIBS_DL = endif +endif # i18n, gettext/libintl ####################### diff --git a/src/GNUmakefile b/src/GNUmakefile index 89eff92..ab948de 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -64,13 +64,6 @@ DYNAMIC_LIB_PATCH = 0 local_all: -# snprintf has some quirks, mainly -Wfloat-equal doesn't allow the -# definition of ISNAN, ISINF, the C99 versions use math.h, ieee.h -# libmath and more, which is maybe not really acceptable for a core -# port (on the other hand so isn't NLS support!) -port/stdio.o : port/stdio.c $(TOPDIR)/include/wolf/port/stdio.h port/snprintf.h port/snprintf.c - $(CC) $(STD99_COMPILE_FLAGS) -c -o $@ $(INCLUDE_DIRS) $(PLATFORM_COMPILE_FLAGS) $< - local_clean: -@rm -f port/*.bak -@rm -f port/*~ diff --git a/src/port/sys_internal.h b/src/port/sys_internal.h index b673c21..8ff88cd 100644 --- a/src/port/sys_internal.h +++ b/src/port/sys_internal.h @@ -141,12 +141,15 @@ #define HAVE_PTRDIFF_T 1 #define HAVE_VA_COPY 0 #define HAVE___VA_COPY 0 +#define HAVE_DLFCN +#define NEEDS_LINK_H +#define WOLF_LIBRARY_DLERROR_CONST #else #if OS_MINOR_VERSION == 10 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN -//#define NEEDS_LINK_H +#define NEEDS_LINK_H #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform diff --git a/tests/library/GNUmakefile b/tests/library/GNUmakefile index 8f13ced..8b5ecc7 100644 --- a/tests/library/GNUmakefile +++ b/tests/library/GNUmakefile @@ -28,4 +28,4 @@ local_distclean: local_test: @echo "Testing loading of a library and executing a function therein.." - @./test_loader >/dev/null + @LD_LIBRARY_PATH=/usr/local/lib ./test_loader >/dev/null -- cgit v1.2.3-54-g00ecf