Hello, I'm trying to cross-compile a kernel with grsecurity for armv5tel-softfloat-linux-uclibceabi-gcc. Kernel grsecurity toolchain use gcc plugins to harden the kernel, but some required headers are missing: arm-cores.def and config/vxworks-dummy.h. My configuration is not really clean but i thinks that this bug is reproducible. I encounter it with both armv5tel-softfloat-linux-gnueabi-gcc-4.7.2 and armv5tel-softfloat-linux-uclibceabi-gcc-4.7.2. Here is an example with uclibceabi. Reproducible: Always Steps to Reproduce: 1. To try to build an empty plugin, run: gcc -E -shared - -o /dev/null -I`armv5tel-softfloat-linux-uclibceabi-gcc -print-file-name=plugin`/include << EOF > #include "gcc-plugin.h" > #include "tree.h" > #include "tm.h" > #include "rtl.h" > EOF Actual Results: In file included from /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include/options.h:8:0, from /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include/flags.h:27, from /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include/tree.h:35, from <stdin>:2: /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include/config/arm/arm-opts.h:30:25: fatal error: arm-cores.def: No such file or directory compilation terminated. Expected Results: [nothing] To fix, copy missing files from gcc tar: cd /tmp tar xvjf /usr/portage/distfiles/gcc-4.7.2.tar.bz2 -C /tmp cp /tmp/gcc-4.7.2/gcc/config/vxworks-dummy.h /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include/config/ cp /tmp/gcc-4.7.2/gcc/config/arm/arm-cores.def /usr/lib/gcc/armv5tel-softfloat-linux-uclibceabi/4.7.2/plugin/include
Typo in command line, bad copy-paste, there is no '>' gcc -E -shared - -o /dev/null -I`armv5tel-softfloat-linux-uclibceabi-gcc -print-file-name=plugin`/include << EOF #include "gcc-plugin.h" #include "tree.h" #include "tm.h" #include "rtl.h" EOF it's extracted from grsec kernel script: ./scripts/gcc-plugin.sh
this has been fixed in gcc-4.8.0 already afaict
Yes, it's fixed in gcc-4.8.0
vxworks-dummy.h is http://gcc.gnu.org/PR45078 http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=196629 arm-cores.def is http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=196512
Created attachment 348364 [details, diff] 91_all_4.8.0_arm-plugin-headers.patch The backport is a little hairy but I think this should work.
(In reply to comment #5) looks simple enough
http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.7.3/gentoo/91_all_4.8.0_arm-plugin-headers.patch?rev=1.1&view=markup
Fixed in 4.7.3 p1.1.