Bug#577621: gcc-4.4-plugin-dev: accepts non-GPL plugins
Package: gcc-4.4-plugin-dev
Version: 4.4.3-7
Severity: normal
According to the GCC plugin documentation plugins should declare a symbol
plugin_is_GPL_compatible.
However the gcc-4.4 in Debian loads the plugin regardless.
To reproduce:
$ cat >testcase.c <<EOF
#include <gcc-plugin.h>
int plugin_init(struct plugin_name_args *plugin_info,
struct plugin_gcc_version *version)
{ return 0; }
EOF
$ gcc -fPIC -DPIC -shared -o testcase.so testcase.c -I`gcc -print-file-name=plugin`/include
$ gcc -fplugin=./testcase.so -c -x c /dev/null
$ echo $?
0
gcc-4.5 correctly rejects the plugin:
$ gcc-4.5 -fplugin=./testcase.so -c -x c /dev/null
cc1: fatal error: plugin ./testcase.so is not licensed under a GPL-compatible license
./testcase.so: undefined symbol: plugin_is_GPL_compatible
compilation terminated.
I think this is a bug in Debian's backport of the plugin to gcc-4.4.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34-rc3-00138-gecb385a (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.4-plugin-dev depends on:
ii gcc-4.4 4.4.3-7 The GNU C compiler
ii gcc-4.4-base 4.4.3-7 The GNU Compiler Collection (base
ii libgmp3-dev 2:4.3.2+dfsg-1 Multiprecision arithmetic library
gcc-4.4-plugin-dev recommends no packages.
gcc-4.4-plugin-dev suggests no packages.
-- no debconf information
Reply to: