Hi,
I have a toolchain with GCC 4.9.1 which is configured with plugin support(--enable-plugin while configuration).
[atulk@localhost linux-3.2.65]$ arm-pokymllibv5te-linux-gnueabi-gcc -v
gcc-4.9.1/configure --build=x86_64-linux --host=i686-pokysdk-linux --target=arm-pokymllibv5te-linux-gnueabi --prefix=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr --exec_prefix=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr --bindir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/bin/arm-pokymllibv5te-linux-gnueabi --sbindir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/bin/arm-pokymllibv5te-linux-gnueabi --libexecdir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/libexec/arm-pokymllibv5te-linux-gnueabi --datadir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/share --sysconfdir=/usr/local/windriver/sysroots/i686-pokysdk-linux/etc --sharedstatedir=/usr/local/windriver/sysroots/i686-pokysdk-linux/com --localstatedir=/usr/local/windriver/sysroots/i686-pokysdk-linux/var --libdir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/lib/arm-pokymllibv5te-linux-gnueabi --includedir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/include --oldincludedir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/include --infodir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/share/info --mandir=/usr/local/windriver/sysroots/i686-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/data/home/asingh/poky/build_gcc_plugin/tmp/sysroots/i686-nativesdk-pokysdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-pokymllibv5te-linux-gnueabi- --without-local-prefix --enable-plugin --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-gxx-include-dir=/usr/local/windriver/sysroots/armv5te-pokymllibv5te-linux-gnueabi/usr/include/c++/4.9.1 --with-build-time-tools=/data/home/asingh/poky/build_gcc_plugin/tmp/sysroots/x86_64-linux/usr/arm-pokymllibv5te-linux-gnueabi/bin --with-sysroot=/usr/local/windriver/sysroots/armv5te-pokymllibv5te-linux-gnueabi --with-build-sysroot=/data/home/asingh/poky/build_gcc_plugin/tmp/sysroots/libv5te-arm-sdk --enable-poison-system-directories --with-mpfr=/data/home/asingh/poky/build_gcc_plugin/tmp/sysroots/i686-nativesdk-pokysdk-linux --with-mpc=/data/home/asingh/poky/build_gcc_plugin/tmp/sysroots/i686-nativesdk-pokysdk-linux --enable-nls
Also we have verified it using the below mentioned step:
[atulk@localhost linux-3.2.65]$ arm-pokymllibv5te-linux-gnueabi-gcc -print-file-name=plugin
/home/atulk/test/ARM_gcc_plugin/sysroots/i686-pokysdk-linux/usr/bin/arm-pokymllibv5te-linux-gnueabi/../../lib/arm-pokymllibv5te-linux-gnueabi/gcc/arm-pokymllibv5te-linux-gnueabi/4.9.1/plugin
[atulk@localhost linux-3.2.65]$ ll /home/atulk/test/ARM_gcc_plugin/sysroots/i686-pokysdk-linux/usr/bin/arm-pokymllibv5te-linux-gnueabi/../../lib/arm-pokymllibv5te-linux-gnueabi/gcc/arm-pokymllibv5te-linux-gnueabi/4.9.1/plugin
total 932
-rw-r--r--. 1 atulk atulk 948959 Jan 1 00:41 gtype.state
drwxr-xr-x. 8 atulk atulk 4096 Jan 1 00:41 include
And when we use the same toolchain to compile kernel 3.2.65 then we are getting error message as below:
Makefile:635: *** Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.. Stop.
But when we have disable the PAX plugin using the below command:
make ARCH=arm CROSS_COMPILE=arm-pokymllibv5te-linux-gnueabi- DISABLE_PAX_PLUGINS=y
We are getting error message as:
arm-pokymllibv5te-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-pokymllibv5te-linux-gnueabi-ld: use the --help option for usage information
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Please let us know if i am missing something.
Regards,
Atul