code generation

O'Connor, Daniel darius at dons.net.au
Sun May 31 00:33:01 UTC 2020



> On 31 May 2020, at 07:22, Jack Raats <mlist at nlned.nl> wrote:
> Can anyone explain why a simple hello_world.c compiles on a AMD64 machine
> to +/- 21000 bytes while on a raspberry pi 3 +/- 206000 bytes (10 times
> more)
> 
> I use FreeBSD 12.1 stable on RPi3 and cc -o hello hello.c to compile.

That would seem like a regression - I have a Beagle Bone Black with a stale install and the binaries it produces are ~10% smaller than my amd64 system..

Beaglebone:
[gps 0:30] ~ >cc --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: armv7-unknown-freebsd13.0-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
[gps 0:31] ~ >cc test.c -o test
[gps 0:31] ~ >ll test
-rwxr-xr-x  1 darius  darius  20068 31 May 00:31 test

amd64:
[midget 9:59] ~ >cc --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin
[midget 10:01] ~ >cc test.c -o test
[midget 10:01] ~ >ll test
-rwxr-xr-x  1 darius  users  22936 31 May 10:01 test

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum




More information about the freebsd-arm mailing list