Crude cross-build support thanks to clang
This commit is contained in:
parent
7d46a6b75a
commit
4bd681c150
@ -220,7 +220,7 @@ STAGE_SYMLINKS_DIR= ${STAGE_OBJTOP}
|
||||
.ifdef WITH_SYSROOT
|
||||
SYSROOT?= ${STAGE_OBJTOP}/
|
||||
.endif
|
||||
LDFLAGS_LAST+= -Wl,-rpath-link,${STAGE_LIBDIR}
|
||||
LDFLAGS_LAST+= -Wl,-rpath-link -Wl,${STAGE_LIBDIR}
|
||||
STAGED_INCLUDE_DIR= ${STAGE_OBJTOP}/usr/include
|
||||
.endif
|
||||
.endif # EARLY_BUILD for host
|
||||
@ -309,4 +309,16 @@ HOST_CC?= ${TOOLSDIR}/usr/bin/cc
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MACHINE:Nhost:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE}
|
||||
# cross-building
|
||||
.if !defined(FREEBSD_REVISION)
|
||||
FREEBSD_REVISION!= sed -n '/^REVISION=/{s,.*=,,;s,",,g;p; }' ${SRCTOP}/sys/conf/newvers.sh
|
||||
.export FREEBSD_REVISION
|
||||
.endif
|
||||
CROSS_TARGET_FLAGS= -target ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION}
|
||||
CFLAGS+= ${CROSS_TARGET_FLAGS}
|
||||
ACFLAGS+= ${CROSS_TARGET_FLAGS}
|
||||
LDFLAGS+= -Wl,-m -Wl,elf_${MACHINE_ARCH}_fbsd
|
||||
.endif
|
||||
|
||||
.endif # bmake
|
||||
|
Loading…
Reference in New Issue
Block a user