Commit a32086ac authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

configure: Fix the way how cc.mk variables are read



The 7a186735 didn't consider a fact that vars like $CC can also hold
an actual list of arguments to the compiler (instead of having them as
part of $CFLAGS for instance). So make sure something like:

CC=gcc -Wwhatever -ffoo ...

is slurped by source properly.

Change-Id: I7d9a26d318bef42655a3dde127db2226c9759949
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22030


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 623709b5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -170,7 +170,8 @@ done
# Detect the compiler toolchain
$rootdir/scripts/detect_cc.sh --cc="$CC" --cxx="$CXX" --lto="${CONFIG[LTO]}" --ld="$LD" --cross-prefix="${CONFIG[CROSS_PREFIX]}" > $rootdir/mk/cc.mk

source <(grep "=" "$rootdir/mk/cc.mk")
mapfile -t cc < <(grep "=" "$rootdir/mk/cc.mk")
source <(printf '%q\n' "${cc[@]}")
CC=$DEFAULT_CC

arch=$($CC -dumpmachine)