Sparc64 doesn't care about you, and you shouldn't care about Sparc64

Simon J. Gerraty sjg at juniper.net
Mon Nov 9 03:21:43 UTC 2015


Warner Losh <imp at bsdimp.com> wrote:
> Speaking of CROSS_BINUTILS_PREFIX, we need to unify CROSS*PREFIX stuff
> with the CROSS_TOOLCHAIN stuff. Two different ways to specify thing.

I guess that depends on how they are used.

We (Juniper) probably took all this to extremes many years ago,
and after a few revisions it can easily get confusing.
FWIW for a compiler:

/volume/hab/FreeBSD/10/amd64/gcc/jnpr/4.2.1/amd64-juniper-junos.8/bin/amd64-juniper-junos-gcc

we currently have something like:

TOOLCHAIN_PREFIX = /volume/hab/FreeBSD/10/amd64

TOOLCHAIN_${MACHINE} = gcc/jnpr/4.2.1/amd64-juniper-junos.8

CROSS_TARGET_${MACHINE} = amd64-juniper-junos

all the VAR[._]${MACHINE} get resolved like:

CROSS_TARGET ?= ${CROSS_TARGET_${MACHINE}}
COMPILER_TYPE ?= ${COMPILER_TYPE_${MACHINE}}
if CROSS_TARGET is not empty, then

CROSS_TARGET_PREFIX = ${CROSS_TARGET}-

so all the above combine into

BUILD_TOOL_PREFIX = ${TOOLCHAIN_PREFIX}/${TOOLCHAIN_${MACHINE}}/bin

and you can set CC etc to

CC.gcc = ${BUILD_TOOL_PREFIX}/${CROSS_TARGET_PREFIX}gcc
AS.gcc = ${BUILD_TOOL_PREFIX}/${CROSS_TARGET_PREFIX}as

etc


More information about the freebsd-sparc64 mailing list