summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2025-03-10 12:00:51 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2025-03-10 12:03:27 +0100
commitb996cd610ed56da9c267a9c72356d7638648ed69 (patch)
tree2024864d7191b2f91e97ca8af1f8b59dc1919312
parente921185d316af9e4a6b44ebac3a17874e461e9ec (diff)
bfin: fix compile and linking errors with gcc 14.2.0
ld.so must be compiled with -ffreestanding to avoid emits of memset/memcpy from gcc. Disable some extra warnings for Blackfin to avoid a compile error.
-rw-r--r--Rules.mak3
-rw-r--r--ldso/ldso/Makefile.in5
2 files changed, 8 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 6c947858b..7cc56c0fd 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -668,6 +668,9 @@ endif
ifeq ($(TARGET_ARCH),i386)
CFLAGS += -fno-omit-frame-pointer
endif
+ifeq ($(TARGET_ARCH),bfin)
+CFLAGS += -Wno-implicit-function-declaration
+endif
ifneq ($(strip $(UCLIBC_EXTRA_LDFLAGS)),"")
LDFLAGS += $(call qstrip,$(UCLIBC_EXTRA_LDFLAGS))
endif
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 6e8a0c388..0f8ed140d 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -19,6 +19,11 @@ ifeq ($(TARGET_ARCH),arm)
CFLAGS-rtld += -fno-unwind-tables -fno-asynchronous-unwind-tables
endif
+ifeq ($(TARGET_ARCH),bfin)
+# for gcc 10.5.0 and above we need to use -ffreestanding
+CFLAGS-rtld += -ffreestanding
+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)\"