------- Comment #1 from joseph at codesourcery dot com 2009-05-06 20:16 ------- Subject: Re: New: plugin tests don't work with multilib
On Wed, 6 May 2009, hjl dot tools at gmail dot com wrote: > On Linux/Intel64, I got > > Executing on host: /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc > -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -I. > -I/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite > -I/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/../../gcc > -I/export/build/gnu/gcc/build-x86_64-linux/gcc/testsuite/gcc/../../../gcc > -I/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/../../include > -I/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/../../libcpp/include -I -O > -DIN_GCC -fPIC -shared > /net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/gcc.dg/plugin/selfassign.c > -lm -m32 -o selfassign.so (timeout = 300) > Executing on host: /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc > -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ > /net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/gcc.dg/plugin/self-assign-test-1.c > -fplugin=./selfassign.so -O -S -m32 -o self-assign-test-1.s (timeout = > 300) > cc1: error: Cannot load plugin ./selfassign.so^M > ./selfassign.so: cannot open shared object file: No such file or directory^M > > I think LD_LIBRARY_PATH was set to multilib path. But for this case, > it should be set to the current dir. I read the problem differently. I presume -m32 are your multilib flags. It looks like both the plugin and the code being built with a compiler loading the plugin have been built with the multilib flags, and the error is because a 64-bit compiler ignores a 32-bit plugin. Plugins must never be built with multilib flags; they must be built with the *host* compiler, and while that's the same compiler as the target compiler in the native case, they must still not use the multilib flags because those won't generally be compatible with the compiler binary. The second compilation, the only loading the plugin, is the one that should keep using the multilib flags. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40050