Making a bare-metal cross Binutils package
John Scott <[email protected]> Sat, 23 Jan 2021 18:24:19 -0500
| Newsgroups | gmane.linux.debian.devel.toolchain |
|---|---|
| Message-ID | <5430967.DvuYhMxLoT@t450> |
--nextPart5679328.lOV4Wx5bFT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: John Scott <[email protected]> To: [email protected] Subject: Making a bare-metal cross Binutils package Date: Sat, 23 Jan 2021 18:24:19 -0500 Message-ID: <5430967.DvuYhMxLoT@t450> Hi, I'm looking into the most painless way to make cross Binutils for sh-elf, but it seems like most documentation and tools are oriented towards Linux crossbuilds. I see there is some code in the Binutils package for recognizing GNU triplets, but setting TARGET=sh-elf and building fails with x86_64-linux-gnu-gcc stamps/build..o -o stamps/build. /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status make: *** [<builtin>: stamps/build.] Error 1 The Electronics Team seems to use various ugly hacks for their cross-compilers. What would be the most effective strategy for tackling this? Sincerely, John --nextPart5679328.lOV4Wx5bFT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQT287WtmxUhmhucNnhyvHFIwKstpwUCYAywIwAKCRByvHFIwKst pxM0AP4uBa2mIQxwuHBqD7MF6KFwnCqT9VDeoYYyZXjqYZgzlAEA523F2pN8HIGf nS06YHf2jPCouKl3SnqcTBMXegfi3Qg= =CcAS -----END PGP SIGNATURE----- --nextPart5679328.lOV4Wx5bFT--