Re: [PATCH 2/2] Add CONFIG_READABLE_ASM

From: Sam Ravnborg
Date: Thu Apr 12 2012 - 16:07:52 EST


On Thu, Apr 12, 2012 at 12:57:57PM -0700, Andi Kleen wrote:
>
>>> You should try cc-diasable-warning like this:
>>>
>>> KBUILD_CFLAGS += $(call cc-disable-warning, ipa-cp-clone)
>> That works, thanks!
>> Andi, does it still work as expected for you?
>
> No, unfortunately it doesn't enable the flag with my compiler.
> Also BTW ipa-cp-clone is not a warning, it's an optimization pass.

Yeah I see now.
cc-disable-warning only works on warnings - which starts with -W

Could you try this:

cc-disable-opt = $(call try-run,\
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -f$(strip $(1)) -c -xc /dev/null -o "$$TMP",-fno-$(strip $(1)))

KBUILD_CFLAGS += $(call cc-disable-opt, ipa-cp-clone)


It will try if "gcc -fipa-cp-clone" is supported,
and add -fno-ipa-cp-clone in that case.

Sam

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/