lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Dec 2022 16:59:41 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Rong Tao <rtoax@...mail.com>
Cc:     linux-kbuild@...r.kernel.org, Rong Tao <rongtao@...tc.cn>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:BPF [MISC]" <bpf@...r.kernel.org>
Subject: Re: [PATCH] kbuild: Fix compilation error

On Sat, Dec 17, 2022 at 4:07 PM Rong Tao <rtoax@...mail.com> wrote:
>
> From: Rong Tao <rongtao@...tc.cn>
>
> In the absence of a CONFIG_FUNCTION_ALIGNMENT defined,

Does it happen in the mainline kernel?


CONFIG_FUNCTION_ALIGNMENT is always defined
as far as I understood arch/Kconfig.












> -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 <rongtao@...tc.cn>
> ---
>  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
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ