make-it-quick icon indicating copy to clipboard operation
make-it-quick copied to clipboard

Cross-Compiling doesn't work

Open federkamm opened this issue 2 years ago • 2 comments

There are some issues when cross-compiling (tested with c3d/recorder).

  1. CC environment variable doesn't get respected (fixed by replacing "CC=" in config.gnu.mk with "CC?=")
  2. Extra dash to CROSS_COMPILE. In my case (yocto SDK) CROSS_COMPILE is set to "aarch64-poky-linux-" with trailing dash. make-it-quick adds an extra dash. Don't know who is "wrong" here, but might be fixable in make-it-quick
  3. Trys to execute compiled files for compiler checks. In MIO_CFGTEST the line '"$<".exe > "$<".out' tries to execute a compiled file. That fails if the file was compiled for another architecture. Removing this line solved the problem for me (most tests only need to check if the file can be compiled, I don't know which tests would have to execute the compiled file but I think that can't be used to find anything out about cross-compilers).

Maybe, something of this is fixable, here.

federkamm avatar Oct 18 '22 13:10 federkamm

Hey @federkamm. Thanks a lot for your feedback.

  1. You are right, will fix.
  2. Interesting - I think I used what Fedora uses, but I may be wrong. I'll check.
  3. That execution is sometimes necessary given the way the auto-configuration works. Some tests may return a result that is actually used. Not all tests, though, not even the majority, so I need to figure out a reasonable way to deal with the two distinct cases.

c3d avatar Oct 19 '22 07:10 c3d

An line like

CROSS_COMPILE := ${CROSS_COMPILE:-=}

to remove a probably trailing dash could solve (2).

federkamm avatar Oct 26 '22 22:10 federkamm