Package: libtool
Version: 2.4.2-1.7
Severity: important
Forwarded: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17750

hi,
this copy of a upstream bug report. As Debian now has gcc-4.9 available
this should be fixed for jessie regardless of upstreams reaction time.


gcc-4.9 now supports cilkplus with the -fcilkplus flag.
libtool strips this flag from LDFLAGS leading to an wrongly linked library.
To reproduce choose a random libtool based project (e.g. libmatheval)
and add this function in a random file (e.g. lib/node.c):


#include <cilk/cilk.h>
int n(char * a)
{
a = cilk_spawn atoi(a);
return a;
}


then configure build with:
./configure  CFLAGS="-fcilkplus" LDFLAGS="-fcilkplus" CC=gcc-4.9


during linking -fcilkplus is not used and the library is underlinked:
./libmatheval-1.1.11+dfsg# ldd -r ./lib/.libs/libmatheval.so
        linux-vdso.so.1 (0x00007fffccdc4000)
        /usr/lib/libeatmydata/libeatmydata.so (0x00007eff50cfd000)
        /usr/lib/cowdancer/libcowdancer.so (0x00007eff50af9000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007eff507f3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eff5044a000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007eff50246000)
        /lib64/ld-linux-x86-64.so.2 (0x00007eff5110f000)
undefined symbol: __cilkrts_rethrow     (./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_enter_frame_1       (./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_save_fp_ctrl_state  (./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_sync        (./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_leave_frame (./lib/.libs/libmatheval.so)
undefined symbol: __cilkrts_enter_frame_fast_1  (./lib/.libs/libmatheval.so)

it needs to be linked against libcilkrts.so.5

This is identical to libtools stripping of fopenmp and the fix is the
same, add -fcilkplus to the whitelist.

Similar the new -fsanitizer= flags are stripped from LDFLAGS, they
should probably be added too.

Cheers,
Julian Taylor

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to