From patchwork Thu Aug 20 09:22:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 248034 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1305429ils; Thu, 20 Aug 2020 05:21:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXeuBumeJCaxH/MOZPHKuM3iF7yM90y8y+chZh85LeCB4kEkGvWwRdWwVqSDC40fqdVTbY X-Received: by 2002:a17:906:e115:: with SMTP id gj21mr2896373ejb.505.1597926071108; Thu, 20 Aug 2020 05:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597926071; cv=none; d=google.com; s=arc-20160816; b=dOqV5/rnyuR67MGTeK4mQWvdQteZtoV+fj7uBqbWjXvhAQY94LNOI4sZtm8UKED4Oe /cJ3ZJHRCs6UkJX/0uvbt5LtsqrFx/x9il8tHyhAHDZZ0mdPC8TCBzdxJF8EVxqFj2fL iMAyZVtq8e33mSia3kMsDLB9oZpTQaaxGUMMv15cEqurIcbIrsWohwpHPqsg+052pgyT HE0FSfGbpUzihTwr2+KXa2h9KbAWSww/IhMyv1IpcJxbeeePXG06PorBQz3/yiwdRdTm 9omf5UZb4HQaGMy7rI5b/kFPopkKYFyaFoxYGnJWcwJRTi2rRoKvP3QSchRVqaIpsXve 3JrA== 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=LPIRh0i9M9LeNSeIl34ruezAIPB+BrcDhod1r4qk00c=; b=zcuUSQP0Z5aE6PcafKnuaG/Mhc7dalQ3iaI5s3VRJZijjU39vCGt3HLGjgZy5zXR8l HZuP9Z9mLJPmdU9yLpypbbmVFzBg28Fs78MZKlwGow0NRnLdfcCrXZaEo6OQTzraKzCJ LB8BdmbqWqznSOXMeb5ktm+LYZpTGzK8OU7QH8DwKEJjGxg/VGwtQeZhyBmWY1zeCO4G kXIsJ/c43ZnB1ZZLnYY2FoG80cf8E8gll8WBP+AHB/96MEqsNO7pb43ryozCtnKWiJIw WTjfX0u/sLJDf3s1qREdNHjBZqSLX332d2hv4SOaOKXHysaWinOgCB1+8/B42DQfv5oy 60MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cVMdAqfn; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 b16si1233372edw.147.2020.08.20.05.21.10; Thu, 20 Aug 2020 05:21:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=cVMdAqfn; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1730475AbgHTMVI (ORCPT + 15 others); Thu, 20 Aug 2020 08:21:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:38570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730211AbgHTJz3 (ORCPT ); Thu, 20 Aug 2020 05:55:29 -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 0855D22B3F; Thu, 20 Aug 2020 09:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597917328; bh=4Kqy42bYRo9TCoGLVURv1kmQzUNij8zQ5wCsCx9mP54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cVMdAqfnwWBnu46r8xA1IFluG4zWYseJ15ja+8spr6/XVnuLx7rxAPCHfseRxbcWb a5kCi6643+05uZ+yXUj3IDMuN0l094tcQT1BlwGiymXoRjfplcySCRuIaPdz98ry8e r8n7DCe7DV0RXHklJAjEkl6vtA8Ei57+0M/x9hd4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Daniel_D=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 4.19 86/92] tools build feature: Quote CC and CXX for their arguments Date: Thu, 20 Aug 2020 11:22:11 +0200 Message-Id: <20200820091542.111946709@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091537.490965042@linuxfoundation.org> References: <20200820091537.490965042@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.25.1 diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 7d9d70c0b3800..7c17f17ea2cd2 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -7,7 +7,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))