summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch b/meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch
new file mode 100644
index 0000000000..c2fe79217c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.7/libgcc-sjlj-check.patch
@@ -0,0 +1,61 @@
1ac_fn_c_try_compile doesnt seem to keep the intermediate files
2which are needed for sjlj test to pass since it greps into the
3generated file. So we run the compiler command using AC_TRY_COMMAND
4which then generates the needed .s file
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Pending
9Index: trunk/libgcc/configure
10===================================================================
11--- trunk.orig/libgcc/configure 2012-03-01 22:59:10.112444433 -0800
12+++ trunk/libgcc/configure 2012-03-01 22:59:50.424446325 -0800
13@@ -4525,17 +4525,19 @@
14 }
15
16 _ACEOF
17-CFLAGS_hold=$CFLAGS
18-CFLAGS="--save-temps -fexceptions"
19 libgcc_cv_lib_sjlj_exceptions=unknown
20-if ac_fn_c_try_compile; then :
21+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
22+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23+ (eval $ac_try) 2>&5
24+ ac_status=$?
25+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26+ test $ac_status = 0; }; }; then
27 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
28 libgcc_cv_lib_sjlj_exceptions=yes
29 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
30 libgcc_cv_lib_sjlj_exceptions=no
31 fi
32 fi
33-CFLAGS=$CFLAGS_hold
34 rm -f conftest*
35
36 fi
37Index: trunk/libgcc/configure.ac
38===================================================================
39--- trunk.orig/libgcc/configure.ac 2012-03-01 22:59:10.128444406 -0800
40+++ trunk/libgcc/configure.ac 2012-03-01 22:59:50.428446373 -0800
41@@ -209,16 +209,14 @@
42 bar();
43 }
44 ])])
45-CFLAGS_hold=$CFLAGS
46-CFLAGS="--save-temps -fexceptions"
47 libgcc_cv_lib_sjlj_exceptions=unknown
48-AS_IF([ac_fn_c_try_compile],
49- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
50+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
51+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
52 libgcc_cv_lib_sjlj_exceptions=yes
53 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
54 libgcc_cv_lib_sjlj_exceptions=no
55- fi])
56-CFLAGS=$CFLAGS_hold
57+ fi
58+fi
59 rm -f conftest*
60 ])
61