From patchwork Thu Aug 20 09:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 248036 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1330615ils; Thu, 20 Aug 2020 05:52:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSMlqZsYLDvkFfjhMA7+KcnTVjpZHvEXpM6bBjUh6CHAPOuDoSmzjlGZ9DwjgAcLX0njNN X-Received: by 2002:a05:6402:16:: with SMTP id d22mr2803704edu.175.1597927965454; Thu, 20 Aug 2020 05:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597927965; cv=none; d=google.com; s=arc-20160816; b=U/KvnfOk6t9Vs+Z+9SUL41KnuAB0PPlHyUr2V7+SyWJFTRiX/JvXd9YMyr/mw7uf/E CqgSkMbJDtyXrv2kQQYAWzDbqqcb6xh0ye/fksz8gYpgvtBIWR+g23biYxuMFKkN2GqN qUJT3AG/IDWAZiB/7r74nE71G5SKBZQyk6LobpDk0vskcHoiT6w+b+1It6kpY+e64GCM SLyO8oPmJwJXSOJU3IRH6iwUJt6jBzRGPQqYx6b4tqmj5y/Ln0jVTqwLm8CWsrnZujCz O8LwYkxKi20gnQJxn1EuCYGTXZFxhZarIB+Ts74mOFnKDFCKE29StesDUjmISsVY3F1Y Fy8g== 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=8vP1cTXftc53h3B5kzGyVLkcNv68HSjuZXFu3P1/Ogg=; b=mmoRIINLjQ7umqL5QKEPzpk5Aghf2cKgXp/XzAYSPrvwRBbA5AASBGkVuYXVf9qIfb +9WdGfiWilnmi3p65m1+FStk3Fgmp+tnODCJPc/SmmZ7/LgzatUxzoxmo2pmS+6YW6I1 wEiwo3k+Mghohaeod+4A+69D0H2Q/5cDzHVuIK/+uiEYz0xVap0RNOps/VZjYv3J7mWS YGAnzOTUKt/ayRRfH4h39UJ+n+i5IFla7Lea1dc5zpRvBiaaL3hbSrxxAO+5j/3eLfju Ko2/yyO9d4LoQu7MPSXSPT2kcZ/PzXfBa2FTv8Ur45FdI0FZURAhmA4nwyvd/RGShLWx sVmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OdRNgbUV; 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 h13si1358734ejl.221.2020.08.20.05.52.45; Thu, 20 Aug 2020 05:52:45 -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=OdRNgbUV; 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 S1730504AbgHTMwm (ORCPT + 15 others); Thu, 20 Aug 2020 08:52:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:41114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728831AbgHTJn1 (ORCPT ); Thu, 20 Aug 2020 05:43:27 -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 A71D5207DE; Thu, 20 Aug 2020 09:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916605; bh=ZSVSCLk6sgVSzJxYcmu3SBHBa8jjlddTn9NVrtyCIvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OdRNgbUV5vTB/Ie41QHPu3E4sy8ISPELdP3wxuoiPUUQTQKQ2k/mKBEOALowkWEQ/ vKZGMtpeGwAZbcOh5E0bSYAq6iI/HLGr5elGdcpac6WIyg9B3Trnx8smJlfQOkRVNY uyK9b8tks8FX4OJTb+NGraetdd+H0jJnILty0Nn4= 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 5.7 186/204] tools build feature: Quote CC and CXX for their arguments Date: Thu, 20 Aug 2020 11:21:23 +0200 Message-Id: <20200820091615.477649993@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091606.194320503@linuxfoundation.org> References: <20200820091606.194320503@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 941cddd5c00cd..82d6c43333fbd 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))