mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-21 13:53:43 +00:00
Use 'command -v' to test for ld.gold
This commit is contained in:
parent
58726498f1
commit
1a7f19cdde
@ -21,7 +21,6 @@ CHMOD ?= chmod
|
||||
MKDIR ?= mkdir
|
||||
LN ?= ln -sf
|
||||
LDCONF ?= /sbin/ldconfig -n
|
||||
UNAME := $(shell uname)
|
||||
|
||||
# Solaris provides a non-Posix shell at /usr/bin
|
||||
ifneq ($(wildcard /usr/xpg4/bin),)
|
||||
@ -593,7 +592,8 @@ endif # Asan
|
||||
# LD gold linker testing. Triggered by 'LD=ld.gold'.
|
||||
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
|
||||
ifeq ($(findstring -fuse-ld=gold,$(CXXFLAGS)),)
|
||||
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(GREP) -i -c "elf")
|
||||
LD_GOLD = $(shell command -v ld.gold)
|
||||
ELF_FORMAT := $(shell file $(LD_GOLD) 2>&1 | cut -d":" -f 2 | $(GREP) -i -c "elf")
|
||||
ifneq ($(ELF_FORMAT),0)
|
||||
LDFLAGS += -fuse-ld=gold
|
||||
endif # ELF/ELF64
|
||||
|
Loading…
x
Reference in New Issue
Block a user