RFA: Improve 128-bit long double configure test
Daniel Jacobowitz
drow@false.org
Thu Nov 15 20:18:00 GMT 2007
MontaVista builds both cross compilers (Linux or Windows -> MVL
target) and native compilers (MVL host) on their Linux-based build
systems. We discovered that the two compilers disagreed on the
size of long double for PowerPC. Have I mentioned that I think
making ABI choices based on configure tests is a really lousy idea?
This is the best I could think of to solve the problem. Configure
wants to grep through /usr/include; if we're building with $build
!= $host (and $host = $target is assured by the previous test, above
the context of the diff), then ask GCC where glibc's headers are.
What do you think? Is the approach OK? How about the shell scripting
choices?
--
Daniel Jacobowitz
CodeSourcery
2007-11-15 Daniel Jacobowitz <dan@codesourcery.com>
* configure.ac: For $build != $host, use the preprocessor to
find glibc headers.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 129996)
+++ configure.ac (working copy)
@@ -3392,6 +3392,8 @@ AC_CACHE_CHECK(__stack_chk_fail in targe
else
glibc_header_dir="${with_sysroot}/usr/include"
fi
+ elif test x$build != x$host && test x$GCC = xyes; then
+ glibc_header_dir=`echo "#include <features.h>" | $CPP -x c - | sed '/features/ { s,/features.h".*,,; s,.*",,; q }; d'`
else
glibc_header_dir=/usr/include
fi
@@ -3446,6 +3448,8 @@ case "$target" in
else
glibc_header_dir="${with_sysroot}/usr/include"
fi
+ elif test x$build != x$host && test x$GCC = xyes; then
+ glibc_header_dir=`echo "#include <features.h>" | $CPP -x c - | sed '/features/ { s,/features.h".*,,; s,.*",,; q }; d'`
else
glibc_header_dir=/usr/include
fi
More information about the Gcc-patches
mailing list