This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patch] Fix to LFS support detection
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 29 Dec 2003 11:08:50 +0100
- Subject: [Patch] Fix to LFS support detection
Hi,
as already discussed, with recent glibc/binutils (honestly I didn't
investigate further) the current autoconf test for LFS may fail at
link time like this:
undefined reference to `__gxx_personality_v0'
Seems safe to add in general '-fno-exceptions' to the test.
Tested x86-linux. Will commit soon if nobody objects.
I mean to add to the testsuite something for LFS, which, however,
shall be run only on platforms LFS-enabled.
Paolo.
/////////////
2003-12-29 Paolo Carlini <pcarlini@suse.de>
* acinclude.m4 (GLIBCXX_CHECK_LFS): Add -fno-exceptions
to CXXFLAGS.
* aclocal.m4: Regenerate.
* configure: Likewise.
diff -urN libstdc++-v3-orig/acinclude.m4 libstdc++-v3/acinclude.m4
--- libstdc++-v3-orig/acinclude.m4 2003-12-10 01:05:11.000000000 +0100
+++ libstdc++-v3/acinclude.m4 2003-12-24 18:50:54.000000000 +0100
@@ -594,7 +594,9 @@
dnl
AC_DEFUN(GLIBCXX_CHECK_LFS, [
AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
AC_CACHE_VAL(glibcxx_cv_LFS, [
AC_TRY_LINK(
[#include <unistd.h>
@@ -611,7 +613,8 @@
if test $glibcxx_cv_LFS = yes; then
AC_DEFINE(_GLIBCXX_USE_LFS)
fi
- AC_LANG_RESTORE
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
])