From f0481d971e9941004814009c1b0877a43aa10bdb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Dec 2014 15:46:00 -0800 Subject: [PATCH] Revert "Use pragmas rather than makefiles for necessary options for unwind code." This reverts commit c324fcfe75c3976ae0b16943df00710e1d0d74f7. --- ChangeLog | 13 ------------- nptl/Makefile | 3 +++ nptl/unwind.c | 2 -- sysdeps/gnu/Makefile | 2 ++ sysdeps/gnu/unwind-resume.c | 2 -- sysdeps/nptl/unwind-forcedunwind.c | 2 -- sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 2 -- 7 files changed, 5 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index aac7f32..76a9849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,3 @@ -2014-12-16 Roland McGrath - - * nptl/unwind.c: Use pragma to turn on -fexceptions. - * sysdeps/nptl/unwind-forcedunwind.c: Use pragma to turn on - -fexceptions and -fasynchronous-unwind-tables. - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c: Likewise. - * sysdeps/gnu/unwind-resume.c: Likewise. - * nptl/Makefile (CFLAGS-unwind.c, CFLAGS-unwind-forcedunwind.c): - Variables removed. - * sysdeps/gnu/Makefile - [$(subdir) = csu] (CFLAGS-unwind-resume.c): Likewise. - [$(subdir) = rt] (CFLAGS-rt-unwind-resume.c): Likewise. - 2014-12-16 Joseph Myers [BZ #17719] diff --git a/nptl/Makefile b/nptl/Makefile index 2b804b2..3d61ec1 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -146,6 +146,9 @@ libpthread-static-only-routines = pthread_atfork # nptl-init.c contains sigcancel_handler(). CFLAGS-nptl-init.c = -fexceptions -fasynchronous-unwind-tables +# The unwind code itself, +CFLAGS-unwind.c = -fexceptions +CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables # The following three functions must be async-cancel safe. CFLAGS-pthread_cancel.c = -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/unwind.c b/nptl/unwind.c index e50900e..f109019 100644 --- a/nptl/unwind.c +++ b/nptl/unwind.c @@ -25,8 +25,6 @@ #include "pthreadP.h" #include -#pragma GCC optimize "-fexceptions" - #ifdef HAVE_FORCED_UNWIND #ifdef _STACK_GROWS_DOWN diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile index 8d407f7..ba495ed 100644 --- a/sysdeps/gnu/Makefile +++ b/sysdeps/gnu/Makefile @@ -79,9 +79,11 @@ endif ifeq ($(subdir),csu) routines += unwind-resume shared-only-routines += unwind-resume +CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables endif ifeq ($(subdir),rt) librt-sysdep_routines += rt-unwind-resume librt-shared-only-routines += rt-unwind-resume +CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables endif diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c index a23d19a..5044a71 100644 --- a/sysdeps/gnu/unwind-resume.c +++ b/sysdeps/gnu/unwind-resume.c @@ -21,8 +21,6 @@ #include #include -#pragma GCC optimize ("-fexceptions", "-fasynchronous-unwind-tables") - static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute__ ((noreturn)); static _Unwind_Reason_Code (*libgcc_s_personality) diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c index bbb366f..9d7bdc5 100644 --- a/sysdeps/nptl/unwind-forcedunwind.c +++ b/sysdeps/nptl/unwind-forcedunwind.c @@ -23,8 +23,6 @@ #include #include -#pragma GCC optimize ("-fexceptions", "-fasynchronous-unwind-tables") - static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); static _Unwind_Reason_Code (*libgcc_s_personality) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c index 3f347a0..660d148 100644 --- a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c @@ -21,8 +21,6 @@ #include #include -#pragma GCC optimize ("-fexceptions", "-fasynchronous-unwind-tables") - static void *libgcc_s_handle; static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__; -- 2.7.4