<html><body><p><font size="2">Hi,</font><br><br><font size="2">There should be a compiler called powerpc64le-linux-gnu-gcc to use for buliding little endian. You probably need a different AT rpm to get the right cross compilers.</font><br><br><font size="2">Lynn Boger<br>Dept. O14A<br>LoP GCC team GO enablement<br>T/L 553-7588 External 507-253-7588<br>boger@us.ibm.com<br></font><br><br><img width="16" height="16" src="cid:1__=8FBB09ADDFFE521E8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Ben Hood ---11/07/2018 01:38:02 PM---Hi list, I’m trying to cross compile a bunch of stuff on CentOS"><font size="2" color="#424282">Ben Hood ---11/07/2018 01:38:02 PM---Hi list, I’m trying to cross compile a bunch of stuff on CentOS7 x86_64 for ppc64le. The resultant b</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Ben Hood <ben@relops.com></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">linuxppc-users@lists.ozlabs.org</font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">11/07/2018 01:38 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">[Linuxppc-users] Little endian linker options</font><br><font size="2" color="#5F5F5F">Sent by: </font><font size="2">"Linuxppc-users" <linuxppc-users-bounces+boger=us.ibm.com@lists.ozlabs.org></font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">Hi list,<br><br>I’m trying to cross compile a bunch of stuff on CentOS7 x86_64 for ppc64le. The resultant binaries appear to be in big endian ppc64 format instead of little.<br><br>So to break things down, I’ve tried to create a little endian binary for a hello world app:<br><br>$ /opt/at12.0/bin/powerpc64-linux-gnu-gcc -mcpu=powerpc64le -Wl,-m,elf64lppc,-EL hello.c<br>/opt/at12.0/bin/powerpc64-linux-gnu-ld: /opt/at12.0/lib/gcc/powerpc64-linux-gnu/8.2.1/../../../../powerpc64-linux-gnu/lib/../lib64/libgcc_s.so.1: error adding symbols: file in wrong format<br>collect2: error: ld returned 1 exit status<br><br>However, I specify -EB instead of -EL, the compilation succeeds and readelf tells me the output is ppc64 big endian:<br><br>$ /opt/at12.0/bin/powerpc64-linux-gnu-gcc -mcpu=powerpc64le -Wl,-m,elf64lppc,-EB hello.c<br><br>Does anybody know how to get the toolchain to generate in little endian format?<br><br>Many thanks in advance,<br><br>Ben<br>_______________________________________________<br>Linuxppc-users mailing list<br>Linuxppc-users@lists.ozlabs.org<br></font></tt><tt><font size="2"><a href="https://lists.ozlabs.org/listinfo/linuxppc-users">https://lists.ozlabs.org/listinfo/linuxppc-users</a></font></tt><tt><font size="2"><br><br></font></tt><br><br><BR>
</body></html>