diff mbox series

Makefile: Don't try to add '-fcatch-undefined-behavior' flag

Message ID 20190509114824.25866-1-natechancellor@gmail.com (mailing list archive)
State New, archived
Headers show
Series Makefile: Don't try to add '-fcatch-undefined-behavior' flag | expand

Commit Message

Nathan Chancellor May 9, 2019, 11:48 a.m. UTC
This is no longer a valid option in clang, it was removed in 3.5, which
we don't support.

https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---

Let me know if you want this incremental to your patch. I figured it
made more sense to remove this then do the cc-option/cc-disable-warning
removal because it will simplify the commit message.

 Makefile | 1 -
 1 file changed, 1 deletion(-)

Comments

Masahiro Yamada May 9, 2019, 1:33 p.m. UTC | #1
On Thu, May 9, 2019 at 8:49 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This is no longer a valid option in clang, it was removed in 3.5, which
> we don't support.
>
> https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4
>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Let me know if you want this incremental to your patch.

No problem. I will rebase mine on top of this.

> I figured it
> made more sense to remove this then do the cc-option/cc-disable-warning
> removal because it will simplify the commit message.

Yes, I agree!


Thanks.
Sedat Dilek May 9, 2019, 1:49 p.m. UTC | #2
On Thu, May 9, 2019 at 1:49 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This is no longer a valid option in clang, it was removed in 3.5, which
> we don't support.
>
> https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4
>

Cool.

Can you test with -mglobal-merge (inverted -mno-global-merge) which is
default for Clang?
I could build, link and boot with my llvm-toolchain (incl. lld-9) on x86-64.

Maybe this is also no more needed?

Thanks.

- Sedat -

> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Let me know if you want this incremental to your patch. I figured it
> made more sense to remove this then do the cc-option/cc-disable-warning
> removal because it will simplify the commit message.
>
>  Makefile | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index d24f5a8009ee..e4788eb2c9b9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -740,7 +740,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
>  # source of a reference will be _MergedGlobals and not on of the whitelisted names.
>  # See modpost pattern 2
>  KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
> -KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
>  else
>
>  # These warnings generated too much noise in a regular build.
> --
> 2.21.0
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To post to this group, send email to clang-built-linux@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20190509114824.25866-1-natechancellor%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
Nick Desaulniers May 9, 2019, 5:01 p.m. UTC | #3
> On Thu, May 9, 2019 at 1:49 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > This is no longer a valid option in clang, it was removed in 3.5, which
> > we don't support.
> >
> > https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4

lol, good catch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> >
>
> Cool.
>
> Can you test with -mglobal-merge (inverted -mno-global-merge) which is
> default for Clang?

Looks like these were added in r234668 in 2015, which would've been
Clang 3.6.2, according to:
http://releases.llvm.org/

I'd be fine with dropping the option check there.

There's a few here (-Qunused-arguments) that don't need cc-option
checks.  I recommend someone audit all of them, rather than send a
bunch of little patches.
Masahiro Yamada May 13, 2019, 2:23 a.m. UTC | #4
On Thu, May 9, 2019 at 8:49 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This is no longer a valid option in clang, it was removed in 3.5, which
> we don't support.
>
> https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4
>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Let me know if you want this incremental to your patch. I figured it
> made more sense to remove this then do the cc-option/cc-disable-warning
> removal because it will simplify the commit message.

Applied to linux-kbuild.
Thanks.


>  Makefile | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index d24f5a8009ee..e4788eb2c9b9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -740,7 +740,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
>  # source of a reference will be _MergedGlobals and not on of the whitelisted names.
>  # See modpost pattern 2
>  KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
> -KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
>  else
>
>  # These warnings generated too much noise in a regular build.
> --
> 2.21.0
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index d24f5a8009ee..e4788eb2c9b9 100644
--- a/Makefile
+++ b/Makefile
@@ -740,7 +740,6 @@  KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
 # source of a reference will be _MergedGlobals and not on of the whitelisted names.
 # See modpost pattern 2
 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
-KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
 else
 
 # These warnings generated too much noise in a regular build.