how to build a 32-bit application on a powerpc64 (target: power8) system

88 Views Asked by At

To build a 32-bit application on a powerpc64le system(target:power8), you need the 32-bit development libraries, such as glibc, which are not available as precompiled packages for powerpc64le. Therefore, you need to build the 32-bit glibc library from source. However, building the 32-bit glibc library depends on the 32-bit libgcc.a library. This creates a circular dependency issue. how to solve this?

When building glibc using the command:

../configure --prefix=/usr/glibc-powerpc32 CC="gcc -m32 -mcpu=power8 -mtune=power8" --disable-werror --disable-multi-arch --host=powerpc-linux-gnu"

the final linking requires the 32-bit libgcc.a library. Therefore, i need to build the libgcc.a library from source code. However, when compiling GCC with the --enable-multilib configuration option, i encounter the error: "fatal error: gnu/stubs-32.h: No such file or directory." This error is caused by the absence of the 32-bit glibc library, creating a circular dependency issue. how to resolve this?

0

There are 0 best solutions below