Re: [PATCH] Makefile: fix GDB warning with CONFIG_RELR

2021-03-23 Thread Nathan Chancellor
On Thu, Mar 18, 2021 at 05:07:06PM -0700, Nick Desaulniers wrote: > GDB produces the following warning when debugging kernels built with > CONFIG_RELR: > > BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' > > when loading a kernel built with CONFIG_RELR into GDB. It can

[PATCH] Makefile: fix GDB warning with CONFIG_RELR

2021-03-18 Thread Nick Desaulniers
GDB produces the following warning when debugging kernels built with CONFIG_RELR: BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' when loading a kernel built with CONFIG_RELR into GDB. It can also prevent debugging symbols using such relocations. Peter sugguests: [Th

RE: [PATCH] Makefile: LTO: have linker check -Wframe-larger-than

2021-03-15 Thread David Laight
From: Nick Desaulniers > Sent: 12 March 2021 17:55 > > On Thu, Mar 11, 2021 at 5:09 PM Nick Desaulniers > wrote: > > > > -Wframe-larger-than= requires stack frame information, which the > > frontend cannot provide. This diagnostic is emitted late during > > compilation once stack frame size is av

Re: [PATCH] Makefile: LTO: have linker check -Wframe-larger-than

2021-03-12 Thread Nick Desaulniers
On Fri, Mar 12, 2021 at 9:55 AM Nick Desaulniers wrote: > > On Thu, Mar 11, 2021 at 5:09 PM Nick Desaulniers > wrote: > > > > -Wframe-larger-than= requires stack frame information, which the > > frontend cannot provide. This diagnostic is emitted late during > > compilation once stack frame size

Re: [PATCH] Makefile: LTO: have linker check -Wframe-larger-than

2021-03-12 Thread Nick Desaulniers
On Thu, Mar 11, 2021 at 5:09 PM Nick Desaulniers wrote: > > -Wframe-larger-than= requires stack frame information, which the > frontend cannot provide. This diagnostic is emitted late during > compilation once stack frame size is available. > > When building with LTO, the frontend simply lowers C

[PATCH] Makefile: LTO: have linker check -Wframe-larger-than

2021-03-11 Thread Nick Desaulniers
-Wframe-larger-than= requires stack frame information, which the frontend cannot provide. This diagnostic is emitted late during compilation once stack frame size is available. When building with LTO, the frontend simply lowers C to LLVM IR and does not have stack frame information, so it cannot e

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-24 Thread Nathan Chancellor
On Wed, Feb 24, 2021 at 12:14:04PM +0900, Masahiro Yamada wrote: > On Sat, Feb 6, 2021 at 12:46 PM Sedat Dilek wrote: > > > > On Sat, Feb 6, 2021 at 2:49 AM Masahiro Yamada wrote: > > > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > > Linux wrote: > > > > > > > > I n

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-23 Thread Masahiro Yamada
On Sat, Feb 6, 2021 at 12:46 PM Sedat Dilek wrote: > > On Sat, Feb 6, 2021 at 2:49 AM Masahiro Yamada wrote: > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > I noticed we're invoking $(CC) via $(shell) more than once to check the > > > versio

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-23 Thread Masahiro Yamada
On Wed, Feb 24, 2021 at 5:10 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Fri, Feb 5, 2021 at 5:49 PM Masahiro Yamada wrote: > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > I noticed we're invoking $(CC) via $(shell) more than o

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-23 Thread Nick Desaulniers
On Fri, Feb 5, 2021 at 5:49 PM Masahiro Yamada wrote: > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > I noticed we're invoking $(CC) via $(shell) more than once to check the > > version. Let's reuse the first string captured in $CC_VERSION_TEXT. > > >

Re: [PATCH] Makefile: Remove # characters from compiler string

2021-02-16 Thread Masahiro Yamada
On Wed, Feb 17, 2021 at 6:33 AM Nathan Chancellor wrote: > > When using AMD's Optimizing C/C++ Compiler (AOCC), the build fails due > to a # character in the version string, which is interpreted as a > comment: > > $ make CC=clang defconfig init/main.o > include/config/auto.conf.cmd:1374: *** inva

[PATCH] Makefile: Remove # characters from compiler string

2021-02-16 Thread Nathan Chancellor
When using AMD's Optimizing C/C++ Compiler (AOCC), the build fails due to a # character in the version string, which is interpreted as a comment: $ make CC=clang defconfig init/main.o include/config/auto.conf.cmd:1374: *** invalid syntax in conditional. Stop. $ sed -n 1374p include/config/auto.co

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-05 Thread Sedat Dilek
On Sat, Feb 6, 2021 at 2:49 AM Masahiro Yamada wrote: > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > I noticed we're invoking $(CC) via $(shell) more than once to check the > > version. Let's reuse the first string captured in $CC_VERSION_TEXT. > > >

Re: [PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-05 Thread Masahiro Yamada
On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > I noticed we're invoking $(CC) via $(shell) more than once to check the > version. Let's reuse the first string captured in $CC_VERSION_TEXT. > > Fixes: 315bab4e972d ("kbuild: fix endless syncconfig in case arch Ma

[PATCH] Makefile: reuse CC_VERSION_TEXT

2021-02-05 Thread Nick Desaulniers
I noticed we're invoking $(CC) via $(shell) more than once to check the version. Let's reuse the first string captured in $CC_VERSION_TEXT. Fixes: 315bab4e972d ("kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILE") Signed-off-by: Nick Desaulniers --- Makefile | 14 +++-

Re: [PATCH] Makefile: Remove Module.symvers when make clean

2020-12-21 Thread Masahiro Yamada
On Tue, Dec 22, 2020 at 12:00 PM Tiezhu Yang wrote: > > Module.symvers still exists when make clean, remove it. > > Signed-off-by: Tiezhu Yang NACK. Module.symver is removed by "make mrproper" since it is needed for building external modules. > --- > Makefile | 2 +- > 1 file changed, 1 in

[PATCH] Makefile: Remove Module.symvers when make clean

2020-12-21 Thread Tiezhu Yang
Module.symvers still exists when make clean, remove it. Signed-off-by: Tiezhu Yang --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e30cf02..8235bb7 100644 --- a/Makefile +++ b/Makefile @@ -1468,7 +1468,7 @@ endif # CONFIG_MODULES # Di

Re: [PATCH] Makefile: Add {kvm_guest,xen}.config targets to make help's output

2020-12-17 Thread Borislav Petkov
On Thu, Dec 17, 2020 at 09:47:07PM +0900, Masahiro Yamada wrote: > I do not want to touch scripts/kconfig/Makefile > every time somebody adds a new file to > kernel/configs/*.config or arch/$(ARCH)/configs/*.config Because that happens so often and somehow burdens your maintenance effort impossibl

Re: [PATCH] Makefile: Add {kvm_guest,xen}.config targets to make help's output

2020-12-17 Thread Masahiro Yamada
On Thu, Dec 17, 2020 at 9:18 PM Borislav Petkov wrote: > > From: Borislav Petkov > > Add the targets which add Kconfig items to the .config so that the > kernel can be run as a guest, to the main 'make help' output so that > they can be found easier and there's no need to grep the tree each time

[PATCH] Makefile: Add {kvm_guest,xen}.config targets to make help's output

2020-12-17 Thread Borislav Petkov
From: Borislav Petkov Add the targets which add Kconfig items to the .config so that the kernel can be run as a guest, to the main 'make help' output so that they can be found easier and there's no need to grep the tree each time to remember what they should be called. Signed-off-by: Borislav Pe

[PATCH] ./Makefile: consider PAGER for `make help'

2020-09-29 Thread Dirk Gouders
`make help' outputs more than a screenfull of lines. In case a user has PAGER defined in his environment, she most likely wants it to be used in such situations. Signed-off-by: Dirk Gouders --- Makefile | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 992d244

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-09-02 Thread Masahiro Yamada
On Thu, Sep 3, 2020 at 7:40 AM Nick Desaulniers wrote: > > On Fri, Aug 21, 2020 at 10:14 PM Masahiro Yamada wrote: > > > > On Fri, Aug 21, 2020 at 7:10 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > While moving Android kernels over to use LLVM=1, we observe the failure > > >

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-09-02 Thread Nick Desaulniers
On Fri, Aug 21, 2020 at 10:14 PM Masahiro Yamada wrote: > > On Fri, Aug 21, 2020 at 7:10 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > While moving Android kernels over to use LLVM=1, we observe the failure > > when building in a hermetic docker image: > > HOSTCC scripts/basic/f

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-08-21 Thread Masahiro Yamada
On Fri, Aug 21, 2020 at 7:10 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > While moving Android kernels over to use LLVM=1, we observe the failure > when building in a hermetic docker image: > HOSTCC scripts/basic/fixdep > clang: error: unable to execute command: Executable "ld" doesn'

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-08-20 Thread Nathan Chancellor
On Thu, Aug 20, 2020 at 03:09:55PM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > While moving Android kernels over to use LLVM=1, we observe the failure > when building in a hermetic docker image: > HOSTCC scripts/basic/fixdep > clang: error: unable to execute command: Executable "ld

[PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-08-20 Thread Nick Desaulniers
While moving Android kernels over to use LLVM=1, we observe the failure when building in a hermetic docker image: HOSTCC scripts/basic/fixdep clang: error: unable to execute command: Executable "ld" doesn't exist! The is because the build of the host utility fixdep builds the fixdep executable

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-19 Thread Michael Witten
The quick RFC patch I just proposed in the parent email is broken in its implementation. I will submit an updated version soon. Michael Witten (Tue, 18 Aug 2020 22:05:00 -): > I think there's an important distinction to make between > the following 2 kinds of code: > > * The curated code pe

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-18 Thread Michael Witten
I think there's an important distinction to make between the following 2 kinds of code: * The curated code people just want to build. * The new patches that maintainers are reviewing. Certainly, maintainers should have a wide range of tools at their disposal to probe the quality of a patch; t

RE: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-18 Thread David Laight
> I'm a big fan of -Wdeclaration-after-statement and I think C++ style > mixed variables/statements code has several disadvantages: Agreed. Personally I think declarations should either be either right at the top of a function or in a very small code block. Otherwise they are annoying to find. Y

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Ingo Molnar
* Linus Torvalds wrote: > On Mon, Aug 17, 2020 at 3:09 PM Pavel Machek wrote: > > > > Submitter believes "wild variable placement" can help with > > #ifdefs.. and that may be actually good tradeoff. > > I agree that it can help in some cases. > > But it can also make it really hard to find t

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Linus Torvalds
On Mon, Aug 17, 2020 at 3:09 PM Pavel Machek wrote: > > Submitter believes "wild variable placement" can help with > #ifdefs.. and that may be actually good tradeoff. I agree that it can help in some cases. But it can also make it really hard to find the variable declarations in other cases. I'v

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Pavel Machek
On Mon 2020-08-17 14:29:37, Linus Torvalds wrote: > On Mon, Aug 17, 2020 at 2:15 PM Eric W. Biederman > wrote: > > > > Does anyone remember why we added this warning? I had always thought > > it's purpose was to ensure we stayed within our chosen dialect of C. > > As far as I'm concerned, that'

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Linus Torvalds
On Mon, Aug 17, 2020 at 2:15 PM Eric W. Biederman wrote: > > Does anyone remember why we added this warning? I had always thought > it's purpose was to ensure we stayed within our chosen dialect of C. As far as I'm concerned, that's the primary motivation. I'm not seeing why we'd suddenly allow

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Eric W. Biederman
Pavel Machek writes: > Hi! > >> > This is not just a matter of style; this is a matter of semantics, >> > especially with regard to: >> > >> > * const Correctness. >> > A const-declared variable must be initialized when defined. >> > >> > * Conditional Compilation. >> > When there i

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Pavel Machek
Hi! > > This is not just a matter of style; this is a matter of semantics, > > especially with regard to: > > > > * const Correctness. > > A const-declared variable must be initialized when defined. > > > > * Conditional Compilation. > > When there is complex interaction between comp

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Pavel Machek
On Sun 2020-08-16 21:19:23, Joe Perches wrote: > On Mon, 2020-08-17 at 03:37 +, Michael Witten wrote: > > Matters of style should probably not be enforced by the build > > infrastructure; style is a matter for the maintainer to enforce: > > I rather doubt style advice should be taken from

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-17 Thread Michael Witten
Joe Perches (Sun, 16 Aug 2020 10:56:53 -0700): > On Mon, 2020-08-17 at 03:37 +, Michael Witten wrote: >> Matters of style should probably not be enforced by >> the build infrastructure; style is a matter for the >> maintainer to enforce: > > I rather doubt style advice should be tak

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-16 Thread Joe Perches
On Mon, 2020-08-17 at 03:37 +, Michael Witten wrote: > Matters of style should probably not be enforced by the build > infrastructure; style is a matter for the maintainer to enforce: I rather doubt style advice should be taken from someone who right justifies fixed pitch block text. chee

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-16 Thread Michael Witten
Joe Perches (Sun, 16 Aug 2020 10:56:53 -0700): > I rather prefer block declarations instead of > sprinkling declarations around with code. Hey, we all have our guilty pleasures. Fortunately, even with this patch, you'd still be able to indulge in your preferred style, or even enforce it among co

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-16 Thread Joe Perches
On Sun, 2020-08-16 at 16:35 +, Michael Witten wrote: > Requiring every declaration to be at the top of a block is an > antiquated, vestigial naivete from a time when C was just a > glorified abstraction over conventional patterns in assembly > programming. I rather prefer block declarations in

Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-16 Thread Al Viro
On Sun, Aug 16, 2020 at 04:35:00PM -, Michael Witten wrote: > This is not just a matter of style; this is a matter of semantics, > especially with regard to: > > * const Correctness. > A const-declared variable must be initialized when defined. > > * Conditional Compilation. > Whe

[PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

2020-08-16 Thread Michael Witten
This is not just a matter of style; this is a matter of semantics, especially with regard to: * const Correctness. A const-declared variable must be initialized when defined. * Conditional Compilation. When there is complex interaction between compile-time configuration options, i

Re: [RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-23 Thread Feng Tang
On Thu, Jul 23, 2020 at 05:57:04PM -0700, Andrew Morton wrote: > On Thu, 23 Jul 2020 14:29:33 +0800 Feng Tang wrote: > > > > > gcc has an option '-falign-functions=n' to force text aligned, and with > > > > that option enabled, some of those performance changes will be gone, > > > > like [1][2][3

Re: [RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-23 Thread Andrew Morton
On Thu, 23 Jul 2020 14:29:33 +0800 Feng Tang wrote: > > > gcc has an option '-falign-functions=n' to force text aligned, and with > > > that option enabled, some of those performance changes will be gone, > > > like [1][2][3]. > > > > > > Add this option so that developers and 0day can easily fi

Re: [RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-22 Thread Feng Tang
On Wed, Jul 22, 2020 at 08:39:19PM -0700, Andrew Morton wrote: > On Thu, 23 Jul 2020 11:30:01 +0800 Feng Tang wrote: > > > Recently 0day reported many strange performance changes (regression > > or improvement), in which there was no obvious relation between > > the culprit commit and the benchma

Re: [RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-22 Thread Feng Tang
Hi Andrew, Thanks for the review. On Wed, Jul 22, 2020 at 08:39:19PM -0700, Andrew Morton wrote: > On Thu, 23 Jul 2020 11:30:01 +0800 Feng Tang wrote: > > > Recently 0day reported many strange performance changes (regression > > or improvement), in which there was no obvious relation between >

Re: [RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-22 Thread Andrew Morton
On Thu, 23 Jul 2020 11:30:01 +0800 Feng Tang wrote: > Recently 0day reported many strange performance changes (regression > or improvement), in which there was no obvious relation between > the culprit commit and the benchmark at the first look, and it causes > people to doubt the test itself is

[RFC PATCH] makefile: add debug option to enable function aligned on 32 bytes

2020-07-22 Thread Feng Tang
Recently 0day reported many strange performance changes (regression or improvement), in which there was no obvious relation between the culprit commit and the benchmark at the first look, and it causes people to doubt the test itself is wrong. Upon further check, many of these cases are caused by

Re: [PATCH] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-20 Thread Fangrui Song
On 2020-07-20, Nick Desaulniers wrote: On Mon, Jul 20, 2020 at 11:16 AM Nathan Chancellor wrote: On Mon, Jul 20, 2020 at 11:12:22AM -0700, Fangrui Song wrote: > When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if > $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-, > GCC_TOOL

Re: [PATCH] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-20 Thread Nick Desaulniers
On Mon, Jul 20, 2020 at 11:16 AM Nathan Chancellor wrote: > > On Mon, Jul 20, 2020 at 11:12:22AM -0700, Fangrui Song wrote: > > When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if > > $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-, > > GCC_TOOLCHAIN_DIR will be set to /usr/bin

Re: [PATCH] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-20 Thread Nathan Chancellor
On Mon, Jul 20, 2020 at 11:12:22AM -0700, Fangrui Song wrote: > When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if > $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-, > GCC_TOOLCHAIN_DIR will be set to /usr/bin/. --prefix= will be set to > /usr/bin/ and Clang as of 11 will sear

[PATCH] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-20 Thread Fangrui Song
When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-, GCC_TOOLCHAIN_DIR will be set to /usr/bin/. --prefix= will be set to /usr/bin/ and Clang as of 11 will search for both $(prefix)aarch64-linux-gnu-$needle and $(prefix)$needle.

[RFC PATCH] Makefile: Add "-eudyptula" string in EXTRAVERSION

2020-07-16 Thread Dhiraj Sharma
I am doing eudyptula assigned tasks to get selected as a mentee. I am using LDF103 course knowledge and loving it. I used git log for Makefile and ran checkpatch.pl on my patch as to follow the same commit process guidelines. I hope you will like it. Signed-off-by: Dhiraj Sharma Suggested-by: L

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-11 Thread Arvind Sankar
On Thu, Jun 11, 2020 at 02:09:21PM -0700, Nick Desaulniers wrote: > On Wed, Jun 10, 2020 at 4:30 PM Arvind Sankar wrote: > > > > Yes, the gcc driver reports an error when deciding what to pass to the > > assembler for -gz=zlib, if it was configured with a linker that does not > > support the flag.

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-11 Thread Arvind Sankar
On Thu, Jun 11, 2020 at 01:44:53PM -0700, Nick Desaulniers wrote: > On Wed, Jun 10, 2020 at 4:39 PM Arvind Sankar wrote: > > > > On Wed, Jun 10, 2020 at 07:30:46PM -0400, Arvind Sankar wrote: > > > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote: > > > > > > No, as-option does inv

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-11 Thread Nick Desaulniers
On Wed, Jun 10, 2020 at 4:30 PM Arvind Sankar wrote: > > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote: > > On Wed, Jun 10, 2020 at 12:11 PM Arvind Sankar > > wrote: > > > > > > Commit > > > 10e68b02c861 ("Makefile: support compressed debug info") > > > added support for com

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-11 Thread Nick Desaulniers
On Wed, Jun 10, 2020 at 4:39 PM Arvind Sankar wrote: > > On Wed, Jun 10, 2020 at 07:30:46PM -0400, Arvind Sankar wrote: > > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote: > > > > No, as-option does invoke the assembler. The problem here is that with > > -Wa, the option is only s

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-10 Thread Arvind Sankar
On Wed, Jun 10, 2020 at 07:30:46PM -0400, Arvind Sankar wrote: > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote: > > No, as-option does invoke the assembler. The problem here is that with > -Wa, the option is only seen by the assembler, not the gcc driver. So it > will succeed be

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-10 Thread Arvind Sankar
On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote: > On Wed, Jun 10, 2020 at 12:11 PM Arvind Sankar wrote: > > > > Commit > > 10e68b02c861 ("Makefile: support compressed debug info") > > added support for compressed debug sections. > > > > Support is detected by checking > > - doe

Re: [PATCH] Makefile: Improve compressed debug info support detection

2020-06-10 Thread Nick Desaulniers
On Wed, Jun 10, 2020 at 12:11 PM Arvind Sankar wrote: > > Commit > 10e68b02c861 ("Makefile: support compressed debug info") > added support for compressed debug sections. > > Support is detected by checking > - does the compiler support -gz=zlib > - does the assembler support --compressed-debug-

[PATCH] Makefile: Improve compressed debug info support detection

2020-06-10 Thread Arvind Sankar
Commit 10e68b02c861 ("Makefile: support compressed debug info") added support for compressed debug sections. Support is detected by checking - does the compiler support -gz=zlib - does the assembler support --compressed-debug-sections=zlib - does the linker support --compressed-debug-sections=zl

Re: [PATCH] Makefile: support compressed debug info

2020-05-14 Thread Nick Clifton
Hi Nick, > + Nick, H.J. > I'm unfamiliar with the git tag conventions of binutils. Does a patch > that landed in 2.25.51.0.4 mean it shipped in the official 2.25 > release, or 2.26 release? Specifically, commit 19a7fe52ae3d. 2.26. The convention is that a released form of the binutils has a ve

Re: [PATCH] Makefile: support compressed debug info

2020-05-13 Thread Nick Desaulniers
On Tue, May 12, 2020 at 1:01 PM Fangrui Song wrote: > > >Fangrui, I wasn't able to easily find what version of binutils first > >added support. Can you please teach me how to fish? > > I actually downloaded https://ftp.gnu.org/gnu/binutils/ archives and > located the sources... I think an easier

Re: [PATCH] Makefile: support compressed debug info

2020-05-13 Thread Sedat Dilek
On Wed, May 13, 2020 at 4:52 AM Masahiro Yamada wrote: > > Nick, > > On Wed, May 13, 2020 at 4:23 AM Nick Desaulniers > wrote: > > > > On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada > > wrote: > > > > > > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > > > > wrote: > > > > >> > > > > >

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Masahiro Yamada
Nick, On Wed, May 13, 2020 at 4:23 AM Nick Desaulniers wrote: > > On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada wrote: > > > > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > > > wrote: > > > >> > > > >> As debug information gets larger and larger, it helps significantly > > > >> save

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Sedat Dilek
On Tue, May 12, 2020 at 10:01 PM Fangrui Song wrote: > > On 2020-05-12, Nick Desaulniers wrote: ... > >I have a patch series that enables dwarf5 support in the kernel that > >I'm working up to. I wanted to send this first. Both roughly reduce > >the debug info size by 20% each, though I haven't

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Sedat Dilek
On Tue, May 12, 2020 at 9:23 PM Nick Desaulniers wrote: > > On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada wrote: > > > > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > > > wrote: > > > >> > > > >> As debug information gets larger and larger, it helps significantly > > > >> save > > >

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Fangrui Song
On 2020-05-12, Nick Desaulniers wrote: On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada wrote: > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > wrote: > >> > >> As debug information gets larger and larger, it helps significantly save > >> the size of vmlinux images to compress the inform

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Nick Desaulniers
On Mon, May 11, 2020 at 10:54 PM Masahiro Yamada wrote: > > > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > > wrote: > > >> > > >> As debug information gets larger and larger, it helps significantly save > > >> the size of vmlinux images to compress the information in the debug > > >> infor

Re: [PATCH] Makefile: support compressed debug info

2020-05-12 Thread Sedat Dilek
On Tue, May 12, 2020 at 7:47 AM Masahiro Yamada wrote: > > Hi Sedat, > > > On Tue, May 5, 2020 at 1:25 AM Sedat Dilek wrote: > > > > On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > wrote: > > > > > > As debug information gets larger and larger, it helps significantly save > > > the size of v

Re: [PATCH] Makefile: support compressed debug info

2020-05-11 Thread Masahiro Yamada
On Tue, May 5, 2020 at 9:47 AM Fangrui Song wrote: > > > On 2020-05-04, Sedat Dilek wrote: > >On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > > wrote: > >> > >> As debug information gets larger and larger, it helps significantly save > >> the size of vmlinux images to compress the information in

Re: [PATCH] Makefile: support compressed debug info

2020-05-11 Thread Masahiro Yamada
Hi Sedat, On Tue, May 5, 2020 at 1:25 AM Sedat Dilek wrote: > > On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers > wrote: > > > > As debug information gets larger and larger, it helps significantly save > > the size of vmlinux images to compress the information in the debug > > information secti

Re: [PATCH] Makefile: support compressed debug info

2020-05-04 Thread Fangrui Song
On 2020-05-04, Sedat Dilek wrote: On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers wrote: As debug information gets larger and larger, it helps significantly save the size of vmlinux images to compress the information in the debug information sections. Note: this debug info is typically split

Re: [PATCH] Makefile: support compressed debug info

2020-05-04 Thread Sedat Dilek
On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers wrote: > > As debug information gets larger and larger, it helps significantly save > the size of vmlinux images to compress the information in the debug > information sections. Note: this debug info is typically split off from > the final compressed

[PATCH] Makefile: support compressed debug info

2020-05-03 Thread Nick Desaulniers
As debug information gets larger and larger, it helps significantly save the size of vmlinux images to compress the information in the debug information sections. Note: this debug info is typically split off from the final compressed kernel image, which is why vmlinux is what's used in conjunction

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough to -Wimplicit-fallthrough=2

2019-08-30 Thread Gustavo A. R. Silva
On 8/29/19 7:02 AM, Michal Suchanek wrote: > From gcc documentation: > > -Wimplicit-fallthrough=0 > disables the warning altogether. > -Wimplicit-fallthrough=1 > matches .* regular expression, any comment is used as fallthrough comment. > -Wimplicit-fallthrough=2 > case insensitively matc

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough to -Wimplicit-fallthrough=2

2019-08-30 Thread Miguel Ojeda
On Fri, Aug 30, 2019 at 1:09 PM Joe Perches wrote: > > On Thu, 2019-08-29 at 14:02 +0200, Michal Suchanek wrote: > > In particular the default value of 3 does not match the comments like > > /* falls through to do foobar */ > > How many comments are there like this in the kernel? +1 Given we are

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough to -Wimplicit-fallthrough=2

2019-08-30 Thread Joe Perches
On Thu, 2019-08-29 at 14:02 +0200, Michal Suchanek wrote: > In particular the default value of 3 does not match the comments like > /* falls through to do foobar */ How many comments are there like this in the kernel? Also you have to deal with gcc/clang differences. As far as I know, clang doesn

[PATCH] Makefile: Convert -Wimplicit-fallthrough to -Wimplicit-fallthrough=2

2019-08-29 Thread Michal Suchanek
>From gcc documentation: -Wimplicit-fallthrough=0 disables the warning altogether. -Wimplicit-fallthrough=1 matches .* regular expression, any comment is used as fallthrough comment. -Wimplicit-fallthrough=2 case insensitively matches .*falls?[ \t-]*thr(ough|u).* regular expression. -Wimplic

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-26 Thread Geert Uytterhoeven
Hi Linus, On Wed, Aug 21, 2019 at 2:41 AM Linus Torvalds wrote: > On Tue, Aug 20, 2019 at 4:37 PM Joe Perches wrote: > > > So I'm putting my foot down on yet another broken string copy > > > interface from people who do not understand this fundamental issue. > > > > I think you are mistaken abou

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Willy Tarreau
On Tue, Aug 20, 2019 at 05:43:27PM -0700, Linus Torvalds wrote: > I would seriously suggest doing something like > >copy_string( dst, dstsize, src, srcsize, FLAGS ); > > where FLAGS migth be "pad" or whatever. Make it return the size of the > resulting string, because while it can be convenie

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Linus Torvalds
On Tue, Aug 20, 2019 at 5:20 PM Joe Perches wrote: > > Umm, btw: have you actually looked at stracpy? Yes, Joe, I have. What part of "there are now so many of them that no human being can keep track of them" didn't you see as a problem? How many broken string functions are we going to do, addin

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Linus Torvalds
On Tue, Aug 20, 2019 at 4:37 PM Joe Perches wrote: > > > So I'm putting my foot down on yet another broken string copy > > interface from people who do not understand this fundamental issue. > > I think you are mistaken about the stracpy limits as > the only limit is not the source size but the de

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Stephen Rothwell
Hi Joe, On Mon, 19 Aug 2019 17:08:00 -0700 Joe Perches wrote: > > A few examples: > > 1: a patch just to MAINTAINERS done via bash script: > > https://lore.kernel.org/lkml/904551f1f198ffac9a0f9c3c99aa966b0a7c76c1.ca...@perches.com/ > > $ git grep -h "^[FX]:" MAINTAINERS | \ > cut -f2- | grep

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Joe Perches
On Tue, 2019-08-20 at 16:28 -0700, Linus Torvalds wrote: > On Mon, Aug 19, 2019 at 5:08 PM Joe Perches wrote: > > 2: would be Julia Lawall's stracpy change done > > with coccinelle: (attached) > > I'm not actually convinced about stracpy() and friends. > > It seems to be yet another badly though

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Joe Perches
On Tue, 2019-08-20 at 16:28 -0700, Linus Torvalds wrote: > On Mon, Aug 19, 2019 at 5:08 PM Joe Perches wrote: > > 2: would be Julia Lawall's stracpy change done > > with coccinelle: (attached) > > I'm not actually convinced about stracpy() and friends. > > It seems to be yet another badly though

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-20 Thread Linus Torvalds
On Mon, Aug 19, 2019 at 5:08 PM Joe Perches wrote: > > 2: would be Julia Lawall's stracpy change done > with coccinelle: (attached) I'm not actually convinced about stracpy() and friends. It seems to be yet another badly thought out string interface, and there are now so many of them that no hum

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-19 Thread Joe Perches
On Tue, 2019-08-20 at 09:24 +1000, Stephen Rothwell wrote: > Hi Joe, Hi Stephen > Sorry for the slow response. No worries. thanks for picking up the thread. > On Fri, 16 Aug 2019 12:58:27 -0700 Joe Perches wrote: > > On Sat, 2019-08-10 at 13:33 -0700, Joe Perches wrote: > > > On Sat, 2019-08-1

Re: rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)QUILT

2019-08-19 Thread Stephen Rothwell
Hi Joe, Sorry for the slow response. On Fri, 16 Aug 2019 12:58:27 -0700 Joe Perches wrote: > > On Sat, 2019-08-10 at 13:33 -0700, Joe Perches wrote: > > On Sat, 2019-08-10 at 13:18 -0700, Joe Perches wrote: > [] > > > There are classes of patches generated by scripts that have > > > no real me

rfc: treewide scripted patch mechanism? (was: Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang)

2019-08-16 Thread Joe Perches
On Sat, 2019-08-10 at 13:33 -0700, Joe Perches wrote: > On Sat, 2019-08-10 at 13:18 -0700, Joe Perches wrote: [] > > There are classes of patches generated by scripts that have > > no real mechanism to be applied today. > > > > For instance: global coccinelle scripted changes to use stracpy > > ht

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-16 Thread Joe Perches
(adding Vivien Didelot for vim) On Wed, 2019-08-14 at 19:44 -0700, Joe Perches wrote: > On Tue, 2019-08-13 at 14:44 +0200, Miguel Ojeda wrote: > > Hm... I would go for either __fallthrough as the rest of attributes, > > or simply fallthrough -- FALLTHROUGH seems wrong. If you want it that > > way

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-14 Thread Joe Perches
On Tue, 2019-08-13 at 14:44 +0200, Miguel Ojeda wrote: > Hm... I would go for either __fallthrough as the rest of attributes, > or simply fallthrough -- FALLTHROUGH seems wrong. If you want it that > way for visibility, then I would choose __fallthrough, since the > underscores are quite prominent

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-13 Thread Miguel Ojeda
On Mon, Aug 12, 2019 at 6:29 PM Nick Desaulniers wrote: > > On Sat, Aug 10, 2019 at 8:06 PM Joe Perches wrote: > > > > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > > On a tangential note, how are you planning on doing the fallthrough > > > comment to attribute conversion? The r

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-12 Thread Joe Perches
On Mon, 2019-08-12 at 09:28 -0700, Nick Desaulniers wrote: > Isn't [[fallthrough]] the C++ style attribute? double brackets will likely at some point become the default attribute style for c as well. It is not now though and linux will continue to support gcc 7+ and the __attribute__ style for qu

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-12 Thread Nick Desaulniers
On Sat, Aug 10, 2019 at 8:06 PM Joe Perches wrote: > > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > On a tangential note, how are you planning on doing the fallthrough > > comment to attribute conversion? The reason I ask is clang does not > > support the comment annotations, me

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-11 Thread Joe Perches
On Sat, 2019-08-10 at 20:54 -0700, Joe Perches wrote: > On Sat, 2019-08-10 at 20:17 -0700, Nathan Chancellor wrote: > > On Sat, Aug 10, 2019 at 08:06:05PM -0700, Joe Perches wrote: > > > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > > > On a tangential note, how are you planning o

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Bernd Petrovitsch
On 11/08/2019 05:17, Nathan Chancellor wrote: > On Sat, Aug 10, 2019 at 08:06:05PM -0700, Joe Perches wrote: >> On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: >>> On a tangential note, how are you planning on doing the fallthrough >>> comment to attribute conversion? The reason I ask i

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Joe Perches
On Sat, 2019-08-10 at 20:17 -0700, Nathan Chancellor wrote: > On Sat, Aug 10, 2019 at 08:06:05PM -0700, Joe Perches wrote: > > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > > On a tangential note, how are you planning on doing the fallthrough > > > comment to attribute conversion?

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Nathan Chancellor
On Sat, Aug 10, 2019 at 08:06:05PM -0700, Joe Perches wrote: > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > On a tangential note, how are you planning on doing the fallthrough > > comment to attribute conversion? The reason I ask is clang does not > > support the comment annotati

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Joe Perches
On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > On a tangential note, how are you planning on doing the fallthrough > comment to attribute conversion? The reason I ask is clang does not > support the comment annotations, meaning that when Nathan Huckleberry's > patch is applied to cla

  1   2   3   >