help-make
[Top][All Lists]
Advanced

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

${CC} versus ${CROSS_CC}: best practices question


From: Robert P. J. Day
Subject: ${CC} versus ${CROSS_CC}: best practices question
Date: Fri, 13 May 2005 09:39:44 -0400 (EDT)

  i inherited someone else's make-based project, which supports
multi-arch builds by, based on your selection, redefining a number of
basic variables with assignments like:

  CC=${CROSS_COMPILE}gcc
  LD=${CROSS_COMPILE}ld

and so on, and defines all of the rules based on ${CC}, ${LD}, etc.

  the drawback i see to this is that it assumes that *every* compile
in the entire process using ${CC} will use the cross-compiler version
of the development commands, and it's possible that part of the build
could quite possibly involve the occaional native compile, for
whatever reason.

  because of that, in some of my earlier projects, i've previously
defined a *different* set of variables that are specifically for
cross-compiling:

  CROSS_CC=${CROSS_COMPILE}gcc
  CROSS_LD=${CROSS_COMPILE}ld

etc.  this leaves me the standard variables to represent native tools
and makes the rules a little more obvious.

  do people have strong opinions either way on which technique is more
acceptable?  is there a common standard for this?  thanks.

rday





reply via email to

[Prev in Thread] Current Thread [Next in Thread]