Added a 64-bit bootfile and modified the configure script to not add
its own -m32 or -m64 flags. To built ikarus in 32-bit mode, one can do: ./configure CFLAGS=-m32 and in 64-bit mode: ./configure CFLAGS=-m64
This commit is contained in:
parent
59b9d28001
commit
358eee03ee
2
c32
2
c32
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
cp configure.32.ac configure.ac && \
|
||||
autoconf && \
|
||||
./configure --prefix=/Users/ikarus/.opt CFLAGS=-m32 LDFLAGS=-m32 \
|
||||
&& make clean \
|
||||
&& make
|
||||
|
|
2
c64
2
c64
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
cp configure.64.ac configure.ac && \
|
||||
autoconf && \
|
||||
./configure CFLAGS="-m64 -g -I/Users/ikarus/.opt64/include" \
|
||||
LDFLAGS="-m64 -g -L/Users/ikarus/.opt64/lib" \
|
||||
&& make clean \
|
||||
|
|
|
@ -4479,9 +4479,8 @@ fi
|
|||
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m32"
|
||||
CCASFLAGS="$CCASFLAGS -m32"
|
||||
LDFLAGS="$LDFLAGS -m32"
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall"
|
||||
|
||||
case "$target_os" in
|
||||
*linux*)
|
||||
|
@ -4496,7 +4495,6 @@ case "$target_os" in
|
|||
esac
|
||||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -5538,12 +5536,6 @@ cat >>confdefs.h <<_ACEOF
|
|||
_ACEOF
|
||||
|
||||
|
||||
# remember to enable before release.
|
||||
if (test $ac_cv_sizeof_void_p != 4); then
|
||||
{ { echo "$as_me:$LINENO: error: Ikarus can only run in 32-bit mode." >&5
|
||||
echo "$as_me: error: Ikarus can only run in 32-bit mode." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
{ echo "$as_me:$LINENO: checking for library containing dlsym" >&5
|
||||
|
|
102
configure.32.ac
102
configure.32.ac
|
@ -1,102 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(ikarus, 0.0.3, aghuloum@cs.indiana.edu)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(ikarus, 0.0.3)
|
||||
AC_CONFIG_SRCDIR([src/])
|
||||
|
||||
|
||||
AM_PROG_AS
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m32"
|
||||
CCASFLAGS="$CCASFLAGS -m32"
|
||||
LDFLAGS="$LDFLAGS -m32"
|
||||
|
||||
case "$target_os" in
|
||||
*linux*)
|
||||
LDFLAGS="-rdynamic $LDFLAGS"
|
||||
;;
|
||||
*bsd*)
|
||||
LDFLAGS="-Wl,-E $LDFLAGS"
|
||||
;;
|
||||
*cygwin*)
|
||||
LDFLAGS="-Wl,-E -Wl,--export-all-symbols $LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
# remember to enable before release.
|
||||
if (test $ac_cv_sizeof_void_p != 4); then
|
||||
AC_MSG_ERROR([Ikarus can only run in 32-bit mode.])
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS(dlsym, dl,, [AC_MSG_ERROR([Cannot find libdl])])
|
||||
AC_SEARCH_LIBS(cos, m,, [AC_MSG_ERROR([Cannot find libm])])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([assert.h dlfcn.h errno.h fcntl.h signal.h \
|
||||
stdint.h stdlib.h string.h strings.h \
|
||||
sys/mman.h sys/resource.h sys/stat.h \
|
||||
sys/time.h sys/types.h sys/wait.h time.h \
|
||||
unistd.h])
|
||||
|
||||
AC_CHECK_HEADERS([gmp.h],,[AC_MSG_ERROR([
|
||||
ERROR: Cannot find libgmp.
|
||||
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||
|
||||
# check that gmp is present
|
||||
AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([
|
||||
ERROR: Cannot find libgmp.
|
||||
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||
|
||||
# check that gmp exports mpn_mul
|
||||
# unfortunately, gmp.h defines mpn_mul as a macro
|
||||
# that expands to __gmpn_mul on my machine.
|
||||
AC_CHECK_LIB(gmp,__gmpn_mul,,[AC_MSG_ERROR([
|
||||
ERROR: your version of libgmp does not contain a binding for
|
||||
ERROR: some of the primitives that ikarus uses. This is most
|
||||
ERROR: likely to happen if your version of gmp was compiled
|
||||
ERROR: in 64-bit mode, while ikarus expects needs the 32-bit
|
||||
ERROR: version. Refer to the following bug report for details
|
||||
https://bugs.launchpad.net/ikarus/+bug/159235
|
||||
])])
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_RESTRICT
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRFTIME
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([sigaltstack bzero gettimeofday memmove memset munmap setenv sqrt strerror getaddrinfo])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES(Makefile src/Makefile scheme/Makefile doc/Makefile lib/Makefile benchmarks/Makefile)
|
||||
AC_OUTPUT #(Makefile src/Makefile scheme/Makefile doc/Makefile)
|
||||
|
103
configure.64.ac
103
configure.64.ac
|
@ -1,103 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(ikarus, 0.0.3, aghuloum@cs.indiana.edu)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(ikarus, 0.0.3)
|
||||
AC_CONFIG_SRCDIR([src/])
|
||||
|
||||
|
||||
AM_PROG_AS
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m64"
|
||||
CCASFLAGS="$CCASFLAGS -m64"
|
||||
LDFLAGS="$LDFLAGS -m64"
|
||||
|
||||
case "$target_os" in
|
||||
*linux*)
|
||||
LDFLAGS="-rdynamic $LDFLAGS"
|
||||
;;
|
||||
*bsd*)
|
||||
LDFLAGS="-Wl,-E $LDFLAGS"
|
||||
;;
|
||||
*cygwin*)
|
||||
LDFLAGS="-Wl,-E -Wl,--export-all-symbols $LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
# remember to enable before release.
|
||||
# if (test $ac_cv_sizeof_void_p != 4); then
|
||||
# AC_MSG_ERROR([Ikarus can only run in 32-bit mode.])
|
||||
# fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS(dlsym, dl,, [AC_MSG_ERROR([Cannot find libdl])])
|
||||
AC_SEARCH_LIBS(cos, m,, [AC_MSG_ERROR([Cannot find libm])])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([assert.h dlfcn.h errno.h fcntl.h signal.h \
|
||||
stdint.h stdlib.h string.h strings.h \
|
||||
sys/mman.h sys/resource.h sys/stat.h \
|
||||
sys/time.h sys/types.h sys/wait.h time.h \
|
||||
unistd.h])
|
||||
|
||||
AC_CHECK_HEADERS([gmp.h],,[AC_MSG_ERROR([
|
||||
ERROR: Cannot find libgmp.
|
||||
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||
|
||||
# check that gmp is present
|
||||
AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([
|
||||
ERROR: Cannot find libgmp.
|
||||
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||
|
||||
# check that gmp exports mpn_mul
|
||||
# unfortunately, gmp.h defines mpn_mul as a macro
|
||||
# that expands to __gmpn_mul on my machine.
|
||||
|
||||
# AC_CHECK_LIB(gmp,__gmpn_mul,,[AC_MSG_ERROR([
|
||||
# ERROR: your version of libgmp does not contain a binding for
|
||||
# ERROR: some of the primitives that ikarus uses. This is most
|
||||
# ERROR: likely to happen if your version of gmp was compiled
|
||||
# ERROR: in 64-bit mode, while ikarus expects needs the 32-bit
|
||||
# ERROR: version. Refer to the following bug report for details
|
||||
# https://bugs.launchpad.net/ikarus/+bug/159235
|
||||
# ])])
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_RESTRICT
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_FORK
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRFTIME
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([sigaltstack bzero gettimeofday memmove memset munmap setenv sqrt strerror getaddrinfo])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES(Makefile src/Makefile scheme/Makefile doc/Makefile lib/Makefile benchmarks/Makefile)
|
||||
AC_OUTPUT #(Makefile src/Makefile scheme/Makefile doc/Makefile)
|
||||
|
10
configure.ac
10
configure.ac
|
@ -13,9 +13,8 @@ AM_PROG_AS
|
|||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m32"
|
||||
CCASFLAGS="$CCASFLAGS -m32"
|
||||
LDFLAGS="$LDFLAGS -m32"
|
||||
|
||||
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall"
|
||||
|
||||
case "$target_os" in
|
||||
*linux*)
|
||||
|
@ -29,12 +28,7 @@ case "$target_os" in
|
|||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
# remember to enable before release.
|
||||
if (test $ac_cv_sizeof_void_p != 4); then
|
||||
AC_MSG_ERROR([Ikarus can only run in 32-bit mode.])
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS(dlsym, dl,, [AC_MSG_ERROR([Cannot find libdl])])
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
nodist_pkglib_DATA=ikarus.boot
|
||||
|
||||
EXTRA_DIST=ikarus.boot.prebuilt ikarus.enumerations.ss \
|
||||
EXTRA_DIST=ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt \
|
||||
ikarus.enumerations.ss \
|
||||
ikarus.exceptions.ss ikarus.apply.ss ikarus.bytevectors.ss \
|
||||
ikarus.cafe.ss ikarus.chars.ss ikarus.code-objects.ss \
|
||||
ikarus.codecs.ss ikarus.collect.ss ikarus.command-line.ss \
|
||||
|
@ -33,16 +34,18 @@ revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision 2>/dev/null)"
|
|||
last-revision: $(shell ls ../.bzr/branch/last-revision 2>/dev/null)
|
||||
echo $(revno) >$@
|
||||
|
||||
sizeofvoidp = $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g")
|
||||
|
||||
ikarus.config.ss: Makefile last-revision ../config.h
|
||||
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
||||
echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@
|
||||
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
||||
echo '(define wordsize $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g"))' >>$@
|
||||
echo '(define wordsize $(sizeofvoidp))' >>$@
|
||||
|
||||
|
||||
CLEANFILES=$(nodist_pkglib_DATA) ikarus.config.ss
|
||||
MAINTAINERCLEANFILES=last-revision
|
||||
|
||||
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
||||
../src/ikarus -b ./ikarus.boot.prebuilt --r6rs-script makefile.ss
|
||||
../src/ikarus -b ./ikarus.boot.$(sizeofvoidp).prebuilt --r6rs-script makefile.ss
|
||||
|
||||
|
|
|
@ -155,7 +155,8 @@ target_vendor = @target_vendor@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
nodist_pkglib_DATA = ikarus.boot
|
||||
EXTRA_DIST = ikarus.boot.prebuilt ikarus.enumerations.ss \
|
||||
EXTRA_DIST = ikarus.boot.4.prebuilt ikarus.boot.8.prebuilt \
|
||||
ikarus.enumerations.ss \
|
||||
ikarus.exceptions.ss ikarus.apply.ss ikarus.bytevectors.ss \
|
||||
ikarus.cafe.ss ikarus.chars.ss ikarus.code-objects.ss \
|
||||
ikarus.codecs.ss ikarus.collect.ss ikarus.command-line.ss \
|
||||
|
@ -182,6 +183,7 @@ EXTRA_DIST = ikarus.boot.prebuilt ikarus.enumerations.ss \
|
|||
ikarus.compiler.tag-annotation-analysis.ss ikarus.ontology.ss
|
||||
|
||||
revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision 2>/dev/null)"
|
||||
sizeofvoidp = $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g")
|
||||
CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss
|
||||
MAINTAINERCLEANFILES = last-revision
|
||||
all: all-am
|
||||
|
@ -376,10 +378,10 @@ ikarus.config.ss: Makefile last-revision ../config.h
|
|||
echo '(define ikarus-version "$(PACKAGE_VERSION)")' >$@
|
||||
echo '(define ikarus-revision "$(shell cat last-revision)")' >>$@
|
||||
echo '(define ikarus-lib-dir "$(pkglibdir)")' >>$@
|
||||
echo '(define wordsize $(shell grep SIZEOF_VOID_P ../config.h | sed "s/.*\(.\)/\1/g"))' >>$@
|
||||
echo '(define wordsize $(sizeofvoidp))' >>$@
|
||||
|
||||
ikarus.boot: $(EXTRA_DIST) ikarus.config.ss
|
||||
../src/ikarus -b ./ikarus.boot.prebuilt --r6rs-script makefile.ss
|
||||
../src/ikarus -b ./ikarus.boot.$(sizeofvoidp).prebuilt --r6rs-script makefile.ss
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
1545
|
||||
1546
|
||||
|
|
Loading…
Reference in New Issue