make: Correct ppc detection

gcc -dumpmachine may provide the following output:
ppc64le-redhat-linux
To detect PowerPC system we should check for both
"powerpc%" and "ppc%" strings

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ifb5afe743797177afa4f1b541a0c8ccaf4befbda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Alexey Marchuk 2021-02-10 19:54:24 +03:00 committed by Tomasz Zawadzki
parent 9643f7ec6e
commit 13381936af

View File

@ -3,7 +3,7 @@
# #
# Copyright (c) Intel Corporation. # Copyright (c) Intel Corporation.
# Copyright (c) 2017, IBM Corporation. # Copyright (c) 2017, IBM Corporation.
# Copyright (c) 2019, Mellanox Corporation. # Copyright (c) 2019, 2021 Mellanox Corporation.
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -75,7 +75,7 @@ TARGET_MACHINE := $(firstword $(TARGET_TRIPLET_WORDS))
COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -fno-strict-aliasing -I$(SPDK_ROOT_DIR)/include COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -fno-strict-aliasing -I$(SPDK_ROOT_DIR)/include
ifneq ($(filter powerpc%,$(TARGET_MACHINE)),) ifneq ($(filter powerpc% ppc%,$(TARGET_MACHINE)),)
COMMON_CFLAGS += -mcpu=$(TARGET_ARCHITECTURE) COMMON_CFLAGS += -mcpu=$(TARGET_ARCHITECTURE)
else ifeq ($(TARGET_MACHINE),aarch64) else ifeq ($(TARGET_MACHINE),aarch64)
ifeq ($(TARGET_ARCHITECTURE),native) ifeq ($(TARGET_ARCHITECTURE),native)