瀏覽代碼

gcc 4.9.x produces some calls to abort()

For sh4/xtensa architectures there is an optimization
bug, which does not allow to compile ld.so with gcc 4.9.2.
Disable this optimization for sh4/xtensa and ld.so compile.
Waldemar Brodkorb 9 年之前
父節點
當前提交
69ba9dcaa1
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      ldso/ldso/Makefile.in

+ 8 - 0
ldso/ldso/Makefile.in

@@ -27,6 +27,14 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
 
 CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
 
+# avoid ld.so linking error since gcc 4.9.x: undefined reference to abort
+ifeq ($(TARGET_ARCH),xtensa)
+CFLAGS-ldso.c += -fno-delete-null-pointer-checks
+endif
+ifeq ($(TARGET_ARCH),sh)
+CFLAGS-ldso.c += -fno-delete-null-pointer-checks
+endif
+
 LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-$(UCLIBC_LDSO_NAME).so := -Wl,--dsbt-index=1
 ifneq ($(SUPPORT_LD_DEBUG),y)
 LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)