Bug 56754 - some missing plugin headers during installation in gcc 4.8
Summary: some missing plugin headers during installation in gcc 4.8
Alias: None
Product: gcc
Classification: Unclassified
Component: plugins (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2013-03-27 17:48 UTC by PaX Team
Modified: 2013-05-22 10:24 UTC (History)
8 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:

This patch readd TARGET_H to PLUGIN_HEADERS (346 bytes, patch)
2013-03-31 21:33 UTC, Magnus Granberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description PaX Team 2013-03-27 17:48:13 UTC
it used to be the case before 4.8 that the following files were made available to plugins:


now it seems that at least for a x86_64-pc-linux-gnu target they no longer get installed. i tried to find the related commit but came up empty so i'm wondering if this is the result of an oversight or some policy change? manually installing these files gets things back to normal, but it'd be nice to know what to expect in the future or if it's a bug, fix it for 4.8.1 ;).
Comment 1 Magnus Granberg 2013-03-28 03:22:04 UTC
Revision 188166 remove TARGET_H from GIMPLE_H.
when TARGET_H did get remove from GIMPLE_H it don't get
pass to IPA_PROP_H, so it can't get pass to PLUGIN_HEADERS.
Comment 2 Jack Howarth 2013-03-28 17:47:41 UTC
This issue blocks building dragonegg svn against FSF gcc 4.8.0...

c++ -c -I/sw/src/fink.build/dragonegg-gcc48-3.3-0/dragonegg-3.3/include/x86 -I/sw/src/fink.build/dragonegg-gcc48-3.3-0/dragonegg-3.3/include/darwin -g  -DENABLE_BUILD_WITH_CXX -DENABLE_LTO -I/sw/include -I/sw/opt/llvm-3.3/include    -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -MD -MP -DIN_GCC -DLLVM_VERSION=\"3.3svn\" -DTARGET_TRIPLE=\"x86_64-apple-darwin12.3.0\" -DGCC_MAJOR=4 -DGCC_MINOR=8 -DGCC_MICRO=0 -I/sw/src/fink.build/dragonegg-gcc48-3.3-0/dragonegg-3.3/include -isystem/sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin12.3.0/4.8.0/plugin/include -Wall -Wextra -DENABLE_LLVM_PLUGINS -I/sw/opt/llvm-3.3/include  -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long  -Wnon-virtual-dtor -O3 -DNDEBUG  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /sw/src/fink.build/dragonegg-gcc48-3.3-0/dragonegg-3.3/src/Backend.cpp
/sw/src/fink.build/dragonegg-gcc48-3.3-0/dragonegg-3.3/src/Backend.cpp:83:10: fatal error: 'target.h' file not found
#include "target.h" // For targetm.
1 error generated.
Comment 3 Michael Davies 2013-03-30 05:26:32 UTC
I get this same error when trying to compile kernel 3.8.5 with the hardened grsecurity patch, and selecting CONFIG_PAX_CONSTIFY_PLUGIN:

scripts/kconfig/conf --silentoldconfig Kconfig
  HOSTCXX -fPIC tools/gcc/colorize_plugin.o
  HOSTCXX -fPIC tools/gcc/constify_plugin.o
tools/gcc/constify_plugin.c:35:20: fatal error: target.h: No such file or directory
 #include "target.h"
compilation terminated.
make[1]: *** [tools/gcc/constify_plugin.o] Error 1
make: *** [gcc-plugins] Error 2

Worked fine in 4.7.2, doesn't work with 4.8.0
Comment 4 Magnus Granberg 2013-03-31 21:33:45 UTC
Created attachment 29761 [details]
This patch readd TARGET_H to PLUGIN_HEADERS

This patch is posted on gcc-patch ml and on
Comment 5 Duncan Sands 2013-05-21 07:50:23 UTC
Was there any feedback on this patch?
Comment 6 PaX Team 2013-05-21 12:44:52 UTC
(In reply to Duncan Sands from comment #5)
> Was there any feedback on this patch?

sadly, no response so far (this bug is still UNCONFIRMED even), so it's probably not going to make 4.8.1.
Comment 7 Duncan Sands 2013-05-22 10:19:50 UTC
2013-05-21  Magnus Granberg  <baldrick@free.fr>

        PR plugins/56754
        * Makefile.in (PLUGIN_HEADERS): Add TARGET_H
Comment 8 Duncan Sands 2013-05-22 10:24:56 UTC
Jakub backported the fix to the 4.8 branch.