Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <573B2A75.9030603@suse.com>
Date: Tue, 17 May 2016 16:28:05 +0200
From: Michal Marek <mmarek@...e.com>
To: Emese Revfy <re.emese@...il.com>
Cc: linux-kbuild@...r.kernel.org, pageexec@...email.hu,
 spender@...ecurity.net, kernel-hardening@...ts.openwall.com,
 keescook@...omium.org, linux@...musvillemoes.dk, fengguang.wu@...el.com,
 dvyukov@...gle.com, linux-kernel@...r.kernel.org, david.brown@...aro.org,
 yamada.masahiro@...ionext.com
Subject: Re: [PATCH v8 2/4] GCC plugin infrastructure

Dne 13.5.2016 v 01:57 Emese Revfy napsal(a):
> --- /dev/null
> +++ b/scripts/Makefile.gcc-plugins
> @@ -0,0 +1,21 @@
> +ifdef CONFIG_GCC_PLUGINS
> +  __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
> +  PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
> +
> +  GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
> +
> +  ifeq ($(PLUGINCC),)
> +    ifneq ($(GCC_PLUGINS_CFLAGS),)
> +      ifeq ($(call cc-ifversion, -ge, 0405, y), y)
> +        PLUGINCC := $(shell $(CO, NFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
> +        $(error error, your gcc installation does not support plugins, perhaps the necessary headers are missing?)
> +      else
> +        $(error error, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
> +      endif
> +    endif
> +  endif
> +
> +  KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
> +  GCC_PLUGIN := $(gcc-plugin-y)
> +
> +endif

Hi Emese,

sorry for the late feedback. A problem I ran into now is that if you
have a compiler that is either too old or built with plugin support
disabled, scripts/Makefile.gcc-plugins errors out immediately. This is
going to be an issue with allmodconfig/allyesconfig test builds. A
solution would either be to make the respective options depend on
!COMPILE_TEST, or turn the errors into warnings and do nothing if the
compiler lacks plugin support. We are handling CONFIG_CC_STACKPROTECTOR
on x86 this way already.

Michal

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.