patches/glibc/ports-2.9/110-arm-fix-sjlj-for-fpu.patch
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Fri Jan 27 13:31:16 2012 +0100 (2012-01-27)
changeset 2854 a70abdbfa342
permissions -rw-r--r--
complibs/cloog: fix linking with libm

In Ubuntu 11.04 and 11.10, the default options for ld have changed.
--no-copy-dt-needed-entries and --as-needed are now enabled by default, which
causes errors like:

[EXTRA] Checking CLooG/ppl
[DEBUG] ==> Executing: 'make' '-j3' '-s' 'check'
[ALL ] Making check in .
[ALL ] config.status: creating include/cloog/cloog-config.h
[ALL ] config.status: include/cloog/cloog-config.h is unchanged
[ALL ] libtool: link: i686-build_pc-linux-gnu-gcc -Wall -fomit-frame-pointer
-pipe -o cloog cloog.o -L/<snip>/build/static/lib ./.libs/libcloog.a -lm
/<snip>/build/static/lib/libppl_c.a /<snip>/build/static/lib/libpwl.a
/<snip>/build/static/lib/libppl.a /<snip>/build/static/lib/libgmpxx.a
/<snip>/build/static/lib/libgmp.a -lstdc++
[ALL ] /usr/bin/ld: /<snip>/build/static/lib/libppl.a(MIP_Problem.o):
undefined reference to symbol 'sqrt@@GLIBC_2.0'
[ALL ] /usr/bin/ld: note: 'sqrt@@GLIBC_2.0' is defined in DSO
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so so try adding
it to the linker command line
[ALL ] /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so:
could not read symbols: Invalid operation
[ALL ] collect2: ld returned 1 exit status
[ERROR] make[2]: *** [cloog] Error 1
[ERROR] make[1]: *** [check-recursive] Error 1

See:
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition

This patch fixes these errors by placing '-lm' at the right place on the command
line as libppl requires libm when linking cloog.

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
yann@1871
     1
From: Mike Frysinger <vapier at gentoo dot org>
yann@1871
     2
To: libc-ports at sourceware dot org
yann@1871
     3
Subject: [PATCH] arm/fpu/setjmp.S: add missing hidden def
yann@1871
     4
Date: Thu, 25 Dec 2008 23:08:56 -0500
yann@1871
     5
yann@1871
     6
All the other arm setjmp.S files provide a hidden alias for __sigsetjmp.
yann@1871
     7
Without this, we get a nice build failure like so:
yann@1871
     8
yann@1871
     9
/var/tmp/cross/armv4l-unknown-linux-gnu/portage/cross-armv4l-unknown-linux-gnu/glibc-2.9_p20081201/work/build-default-armv4l-unknown-linux-gnu-nptl/libc_pic.os: In function `setjmp':
yann@1871
    10
unwind-pe.c:(.text+0x15a54): undefined reference to `__GI___sigsetjmp'
yann@1871
    11
/var/tmp/cross/armv4l-unknown-linux-gnu/portage/cross-armv4l-unknown-linux-gnu/glibc-2.9_p20081201/work/build-default-armv4l-unknown-linux-gnu-nptl/libc_pic.os: In function `__GI__setjmp':
yann@1871
    12
unwind-pe.c:(.text+0x15a64): undefined reference to `__GI___sigsetjmp'
yann@1871
    13
collect2: ld returned 1 exit status
yann@1871
    14
make[1]: *** [/var/tmp/cross/armv4l-unknown-linux-gnu/portage/cross-armv4l-unknown-linux-gnu/glibc-2.9_p20081201/work/build-default-armv4l-unknown-linux-gnu-nptl/libc.so] Error 1
yann@1871
    15
yann@1871
    16
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
yann@1871
    17
---
yann@1871
    18
 sysdeps/arm/fpu/setjmp.S |    2 ++
yann@1871
    19
 1 files changed, 2 insertions(+), 0 deletions(-)
yann@1871
    20
yann@1871
    21
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
yann@1871
    22
index 8432836..82a7e19 100644
yann@1871
    23
--- a/ports/sysdeps/arm/fpu/setjmp.S
yann@1871
    24
+++ b/ports/sysdeps/arm/fpu/setjmp.S
yann@1871
    25
@@ -33,3 +33,5 @@ ENTRY (__sigsetjmp)
yann@1871
    26
 	/* Make a tail call to __sigjmp_save; it takes the same args.  */
yann@1871
    27
 	B	PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
yann@1871
    28
 END (__sigsetjmp)
yann@1871
    29
+
yann@1871
    30
+hidden_def (__sigsetjmp)