[uclibc-ng-devel,13/32,ARM,FDPIC] rtld: Compile with -fno-unwind-tables -fno-asynchronous-unwind-tables

Message ID 20180704155605.1892-14-christophe.lyon@st.com
State New
Headers show
Series
  • FDPIC ABI for ARM
Related show

Commit Message

Christophe Lyon July 4, 2018, 3:55 p.m.
Otherwise we have link errors because of unresolved refs in libgcc.a:

ld: /lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/libgcc.a(pr-support.o): in function `_Unwind_GetDataRelBase':
/libgcc/config/arm/pr-support.c:378: undefined reference to `abort'
ld: /lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/libgcc.a(unwind-arm.o): in function `unwind_phase2_forced':
/libgcc/unwind-arm-common.inc:511: undefined reference to `memcpy'

	* ldso/ldso/Makefile.in (CFLAGS-rtld): Always use
	-fno-unwind-tables -fno-asynchronous-unwind-tables on arm

Signed-off-by: Christophe Lyon <christophe.lyon@st.com>

Patch

diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index acb1a5b..4f2a184 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -14,12 +14,10 @@  ifneq ($(TARGET_ARCH),arc)
 CFLAGS-rtld += -fno-omit-frame-pointer
 endif
 
-ifeq ($(DODEBUG),y)
 ifeq ($(TARGET_ARCH),arm)
 # This stuff will not work with -funwind-tables / -fasynchronous-unwind-tables
 CFLAGS-rtld += -fno-unwind-tables -fno-asynchronous-unwind-tables
 endif
-endif
 
 CFLAGS-rtld += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
 CFLAGS-rtld += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\"