Patch "powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-vdso-remove-an-unsupported-flag-from-vgettim.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a1fd4ceb1d8fb517404405ad41a1b758dcfa0b02
Author: Nathan Chancellor <nathan@xxxxxxxxxx>
Date:   Wed Jan 11 20:05:05 2023 -0700

    powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang
    
    [ Upstream commit 05e05bfc92d196669a3d087fc34d3998b6ddb758 ]
    
    When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it
    warns:
    
      clang-16: error: argument unused during compilation: '-fno-stack-clash-protection' [-Werror,-Wunused-command-line-argument]
    
    This warning happens because vgettimeofday-32.c gets its base CFLAGS
    from the main kernel, which may contain flags that are only supported on
    a 64-bit target but not a 32-bit one, which is the case here.
    -fstack-clash-protection and its negation are only suppported by the
    64-bit powerpc target but that flag is included in an invocation for a
    32-bit powerpc target, so clang points out that while the flag is one
    that it recognizes, it is not actually used by this compiler job.
    
    To eliminate the warning, remove -fno-stack-clash-protection from
    vgettimeofday-32.c's CFLAGS when using clang, as has been done for other
    flags previously.
    
    Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Tested-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
    Tested-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Stable-dep-of: d677ce521334 ("powerpc/vdso: Drop -mstack-protector-guard flags in 32-bit files with clang")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
index d4023bceec348..7e69e87fbf744 100644
--- a/arch/powerpc/kernel/vdso/Makefile
+++ b/arch/powerpc/kernel/vdso/Makefile
@@ -16,6 +16,11 @@ ifneq ($(c-gettimeofday-y),)
   CFLAGS_vgettimeofday-32.o += -ffreestanding -fasynchronous-unwind-tables
   CFLAGS_REMOVE_vgettimeofday-32.o = $(CC_FLAGS_FTRACE)
   CFLAGS_REMOVE_vgettimeofday-32.o += -mcmodel=medium -mabi=elfv1 -mabi=elfv2 -mcall-aixdesc
+  # This flag is supported by clang for 64-bit but not 32-bit so it will cause
+  # an unused command line flag warning for this file.
+  ifdef CONFIG_CC_IS_CLANG
+  CFLAGS_REMOVE_vgettimeofday-32.o += -fno-stack-clash-protection
+  endif
   CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y)
   CFLAGS_vgettimeofday-64.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
   CFLAGS_vgettimeofday-64.o += $(call cc-option, -fno-stack-protector)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux