autobuild.sh: export CC when building with custom DPDK
When buliding with build_native_dpdk() CC is not set which causes "compiler" to be set to gcc and gcc-specific cflags options are used. Meson build however is not aware of this (as CC variable is not set) and uses whatever compiler is default in the OS. In case of doing the build of freebsd this results in trying to do a clang build with gcc options, which of course fails. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I72a5919410502786c5d44fe31ce231c023df9acd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11182 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
45777e1b24
commit
03beec4466
@ -59,6 +59,13 @@ function build_native_dpdk() {
|
||||
local compiler
|
||||
|
||||
compiler=${CC:-gcc}
|
||||
|
||||
# Export CC to be absolutely sure it's set.
|
||||
# If CC was not set and we defaulted to "gcc" then we need to do the export
|
||||
# so that "meson build" command a few lines below is aware of which compiler
|
||||
# to use.
|
||||
export CC="$compiler"
|
||||
|
||||
if [[ $compiler != *clang* && $compiler != *gcc* ]]; then
|
||||
echo "Unsupported compiler detected ($compiler), failing the test" >&2
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user