I have a linking error on a BG/Q machine: when I link statically a big amount of libraries the linking fails with this error message:
/bgsys/drivers/V1R1M2/ppc64/comm/sys/lib/libpami.a(component-pami--CAPI.cnk.o)(.text._ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E+0xbc): sibling call optimization to `_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E' extern
/bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/bin/ld: final link failed: Bad value
I think it is related to the number of global symbols defined (but should´t most of the unused ones get removed?). I tried the following compiler flags without success:
-qminimaltoc -qipa=level=1 -bbigtoc -qpic=large
Commenting out partially the source code the linking works.. but this is not really what I want to do
Does someone have some suggestions?