Commit 7a186735 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

configure: Unify read of cc.mk



Two variables were being unnecessarily set in two different ways.
Instead, just slurp entire cc.mk into the environment - this file
is generated by detect_cc.sh hence the format is known to be
sourceable.

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


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 2aa2e365
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -170,8 +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

CC=$(grep "DEFAULT_CC=" "$rootdir/mk/cc.mk" | sed s/DEFAULT_CC=//)
CC_TYPE=$(grep "CC_TYPE=" "$rootdir/mk/cc.mk" | cut -d "=" -f 2)
source <(grep "=" "$rootdir/mk/cc.mk")
CC=$DEFAULT_CC

arch=$($CC -dumpmachine)
sys_name=$(uname -s)