I think there's something missing from the assembly source file generated using the toolchain. It appears the symbol is present but it is not exported.
$ m4 common.m4 sha256_compress_ppc.m4 > sha256_compress.s
$ as -mpower8 sha256_compress.s -o sha256_compress.o
$ g++ test.cxx -o test.exe sha256_compress.o
/home/noloader/tmp/cc6pWEuv.o: In function `main':
test.cxx:(.text+0x88): undefined reference to `sha256_compress_ppc(unsigned int*, unsigned char const*, unsigned int const*)'
collect2: error: ld returned 1 exit status
$ nm -D sha256_compress.o
nm: sha256_compress.o: no symbols
$ objdump --disassemble sha256_compress.o
sha256_compress.o: file format elf64-powerpcle
Disassembly of section .text:
0000000000000000 <sha256_compress_ppc>:
0: 50 ff 00 38 li r0,-176
4: ce 01 a1 7f stvx v29,r1,r0
8: 60 ff 00 38 li r0,-160
c: ce 01 81 7f stvx v28,r1,r0
...
744: d0 ff 00 38 li r0,-48
748: ce 00 a1 7e lvx v21,r1,r0
74c: e0 ff 00 38 li r0,-32
750: ce 00 81 7e lvx v20,r1,r0
754: 20 00 80 4e blr