Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3853732rwb; Sat, 17 Dec 2022 00:16:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Dyhnr+OIRbRfCuBI0c/Kvv94uEeMusMWv9RdkpfeSRLalIXdN7yYuhx+g//eJV0wd9GaG X-Received: by 2002:a17:90a:a894:b0:219:8e37:3d81 with SMTP id h20-20020a17090aa89400b002198e373d81mr36261336pjq.14.1671265013529; Sat, 17 Dec 2022 00:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671265013; cv=none; d=google.com; s=arc-20160816; b=VOfXHshX+s5Rr+3dvTKR7oj9tvPpLJiTBGcO3z9Ytw6DajazpPFlYLlWuELfalYOs8 7lw7W8sWUihiu1Kj/5mcNcbWN5oWULORIqB58aB12iPhQRt5mO2CY+EoLhLV7ksbvzY8 czNqeEEun1wCBd8vLayCApKYMBy8ITfiFe7L3A49LQWqzMMOCltj8YqX8YiE5HBUiSlN OtKC44kTacokVhKNjkOA9oqUH+C1Zf9U+pqXZC+mg4Lok0nCWmkZtsxSRN0oezYAe0Fx +xNoiSJF6pxlJUYQEMdFz9wt96ZihytUigYaKbWfMlzQSX1sOSxML4N6dBovOCtnjqut INIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :subject:cc:to:from:message-id:dkim-signature; bh=qNPme23sRfuoZh5wT71WmCg74RkrBQR8L1HFucUJqQg=; b=WKWErVxDuN4WGtkzrHzC8WEv0Ascl0a2uELeeOZav6C4VESigY2q5rsPYsCLC52wpP uXNn81padk74RMTuNrLWt8rT4SFVqL6C04VXEXWjRULnfBgO4I6cuhYblexS8qn85OgR nT0gQKWJWgkCoe2Y/MaiXx2zElAjGHUdqNUF1wMWNfco3SZw+sNymId7aLlXgjuuXLsC faaFfpPoSrNfxUMxgX78OXbbUfsWq3XTNiPxf/7PHDTM10ssQd772Fs82TtB8xnW0fh5 7Yt5YN9kTkJy5OnfWNJbuJlzGsT+vLpKQgW6BCZlEmG/r0k0ZXxImSIuwmB4e8fkKt+e mjlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=KxSV7Rou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb1-20020a17090ae7c100b00219738f4d3dsi11669920pjb.136.2022.12.17.00.16.40; Sat, 17 Dec 2022 00:16:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=KxSV7Rou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbiLQHHB (ORCPT + 70 others); Sat, 17 Dec 2022 02:07:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiLQHG7 (ORCPT ); Sat, 17 Dec 2022 02:06:59 -0500 Received: from out162-62-57-64.mail.qq.com (out162-62-57-64.mail.qq.com [162.62.57.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A40EC3B9FC for ; Fri, 16 Dec 2022 23:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1671260811; bh=qNPme23sRfuoZh5wT71WmCg74RkrBQR8L1HFucUJqQg=; h=From:To:Cc:Subject:Date; b=KxSV7RouGnBGIBn030RaXFw/DrdQ8xtwR4NbKP+Z2ItkaYrNCajP/uO4YpJEVI+mn H+ZFeXxLH1ghAfx62qQ69tMWlEalDS9Grez6QMT7iNm0zrqdfoXYhalQXyuJS+V4z6 agRm/mtPFkWW2vSd+4Zu6SjtvvnmcAbYMjml8Iqo= Received: from rtoax.. ([111.199.188.149]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id DCB7CC9; Sat, 17 Dec 2022 15:03:28 +0800 X-QQ-mid: xmsmtpt1671260608t8uzpjr6z Message-ID: X-QQ-XMAILINFO: Mm/8i8/T4yne7jDl1XJl/TzZjZik7sj8e1EHqrLVkaLp4DVV33nWJ6iwpCMpUh azceIv7JFW8GnKjG3GeU/09D0/P47r43xawCn9CVCqwOy3SaZ4LJtZCFTyyHPI/LijsQikeOHwWs AYnMLcNl+UkrzaaDThXSh3bxQVXbwnlNrSfQsGLfKIIl4nKjI/J2Ja12/RIqn10jnjpjOpPmTiMP WG/wLgLxB3el4y87Rx0yPRImgDYm3hIJuoj9UpD5ZIyh8896T1Go479yovAElJsKDE4reGigHQSV M+VhAorZoYuh3am1j+wVHYLkLnmAKAo8y5kl0MgQRz26lr7eZfQ1RuiVK+Gr4Qt8/qpe6FCIdyaU K7S/SRSesAEvCk9lCu7gFSBJpkjgiQSS43trnyEHDh6aK7tpHF4MtMOep+jHwXati8mlspBbl9rw UQLBePJvflbZ7Wi/hafU+4gFD9fh1u2WetzoQBdXiGSVgKBharQy4OEXkDtnQHzS+AU4H6AFfb9A GnBkCt6XCT0i61pdjXAyQrqu0pEOHPDw5wblLHRZ5NhmyjN3F9id8FznvVdG2/Kbr0NmbkuBQvLL EgLlci8v3ONPa7Fvx/PdPAKg4cz6/EZd8T0dPFfZZTkjCy7QQCHGPi78VOo2yg4Py7qLMNuebRZ/ 10r55qnz+SA8dAtno09cK4meNvy3sSfzSm5G0as+XtZRTR4Ybv0hVigOO7KvfB0fRRZaYBUdHv+S vZzn29h8LNp/JgnXIu6JHR9yWcTQe7znhxVnnI2q3SVo5+bCofKbvYh6Or6eT3s7qqftbwbVb27i hyR1QpNW9EJUZEvoI+cWeGlGtSoz+/x4FjNqnzj0chR3rY7JoV7Q7d13q/08Bpkn0E0XgmB38Xdu sBVpyLBAagW/rQ3vd9Pmj/UfwkPj7x0whVdhuQstzx3bDoxbtEd2mGEfC0tfBFEVnnzeifKsSEvQ Cdq0QHk1bU5kToBdBcakwEJhPEhQXNGTKUIUA+nStgCA8kPtJ00w== 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 -- 2.38.1