Browse Source

fix ARCH_NATIVE_BIT for aarch64

Patch suggested by Thomas Petazzoni and tested by me.

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Waldemar Brodkorb 1 year ago
parent
commit
b1638b692b
2 changed files with 22 additions and 11 deletions
  1. 2 11
      Rules.mak
  2. 20 0
      extra/Configs/Config.in

+ 2 - 11
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

+ 20 - 0
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"