Menu

#217 toolchain vars set in env while using --target= messes up

open-rejected
5
2009-10-30
2009-10-29
No

if CXX/CC are set to the full name of the toolchain in the environment and --target= is used with a normal configure host, the gcc.mak will make a mess of things

consider a config.mak that does:
TARGET_OS := bfin-linux-uclibc
_FORCE_CC := bfin-linux-uclibc-gcc

the gcc.mak will then proceed to do:
ifndef _FORCE_CC
CC := gcc
else
CC := ${_FORCE_CC}
endif
ifdef TARGET_OS
CC := ${TARGET_OS}-${CC}
endif

and the build will quickly fail with something like:
make[4]: bfin-linux-uclibc-bfin-linux-uclibc-gcc: Command not found

if a variable has a forced value, then TARGET_OS should not get prefixed to it:
ifdef _FORCE_CC
CC := ${_FORCE_CC}
else
CC := gcc
ifdef TARGET_OS
CC := ${TARGET_OS}-${CC}
endif
endif

Discussion

  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-10-30

    Use either --target= or $CXX/$CC. Cross-compilation scheme present here only for gcc. Option --target= assume cross-compilation.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-10-30
    • assigned_to: nobody --> complement
    • status: open --> open-rejected
     

Log in to post a comment.