Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1237551pxa; Thu, 20 Aug 2020 06:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrE+3Pvy8XxQhBS3sl8orXSFj4syJwk5HN+wjU1t4h8yh6ayujswzrASHAkSQO+KcbDuJM X-Received: by 2002:a17:906:7f0b:: with SMTP id d11mr3501978ejr.116.1597929987015; Thu, 20 Aug 2020 06:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597929987; cv=none; d=google.com; s=arc-20160816; b=d70DujRqUReJu5jruZDkT4hMWC4m0zhKjtgBlf7YF9G8X5n8mydAdocKFHNx9ml05J H2xY2jqfMSoDc4dMXeGk+0NPz801zn9kpoAlJV3CjCT6V2NgY0yc9D78ELbKWWb5cH/A jt3Od1PTCqHGz0fuw/fLEfgFKxPy4q6njXqUmGRZokon1bspcJE2Xba1cHEiF0FHUi0N CNSDY3bbyFBSZ2JOyCubivYf+H8hnE2oihKEk8+6ulw4nDK41VUmmLAFmpo7KE2yrEef 5dicXSsxHxqhjE99PDkwYkPwtelV6KKIF3z4TUPmu0QPRicgOuNk8VhB/QJtcclxCWIf pp1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XXD36fyb9gz8uoYOiFLgIA6oZAB+nNHChwqYzcQNS9A=; b=pWXXNP/kz6pbG5cL3DOGqzbY97E9jbLiW4l6BjZVXXrfuRm41DQmm0mJyM8g5j0xb4 Ol65+PhW0VE6r+ZOw5Tfk83WXKEpyEOuypVCg+KWHylJj2o3rXD/JVeKxKiWbQodK3B0 PRMGoWgBR0JKQ09EAPoVT//mhHa/ofZzHG4qfWoHlcmDbGaV3pOi1L0TWtKFJ/wYrDQs PbUCLBIkOmx923waZ2hVwKRcLm+p+d4upUOAow1mna4mzT7093sTCYwKXFl9KUh1lNoQ cbXhZr5MEeFok96au30mH5V59SQG0Qxzms9PNW3uLfMAVQYWLpWFKYWpsLHyKwxL+hRd YFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=znFHq7He; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si1383332ejl.636.2020.08.20.06.26.02; Thu, 20 Aug 2020 06:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=znFHq7He; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730838AbgHTNZ0 (ORCPT + 99 others); Thu, 20 Aug 2020 09:25:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:46418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbgHTJeK (ORCPT ); Thu, 20 Aug 2020 05:34:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C6FA621775; Thu, 20 Aug 2020 09:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916022; bh=jcRA3/dvIFzvzWTh9Top8KkbsVp7IEUSwTnsevvfODc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=znFHq7HeiZsM/NTEtjo6Jed3iixH1yuoWxQ5LhyAVg61AMFth1Etjb4A9aCQUd3xR 2OLSGng7efJh0tIADNbi54k2tv/5QbLeANqbT/s1RIsbliOSbYY/ivMqL4rLxO/g9w xTtKgd2pKcxcBFbLQtaSDzB5CK0InKpa2yyr4aWA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Daniel=20D=C3=ADaz?= , Thomas Hebb , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Jiri Olsa , John Fastabend , KP Singh , Martin KaFai Lau , Namhyung Kim , Song Liu , Stephane Eranian , Yonghong Song , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.8 216/232] tools build feature: Quote CC and CXX for their arguments Date: Thu, 20 Aug 2020 11:21:07 +0200 Message-Id: <20200820091623.258543906@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Díaz [ Upstream commit fa5c893181ed2ca2f96552f50073786d2cfce6c0 ] When using a cross-compilation environment, such as OpenEmbedded, the CC an CXX variables are set to something more than just a command: there are arguments (such as --sysroot) that need to be passed on to the compiler so that the right set of headers and libraries are used. For the particular case that our systems detected, CC is set to the following: export CC="aarch64-linaro-linux-gcc --sysroot=/oe/build/tmp/work/machine/perf/1.0-r9/recipe-sysroot" Without quotes, detection is as follows: Auto-detecting system features: ... dwarf: [ OFF ] ... dwarf_getlocations: [ OFF ] ... glibc: [ OFF ] ... gtk2: [ OFF ] ... libbfd: [ OFF ] ... libcap: [ OFF ] ... libelf: [ OFF ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ OFF ] ... zlib: [ OFF ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ OFF ] ... libaio: [ OFF ] ... libzstd: [ OFF ] ... disassembler-four-args: [ OFF ] Makefile.config:414: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. Makefile.perf:230: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 Makefile:69: recipe for target 'all' failed make: *** [all] Error 2 With CC and CXX quoted, some of those features are now detected. Fixes: e3232c2f39ac ("tools build feature: Use CC and CXX from parent") Signed-off-by: Daniel Díaz Reviewed-by: Thomas Hebb Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Link: http://lore.kernel.org/lkml/20200812221518.2869003-1-daniel.diaz@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/build/Makefile.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 774f0b0ca28ac..e7818b44b48ee 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -8,7 +8,7 @@ endif feature_check = $(eval $(feature_check_code)) define feature_check_code - feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CC=$(CC) CXX=$(CXX) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" CXXFLAGS="$(EXTRA_CXXFLAGS) $(FEATURE_CHECK_CXXFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) + feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CC="$(CC)" CXX="$(CXX)" CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" CXXFLAGS="$(EXTRA_CXXFLAGS) $(FEATURE_CHECK_CXXFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) endef feature_set = $(eval $(feature_set_code)) -- 2.25.1