~ chicken-core (chicken-5) e705943f8adefa9594aa10c31993a8cced517501
commit e705943f8adefa9594aa10c31993a8cced517501 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Thu May 20 15:46:07 2010 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Thu May 20 15:46:07 2010 +0200 Applied OpenSolaris patches to compile with cc (contributed by Semih Cemiloglu) diff --git a/Makefile.solaris b/Makefile.solaris index d0f383bc..36868da5 100644 --- a/Makefile.solaris +++ b/Makefile.solaris @@ -34,22 +34,24 @@ SRCDIR = ./ # platform configuration ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh) +export C_COMPILER ?= cc +export INSTALL_PROGRAM ?= ginstall # options -C_COMPILER_OPTIONS ?= -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H +C_COMPILER_OPTIONS ?= -errtags -DHAVE_CHICKEN_CONFIG_H ifdef DEBUGBUILD -C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused +C_COMPILER_OPTIMIZATION_OPTIONS ?= -g +w else ifdef OPTIMIZE_FOR_SPEED -C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer +C_COMPILER_OPTIMIZATION_OPTIONS ?= -xdebugformat=stabs -xannotate=no -g -xO4 else -C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer +C_COMPILER_OPTIMIZATION_OPTIONS ?= -xdebugformat=stabs -xannotate=no -g -xO3 endif endif -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)" +LINKER_LINK_SHARED_LIBRARY_OPTIONS = -G +LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -G +LINKER_LINK_SHARED_PROGRAM_OPTIONS = LIBRARIES = -lrt -lsocket -lnsl -lm -ldl NEEDS_RELINKING = yes diff --git a/manual/Acknowledgements b/manual/Acknowledgements index ff6f8a83..a564ecd1 100644 --- a/manual/Acknowledgements +++ b/manual/Acknowledgements @@ -8,18 +8,18 @@ Peter Bex, Jean-Francois Bignolles, Alaric Blagrave-Snellpym, Dave Bodenstab, Fabian Boehlke, T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence Brannon, Roy Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor Campbell, Naruto Canada, Mark Carter, Esteban -U. Caamano Castro, Franklin Chen, Thomas Chust, Gian Paolo Ciceri, -Fulvio Ciriaco, Tobia Conforto, John Cowan, Grzegorz Chrupała, -James Crippen, Tollef Fog Heen, Drew Hess, Alejandro Forero Cuervo, -Peter Danenberg, Linh Dang, Brian Denheyer, Sean D'Epagnier, dgym, -Don, Chris Double, Brown Dragon, Jarod Eells, Petter Egesund, Steve -Elkins, Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley, -Fizzie, Matthew Flatt, Kimura Fuyuki, Tony Garnock-Jones, Martin -Gasbichler, Abdulaziz Ghuloum, Joey Gibson, Stephen C. Gilardi, Mario -Domenech Goulart, Joshua Griffith, Johannes Groedem, Damian Gryski, -Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino, Ahdi -Hargo, Matthias Heiler, Karl M. Hegbloom, William P. Heinemann, Bill -Hoffman, Bruce Hoult, Hans Hübner, Markus Huelsmann, Goetz +U. Caamano Castro, Semih Cemiloglu, Franklin Chen, Thomas Chust, Gian +Paolo Ciceri, Fulvio Ciriaco, Tobia Conforto, John Cowan, Grzegorz +Chrupała, James Crippen, Tollef Fog Heen, Drew Hess, Alejandro +Forero Cuervo, Peter Danenberg, Linh Dang, Brian Denheyer, Sean +D'Epagnier, dgym, Don, Chris Double, Brown Dragon, Jarod Eells, Petter +Egesund, Steve Elkins, Daniel B. Faken, Will Farr, Graham Fawcett, +Marc Feeley, Fizzie, Matthew Flatt, Kimura Fuyuki, Tony Garnock-Jones, +Martin Gasbichler, Abdulaziz Ghuloum, Joey Gibson, Stephen C. Gilardi, +Mario Domenech Goulart, Joshua Griffith, Johannes Groedem, Damian +Gryski, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino, +Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William P. Heinemann, +Bill Hoffman, Bruce Hoult, Hans Hübner, Markus Huelsmann, Goetz Isenmann, Paulo Jabardo, Wietse Jacobs, David Janssens, Christian Jaeger, Matt Jones, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller, Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof diff --git a/runtime.c b/runtime.c index 1c8eb268..e0b732e0 100644 --- a/runtime.c +++ b/runtime.c @@ -7763,7 +7763,7 @@ void C_ccall C_machine_byte_order(C_word c, C_word closure, C_word k) C_cblock static C_word one_two_three = 123; str = (*((C_char *)&one_two_three) != 123) ? "big-endian" : "little-endian"; - C_cblockend + C_cblockend; #endif a = C_alloc(2 + C_bytestowords(strlen(str))); diff --git a/tests/runtests.sh b/tests/runtests.sh index 3cea9bd1..9e0f0155 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -6,6 +6,7 @@ set -e TEST_DIR=`pwd` +OS_NAME=`uname -s` export DYLD_LIBRARY_PATH=${TEST_DIR}/.. export LD_LIBRARY_PATH=${TEST_DIR}/.. @@ -34,8 +35,15 @@ if test -n "$MSYSTEM"; then cp ../libchicken.dll . fi -compile="../csc -compiler $CHICKEN -v -I.. -L.. -include-path .. -o a.out" -compile_s="../csc -s -compiler $CHICKEN -v -I.. -L.. -include-path .." +CSC_COMP_FLAGS="" +if [ "$OS_NAME" = "SunOS" ]; then + if [ "$C_COMPILER" = "cc" ]; then + CSC_COMP_FLAGS="-cc cc -ld cc" + fi +fi + +compile="../csc $CSC_COMP_FLAGS -compiler $CHICKEN -v -I.. -L.. -include-path .. -o a.out" +compile_s="../csc $CSC_COMP_FLAGS -s -compiler $CHICKEN -v -I.. -L.. -include-path .." interpret="../csi -n -include-path .." echo "======================================== compiler tests ..." @@ -232,15 +240,23 @@ $compile -e embedded2.scm ./a.out echo "======================================== private repository test ..." +# Skip this test on Solaris/Sun CC +if [ "$OS_NAME" != "SunOS" -o "$C_COMPILER" != "cc" ]; then mkdir -p tmp $compile private-repository-test.scm -private-repository -o tmp/xxx tmp/xxx $PWD/tmp PATH=$PWD/tmp:$PATH xxx $PWD/tmp # this may crash, if the PATH contains a non-matching libchicken.dll on Windows: #PATH=$PATH:$PWD/tmp xxx $PWD/tmp +fi echo "======================================== timing compilation ..." -time $compile compiler.scm -O5 -debug pb -v -C -Wa,-W +if [ "$OS_NAME" = "SunOS" -o "$C_COMPILER" = "cc" ]; then + COMP_FLAGS="" +else + COMP_FLAGS="-C -Wa,-W" +fi +time $compile compiler.scm -O5 -debug pb -v $COMP_FLAGS echo "executing ..." time ./a.outTrap