On Thu, 29 Nov 2018, 19:50:40 +0100, John Paul Adrian Glaubitz wrote:
On 11/29/18 7:38 PM, John Paul Adrian Glaubitz wrote:
On 11/29/18 2:16 PM, John Paul Adrian Glaubitz wrote:
If you want to work on ppc for Factory, the biggest obstacle right now is mariadb.
Ah, I already guessed that. I saw the build was missing which makes quite a number of reverse dependencies unresolvable.
Ok, this is the same issue as on Debian [1, 2]:
../include/my_atomic.h:121:2: error: #error atomic ops for this platform are not implemented #error atomic ops for this platform are not implemented ^~~~~
I will have a look. I wonder why they're not the atomic stuff from C++11.
Oh, they actually do that! Their test is just flawed in cmake:
CHECK_CXX_SOURCE_COMPILES(" int main() { long long int var= 1; long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS)
On ppc64, this works:
glaubitz@redpanda:~/mariadb$ g++ cpp11test.cpp -o cpp11test glaubitz@redpanda:~/mariadb$ ./cpp11test
On powerpc, we need -latomic:
root@kapitsa:~# g++ cpp11test.cpp -o cpp11test -Wl,--as-needed /usr/bin/ld: /tmp/ccyivhlO.o: in function `main': cpp11test.cpp:(.text+0x48): undefined reference to `__atomic_load_8' collect2: error: ld returned 1 exit status root@kapitsa:~#
root@kapitsa:~# g++ cpp11test.cpp -o cpp11test -latomic root@kapitsa:~#
Now, I don't know from the top of my head how to fix the cmake file.
Any suggestions?
Does CHECK_CXX_SOURCE_COMPILES use anything like LDFLAGS which could be predefined in a host specific way?
Adrian
Cheers. l8er manfred