Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467418 - sys-devel/gcc-4.7.2: arm targets: missing headers for plugins
Summary: sys-devel/gcc-4.7.2: arm targets: missing headers for plugins
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2013-04-26 22:16 UTC by Julien
Modified: 2013-08-12 19:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
91_all_4.8.0_arm-plugin-headers.patch (91_all_4.8.0_arm-plugin-headers.patch,3.38 KB, patch)
2013-05-15 05:20 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien 2013-04-26 22:16:35 UTC
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
Comment 1 Julien 2013-04-26 22:22:02 UTC
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
Comment 2 SpanKY gentoo-dev 2013-04-27 22:25:44 UTC
this has been fixed in gcc-4.8.0 already afaict
Comment 3 Julien 2013-05-04 23:17:30 UTC
Yes, it's fixed in gcc-4.8.0
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2013-05-15 05:20:01 UTC
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.
Comment 6 SpanKY gentoo-dev 2013-05-22 04:59:04 UTC
(In reply to comment #5)

looks simple enough
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2013-08-12 19:35:44 UTC
Fixed in 4.7.3 p1.1.