* Linux-5.9: Remove CC_FLAGS_USING via asflags-remove
@ 2020-10-04 13:29 Sedat Dilek
2020-10-04 14:03 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Sedat Dilek @ 2020-10-04 13:29 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild
Hi,
I wanted to get rid of CC_FLAGS_USING in lib/Makefile:
ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
+ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
+asflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
...it makes no sense to me to remove CC_FLAGS_FTRACE and not CC_FLAGS_USING.
ccflags-remove-y (here: CONFIG_FUNCTION_TRACER=y) seems to work but
*not* asflags-remove-y.
Am I missing something?
It is getting overridden?
Documentation/kbuild/makefiles.rst says:
"...AFLAGS_$@ has the higher priority than asflags-remove..."
How can I check if there is another AFLAGS_XXX interfering?
I see -DCC_XXX in...
lib/.crc-t10dif.mod.o.cmd
lib/.crc-t10dif.o.cmd
I want to remove all -DCC_XXX assembler-options derived from lib/Makefile.
Regards,
- Sedat -
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux-5.9: Remove CC_FLAGS_USING via asflags-remove
2020-10-04 13:29 Linux-5.9: Remove CC_FLAGS_USING via asflags-remove Sedat Dilek
@ 2020-10-04 14:03 ` Masahiro Yamada
2020-10-04 14:09 ` Sedat Dilek
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-10-04 14:03 UTC (permalink / raw)
To: Sedat Dilek; +Cc: Linux Kbuild mailing list
On Sun, Oct 4, 2020 at 10:29 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> Hi,
>
> I wanted to get rid of CC_FLAGS_USING in lib/Makefile:
>
> ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
> +ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
> +asflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
>
> ...it makes no sense to me to remove CC_FLAGS_FTRACE and not CC_FLAGS_USING.
>
> ccflags-remove-y (here: CONFIG_FUNCTION_TRACER=y) seems to work but
> *not* asflags-remove-y.
>
> Am I missing something?
> It is getting overridden?
>
> Documentation/kbuild/makefiles.rst says:
> "...AFLAGS_$@ has the higher priority than asflags-remove..."
>
> How can I check if there is another AFLAGS_XXX interfering?
>
> I see -DCC_XXX in...
>
> lib/.crc-t10dif.mod.o.cmd
> lib/.crc-t10dif.o.cmd
This is compiled from a C source file.
lib/crc-t10dif.c
Why are you trying asflags-remove-y for lib/Makefile?
I see no assembly source file under lib/.
masahiro@oscar:~/ref/linux$ find lib -name '*.S'
masahiro@oscar:~/ref/linux$
> I want to remove all -DCC_XXX assembler-options derived from lib/Makefile.
>
> Regards,
> - Sedat -
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux-5.9: Remove CC_FLAGS_USING via asflags-remove
2020-10-04 14:03 ` Masahiro Yamada
@ 2020-10-04 14:09 ` Sedat Dilek
2020-10-04 14:22 ` Sedat Dilek
0 siblings, 1 reply; 4+ messages in thread
From: Sedat Dilek @ 2020-10-04 14:09 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Linux Kbuild mailing list
On Sun, Oct 4, 2020 at 4:04 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Oct 4, 2020 at 10:29 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > Hi,
> >
> > I wanted to get rid of CC_FLAGS_USING in lib/Makefile:
> >
> > ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
> > +ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
> > +asflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_USING)
> >
> > ...it makes no sense to me to remove CC_FLAGS_FTRACE and not CC_FLAGS_USING.
> >
> > ccflags-remove-y (here: CONFIG_FUNCTION_TRACER=y) seems to work but
> > *not* asflags-remove-y.
> >
> > Am I missing something?
> > It is getting overridden?
> >
> > Documentation/kbuild/makefiles.rst says:
> > "...AFLAGS_$@ has the higher priority than asflags-remove..."
> >
> > How can I check if there is another AFLAGS_XXX interfering?
> >
> > I see -DCC_XXX in...
> >
> > lib/.crc-t10dif.mod.o.cmd
> > lib/.crc-t10dif.o.cmd
>
>
> This is compiled from a C source file.
>
> lib/crc-t10dif.c
>
>
>
> Why are you trying asflags-remove-y for lib/Makefile?
>
> I see no assembly source file under lib/.
>
> masahiro@oscar:~/ref/linux$ find lib -name '*.S'
> masahiro@oscar:~/ref/linux$
>
Yeah, you are right it is a C file.
It looks like CC_FLAGS_USING is not "inherited" or passed or whatever.
I tried with "filter-out" and...
KBUILD_CFLAGS := $(filter-out -DCC_USING_FENTRY, $(KBUILD_CFLAGS)
....that resulted in an error:
need-builtin= \
need-modorder=1
In file included from lib/bug.c:50:
In file included from ./include/linux/ftrace.h:21:
./arch/x86/include/asm/ftrace.h:7:3: error: Compiler does not support fentry?
# error Compiler does not support fentry?
^
1 error generated.
make[4]: *** [scripts/Makefile.build:276: lib/bug.o] Error 1
So, it looks like I was wrong with removing -DCC_USING_XXX.
Thanks for the quick response.
- Sedat -
>
> > I want to remove all -DCC_XXX assembler-options derived from lib/Makefile.
> >
> > Regards,
> > - Sedat -
>
>
>
> --
> Best Regards
> Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-04 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04 13:29 Linux-5.9: Remove CC_FLAGS_USING via asflags-remove Sedat Dilek
2020-10-04 14:03 ` Masahiro Yamada
2020-10-04 14:09 ` Sedat Dilek
2020-10-04 14:22 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).