[LLVMdev] dragonegg plugin invoking issue

Rehman Saeed
Tue, 24 Aug 2010 10:51:22 -0000

Hi,

I am using latest sources on GCC (gcc4.5_branch), LLVM and dragonegg. I am able
to build all three bits though unsuccessfull in building. Already done obvious
things

- checked out the sources as per defined in "Getting the development
version" on dragonegg.llvm.org
- Modified the llvm-backend.cpp in dragonegg to make available the global
plugin_is_GPL_compatible publically
- exports.map do include the global symbol "plugin_is_GPL_compatible"
and "plugin_init"

My host system is CentOS-3.8 and I am building it for same operating system and
intel machine.

Can somebody please help me why GCC is not reconizing dragonegg.so as a legal
plugin - as the requirement is symbol plugin_is_GPL_compatible should be able
publically? Maybe I am missing something obvious. Please find below the
different version & configuration and error which I am getting. Please let
me know if I need to provide any further information. Thanks.

Regards,
Rehman


GCC configuration & version
---------------------------
$path_to/gcc-4.5.x/bin/gcc -v
Using built-in specs.
COLLECT_GCC=$path_to/gcc-4.5.x/bin/gcc
COLLECT_LTO_WRAPPER=$path_to/gcc-4.5.x/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.5.x/configure --prefix=$path_to/gcc-4.5.x
--enable-threads=posix --disable-checking --with-system-zlib --enable-__c
xa_atexit --disable-libunwind-exceptions --enable-libgomp
--enable-languages=c,c++ --with-mpc=$path_to_home/root/usr
--with-mpfr=$path_to_home/root/usr -
-with-gmp=$path_to_home/root/usr --enable-plugin --enable-lto
--with-libelf=$path_to_home/root/usr
Thread model: posix
gcc version 4.5.2 20100819 (prerelease) (GCC)

LLVM Config version
-------------------
llvm-config --version
2.8svn

CommandLine
------------
gcc hello.c -S -fplugin=./dragonegg.so -fplugin-arg-dragonegg-emit-ir

Error
cc1: fatal error: plugin ./dragonegg.so is not licensed under a GPL-compatible
license
./dragonegg.so: undefined symbol: plugin_is_GPL_compatible
compilation terminated.



-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20100824/c570ed07/attachment.html>