-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please dont hard code compiler paths #978
Comments
cmake tells users how to set the compiler if it doesnt find it
|
THis bit is crucial for arm64 build, for it to be plug'n play. |
Same here but I can't compile without patching your thing |
Not every GCC compiler has the same triple name. This is how cross compilation should be done Atleast do checks first. Cmake supports those. |
but those patch are Arch OS specific. The point is to have box86 buildable everywhere. Currently, most machine still use debian based OS (Debian, Ubuntu, Armbian), and this works perfectly, without the need to use a shell script. Note that this is not really cross-compiling, it' build on the devices directly. If you find a solution to make this parametrable without breaking debian compatibility, I'm all hears. Last time I tried, cmake was not not happy and needed the settings of the C compiler very early in the CMake Script, but maybe there is a simpler way? |
Edit: this is the actual fix |
Ok, looks good to me. Out of curiosity, is set(COMPILER_TRIPLE arm-linux-gnueabihf-gcc) overloadable? Or does cmake has some specific test that allows it to goes from "arm-linux-gnueabihf-gcc" the actual armhf triplet actually setup in the system? |
its still hard coded in a way, checks for that toolchain, if it exists sets it and uses it else uses either /usr/bin/gcc OR in the case of most crosscompilations, CC var or if user specified -DCMAKE_C_COMPILER |
Ah ok, this allows to use fallback instead of just failing. Nice. |
box86/CMakeLists.txt
Lines 87 to 89 in 21e9a43
Please leave that unset so that it wont break if they are cross compiling/building :)
Currently you are breaking builds on systems that dont use the triple arm-linux-gnueabihf-gcc arch arm is one of them
The text was updated successfully, but these errors were encountered: