Detect Cross Compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
As a whole, my project is not being cross-compiled, but there is a test that uses a user-specified compiler on some test code and then runs the generated executable. The problem is that the user may specify to cross-compile this test code, in which case the executable should NOT be run. Therefore, I would like to set an AM_CONDITIONAL(IS_USING_CROSS_COMPILER), for example.

Say the user specifies the test compiler on the configure line using

—with-test-compiler=<compiler>.

What I would like to do is have configure detect that this compiler, $with_test_compiler, is a cross-compiler for the host system and then I can set my AM_CONDITIONAL to use in my Makefile.am's. I'm aware of AC_RUN_IFELSE and AC_LANG_PROGRAM, but I don't see a way to feed these macros a different compiler. AC_LANG and AC_LANG_PUSH don't seem to be useful in this scenario either.

Any tips?

Thanks,
Justin
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux