Closed jonathan-geisler closed 4 years ago
Makes sense. Will look into addressing this and otherwise happy to take patches sooner!
@jonathan-geisler One thing I forgot to mention: Cross-compilation is usually done today using build profiles. See the --profile
option. If you're blocked on this, you may want to take this route. This removes the need to do a lot checks as well. Does this work for your use-case?
Parsing compiler version output is a bit of a PITA given the number of supported compilers, it also becomes a maintenance burden as more compilers are supported, but I'll check for feasibility of it.
I am not blocked because I was able to make this change to the code:
#COMPILER=`./.` 2> /devnull`
COMPILER="gcc" # hack to allow cross-compiling
The --profile
option could work in the long run, but it doesn't get checked until after this line of code, so it is not quite enough to fix the problem permanently.
Parsing compiler version output is a bit of a PITA given the number of supported compilers, it also becomes a maintenance burden as more compilers are supported, but I'll check for feasibility of it.
I am not sure you need to parse compiler output. $CC --version || return 1
or $CC --help || return 1
should be just fine.
The configure script tries to build a program that it can execute to determine the compiler version being used. This does not work properly when cross-compiling because the executable cannot run on the host machine. There needs to be a way to provide this information when cross compiling so that this step can be avoided. Maybe do something like
${CC} --version
and parse the output there since the compiler must execute on the host?