On Mon, Jan 09, 2023 at 05:51:23PM -0700, Nathan Chancellor wrote: > So for this patch, I have > > 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 either '-c' > or '-S', which do not run the linker, so '-s' can be safely dropped from > ASFLAGS. > > as a new commit message. Is that sufficient for everyone? If so, I'll > adjust the s390 commit to match, as it is the same exact problem.
Almost? -S doesn't write .o files, it writes a .s file. To go from an assembler file (.s, or .S if you want to run the C preprocessor on non-C code for some strange reason, the assembler macro facilities are vastly superior) to an object file is just -c as well. > Alternatively, if '-s' should actually remain around, we could move it > to ldflags-y, which is added in patch 7. However, I assume that nobody > has noticed that it has not been doing its job for a while, so it should > be safe to remove. +1 Segher