summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2022-08-11 01:20:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2022-08-11 01:20:10 +0200
commitb1638b692bb9081b3ac76f09500d4b10ceb5392f (patch)
treede5cc0da328594387e6c8dc3796f65ed65d885b5
parent3e14288eaaf62124d090b5225665632e1fe5d47c (diff)
fix ARCH_NATIVE_BIT for aarch64
Patch suggested by Thomas Petazzoni and tested by me. Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--Rules.mak13
-rw-r--r--extra/Configs/Config.in20
2 files changed, 22 insertions, 11 deletions
diff --git a/Rules.mak b/Rules.mak
index 3fb64c728..a0b012d7f 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -142,17 +142,8 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL
LIBC := libc
SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
-UCLIBC_LDSO_NAME := ld-uClibc
-ARCH_NATIVE_BIT := 32
-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 kvx ),)
-UCLIBC_LDSO_NAME := ld64-uClibc
-ARCH_NATIVE_BIT := 64
-else
-ifeq ($(CONFIG_MIPS_N64_ABI),y)
-UCLIBC_LDSO_NAME := ld64-uClibc
-ARCH_NATIVE_BIT := 64
-endif
-endif
+UCLIBC_LDSO_NAME := $(call qstrip,$(TARGET_LDSO_NAME))
+ARCH_NATIVE_BIT := $(call qstrip,$(TARGET_ARCH_BITS))
UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
NONSHARED_LIBNAME := uclibc_nonshared.a
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 7d7d374c3..e0905e956 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -145,6 +145,26 @@ config TARGET_xtensa
endchoice
+config TARGET_LDSO_NAME
+ string
+ default "ld64-uClibc" if TARGET_ia64
+ default "ld64-uClibc" if TARGET_powerpc64
+ default "ld64-uClibc" if TARGET_sparc64
+ default "ld64-uClibc" if TARGET_x86_64
+ default "ld64-uClibc" if TARGET_kvx
+ default "ld64-uClibc" if CONFIG_MIPS_N64_ABI
+ default "ld-uClibc"
+
+config TARGET_ARCH_BITS
+ int
+ default 64 if TARGET_aarch64
+ default 64 if TARGET_ia64
+ default 64 if TARGET_powerpc64
+ default 64 if TARGET_sparc64
+ default 64 if TARGET_x86_64
+ default 64 if TARGET_kvx
+ default 64 if CONFIG_MIPS_N64_ABI
+ default 32
menu "Target Architecture Features and Options"