This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug bootstrap/12276] [3.3/3.4 regression] Configure check forlibunwind does not work with cross


"mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> Apparently, this was considered to be desirable behavior; the ChangeLog says:
>
> 2002-10-02  David Mosberger-Tang  <David.Mosberger@acm.org>
>
> 	* configure.in: Move sjlj-exceptions and --enable-libunwind-exceptions
> 	before inclusion of config.gcc, but after configuring the compiler etc.
> 	Determine default value for --enable-libunwind-exceptions based on
> 	whether the host has a libunwind library (not guaranteed to be correct,
> 	but it's a reasonable first guess and can always be overridden with an
> 	explicit --enable/disable-libunwind-exceptions.
>
> Therefore, I've closed this bug.  If you still think it's a bug, bring it up on
> the GCC mailing list and see if you can get consensus about that.

I don't think it is desirable to suddenly get a broken cross compiler just
because someone installed libunwind on your host system.

Tested both natively and with a ia64->m68k cross.

Andreas.

2003-10-03  Andreas Schwab  <schwab@suse.de>

	PR bootstrap/12276
	* configure.in: Check for libunwind on the host only if building
	a native compiler.

Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.732
diff -u -p -a -u -p -a -r1.732 gcc/configure.in
--- gcc/configure.in	23 Sep 2003 21:51:43 -0000	1.732
+++ gcc/configure.in	3 Oct 2003 14:10:28 -0000
@@ -941,7 +941,11 @@ AC_ARG_ENABLE(sjlj-exceptions,
 AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
   [Define 0/1 to force the choice for exception handling model.])])
 
-AC_CHECK_LIB(unwind, main, use_libunwind_default=yes, use_libunwind_default=no)
+if test x$host = x$target; then
+   AC_CHECK_LIB(unwind, main, use_libunwind_default=yes, use_libunwind_default=no)
+else
+   use_libunwind_default=no
+fi
 # Use libunwind based exception handling.
 AC_ARG_ENABLE(libunwind-exceptions,
 [  --enable-libunwind-exceptions  force use libunwind for exceptions],

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]