I recently started porting my kernel project to c++ (from C) and tried to compile it with the same cross compiler I use to compile my C kernel. The problem is that GCC calls Ubuntu's G++ instead of calling the cross-compiler G++. Therefore when the cross compiler linker tries to link the kernel it can't read the object files. How do I fix this?
Thanks in advance
How to compile a kernel in C++ using a cross compiler?
-
- Posts: 7
- Joined: Tue Feb 28, 2017 11:44 am
- Libera.chat IRC: sofferjacob
Re: How to compile a kernel in C++ using a cross compiler?
When you created the cross-compiler did you specify C++ as one of the languages it could compile?
Re: How to compile a kernel in C++ using a cross compiler?
Do you invoke {x86_64,i386}-{elf,youros}-g++ or plain g++? Is i386-elf-g++ in your path?
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].