Re: Building Hello World on an iMac G5 (Debian 12) for a PPC 405EX target?

Joe Flowers <[email protected]> Fri, 5 Sep 2025 06:34:53 -0400
Newsgroups gmane.comp.gcc.cross-compiling
Message-ID <CA+4=ZEOSc=4ZcNZjDeNgWNr0jdX+_WpzT8f_0SK3GNe1foYMQw@mail.gmail.com>
Hi Chris,


Thanks very much for your experience and all of your comments. I plan to
make good use of that information. Thank you!

One of the things Tommy's criticism (and your comments confirm) made me
realize that the first thing I needed to do was find the
"powerpc-4xx-softfloat" toolchain.

So, I was able to do that, and even better, it is publicly available:

https://ftp.denx.de/pub/eldk/5.2/targets/powerpc-4xx-softfloat/core-image-lsb-sdk-generic-powerpc-4xx-softfloat.tar.gz
sha256: 4fc111ffede2fe0509970dc0a5377662bf5bf9c50972658fd20820fdd13fc0fa

Looks like DENX did a *great* job on it because all I had to do was extract
it at the root of my Ubuntu 24.04 machine.

These commands just worked with no changes: Wow!

/opt/eldk-5.2/powerpc-4xx-softfloat/sysroots/i686-eldk-linux/usr/bin/ppc405-linux/powerpc-4xx-softfloat-gcc
-c -g -m32 -static -Wall -O2 -MD -MP -ffunction-sections -fdata-sections
-Wl,--gc-sections -Wstrict-aliasing=0 tcp_client.c

/opt/eldk-5.2/powerpc-4xx-softfloat/sysroots/i686-eldk-linux/usr/bin/ppc405-linux/powerpc-4xx-softfloat-gcc
-g -Wall -O2 -MD -MP -ffunction-sections -fdata-sections -Wl,--gc-sections
-Wstrict-aliasing=0 tcp_client.o -o tcp_client_eldk

/opt/eldk-5.2/powerpc-4xx-softfloat/sysroots/i686-eldk-linux/usr/bin/ppc405-linux/powerpc-4xx-softfloat-gdb
seg_fault_ppc_32bit core_from_imacg5

I ran my powerpc-4xx-softfloat-gcc compiled programs on my Debian 12 iMac
G5 and on the actual TARGET, and they all worked.

Also, powerpc-4xx-softfloat-gdb on my Ubuntu and the up-to-date gdb on my
iMac both worked on cores produced by my iMac and cores produced by the
TARGET.


I am curious to find out what the changes/improvements/bug fixes are
between
https://ftp.denx.de/pub/eldk/5.2/targets/powerpc-4xx-softfloat/
and
https://ftp.denx.de/pub/eldk/5.6/targets/powerpc-4xx-softfloat/


I am still curious what may be gained by compiling and linking basic socket
programs with a 2025 tool.
Not sure if the source to powerpc-4xx-softfloat is available.


Anyway, thanks for all of your help. I hope this is good feedback.


And, thanks for this trick. I love it. /usr/lib/ld-linux.so.2 --list
I need to run this on the target and see what it uncovers. Thanks!




>
> This is a trick I learned. ldd is really just a glorified wrapper for
> /usr/lib/ld-linux.so.2 --list or in your case /lib/ld-2.24.so --list
>
>
>
--
For unsubscribe information see http://sourceware.org/lists.html#faq