public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: Support the new ia64 EH ABI
@ 2004-09-14 18:58 H. J. Lu
  0 siblings, 0 replies; only message in thread
From: H. J. Lu @ 2004-09-14 18:58 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Gcc mainline and 3.4 have been updated to support the new ia64 EH ABI:

http://www.kernel.org/pub/linux/devel/gcc/unwind/

This patch updates the libunwind support for the gcc changes.


H.J.

[-- Attachment #2: libc-unwind-3.patch --]
[-- Type: text/plain, Size: 3115 bytes --]

2004-09-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makeconfig (libunwind): New.
	(libgcc_eh): Add $(libunwind).
	(gnulib): Always set to -lgcc $(libgcc_eh).
	(static-gnulib): Always set to -lgcc -lgcc_eh $(libunwind).
	(libc.so-gnulib): New.

	* Makerules (LDLIBS-c.so): Use $(libc.so-gnulib) instead of
	$(static-gnulib).

	* configure.in (libc_cv_cc_with_libunwind): Set to yes if gcc
	uses -lunwind for static binaries.
	* configure: Regenerated.

--- libc/Makeconfig.unwind	2004-08-11 14:23:00.000000000 -0700
+++ libc/Makeconfig	2004-09-08 10:07:59.512198328 -0700
@@ -521,18 +521,19 @@ link-libc-bounded = $(common-objpfx)libc
 link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
 
 ifndef gnulib
-ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh
+ifneq ($(have-cc-with-libunwind),yes)
+  libunwind =
 else
- libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) -Wl,--no-as-needed
+  libunwind = -lunwind
 endif
-ifneq ($(have-cc-with-libunwind),yes)
- gnulib := -lgcc $(libgcc_eh)
- static-gnulib := -lgcc -lgcc_eh
+ifneq ($(have-as-needed),yes)
+ libgcc_eh := -lgcc_eh $(libunwind)
 else
- gnulib := -lgcc $(libgcc_eh) -lunwind
- static-gnulib := -lgcc -lgcc_eh -lunwind
+ libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
 endif
+gnulib := -lgcc $(libgcc_eh)
+static-gnulib := -lgcc -lgcc_eh $(libunwind)
+libc.so-gnulib := -lgcc
 endif
 ifeq ($(elf),yes)
 +preinit = $(addprefix $(csu-objpfx),crti.o)
--- libc/Makerules.unwind	2004-09-01 15:44:48.000000000 -0700
+++ libc/Makerules	2004-09-08 09:12:53.000000000 -0700
@@ -581,8 +581,8 @@ build-shlib-objlist = $(build-module-hel
 # Also omits crti.o and crtn.o, which we do not want
 # since we define our own `.init' section specially.
 LDFLAGS-c.so = -nostdlib -nostartfiles
-# But we still want to link libc.so against $(static-gnulib).
-LDLIBS-c.so += $(static-gnulib)
+# But we still want to link libc.so against $(libc.so-gnulib).
+LDLIBS-c.so += $(libc.so-gnulib)
 # Give libc.so an entry point and make it directly runnable itself.
 LDFLAGS-c.so += -e __libc_main
 # If lazy relocation is disabled add the -z now flag.
--- libc/configure.in.unwind	2004-09-08 09:12:53.000000000 -0700
+++ libc/configure.in	2004-09-08 09:12:53.000000000 -0700
@@ -1309,13 +1309,17 @@ EOF
   fi
 
   AC_CACHE_CHECK(for libunwind-support in compiler,
-		 libc_cv_cc_with_libunwind, [dnl
-    AC_TRY_LINK([#include <libunwind.h>], [
-      unw_context_t uc;
-      unw_cursor_t c;
-      unw_getcontext (&uc);
-      unw_init_local (&c, &uc)],
-        libc_cv_cc_with_libunwind=yes, libc_cv_cc_with_libunwind=no)])
+		 libc_cv_cc_with_libunwind, [
+    cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
+       conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
+      libc_cv_cc_with_libunwind=yes
+    else
+      libc_cv_cc_with_libunwind=no
+    fi
+    rm -f conftest*])
   AC_SUBST(libc_cv_cc_with_libunwind)
   if test $libc_cv_cc_with_libunwind = yes; then
     AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-14 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-14 18:58 PATCH: Support the new ia64 EH ABI H. J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).