mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 06:38:29 +04:00
build: add ATOMIC64_DEPENDS
Packages that use 64-bit atomics carry open-coded architecture lists such as +(arm||armeb||mips||mipsel||powerpc):libatomic. Those lists drift (ruby still names arc), over-include ARMv6K and ARMv7 targets whose compiler inlines 64-bit atomics via ldrexd/strexd, and under-include ARMv5 in other packages. Add HAS_ATOMIC64, selected on the architectures where GCC emits 64-bit atomics inline (all 64-bit ones, x86 via cmpxchg8b, ARMv6K and ARMv7), and ATOMIC64_DEPENDS as the single dependency expression to use instead. The condition is one negated symbol because the Depends: evaluator in package-pack.mk only handles flat conjunctions and disjunctions. 16-byte and size-generic atomics need libatomic on every architecture and keep a plain +libatomic dependency. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
d223c88f57
commit
e23f575e4d
2 files changed
+11
-1
No files matched your search
@@ -71,6 +71,8 @@ else
|
||||
TARGET_LDFLAGS += -zmax-page-size=4096
|
||||
endif
|
||||
|
||||
ATOMIC64_DEPENDS:=+!HAS_ATOMIC64:libatomic
|
||||
|
||||
include $(INCLUDE_DIR)/hardening.mk
|
||||
include $(INCLUDE_DIR)/prereq.mk
|
||||
include $(INCLUDE_DIR)/unpack.mk
|
||||
|
||||
+9
-1
@@ -116,7 +116,11 @@ config NAND_SUPPORT
|
||||
config LEGACY_SDCARD_SUPPORT
|
||||
bool
|
||||
|
||||
config HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config ARCH_64BIT
|
||||
select HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config VIRTIO_SUPPORT
|
||||
@@ -153,16 +157,20 @@ config arm_v6
|
||||
bool
|
||||
|
||||
config arm_v6k
|
||||
select HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config arm_v7
|
||||
select HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config i386
|
||||
select HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config i686
|
||||
bool
|
||||
select HAS_ATOMIC64
|
||||
bool
|
||||
|
||||
config loongarch64
|
||||
select ARCH_64BIT
|
||||
|
||||
Reference in new issue
Block a user