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] [day] [month] [year] [list]
Message-ID: <CAMo8Bf+4qs9O8XhCtbmNP22esuzXuxu3HRWtQbgOWX=hdTSrmQ@mail.gmail.com>
Date:   Sun, 14 Mar 2021 07:33:28 -0700
From:   Max Filippov <jcmvbkbc@...il.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Chris Zankel <chris@...kel.net>,
        "open list:TENSILICA XTENSA PORT (xtensa)" 
        <linux-xtensa@...ux-xtensa.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig

On Sat, Mar 13, 2021 at 4:24 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> Move the definition of CONFIG_CPU_*_ENDIAN to Kconfig, the best place
> for CONFIG options.
>
> I slightly simplified the test code. You can use the -P option to suppress
> linemarker generation. The grep command is unneeded.
>
>   $ echo __XTENSA_EB__ | xtensa-linux-gcc -E -
>   # 1 "<stdin>"
>   # 1 "<built-in>"
>   # 1 "<command-line>"
>   # 1 "<stdin>"
>   1
>
>   $ echo __XTENSA_EB__ | xtensa-linux-gcc -E -P -
>   1
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
>
> Changes in v2:
>  - more cleanups
>
>  arch/xtensa/Kconfig                    | 6 ++++++
>  arch/xtensa/Makefile                   | 9 +--------
>  arch/xtensa/boot/Makefile              | 4 ----
>  arch/xtensa/boot/boot-elf/Makefile     | 6 +-----
>  arch/xtensa/boot/boot-redboot/Makefile | 6 +-----
>  5 files changed, 9 insertions(+), 22 deletions(-)

Thanks. I've made one change and applied both patches to my xtensa tree.

[...]

> diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
> index cf0940708702..f43c731dec89 100644
> --- a/arch/xtensa/Makefile
> +++ b/arch/xtensa/Makefile
> @@ -52,14 +52,7 @@ ifneq ($(CONFIG_LD_NO_RELAX),)
>  KBUILD_LDFLAGS := --no-relax
>  endif
>
> -ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1)
> -CHECKFLAGS += -D__XTENSA_EB__
> -KBUILD_CPPFLAGS += -DCONFIG_CPU_BIG_ENDIAN
> -endif
> -ifeq ($(shell echo __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1)
> -CHECKFLAGS += -D__XTENSA_EL__
> -KBUILD_CPPFLAGS += -DCONFIG_CPU_LITTLE_ENDIAN
> -endif
> +CHECKFLAGS += -D $(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__)

I've removed the space between -D and the $(if ...) to make the result
look like the rest of -D options.

-- 
Thanks.
-- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ