Re: Linux-5.9: Remove CC_FLAGS_USING via asflags-remove

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

 



On Sun, Oct 4, 2020 at 4:04 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> On Sun, Oct 4, 2020 at 10:29 PM Sedat Dilek <sedat.dilek@xxxxxxxxx> 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



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux