I am trying to compile the GNU binutils for PowerPc on my x86-64 Pc. I'm not trying to cross compile them (got the cross compiler version from the AUR), I'm trying to compile the on my pc to use them on the other(It has no network etc just an SD-card). Anyways I have downloaded the tar file and tried to run ./configure but I wasn't sure what options to use and couldn't any proper documentation... For example what to I need to set $CC to the powerpc-linux-gnu-gcc compiler or do i need to set this as $CC_FOR_TARGET or both idk. I found out --prefix is the output output folder but idk anything else. Pl help
Asked
Active
Viewed 121 times
-1
-
Have you considered reading binutils/README? – stark Aug 08 '22 at 11:35
2 Answers
1
Cross compiling can be difficult if you are not familiar with the process. I'd recommend Debian and Ubuntu as they have a very good set of cross compilers prepackaged you can get with apt install gcc-powerpc64le-linux-gnu
.
Alternatively, you can download cross compilers from: https://toolchains.bootlin.com/

Mikey
- 167
- 4
-
I already have a cross compiler. I need a compiler that runs on powerpc (32bit) – user1237916231 Aug 09 '22 at 11:25
-
Arrh, ok. I'm not a compiler expert so I'd be looking at alternative solutions like putting your SD-card image into qemu (which does have networking), and installing the compilers via the normal distro process. – Mikey Aug 10 '22 at 00:58
-
I could try that but there is one problem it is a 32bit cpu running a debian based distro and debian does not have 32-bit packages(I have not seen them in the online package explorer). – user1237916231 Aug 10 '22 at 15:56
0
There is information about the config options available by running ./configure --help
The relevant option in this situation is:
--host=HOST cross-compile to build programs to run on HOST [BUILD]
For 32bit ppc:
./configure --host=powerpc-linux-gnu

jpn
- 81
- 2