1
0
Fork 0
alistair23-linux/arch/arm
Emese Revfy 6b90bd4ba4 GCC plugin infrastructure
This patch allows to build the whole kernel with GCC plugins. It was ported from
grsecurity/PaX. The infrastructure supports building out-of-tree modules and
building in a separate directory. Cross-compilation is supported too.
Currently the x86, arm, arm64 and uml architectures enable plugins.

The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
there. The plugins compile with these options:
 * -fno-rtti: gcc is compiled with this option so the plugins must use it too
 * -fno-exceptions: this is inherited from gcc too
 * -fasynchronous-unwind-tables: this is inherited from gcc too
 * -ggdb: it is useful for debugging a plugin (better backtrace on internal
    errors)
 * -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
 * -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
    variable, plugin-version.h)

The infrastructure introduces a new Makefile target called gcc-plugins. It
supports all gcc versions from 4.5 to 6.0. The scripts/gcc-plugin.sh script
chooses the proper host compiler (gcc-4.7 can be built by either gcc or g++).
This script also checks the availability of the included headers in
scripts/gcc-plugins/gcc-common.h.

The gcc-common.h header contains frequently included headers for GCC plugins
and it has a compatibility layer for the supported gcc versions.

The gcc-generate-*-pass.h headers automatically generate the registration
structures for GIMPLE, SIMPLE_IPA, IPA and RTL passes.

Note that 'make clean' keeps the *.so files (only the distclean or mrproper
targets clean all) because they are needed for out-of-tree modules.

Based on work created by the PaX Team.

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-06-07 22:57:10 +02:00
..
boot Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-05-26 22:01:22 -07:00
common Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
configs arch/defconfig: remove CONFIG_RESOURCE_COUNTERS 2016-05-23 17:04:14 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
firmware
include - move kvm_stat tool from QEMU repo into tools/kvm/kvm_stat 2016-05-27 13:41:54 -07:00
kernel Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-05-25 17:05:40 -07:00
kvm - move kvm_stat tool from QEMU repo into tools/kvm/kvm_stat 2016-05-27 13:41:54 -07:00
lib
mach-alpine ARM: alpine: select the Alpine MSI controller driver 2016-02-26 22:57:22 +01:00
mach-artpec
mach-asm9260
mach-aspeed arm: Add Aspeed machine 2016-05-09 17:41:14 +09:30
mach-at91 ARM: at91/soc: reference the whole sama5d2 family 2016-03-29 16:34:31 +02:00
mach-axxia
mach-bcm bus: brcmstb_gisb: Rework dependencies 2016-04-18 14:20:30 -07:00
mach-berlin cpufreq: berlin: Use generic platdev driver 2016-04-25 16:18:23 +02:00
mach-clps711x
mach-cns3xxx ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-davinci ARM: DT updates for v4.7 2016-05-18 12:48:46 -07:00
mach-digicolor
mach-dove ARM: dove: Remove CLK_IS_ROOT 2016-04-27 13:55:52 +02:00
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: SoC platform updates for v4.7 2016-05-18 12:35:46 -07:00
mach-integrator ARM: integrator: move flash registration to device tree 2016-04-04 10:33:16 +02:00
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mach-keystone ARM: provide improved virt_to_idmap() functionality 2016-05-03 11:13:54 +01:00
mach-ks8695 ARM: SoC non-urgent fixes for v4.6 2016-03-20 14:26:57 -07:00
mach-lpc18xx
mach-lpc32xx ARM: lpc32xx: fix NR_IRQS confict 2016-05-24 19:32:46 +00:00
mach-mediatek ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0 ARM: mv78xx0: Remove CLK_IS_ROOT 2016-04-27 12:42:55 +02:00
mach-mvebu cpufreq: mvebu: Move cpufreq code into drivers/cpufreq/ 2016-04-28 15:22:43 +02:00
mach-mxs
mach-netx ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-nomadik
mach-nspire ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-omap1 Revert "ARM: OMAP: Catch callers of revision information prior to it being populated" 2016-04-19 08:01:05 -07:00
mach-omap2 MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
mach-orion5x ARM: orion5x: Remove CLK_IS_ROOT 2016-04-27 13:11:42 +02:00
mach-oxnas ARM: Add new mach-oxnas 2016-04-26 09:50:52 +02:00
mach-picoxcell
mach-prima2 ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-pxa ARM: SoC fixes for 4.7 2016-05-24 15:50:58 -07:00
mach-qcom
mach-realview ARM: realview: hide unused 'pmu_device' object 2016-04-04 10:58:47 +02:00
mach-rockchip ARM: SoC cleanups and fixes for v4.7 2016-05-18 12:28:29 -07:00
mach-rpc
mach-s3c24xx ARM: Explicitly apply PWM config extracted from pwm_args 2016-05-17 14:45:08 +02:00
mach-s3c64xx ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
mach-s5pv210
mach-sa1100 ARM: sa1100: remove references to the defunct handhelds.org 2016-04-12 12:34:15 -07:00
mach-shmobile ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
mach-socfpga * Altera Arria10 L2 cache and On-Chip RAM ECC handling. (Thor Thayer) 2016-05-16 18:44:39 -07:00
mach-spear
mach-sti ARM: STi: Update platform level menuconfig 'help' 2016-04-07 16:32:14 +02:00
mach-stm32
mach-sunxi cpufreq: sunxi: Use generic platdev driver 2016-04-25 16:18:24 +02:00
mach-tango
mach-tegra ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
mach-u300
mach-uniphier ARM: SoC platform updates for v4.7 2016-05-18 12:35:46 -07:00
mach-ux500 ARM: SoC cleanups for v4.6 2016-03-20 14:37:22 -07:00
mach-versatile ARM: versatile: move flash registration to the device tree 2016-04-04 10:33:16 +02:00
mach-vexpress ARM: vexpress/mps2: introduce MPS2 platform 2016-04-26 12:50:01 +02:00
mach-vt8500
mach-w90x900 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
mach-zx
mach-zynq cpufreq: zynq: Use generic platdev driver 2016-04-25 16:18:24 +02:00
mm lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
net
nwfpe
oprofile
plat-iop
plat-omap
plat-orion Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
plat-pxa ARM: pxa: add the number of DMA requestor lines 2016-02-26 22:57:05 +01:00
plat-samsung ARM: EXYNOS: Remove SROM related register settings from mach-exynos 2016-04-18 14:25:28 +02:00
plat-versatile
probes
tools ARM: 8562/1: suppress "include/generated/mach-types.h is up to date." 2016-04-19 19:42:47 +01:00
vdso kbuild: drop FORCE from PHONY targets 2016-04-20 10:27:20 +02:00
vfp exit_thread: accept a task parameter to be exited 2016-05-20 17:58:30 -07:00
xen
Kconfig GCC plugin infrastructure 2016-06-07 22:57:10 +02:00
Kconfig-nommu
Kconfig.debug ARM: debug: remove extraneous DEBUG_HI3716_UART option 2016-04-26 13:00:11 +02:00
Makefile ARM: vexpress/mps2: introduce MPS2 platform 2016-04-26 12:50:01 +02:00