aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-15 04:51:44 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-15 04:51:44 +0000
commita88f78e5d08f790f8be05e4fddbb99748f908630 (patch)
tree2f76a24fb770bbd376f17ed0386e7c6ec8e7e0ae
parentd7cc951908ac7f74318a08ed7f2e64768b971f00 (diff)
downloadopen-axiom-a88f78e5d08f790f8be05e4fddbb99748f908630.tar.gz
* config/var-def.mk (CPPFLAGS): New expanded variable.
(LDFLAGS): Likewise. (COMPILE): Include CPPFLAGS. (CXXCOMPILE): Likewise. (LINK): Include LDFLAGS. (CXXLINK): Likewise. (CXXLINK_SHRLIB): New. * config/open-axiom.m4 (OPENAXIOM_HOST_DATA_PROPERTIES): Move ABI flags setting to OPENAXIOM_HOST_COMPILERS. The CPPFLAGS and LDFLAGS instead of CFLAGS and CXXFLAGS.
-rw-r--r--ChangeLog13
-rw-r--r--config/open-axiom.m423
-rw-r--r--config/var-def.mk15
-rwxr-xr-xconfigure101
-rw-r--r--src/ChangeLog6
-rw-r--r--src/lib/Makefile.in7
6 files changed, 93 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index a89f5aa2..4b03cf83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2010-08-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * config/var-def.mk (CPPFLAGS): New expanded variable.
+ (LDFLAGS): Likewise.
+ (COMPILE): Include CPPFLAGS.
+ (CXXCOMPILE): Likewise.
+ (LINK): Include LDFLAGS.
+ (CXXLINK): Likewise.
+ (CXXLINK_SHRLIB): New.
+ * config/open-axiom.m4 (OPENAXIOM_HOST_DATA_PROPERTIES): Move
+ ABI flags setting to OPENAXIOM_HOST_COMPILERS. The CPPFLAGS and
+ LDFLAGS instead of CFLAGS and CXXFLAGS.
+
+2010-08-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* config/open-axiom.m4 (OPENAXIOM_CHECK_GCL_INCLUSION): New macro.
(OPENAXIOM_LISP_FLAVOR): Likewise.
(OPENAXIOM_HOST_COMPILERS): Likewise.
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 1c9332ab..e868a77b 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -189,8 +189,19 @@ AC_DEFUN([OPENAXIOM_HOST_COMPILERS],[
OPENAXIOM_PROG_LISP
OPENAXIOM_LISP_FLAVOR($axiom_lisp)
OPENAXIOM_REJECT_ROTTED_LISP($AXIOM_LISP)
+OPENAXIOM_HOST_LISP_CPU_PRECISION
AC_PROG_CC
AC_PROG_CXX
+## Augment C and C++ compiler flags with ABI directives as appropriate.
+case $GCC in
+ yes)
+ CPPFLAGS="$CPPFLAGS -m$openaxiom_host_lisp_precision"
+ LDFLAGS="$LDFLAGS -m$openaxiom_host_lisp_precision"
+ ;;
+ no)
+ # cross fingers and pray.
+ ;;
+esac
OPENAXIOM_SATISFY_GCL_NEEDS
AC_PROG_CPP
])
@@ -406,7 +417,6 @@ dnl ------------------------------------
dnl -- OPENAXIOM_HOST_DATA_PROPERTIES --
dnl ------------------------------------
AC_DEFUN([OPENAXIOM_HOST_DATA_PROPERTIES],[
-OPENAXIOM_HOST_LISP_CPU_PRECISION
## Byte order of the host.
AC_C_BIGENDIAN
AC_CHECK_HEADERS([stdint.h inttypes.h])
@@ -421,15 +431,4 @@ fi
AC_DEFINE_UNQUOTED([OPENAXIOM_HOST_LISP_PRECISION],
[$openaxiom_host_lisp_precision],
[The width of the host Lisp and CPU registers.])
-
-## Augment compiler flags with ABI directives as appropriate.
-case $GCC in
- yes)
- CFLAGS="$CFLAGS -m$openaxiom_host_lisp_precision"
- CXXFLAGS="$CXXFLAGS -m$openaxiom_host_lisp_precision"
- ;;
- no)
- # cross fingers and pray.
- ;;
-esac
])
diff --git a/config/var-def.mk b/config/var-def.mk
index 6de145ed..89c03c29 100644
--- a/config/var-def.mk
+++ b/config/var-def.mk
@@ -53,7 +53,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
AR = @AR@
CC = @CC@
+CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+LDFLAGS = @LDFLAGS@
OBJEXT = @OBJEXT@
EXEEXT = @EXEEXT@
# this includes leading period
@@ -67,15 +70,15 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIBTOOL = $(top_builddir)/libtool
## Command used to compile a C program
-COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) -c
-CXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) -c
+COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) -c $(CPPFLAGS)
+CXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) -c $(CPPFLAGS)
## Sadly, at the moment, the C parts of the OpenAxiom system is not
## well structured enough to allow for clean dynamic libraries
## and dynamic linking. So, we build static programs.
## This situation is to be fixed when I have time.
-LINK = $(LIBTOOL) --mode=link $(CC) -static
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -static
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) -static $(LDFLAGS)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -static $(LDFLAGS)
## Libtool is a disaster for building DLLs on Cygwin, and insists
## on adding silly extensions where it should not on MinGW, so we have
@@ -83,8 +86,10 @@ CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -static
## up negating the whole point of having Libtool in the first place.
ifeq (@oa_use_libtool_for_shared_lib@,no)
LINK_SHRLIB = $(CC)
+CXXLINK_SHRLIB = $(CXX)
else
-LINK_SHRLIB = $(LIBTOOL) --mode=link $(CC)
+LINK_SHRLIB = $(LIBTOOL) --tag=CC --mode=link $(CC)
+CXXLINK_SHRLIB = $(LIBTOOL) --tag=CXX --mode=link $(CC)
endif
diff --git a/configure b/configure
index cbfb2c5d..09f1c2f3 100755
--- a/configure
+++ b/configure
@@ -2463,6 +2463,26 @@ $as_echo "$as_me: error: This version of SBCL has a bug that breaks OpenAxiom bu
;;
esac
+
+if test x"$axiom_include_gcl" != xyes; then
+ { $as_echo "$as_me:$LINENO: checking CPU precision as seen by $AXIOM_LISP" >&5
+$as_echo_n "checking CPU precision as seen by $AXIOM_LISP... " >&6; }
+ case `echo '*features*' | $AXIOM_LISP` in
+ *X86-64*|*X86_64*|*WORD-SIZE=64*|*64-BIT-HOST*)
+ # PORTME: the pattern above covers only the supported free Lisps, i.e.
+ # GCL, SBCL, CLisp, ECL and Clozure CL.
+ openaxiom_host_lisp_precision=64
+ ;;
+ *)
+ # assume everything else is 32-bit
+ # FIXME: this is bold assumption.
+ openaxiom_host_lisp_precision=32
+ ;;
+ esac
+ { $as_echo "$as_me:$LINENO: result: $openaxiom_host_lisp_precision" >&5
+$as_echo "$openaxiom_host_lisp_precision" >&6; }
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3768,6 +3788,16 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+## Augment C and C++ compiler flags with ABI directives as appropriate.
+case $GCC in
+ yes)
+ CPPFLAGS="$CPPFLAGS -m$openaxiom_host_lisp_precision"
+ LDFLAGS="$LDFLAGS -m$openaxiom_host_lisp_precision"
+ ;;
+ no)
+ # cross fingers and pray.
+ ;;
+esac
## If we are using GCL as the base runtime system, then we do really need
# a C compiler from GNU. Well, at least for the moment.
@@ -4424,26 +4454,6 @@ done
-
-if test x"$axiom_include_gcl" != xyes; then
- { $as_echo "$as_me:$LINENO: checking CPU precision as seen by $AXIOM_LISP" >&5
-$as_echo_n "checking CPU precision as seen by $AXIOM_LISP... " >&6; }
- case `echo '*features*' | $AXIOM_LISP` in
- *X86-64*|*X86_64*|*WORD-SIZE=64*|*64-BIT-HOST*)
- # PORTME: the pattern above covers only the supported free Lisps, i.e.
- # GCL, SBCL, CLisp, ECL and Clozure CL.
- openaxiom_host_lisp_precision=64
- ;;
- *)
- # assume everything else is 32-bit
- # FIXME: this is bold assumption.
- openaxiom_host_lisp_precision=32
- ;;
- esac
- { $as_echo "$as_me:$LINENO: result: $openaxiom_host_lisp_precision" >&5
-$as_echo "$openaxiom_host_lisp_precision" >&6; }
-fi
-
## Byte order of the host.
{ $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
@@ -6459,17 +6469,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-## Augment compiler flags with ABI directives as appropriate.
-case $GCC in
- yes)
- CFLAGS="$CFLAGS -m$openaxiom_host_lisp_precision"
- CXXFLAGS="$CXXFLAGS -m$openaxiom_host_lisp_precision"
- ;;
- no)
- # cross fingers and pray.
- ;;
-esac
-
oa_use_libtool_for_shared_lib=yes
oa_shrobj_flags=
@@ -6961,13 +6960,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:6964: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:6963: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:6967: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:6966: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:6970: output\"" >&5)
+ (eval echo "\"\$as_me:6969: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8169,7 +8168,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8172 "configure"' > conftest.$ac_ext
+ echo '#line 8171 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10440,11 +10439,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10443: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10442: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10447: \$? = $ac_status" >&5
+ echo "$as_me:10446: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10779,11 +10778,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10782: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10781: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10786: \$? = $ac_status" >&5
+ echo "$as_me:10785: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10884,11 +10883,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10887: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10886: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10891: \$? = $ac_status" >&5
+ echo "$as_me:10890: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10939,11 +10938,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10942: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10941: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10946: \$? = $ac_status" >&5
+ echo "$as_me:10945: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13739,7 +13738,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13742 "configure"
+#line 13741 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13835,7 +13834,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13838 "configure"
+#line 13837 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15855,11 +15854,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15858: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15857: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15862: \$? = $ac_status" >&5
+ echo "$as_me:15861: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15954,11 +15953,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15957: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15956: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15961: \$? = $ac_status" >&5
+ echo "$as_me:15960: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16006,11 +16005,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16009: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16008: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16013: \$? = $ac_status" >&5
+ echo "$as_me:16012: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
diff --git a/src/ChangeLog b/src/ChangeLog
index a0b81b5c..8235e3d8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * lib/Makefile.in (libopen-axiom-core.$(LIBEXT)): Use LINK.
+ (libspad.$(LIBEXT)): Likewise.
+ (%.$(OBJEXT) %.lo): Honor CFLAGS.
+
2010-08-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
* hyper/ex2ht.c (strPrefix): Be const-correct.
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index fd84b82c..353cffc6 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -91,16 +91,15 @@ $(axiom_target_libdir)/libopen-axiom-core$(SHREXT): \
@axiom_c_runtime_extra@ -lm
libopen-axiom-core.$(LIBEXT): $(libopen_axiom_core_SOURCES:.c=.lo)
- $(LIBTOOL) --mode=link $(CC) -static -o $@ \
- $(libopen_axiom_core_SOURCES:.c=.lo)
+ $(LINK) -o $@ $(libopen_axiom_core_SOURCES:.c=.lo)
libspad.$(LIBEXT): $(libspad_objects)
- $(LIBTOOL) --mode=link $(CC) -static -o $@ $(libspad_objects)
+ $(LINK) -o $@ $(libspad_objects)
.PRECIOUS: %.$(OBJEXT)
%.$(OBJEXT) %.lo: %.c $(axiom_c_macros_h)
- $(COMPILE) $(oa_shrobj_flags) -no-suppress -o $@ $(CCF) -g \
+ $(COMPILE) $(oa_shrobj_flags) -no-suppress -o $@ $(CCF) $(CFLAGS) \
$(axiom_includes) $(AXIOM_X11_CFLAGS) $<
# This is a support library, so it does not change often and