How to build 32-bit application on powerpc64(target:power8) system?

You are running a centos 7.9 big endian kernel and 64bit runtime on a power 8 system. This implies a gcc 4.8 compiler.

It is definitely NOT little endian.

Very very old. Not fully enabled for P8. Barely supports power7.

I forget when rhel stopped supporting 32 bit.

The kernel should support concurrent 32 and 64 apps in separate processes.

You may have to build the full 32bit stack yourself.