OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:27 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to compile C and CPP to elf by win32 clang?
PostPosted: Tue Apr 27, 2021 2:44 am 
Offline

Joined: Sun Feb 14, 2021 12:41 am
Posts: 17
My new OS(Hyperon, based macOS and FreeBSD and myself codes). But I don't know how to generate elf file by win32 clang?(I don't like GPL)


Top
 Profile  
 
 Post subject: Re: How to compile C and CPP to elf by win32 clang?
PostPosted: Tue Apr 27, 2021 3:25 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
-target i686-elf

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: How to compile C and CPP to elf by win32 clang?
PostPosted: Thu Apr 29, 2021 3:06 am 
Offline

Joined: Sun Feb 14, 2021 12:41 am
Posts: 17
Korona wrote:
-target i686-elf

Thanks, but I want to compile on windows.


Top
 Profile  
 
 Post subject: Re: How to compile C and CPP to elf by win32 clang?
PostPosted: Thu Apr 29, 2021 3:10 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
Clang does not care about your host OS, it is a cross compiler that can target any of its targets.

So that flag also works on Windows.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 73 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