All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: joel@jms.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/math-emu: Fix building with clang
Date: Fri, 2 Nov 2018 09:54:14 -0700	[thread overview]
Message-ID: <CAKwvOdnVr8_bg-ND29PWihzdD_YVcGH6z+0zHZhK8nEv-k0-2A@mail.gmail.com> (raw)
In-Reply-To: <20181102033713.31916-1-joel@jms.id.au>

On Thu, Nov 1, 2018 at 8:37 PM Joel Stanley <joel@jms.id.au> wrote:
>
>   make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-  ppc44x_defconfig
>   make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-
>
>   ...
>
>   arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
>   inline asm context requiring an l-value: remove the cast or build with
>   -fheinous-gnu-extensions
>           FP_ADD_D(R, T, B);
>           ^~~~~~~~~~~~~~~~~
>   ./include/math-emu/double.h:110:27: note: expanded from macro 'FP_ADD_D'
>   #define FP_ADD_D(R,X,Y)                 _FP_ADD(D,2,R,X,Y)
>                                           ^~~~~~~~~~~~~~~~~~
>   ./include/math-emu/op-common.h:367:34: note: expanded from macro '_FP_ADD'
>   #define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+')
>                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   ./include/math-emu/op-common.h:264:4: note: expanded from macro '_FP_ADD_INTERNAL'
>             _FP_FRAC_ADD_##wc(R, X, Y);                                        \
>             ^~~~~~~~~~~~~~~~~~~~~~~~~~
>   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)

^^^ Hi Joel, would you mind recompiling with
`-fmacro-backtrace-limit=0` hacked in and including the full
backtrace?  I'm curious if there's a more appropriate fix, but can't
tell where the inline asm is that clang is complaining about.

>   ./include/math-emu/op-2.h:94:27: note: expanded from macro '_FP_FRAC_ADD_2'
>     __FP_FRAC_ADD_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0)
>     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/260
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  arch/powerpc/math-emu/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/arch/powerpc/math-emu/Makefile b/arch/powerpc/math-emu/Makefile
> index 494df26c5988..b9cb797445ac 100644
> --- a/arch/powerpc/math-emu/Makefile
> +++ b/arch/powerpc/math-emu/Makefile
> @@ -18,3 +18,7 @@ CFLAGS_fabs.o = -fno-builtin-fabs
>  CFLAGS_math.o = -fno-builtin-fabs
>
>  ccflags-y = -I. -Iinclude/math-emu -w
> +
> +ifdef CONFIG_CC_IS_CLANG
> +ccflags-y += -fheinous-gnu-extensions
> +endif
> --
> 2.19.1
>


-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-11-02 16:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02  3:37 [PATCH] powerpc/math-emu: Fix building with clang Joel Stanley
2018-11-02 16:54 ` Nick Desaulniers [this message]
2018-11-12 11:33   ` Joel Stanley
2018-11-12 12:43     ` Segher Boessenkool
2018-11-12 19:17     ` Nick Desaulniers
2018-11-02 17:34 ` Segher Boessenkool
2018-11-02 17:38   ` Nick Desaulniers
2018-11-02 18:44     ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKwvOdnVr8_bg-ND29PWihzdD_YVcGH6z+0zHZhK8nEv-k0-2A@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=joel@jms.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.