-
Notifications
You must be signed in to change notification settings - Fork 199
Cross compile rpmalloc with ninja #124
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
Comments
The ninja generator does indeed not support cross-compilation at the moment, but I will be happy to try to improve it so it does. |
I´ve created a quick and dirty patch for cross compilation with gcc. With that patch i can compile rpmalloc inside the OpenWRT buildroot.
Probably appending the FLAGS in the writer is too late, but to honor my flags from the build system i need it to be the last. |
Nice solution, I generalized the flag handling a bit and added it to the clang toolchain as well, check the mjansson/cross-compile branch and see if it still works for you. |
I tested your cross-compile branch with gcc as cross toolchain but the CFLAGS aren´t honored... The OpenWRT buildroot has a own flag "-fhonour-copts" for gcc that prints "note: someone does not honour COPTS correctly, passed 0 times" if it is not set to verify the flags are honored. Do you have any thoughts about that? Apart from not honoring CFLAGS, i think the following should be changed:
Or like this:
|
In the build.ninja file, there are some occurrences of "cmoreflags" that override the "cmoreflags" that are set from the environment in the configure step. The OpenWRT buildroot has a own flag "-fhonour-copts" for gcc that prints "note: someone does not honour COPTS correctly, passed 0 times" if it is not set. Easiest solution to fix that would be to use another var instead of "cmoreflags" that gets not overridden. Here is my generated build.ninja:
|
Thanks, will add these changes later tonight |
Proper solution is provided in #126 |
Hello,
same problem as mjansson/rpmalloc-benchmark#4.
How can i define a sysroot or a toolchain for cross compiling?
I´ve seen that
build/ninja/generator.py
supports some environment variables, but they have no influence in the build process.Thanks
The text was updated successfully, but these errors were encountered: