* [PATCH v2 09/14] s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64
2023-01-12 3:04 [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Nathan Chancellor
@ 2023-01-12 3:05 ` Nathan Chancellor
2023-01-12 3:05 ` [PATCH v2 10/14] s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64 Nathan Chancellor
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-01-12 3:05 UTC (permalink / raw)
To: masahiroy
Cc: ndesaulniers, nicolas, trix, linux-kbuild, llvm,
Nathan Chancellor, Heiko Carstens, Sven Schnelle, linux-s390
When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it
warns:
clang-16: error: argument unused during compilation: '-s' [-Werror,-Wunused-command-line-argument]
The compiler's '-s' flag is a linking option (it is passed along to the
linker directly), which means it does nothing when the linker is not
invoked by the compiler. The kernel builds all .o files with '-c', which
stops the compilation pipeline before linking, so '-s' can be safely
dropped from KBUILD_AFLAGS_64.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
---
Cc: linux-s390@vger.kernel.org
---
arch/s390/kernel/vdso64/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index 9e2b95a222a9..a2fe9383d452 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -22,7 +22,7 @@ KBUILD_AFLAGS += -DBUILD_VDSO
KBUILD_CFLAGS += -DBUILD_VDSO -DDISABLE_BRANCH_PROFILING
KBUILD_AFLAGS_64 := $(filter-out -m64,$(KBUILD_AFLAGS))
-KBUILD_AFLAGS_64 += -m64 -s
+KBUILD_AFLAGS_64 += -m64
KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 10/14] s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64
2023-01-12 3:04 [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Nathan Chancellor
2023-01-12 3:05 ` [PATCH v2 09/14] s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64 Nathan Chancellor
@ 2023-01-12 3:05 ` Nathan Chancellor
2023-01-12 3:05 ` [PATCH v2 11/14] s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags Nathan Chancellor
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-01-12 3:05 UTC (permalink / raw)
To: masahiroy
Cc: ndesaulniers, nicolas, trix, linux-kbuild, llvm,
Nathan Chancellor, Heiko Carstens, Sven Schnelle, linux-s390
When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it
points out that there is a linking phase flag added to CFLAGS, which
will only be used for compiling
clang-16: error: argument unused during compilation: '-shared' [-Werror,-Wunused-command-line-argument]
'-shared' is already present in ldflags-y so it can just be dropped.
Fixes: 2b2a25845d53 ("s390/vdso: Use $(LD) instead of $(CC) to link vDSO")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
---
Cc: linux-s390@vger.kernel.org
---
arch/s390/kernel/vdso64/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index a2fe9383d452..34f9542636e9 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -25,7 +25,7 @@ KBUILD_AFLAGS_64 := $(filter-out -m64,$(KBUILD_AFLAGS))
KBUILD_AFLAGS_64 += -m64
KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
-KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
+KBUILD_CFLAGS_64 += -m64 -fPIC -fno-common -fno-builtin
ldflags-y := -fPIC -shared -soname=linux-vdso64.so.1 \
--hash-style=both --build-id=sha1 -T
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 11/14] s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags
2023-01-12 3:04 [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Nathan Chancellor
2023-01-12 3:05 ` [PATCH v2 09/14] s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64 Nathan Chancellor
2023-01-12 3:05 ` [PATCH v2 10/14] s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64 Nathan Chancellor
@ 2023-01-12 3:05 ` Nathan Chancellor
2023-01-22 17:28 ` [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Masahiro Yamada
2023-01-23 13:58 ` Naresh Kamboju
4 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2023-01-12 3:05 UTC (permalink / raw)
To: masahiroy
Cc: ndesaulniers, nicolas, trix, linux-kbuild, llvm,
Nathan Chancellor, Heiko Carstens, Sven Schnelle, linux-s390
When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it
warns while building objects in the purgatory folder:
clang-16: error: argument unused during compilation: '-MD' [-Werror,-Wunused-command-line-argument]
'-MMD' is always passed to the preprocessor via c_flags, even when
KBUILD_CFLAGS is overridden in a folder, so clang complains the addition
of '-MD' will be unused. Remove '-MD' to clear up this warning, as it is
unnecessary with '-MMD'.
Additionally, '-c' is also unnecessary, remove it while in the area.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
---
Cc: linux-s390@vger.kernel.org
---
arch/s390/purgatory/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index d237bc6841cb..32573b4f9bd2 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -24,7 +24,7 @@ KCSAN_SANITIZE := n
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
-KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
+KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
2023-01-12 3:04 [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Nathan Chancellor
` (2 preceding siblings ...)
2023-01-12 3:05 ` [PATCH v2 11/14] s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags Nathan Chancellor
@ 2023-01-22 17:28 ` Masahiro Yamada
2023-01-23 13:58 ` Naresh Kamboju
4 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2023-01-22 17:28 UTC (permalink / raw)
To: Nathan Chancellor
Cc: ndesaulniers, nicolas, trix, linux-kbuild, llvm, tglx, mingo, bp,
dave.hansen, x86, kernel test robot, Thomas Bogendoerfer,
Philippe Mathieu-Daudé, linux-mips, mpe, npiggin,
christophe.leroy, linuxppc-dev, Segher Boessenkool,
Heiko Carstens, Sven Schnelle, linux-s390, Alex Deucher, amd-gfx,
dri-devel
On Thu, Jan 12, 2023 at 12:05 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi all,
>
> Clang can emit a few different warnings when it encounters a flag that it
> recognizes but does not support internally. These warnings are elevated to
> errors within {as,cc}-option via -Werror to catch unsupported flags that should
> not be added to KBUILD_{A,C}FLAGS; see commit c3f0d0bc5b01 ("kbuild, LLVMLinux:
> Add -Werror to cc-option to support clang").
>
> If an unsupported flag is unconditionally to KBUILD_{A,C}FLAGS, all subsequent
> {as,cc}-option will always fail, preventing supported and even potentially
> necessary flags from getting adding to the tool flags.
>
> One would expect these warnings to be visible in the kernel build logs since
> they are added to KBUILD_{A,C}FLAGS but unfortunately, these warnings are
> hidden with clang's -Qunused-arguments flag, which is added to KBUILD_CPPFLAGS
> and used for both compiling and assembling files.
>
> Patches 1-4 address the internal inconsistencies of invoking the assembler
> within kbuild by using KBUILD_AFLAGS consistently and using '-x
> assembler-with-cpp' over '-x assembler'. This matches how assembly files are
> built across the kernel and helps avoid problems in situations where macro
> definitions or warning flags are present in KBUILD_AFLAGS, which cause
> instances of -Wunused-command-line-argument when the preprocessor is not called
> to consume them. There were a couple of places in architecture code where this
> change would break things so those are fixed first.
>
> Patches 5-12 clean up warnings that will show up when -Qunused-argument is
> dropped. I hope none of these are controversial.
>
> Patch 13 turns two warnings into errors so that the presence of unused flags
> cannot be easily ignored.
>
> Patch 14 drops -Qunused-argument. This is done last so that it can be easily
> reverted if need be.
>
> This series has seen my personal test framework, which tests several different
> configurations and architectures, with LLVM tip of tree (16.0.0). I have done
> defconfig, allmodconfig, and allnoconfig builds for arm, arm64, i386, mips,
> powerpc, riscv, s390, and x86_64 with GCC 12.2.0 as well but I am hoping the
> rest of the test infrastructure will catch any lurking problems.
>
> I would like this series to stay together so that there is no opportunity for
> breakage so please consider giving acks so that this can be carried via the
> kbuild tree (and many thanks to the people who have already provided such
> tags).
All applied to linux-kbuild. Thanks.
I left small comments in 07/14.
> ---
> Changes in v2:
> - Pick up tags where provided (thank you everyone!)
> - Patch 6 and 9: Clarify that '-s' is a compiler flag that is only relevant to
> the linking phase and remove all mention of the assembler's '-s' flag, as the
> assembler is never directly invoked (Nick, Segher)
> - Patch 7: Move '-z noexecstack' into new ldflags-y variable (Nick)
> - Patch 8: Reword commit message to explain the problem in a clearer manner
> (Nick)
> - Link to v1: https://lore.kernel.org/r/20221228-drop-qunused-arguments-v1-0-658cbc8fc592@kernel.org
>
> ---
> Nathan Chancellor (12):
> MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT
> MIPS: Prefer cc-option for additions to cflags
> powerpc: Remove linker flag from KBUILD_AFLAGS
> powerpc/vdso: Remove unused '-s' flag from ASFLAGS
> powerpc/vdso: Improve linker flags
> powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang
> s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64
> s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64
> s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags
> drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang
> kbuild: Turn a couple more of clang's unused option warnings into errors
> kbuild: Stop using '-Qunused-arguments' with clang
>
> Nick Desaulniers (2):
> x86/boot/compressed: prefer cc-option for CFLAGS additions
> kbuild: Update assembler calls to use proper flags and language target
>
> Makefile | 1 -
> arch/mips/Makefile | 13 ++-------
> arch/mips/include/asm/asmmacro-32.h | 4 +--
> arch/mips/include/asm/asmmacro.h | 42 ++++++++++++++---------------
> arch/mips/include/asm/fpregdef.h | 14 ----------
> arch/mips/include/asm/mipsregs.h | 20 +++-----------
> arch/mips/kernel/genex.S | 2 +-
> arch/mips/kernel/r2300_fpu.S | 4 +--
> arch/mips/kernel/r4k_fpu.S | 12 ++++-----
> arch/mips/kvm/fpu.S | 6 ++---
> arch/mips/loongson2ef/Platform | 2 +-
> arch/powerpc/Makefile | 2 +-
> arch/powerpc/kernel/vdso/Makefile | 25 +++++++++++------
> arch/s390/kernel/vdso64/Makefile | 4 +--
> arch/s390/purgatory/Makefile | 2 +-
> arch/x86/boot/compressed/Makefile | 2 +-
> drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 ++-
> scripts/Kconfig.include | 2 +-
> scripts/Makefile.clang | 2 ++
> scripts/Makefile.compiler | 8 +++---
> scripts/as-version.sh | 2 +-
> 21 files changed, 74 insertions(+), 98 deletions(-)
> ---
> base-commit: 88603b6dc419445847923fcb7fe5080067a30f98
> change-id: 20221228-drop-qunused-arguments-0c5c7dae54fb
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
2023-01-12 3:04 [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Nathan Chancellor
` (3 preceding siblings ...)
2023-01-22 17:28 ` [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS Masahiro Yamada
@ 2023-01-23 13:58 ` Naresh Kamboju
2023-01-23 16:11 ` Nathan Chancellor
4 siblings, 1 reply; 8+ messages in thread
From: Naresh Kamboju @ 2023-01-23 13:58 UTC (permalink / raw)
To: Nathan Chancellor
Cc: masahiroy, ndesaulniers, nicolas, trix, linux-kbuild, llvm, tglx,
mingo, bp, dave.hansen, x86, kernel test robot,
Thomas Bogendoerfer, Philippe Mathieu-Daudé, linux-mips, mpe,
npiggin, christophe.leroy, linuxppc-dev, Segher Boessenkool,
Heiko Carstens, Sven Schnelle, linux-s390, Alex Deucher, amd-gfx,
dri-devel, lkft-triage
Hi Nathan,
On Thu, 12 Jan 2023 at 08:35, Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi all,
>
> Clang can emit a few different warnings when it encounters a flag that it
> recognizes but does not support internally. These warnings are elevated to
> errors within {as,cc}-option via -Werror to catch unsupported flags that should
> not be added to KBUILD_{A,C}FLAGS; see commit c3f0d0bc5b01 ("kbuild, LLVMLinux:
> Add -Werror to cc-option to support clang").
>
> If an unsupported flag is unconditionally to KBUILD_{A,C}FLAGS, all subsequent
> {as,cc}-option will always fail, preventing supported and even potentially
> necessary flags from getting adding to the tool flags.
>
> One would expect these warnings to be visible in the kernel build logs since
> they are added to KBUILD_{A,C}FLAGS but unfortunately, these warnings are
> hidden with clang's -Qunused-arguments flag, which is added to KBUILD_CPPFLAGS
> and used for both compiling and assembling files.
>
> Patches 1-4 address the internal inconsistencies of invoking the assembler
> within kbuild by using KBUILD_AFLAGS consistently and using '-x
> assembler-with-cpp' over '-x assembler'. This matches how assembly files are
> built across the kernel and helps avoid problems in situations where macro
> definitions or warning flags are present in KBUILD_AFLAGS, which cause
> instances of -Wunused-command-line-argument when the preprocessor is not called
> to consume them. There were a couple of places in architecture code where this
> change would break things so those are fixed first.
>
> Patches 5-12 clean up warnings that will show up when -Qunused-argument is
> dropped. I hope none of these are controversial.
>
> Patch 13 turns two warnings into errors so that the presence of unused flags
> cannot be easily ignored.
>
> Patch 14 drops -Qunused-argument. This is done last so that it can be easily
> reverted if need be.
>
> This series has seen my personal test framework, which tests several different
> configurations and architectures, with LLVM tip of tree (16.0.0). I have done
> defconfig, allmodconfig, and allnoconfig builds for arm, arm64, i386, mips,
> powerpc, riscv, s390, and x86_64 with GCC 12.2.0 as well but I am hoping the
> rest of the test infrastructure will catch any lurking problems.
>
> I would like this series to stay together so that there is no opportunity for
> breakage so please consider giving acks so that this can be carried via the
> kbuild tree (and many thanks to the people who have already provided such
> tags).
>
> ---
> Changes in v2:
> - Pick up tags where provided (thank you everyone!)
> - Patch 6 and 9: Clarify that '-s' is a compiler flag that is only relevant to
> the linking phase and remove all mention of the assembler's '-s' flag, as the
> assembler is never directly invoked (Nick, Segher)
> - Patch 7: Move '-z noexecstack' into new ldflags-y variable (Nick)
> - Patch 8: Reword commit message to explain the problem in a clearer manner
> (Nick)
> - Link to v1: https://lore.kernel.org/r/20221228-drop-qunused-arguments-v1-0-658cbc8fc592@kernel.org
>
> ---
> Nathan Chancellor (12):
> MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT
> MIPS: Prefer cc-option for additions to cflags
> powerpc: Remove linker flag from KBUILD_AFLAGS
> powerpc/vdso: Remove unused '-s' flag from ASFLAGS
> powerpc/vdso: Improve linker flags
> powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang
> s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64
> s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64
> s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags
> drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang
> kbuild: Turn a couple more of clang's unused option warnings into errors
> kbuild: Stop using '-Qunused-arguments' with clang
>
> Nick Desaulniers (2):
> x86/boot/compressed: prefer cc-option for CFLAGS additions
> kbuild: Update assembler calls to use proper flags and language target
>
> Makefile | 1 -
> arch/mips/Makefile | 13 ++-------
> arch/mips/include/asm/asmmacro-32.h | 4 +--
> arch/mips/include/asm/asmmacro.h | 42 ++++++++++++++---------------
> arch/mips/include/asm/fpregdef.h | 14 ----------
> arch/mips/include/asm/mipsregs.h | 20 +++-----------
> arch/mips/kernel/genex.S | 2 +-
> arch/mips/kernel/r2300_fpu.S | 4 +--
> arch/mips/kernel/r4k_fpu.S | 12 ++++-----
> arch/mips/kvm/fpu.S | 6 ++---
> arch/mips/loongson2ef/Platform | 2 +-
> arch/powerpc/Makefile | 2 +-
> arch/powerpc/kernel/vdso/Makefile | 25 +++++++++++------
> arch/s390/kernel/vdso64/Makefile | 4 +--
> arch/s390/purgatory/Makefile | 2 +-
> arch/x86/boot/compressed/Makefile | 2 +-
> drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 ++-
> scripts/Kconfig.include | 2 +-
> scripts/Makefile.clang | 2 ++
> scripts/Makefile.compiler | 8 +++---
> scripts/as-version.sh | 2 +-
> 21 files changed, 74 insertions(+), 98 deletions(-)
FYI,
[ please provide comments, feedback and improvements on build/ ltp smoke tests ]
LKFT test farm have fetched your patch series [1]
[PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
[1] https://lore.kernel.org/llvm/20221228-drop-qunused-arguments-v2-0-9adbddd20d86@kernel.org/
Following build warnings and errors reported.
sh:
gcc-11-defconfig — FAIL
gcc-11-shx3_defconfig — FAIL
https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221835/suite/build/tests/
mainline getting passed.
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-defconfig/history/
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-shx3_defconfig/history/
Build error:
In function 'follow_pmd_mask',
inlined from 'follow_pud_mask' at /builds/linux/mm/gup.c:735:9,
inlined from 'follow_p4d_mask' at /builds/linux/mm/gup.c:752:9,
inlined from 'follow_page_mask' at /builds/linux/mm/gup.c:809:9:
/builds/linux/include/linux/compiler_types.h:358:45: error: call to
'__compiletime_assert_263' declared with attribute error: Unsupported
access size for {READ,WRITE}_ONCE().
358 | _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
s390:
clang-15-defconfig — FAIL
https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221913/suite/build/tests/
mainline getting passed.
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14300495/suite/build/test/clang-15-defconfig/history/
Build error:
make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM_IAS=0 ARCH=s390
CROSS_COMPILE=s390x-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache
clang'
`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
defined in discarded section `.exit.text' of fs/fuse/inode.o
`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
defined in discarded section `.exit.text' of fs/fuse/inode.o
`.exit.text' referenced in section `__bug_table' of crypto/algboss.o:
defined in discarded section `.exit.text' of crypto/algboss.o
`.exit.text' referenced in section `__bug_table' of drivers/scsi/sd.o:
defined in discarded section `.exit.text' of drivers/scsi/sd.o
`.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
defined in discarded section `.exit.text' of drivers/md/md.o
`.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
defined in discarded section `.exit.text' of drivers/md/md.o
`.exit.text' referenced in section `.altinstructions' of
drivers/md/md.o: defined in discarded section `.exit.text' of
drivers/md/md.o
`.exit.text' referenced in section `.altinstructions' of
drivers/md/md.o: defined in discarded section `.exit.text' of
drivers/md/md.o
`.exit.text' referenced in section `.altinstructions' of
net/iucv/iucv.o: defined in discarded section `.exit.text' of
net/iucv/iucv.o
`.exit.text' referenced in section `__bug_table' of
drivers/s390/cio/qdio_thinint.o: defined in discarded section
`.exit.text' of drivers/s390/cio/qdio_thinint.o
`.exit.text' referenced in section `__bug_table' of
drivers/s390/net/qeth_l3_main.o: defined in discarded section
`.exit.text' of drivers/s390/net/qeth_l3_main.o
`.exit.text' referenced in section `__bug_table' of
drivers/s390/net/qeth_l3_main.o: defined in discarded section
`.exit.text' of drivers/s390/net/qeth_l3_main.o
s390x-linux-gnu-ld: BFD (GNU Binutils for Debian) 2.35.2 assertion
fail ../../bfd/elf64-s390.c:3349
make[2]: *** [/builds/linux/scripts/Makefile.vmlinux:34: vmlinux] Error 1
But,
Build and boot pass on arm64, arm, x86_64 and i386.
Build test performed for mips, parisc, riscv, s390, sh, sparc and
powerpc (known build errors for maple_defconfig and cell_defconfig),
Please refer following link for detailed build, boot, LTP smoketest.
https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/?failures_only=false&results_layout=table#!#test-results
Best regards
Naresh Kamboju
--
Linaro LKFT
https://lkft.linaro.org
> ---
> base-commit: 88603b6dc419445847923fcb7fe5080067a30f98
> change-id: 20221228-drop-qunused-arguments-0c5c7dae54fb
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
2023-01-23 13:58 ` Naresh Kamboju
@ 2023-01-23 16:11 ` Nathan Chancellor
2023-01-24 15:29 ` Naresh Kamboju
0 siblings, 1 reply; 8+ messages in thread
From: Nathan Chancellor @ 2023-01-23 16:11 UTC (permalink / raw)
To: Naresh Kamboju
Cc: masahiroy, ndesaulniers, nicolas, trix, linux-kbuild, llvm, tglx,
mingo, bp, dave.hansen, x86, kernel test robot,
Thomas Bogendoerfer, Philippe Mathieu-Daudé, linux-mips, mpe,
npiggin, christophe.leroy, linuxppc-dev, Segher Boessenkool,
Heiko Carstens, Sven Schnelle, linux-s390, Alex Deucher, amd-gfx,
dri-devel, lkft-triage
Hi Naresh,
On Mon, Jan 23, 2023 at 07:28:10PM +0530, Naresh Kamboju wrote:
> FYI,
> [ please provide comments, feedback and improvements on build/ ltp smoke tests ]
>
> LKFT test farm have fetched your patch series [1]
> [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
> [1] https://lore.kernel.org/llvm/20221228-drop-qunused-arguments-v2-0-9adbddd20d86@kernel.org/
Thank you a lot for testing this series, it is much appreciated!
It looks like this was applied on top of 6.2-rc3 if I am reading your
logs right but your mainline testing is recent, 6.2-rc5. I think the
errors you are seeing here are just existing mainline regressions that
were later fixed.
> Following build warnings and errors reported.
>
> sh:
> gcc-11-defconfig — FAIL
> gcc-11-shx3_defconfig — FAIL
> https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221835/suite/build/tests/
>
> mainline getting passed.
> https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-defconfig/history/
> https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-shx3_defconfig/history/
>
> Build error:
> In function 'follow_pmd_mask',
> inlined from 'follow_pud_mask' at /builds/linux/mm/gup.c:735:9,
> inlined from 'follow_p4d_mask' at /builds/linux/mm/gup.c:752:9,
> inlined from 'follow_page_mask' at /builds/linux/mm/gup.c:809:9:
> /builds/linux/include/linux/compiler_types.h:358:45: error: call to
> '__compiletime_assert_263' declared with attribute error: Unsupported
> access size for {READ,WRITE}_ONCE().
> 358 | _compiletime_assert(condition, msg,
> __compiletime_assert_, __COUNTER__)
I think this was fixed with mainline commit 526970be53d5 ("sh/mm: Fix
pmd_t for real"), released in 6.2-rc4. You can see a previous build
failing in the same manner:
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc3-9-g5a41237ad1d4/testrun/14056384/suite/build/tests/
> s390:
> clang-15-defconfig — FAIL
> https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221913/suite/build/tests/
>
> mainline getting passed.
> https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14300495/suite/build/test/clang-15-defconfig/history/
>
> Build error:
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM_IAS=0 ARCH=s390
> CROSS_COMPILE=s390x-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache
> clang'
> `.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
> defined in discarded section `.exit.text' of fs/fuse/inode.o
> `.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
> defined in discarded section `.exit.text' of fs/fuse/inode.o
> `.exit.text' referenced in section `__bug_table' of crypto/algboss.o:
> defined in discarded section `.exit.text' of crypto/algboss.o
> `.exit.text' referenced in section `__bug_table' of drivers/scsi/sd.o:
> defined in discarded section `.exit.text' of drivers/scsi/sd.o
> `.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
> defined in discarded section `.exit.text' of drivers/md/md.o
> `.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
> defined in discarded section `.exit.text' of drivers/md/md.o
> `.exit.text' referenced in section `.altinstructions' of
> drivers/md/md.o: defined in discarded section `.exit.text' of
> drivers/md/md.o
> `.exit.text' referenced in section `.altinstructions' of
> drivers/md/md.o: defined in discarded section `.exit.text' of
> drivers/md/md.o
> `.exit.text' referenced in section `.altinstructions' of
> net/iucv/iucv.o: defined in discarded section `.exit.text' of
> net/iucv/iucv.o
> `.exit.text' referenced in section `__bug_table' of
> drivers/s390/cio/qdio_thinint.o: defined in discarded section
> `.exit.text' of drivers/s390/cio/qdio_thinint.o
> `.exit.text' referenced in section `__bug_table' of
> drivers/s390/net/qeth_l3_main.o: defined in discarded section
> `.exit.text' of drivers/s390/net/qeth_l3_main.o
> `.exit.text' referenced in section `__bug_table' of
> drivers/s390/net/qeth_l3_main.o: defined in discarded section
> `.exit.text' of drivers/s390/net/qeth_l3_main.o
> s390x-linux-gnu-ld: BFD (GNU Binutils for Debian) 2.35.2 assertion
> fail ../../bfd/elf64-s390.c:3349
> make[2]: *** [/builds/linux/scripts/Makefile.vmlinux:34: vmlinux] Error 1
This should be fixed with mainline commit a494398bde27 ("s390: define
RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36"), released in
6.2-rc4 as well. Same as before, visible in mainline at one point
without this series:
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc3-9-g5a41237ad1d4/testrun/14057142/suite/build/tests/
> But,
> Build and boot pass on arm64, arm, x86_64 and i386.
> Build test performed for mips, parisc, riscv, s390, sh, sparc and
> powerpc (known build errors for maple_defconfig and cell_defconfig),
Good to hear!
Please consider retesting this series on top of 6.2-rc5 or testing the
current kbuild tree, which has this series applied in it:
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=for-next
Cheers,
Nathan
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
2023-01-23 16:11 ` Nathan Chancellor
@ 2023-01-24 15:29 ` Naresh Kamboju
0 siblings, 0 replies; 8+ messages in thread
From: Naresh Kamboju @ 2023-01-24 15:29 UTC (permalink / raw)
To: Nathan Chancellor
Cc: masahiroy, ndesaulniers, nicolas, trix, linux-kbuild, llvm, tglx,
mingo, bp, dave.hansen, x86, kernel test robot,
Thomas Bogendoerfer, Philippe Mathieu-Daudé, linux-mips, mpe,
npiggin, christophe.leroy, linuxppc-dev, Segher Boessenkool,
Heiko Carstens, Sven Schnelle, linux-s390, Alex Deucher, amd-gfx,
dri-devel, lkft-triage, Anders Roxell
Hi Nathan,
On Mon, 23 Jan 2023 at 21:41, Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi Naresh,
>
> On Mon, Jan 23, 2023 at 07:28:10PM +0530, Naresh Kamboju wrote:
> > FYI,
> > [ please provide comments, feedback and improvements on build/ ltp smoke tests ]
> >
> > LKFT test farm have fetched your patch series [1]
> > [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS
> > [1] https://lore.kernel.org/llvm/20221228-drop-qunused-arguments-v2-0-9adbddd20d86@kernel.org/
>
> Thank you a lot for testing this series, it is much appreciated!
>
> It looks like this was applied on top of 6.2-rc3 if I am reading your
> logs right but your mainline testing is recent, 6.2-rc5. I think the
> errors you are seeing here are just existing mainline regressions that
> were later fixed.
>
> > Following build warnings and errors reported.
> >
> > sh:
> > gcc-11-defconfig — FAIL
> > gcc-11-shx3_defconfig — FAIL
> > https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221835/suite/build/tests/
> >
> > mainline getting passed.
> > https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-defconfig/history/
> > https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14298156/suite/build/test/gcc-11-shx3_defconfig/history/
> >
> > Build error:
> > In function 'follow_pmd_mask',
> > inlined from 'follow_pud_mask' at /builds/linux/mm/gup.c:735:9,
> > inlined from 'follow_p4d_mask' at /builds/linux/mm/gup.c:752:9,
> > inlined from 'follow_page_mask' at /builds/linux/mm/gup.c:809:9:
> > /builds/linux/include/linux/compiler_types.h:358:45: error: call to
> > '__compiletime_assert_263' declared with attribute error: Unsupported
> > access size for {READ,WRITE}_ONCE().
> > 358 | _compiletime_assert(condition, msg,
> > __compiletime_assert_, __COUNTER__)
>
> I think this was fixed with mainline commit 526970be53d5 ("sh/mm: Fix
> pmd_t for real"), released in 6.2-rc4. You can see a previous build
> failing in the same manner:
>
> https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc3-9-g5a41237ad1d4/testrun/14056384/suite/build/tests/
>
> > s390:
> > clang-15-defconfig — FAIL
> > https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/https___lore_kernel_org_llvm_20221228-drop-qunused-arguments-v2-1-9adbddd20d86_kernel_org/testrun/14221913/suite/build/tests/
> >
> > mainline getting passed.
> > https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc5/testrun/14300495/suite/build/test/clang-15-defconfig/history/
> >
> > Build error:
> > make --silent --keep-going --jobs=8
> > O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM_IAS=0 ARCH=s390
> > CROSS_COMPILE=s390x-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache
> > clang'
> > `.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
> > defined in discarded section `.exit.text' of fs/fuse/inode.o
> > `.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
> > defined in discarded section `.exit.text' of fs/fuse/inode.o
> > `.exit.text' referenced in section `__bug_table' of crypto/algboss.o:
> > defined in discarded section `.exit.text' of crypto/algboss.o
> > `.exit.text' referenced in section `__bug_table' of drivers/scsi/sd.o:
> > defined in discarded section `.exit.text' of drivers/scsi/sd.o
> > `.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
> > defined in discarded section `.exit.text' of drivers/md/md.o
> > `.exit.text' referenced in section `__jump_table' of drivers/md/md.o:
> > defined in discarded section `.exit.text' of drivers/md/md.o
> > `.exit.text' referenced in section `.altinstructions' of
> > drivers/md/md.o: defined in discarded section `.exit.text' of
> > drivers/md/md.o
> > `.exit.text' referenced in section `.altinstructions' of
> > drivers/md/md.o: defined in discarded section `.exit.text' of
> > drivers/md/md.o
> > `.exit.text' referenced in section `.altinstructions' of
> > net/iucv/iucv.o: defined in discarded section `.exit.text' of
> > net/iucv/iucv.o
> > `.exit.text' referenced in section `__bug_table' of
> > drivers/s390/cio/qdio_thinint.o: defined in discarded section
> > `.exit.text' of drivers/s390/cio/qdio_thinint.o
> > `.exit.text' referenced in section `__bug_table' of
> > drivers/s390/net/qeth_l3_main.o: defined in discarded section
> > `.exit.text' of drivers/s390/net/qeth_l3_main.o
> > `.exit.text' referenced in section `__bug_table' of
> > drivers/s390/net/qeth_l3_main.o: defined in discarded section
> > `.exit.text' of drivers/s390/net/qeth_l3_main.o
> > s390x-linux-gnu-ld: BFD (GNU Binutils for Debian) 2.35.2 assertion
> > fail ../../bfd/elf64-s390.c:3349
> > make[2]: *** [/builds/linux/scripts/Makefile.vmlinux:34: vmlinux] Error 1
>
> This should be fixed with mainline commit a494398bde27 ("s390: define
> RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36"), released in
> 6.2-rc4 as well. Same as before, visible in mainline at one point
> without this series:
>
> https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.2-rc3-9-g5a41237ad1d4/testrun/14057142/suite/build/tests/
>
> > But,
> > Build and boot pass on arm64, arm, x86_64 and i386.
> > Build test performed for mips, parisc, riscv, s390, sh, sparc and
> > powerpc (known build errors for maple_defconfig and cell_defconfig),
>
> Good to hear!
>
> Please consider retesting this series on top of 6.2-rc5 or testing the
> current kbuild tree, which has this series applied in it:
This is the perfect place to test.
> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=for-next
Build test pass on arm, arm64, i386, mips, parisc, powerpc, riscv, s390, sh,
sparc and x86_64.
Boot and LTP smoke pass on qemu-arm64, qemu-armv7, qemu-i386 and qemu-x86_64.
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Please refer to the following link for details of testing.
https://qa-reports.linaro.org/~anders.roxell/linux-mainline-patches/build/linux-kbuild_masahiroy-branch-kbuild-20230124/?failures_only=false&results_layout=table#!#test-results
metadata:
git_describe : v6.2-rc5-46-ga778c9dd138b
git_repo : https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git_sha : a778c9dd138b4f4410779705b444d58ce6f8fc44
git_short_log : a778c9dd138b ("builddeb: clean generated package content")
--
Linaro LKFT
https://lkft.linaro.org
>
> Cheers,
> Nathan
^ permalink raw reply [flat|nested] 8+ messages in thread