Hello.
The current HEAD has broken cross compilation. The problem is that the check
for __builtin_return_address function is not handled via the build/cross_config
file.
I fixed it by specifying an environment variable in the "build/cross_config"
and checking for the variable in the "configure". My diff is attached.
BTW, probably it will be sufficient just to *compile* the test program, i.e. to
use AC_COMPILE_IFELSE instead of AC_RUN_IFELSE for this check in aclocal.m4?
Best regards,
- Anton
Index: src/configure
===================================================================
RCS file: /cvsroot/ecls/ecl/src/configure,v
retrieving revision 1.326
diff -U8 -r1.326 configure
--- src/configure 19 Jan 2011 21:32:21 -0000 1.326
+++ src/configure 26 Jan 2011 13:35:09 -0000
@@ -4731,16 +4731,18 @@
ECL_INT64_T=no
ECL_LONG_LONG_BITS=no
###
### 1.7) Other features (set to 'no' to disable)
###
ECL_WORKING_SEM_INIT=no
ECL_WORKING_ENVIRON=yes
+# if the function __builtin_return_address supported
+ECL_HAVE___BUILTIN_RETURN_ADDRESS=yes
### 2) To cross-compile ECL so that it runs on the system
### ${host}
### you need to first compile ECL on the system in which you are building
### the cross-compiled files, that is
### ${build}
### By default we assume that ECL can be accessed from some directory in
### the path.
@@ -9021,39 +9023,49 @@
fi
if test ! ${opcode8} = "no" ; then
$as_echo "#define ECL_SMALL_BYTECODES 1" >>confdefs.h
fi
-
-if test "$cross_compiling" = yes; then :
+if test -z "$ECL_HAVE___BUILTIN_RETURN_ADDRESS"; then
+ if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void *foo() { return __builtin_return_address(1); }
int main() {
return (foo() == 0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define HAVE___BUILTIN_RETURN_ADDRESS 1" >>confdefs.h
-
+ ECL_HAVE___BUILTIN_RETURN_ADDRESS=yes
+else
+ ECL_HAVE___BUILTIN_RETURN_ADDRESS=no
fi
+
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECL_HAVE___BUILTIN_RETURN_ADDRESS" >&5
+$as_echo "$ECL_HAVE___BUILTIN_RETURN_ADDRESS" >&6; }
+if test $ECL_HAVE___BUILTIN_RETURN_ADDRESS = yes ; then
+ $as_echo "#define HAVE___BUILTIN_RETURN_ADDRESS 1" >>confdefs.h
+fi
+
if test "x${enable_threads}" != "xno"; then
test -d atomic || mkdir atomic
(destdir=`${PWDCMD}`; cd atomic && CC="${CC} ${PICFLAG}" \
$srcdir/gc/libatomic*/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${build_alias} --host=${host_alias} \
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list