Question about multilib testings
CHIGOT, CLEMENT
clement.chigot@atos.net
Mon May 18 08:50:31 GMT 2020
Hi everyone,
I've discovered, when building gcc10, that the tests in multilib directories aren't launched correctly, at least in our configuration (powerpc-ibm-aix* with ppc64 and pthread multilibs).
The tests are using the default compiler and the default library path instead of using the multilib ones.
For example, in ppc64/libatomic, a test compilation line looks like:
/opt/freeware/src/packages/BUILD/gcc-build-10.1.0/./gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build-10.1.0/./gcc/ \
-B/opt/freeware/powerpc-ibm-aix7.2.0.0/bin/ -B/opt/freeware/powerpc-ibm-aix7.2.0.0/lib/ \
-isystem /opt/freeware/powerpc-ibm-aix7.2.0.0/include -isystem /opt/freeware/powerpc-ibm-aix7.2.0.0/sys-include \
-maix64 \
../../../../../gcc-10.1.0/libatomic/testsuite/libatomic.c/atomic-compare-exchange-2.c \
-B/opt/freeware/src/packages/BUILD/gcc-build-10.1.0/powerpc-ibm-aix7.2.0.0/./libatomic/ \
-I/opt/freeware/src/packages/BUILD/gcc-build-10.1.0/powerpc-ibm-aix7.2.0.0/./libatomic \
-I../../../../../gcc-10.1.0/libatomic/testsuite/.. -fmessage-length=0 -fno-inline-atomics -g \
-L/opt/freeware/src/packages/BUILD/gcc-build-10.1.0/powerpc-ibm-aix7.2.0.0/./libatomic/.libs -latomic \
-lm -o ./atomic-compare-exchange-2.exe
The "-maix64" (which is the multilib option for ppc64) is indeed there. But it's present only because of the new "GCC_UNDER_TEST" variable. For libatomic it was added by https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ff06d762a88077aff0fb637c931c64e6f47f93d and for libgomp, by https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c8e759b4215ba4b376c9d468aeffe163b3d520f0. It's not there in previous versions (at least 8,9) and in others libraries (libstdc++).
However, the "-L" path before -latomic is wrong. It's targeting the default one. thus, AIX linker cannot find 64bit symbols.
It seems that the blddir variable in libatomic.exp isn't set correctly in our case: (https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libatomic/testsuite/lib/libatomic.exp;h=38f3e5673e24f36e641c15bc5aba5221dc6a4f0a;hb=c8e759b4215ba4b376c9d468aeffe163b3d520f0#l85). It should return "ppc64" but "." is returned. I'm guessing that the "compiler" variable isn't correctly set at this moment, it should be taking the default CC, ie without "-maix64" flag.
Thus, I've two questions:
- Is anyone have the same problem or is it a problem coming from our DejaGNU tool ?
- What's the correct way to launch tests in multilib ? Is "make DO=check multi-do" supposed to work ? And in a closer way, can a "make check" in the multilib directory work too ?
Sincerely
Clément
More information about the Gcc
mailing list