Makefile: Enable external override for TARGET
A cross-architecture build might pass a target-specific CC on 'make', and not on 'make install', and this is what happens in Debian cross-qa tests. Given that we select binaries to be installed depending on the target architecture, this means we would build AVX2 binaries in any case on a x86_64 build machine. By overriding TARGET in package build rules, we can tell the Makefile about the target architecture, also for the 'install' (Makefile) target. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
7727804658
commit
87a655045b
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@ ifeq ($(RLIMIT_STACK_VAL),unlimited)
|
||||||
RLIMIT_STACK_VAL := 1024
|
RLIMIT_STACK_VAL := 1024
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET := $(shell $(CC) -dumpmachine)
|
TARGET ?= $(shell $(CC) -dumpmachine)
|
||||||
# Get 'uname -m'-like architecture description for target
|
# Get 'uname -m'-like architecture description for target
|
||||||
TARGET_ARCH := $(shell echo $(TARGET) | cut -f1 -d- | tr [A-Z] [a-z])
|
TARGET_ARCH := $(shell echo $(TARGET) | cut -f1 -d- | tr [A-Z] [a-z])
|
||||||
TARGET_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/powerpc/ppc/')
|
TARGET_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/powerpc/ppc/')
|
||||||
|
|
Loading…
Reference in a new issue