Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 1,120 Lines • ▼ Show 20 Lines | |||||
ARCH!= ${UNAME} -p | ARCH!= ${UNAME} -p | ||||
.endif | .endif | ||||
HOSTARCH:= ${ARCH} | HOSTARCH:= ${ARCH} | ||||
.if defined(CROSS_TOOLCHAIN) | .if defined(CROSS_TOOLCHAIN) | ||||
ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} | ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} | ||||
.endif | .endif | ||||
_EXPORTED_VARS+= ARCH | _EXPORTED_VARS+= ARCH | ||||
.if ${ARCH} == powerpc64 | |||||
PPC_ABI!= ${CC} -dM -E - < /dev/null | ${AWK} '/_CALL_ELF/{print "ELFv"$$3}' | |||||
mat: This needs to be cached, see usage of _EXPORTED_VARS. | |||||
. if ${PPC_ABI} != ELFv2 | |||||
PPC_ABI= ELFv1 | |||||
. endif | |||||
.endif | |||||
_EXPORTED_VARS+= PPC_ABI | |||||
Not Done Inline ActionsI have never actually used _EXPORTED_VARS, but the goal is to not run the command in != if the variable is already set, so you might need to test if the variable already exists, and only add to _EXPORTED_VARS if the arch is powerpc64. See other places where the variable is used. mat: I have never actually used _EXPORTED_VARS, but the goal is to not run the command in != if the… | |||||
# Get operating system versions for a cross build | # Get operating system versions for a cross build | ||||
.if defined(CROSS_SYSROOT) | .if defined(CROSS_SYSROOT) | ||||
.if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) | .if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) | ||||
.error CROSS_SYSROOT does not include /usr/include/sys/param.h. | .error CROSS_SYSROOT does not include /usr/include/sys/param.h. | ||||
.endif | .endif | ||||
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h | OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h | ||||
_OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null | _OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 4,245 Lines • Show Last 20 Lines |
This needs to be cached, see usage of _EXPORTED_VARS.