~ chicken-core (chicken-5) 6e186a9622119b3a2a9372afe28c695a3039f397
commit 6e186a9622119b3a2a9372afe28c695a3039f397 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Thu Aug 12 04:23:50 2010 -0400 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Thu Aug 12 04:23:50 2010 -0400 Solaris build- and runtime patches by Semih Cemiloglu diff --git a/Makefile.solaris b/Makefile.solaris index bd2a133a..163020e2 100644 --- a/Makefile.solaris +++ b/Makefile.solaris @@ -41,9 +41,9 @@ export INSTALL_PROGRAM ?= ginstall # options ifeq ($(C_COMPILER),cc) -C_COMPILER_OPTIONS ?= -errtags -DHAVE_CHICKEN_CONFIG_H -C_COMPILER_OPTIONS ?= -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H +C_COMPILER_OPTIONS ?= -errtags -xdebugformat=stabs -xannotate=no -DHAVE_CHICKEN_CONFIG_H else +C_COMPILER_OPTIONS ?= -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H endif ifdef DEBUGBUILD @@ -55,13 +55,13 @@ endif else ifdef OPTIMIZE_FOR_SPEED ifeq ($(C_COMPILER),cc) -C_COMPILER_OPTIMIZATION_OPTIONS ?= -xdebugformat=stabs -xannotate=no -g -xO4 +C_COMPILER_OPTIMIZATION_OPTIONS += -g -xO4 else C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer endif else ifeq ($(C_COMPILER),cc) -C_COMPILER_OPTIMIZATION_OPTIONS ?= -xannotate=no -xO3 +C_COMPILER_OPTIMIZATION_OPTIONS += -g -xO3 else C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer endif @@ -69,15 +69,15 @@ endif endif ifeq ($(C_COMPILER),cc) -LINKER_LINK_SHARED_LIBRARY_OPTIONS = -G -LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -G +LINKER_LINK_SHARED_LIBRARY_OPTIONS = -xannotate=no -G +LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -xannotate=no -G LINKER_LINK_SHARED_PROGRAM_OPTIONS = else LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R"$(RUNTIME_LINKER_PATH)" -Wl,-L. LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)" endif -LIBRARIES = -lrt -lsocket -lnsl -lm -ldl +LIBRARIES = -lsocket -lnsl -lm -ldl NEEDS_RELINKING = yes # special files diff --git a/runtime.c b/runtime.c index b47a262b..730fb6f9 100644 --- a/runtime.c +++ b/runtime.c @@ -2612,11 +2612,18 @@ void C_save_and_reclaim(void *trampoline, void *proc, int n, ...) } -#define mark(x) \ - C_cblock \ - C_word *_x = (x), _val = *_x; \ - if(!C_immediatep(_val)) really_mark(_x); \ +#ifdef __SUNPRO_C +static void mark(C_word *x) { \ + C_word *_x = (x), _val = *_x; \ + if(!C_immediatep(_val)) really_mark(_x); \ +} +#else +# define mark(x) \ + C_cblock \ + C_word *_x = (x), _val = *_x; \ + if(!C_immediatep(_val)) really_mark(_x); \ C_cblockend +#endif C_regparm void C_fcall C_reclaim(void *trampoline, void *proc) @@ -3079,11 +3086,18 @@ C_regparm void C_fcall really_mark(C_word *x) } -#define remark(x) \ - C_cblock \ - C_word *_x = (x), _val = *_x; \ - if(!C_immediatep(_val)) really_remark(_x); \ +#ifdef __SUNPRO_C +static void remark(C_word *x) { \ + C_word *_x = (x), _val = *_x; \ + if(!C_immediatep(_val)) really_remark(_x); \ +} +#else +#define remark(x) \ + C_cblock \ + C_word *_x = (x), _val = *_x; \ + if(!C_immediatep(_val)) really_remark(_x); \ C_cblockend +#endif /* Do a major GC into a freshly allocated heap: */Trap