OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 1:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Aarch64 PE GNU toolchain
PostPosted: Fri Jul 02, 2021 9:58 am 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
Hello,
I going to be make a UEFI bootloader for my Raspberry Pi 3, as there are some OVMF images I found that work on it. My only problem is that there seems to be no aarch64-mingw32 toolchain in GCC and Binutils. Has anybody ever built an Aarch64 Mingw32 toolchain? If so, please tell me how! I tried building clang, but my machine kept running out of memory, even after adjusting link and job counts (and I have 8 GB of RAM!). I also am not willing to use GNU-EFI.
Thanks,
nexos

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Aarch64 PE GNU toolchain
PostPosted: Fri Jul 02, 2021 2:06 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
nexos wrote:
I tried building clang,

Why? Clang is already a cross-compiler.

Install the Clang package provided by your distro and try this:
Code:
clang -o program.efi program.c -ffreestanding -nostdlib -mno-stack-arg-probe --target=aarch64-unknown-windows -fuse-ld=lld-link -Wl,-entry:efi_main -Wl,-subsystem:efi_application


Top
 Profile  
 
 Post subject: Re: Aarch64 PE GNU toolchain
PostPosted: Fri Jul 02, 2021 2:40 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
Octocontrabass wrote:
nexos wrote:
I tried building clang,

Why? Clang is already a cross-compiler.

Install the Clang package provided by your distro and try this:
Code:
clang -o program.efi program.c -ffreestanding -nostdlib -mno-stack-arg-probe --target=aarch64-unknown-windows -fuse-ld=lld-link -Wl,-entry:efi_main -Wl,-subsystem:efi_application

That is true, that skipped my mind #-o .

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group