From patchwork Sat Dec 17 07:03:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rong Tao X-Patchwork-Id: 13075784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 013C3C4332F for ; Sat, 17 Dec 2022 07:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiLQHTR (ORCPT ); Sat, 17 Dec 2022 02:19:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiLQHTR (ORCPT ); Sat, 17 Dec 2022 02:19:17 -0500 X-Greylist: delayed 939 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 16 Dec 2022 23:19:14 PST Received: from out203-205-221-245.mail.qq.com (out203-205-221-245.mail.qq.com [203.205.221.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 837F046642 for ; Fri, 16 Dec 2022 23:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1671261552; bh=qNPme23sRfuoZh5wT71WmCg74RkrBQR8L1HFucUJqQg=; h=From:To:Cc:Subject:Date; b=FZu4nFYiITZExBlOhEI+h/YCakv/+s/YC03duiVPmg3HydEgFeAhF5qP+2MsY28i0 visSVjlEHLapjzAKRvnfPlGPUlCZlMEeL3d2Yp6tX7yl17hf0SdzrKxxbb2FoWVJoh DkUj1L0+7Z07djC3/xdcnVnt4/5mbnBStY5pDBG8= Received: from rtoax.. ([111.199.188.149]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id DCB7CC9; Sat, 17 Dec 2022 15:03:28 +0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kPtJ00w== From: Rong Tao To: masahiroy@kernel.org Cc: linux-kbuild@vger.kernel.org, Rong Tao , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kernel@vger.kernel.org (open list), bpf@vger.kernel.org (open list:BPF [MISC]) Subject: [PATCH] kbuild: Fix compilation error Date: Sat, 17 Dec 2022 15:03:18 +0800 X-OQ-MSGID: <20221217070319.18331-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Rong Tao In the absence of a CONFIG_FUNCTION_ALIGNMENT defined, -falign-functions= will be given a null value, which results in a compilation error, as follows: $ make -C samples/bpf/ ... CC /home/sdb/Git/linux/samples/bpf/syscall_nrs.s gcc: error: missing argument to ‘-falign-functions=’ make[2]: *** [scripts/Makefile.build:118: /home/sdb/Git/linux/samples /bpf/syscall_nrs.s] Error 1 make[1]: *** [Makefile:1996: /home/sdb/Git/linux/samples/bpf] Error 2 make[1]: Leaving directory '/home/sdb/Git/linux' make: *** [Makefile:269: all] Error 2 Signed-off-by: Rong Tao --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 6aa709df6bde..57cce4c8f8a2 100644 --- a/Makefile +++ b/Makefile @@ -1006,9 +1006,11 @@ KBUILD_CFLAGS += $(CC_FLAGS_CFI) export CC_FLAGS_CFI endif +ifdef CONFIG_FUNCTION_ALIGNMENT ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0) KBUILD_CFLAGS += -falign-functions=$(CONFIG_FUNCTION_ALIGNMENT) endif +endif # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc