Commit 981fa020 authored by bapt's avatar bapt
Browse files

Add a cross developement environnement for FreeBSD 10.0 armv6

This is need for the upcoming work on cross building the ports tree
parent 0ffbe0cd
......@@ -70,6 +70,7 @@
SUBDIR += arm-eabi-binutils
SUBDIR += arm-eabi-gcc
SUBDIR += arm-elf-binutils
SUBDIR += armv6-freebsd10.0-xdev
SUBDIR += aros-sdk
SUBDIR += art
SUBDIR += as31
......
# $FreeBSD$
X_TARGET= arm
X_TARGET_ARCH= armv6
.include "${.CURDIR}/Makefile.shared"
.include <bsd.port.mk>
MAKE_ENV:= ${MAKE_ENV:N*FLAGS=*}
MAKE_ENV:= ${MAKE_ENV:NCC=*}
MAKE_ENV:= ${MAKE_ENV:NCPP=*}
MAKE_ENV:= ${MAKE_ENV:NCXX=*}
# $FreeBSD$
PORTNAME= xdev
PORTVERSION= 10.0
PKGNAMEPREFIX= ${X_BASE}-
DISTFILES= src.txz
DIST_SUBDIR= freebsd/${PORTVERSION}
CATEGORIES= devel
MASTER_SITES= FREEBSD_ORG/releases/amd64/${PORTVERSION}-RELEASE/
COMMENT= FreeBSD ${PORTVERSION} base libraries and headers for ${X_TARGET_ARCH}
LICENSE= BSD2CLAUSE
X_BASE= ${X_TARGET_ARCH}-freebsd${PORTVERSION}
WRKSRC= ${WRKDIR}/usr/src
SETENV= env -i
MAKE_ENV+= WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null \
NO_FSCHG=yes \
XDEV=${X_TARGET} XDEV_ARCH=${X_TARGET_ARCH} \
XDTP=${PREFIX}/${X_BASE} \
MAKEOBJDIRPREFIX=${WRKDIR}/obj DESTDIR=${WRKDIR}/tmp
ALL_TARGET= xdev
.if !defined(WITH_DEBUG)
X_STRIP_CMD= ${WRKDIR}/tmp/${PREFIX}/${X_BASE}/usr/bin/strip
.else
X_STRIP_CMD= ${TRUE}
.endif
do-install:
@cd ${WRKDIR}/tmp; ${PAX} -rw . ${STAGEDIR}
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE} -type d -empty -delete
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${X_BASE}/usr/bin/* 2>/dev/null
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE}/usr/lib -type f -name "*.so*" -exec ${X_STRIP_CMD} {} \; 2>/dev/null
@${FIND} ${STAGEDIR}${PREFIX}/${X_BASE}/lib -type f -exec ${X_STRIP_CMD} {} \; 2>/dev/null
#Fix symlinks
@for l in `${FIND} ${STAGEDIR}${PREFIX}/${X_BASE} -type l -print`; do \
d=`readlink $$l` ; \
case $$d in \
${WRKDIR}/tmp/*) ${LN} -sf $${d#${WRKDIR}/tmp} $$l ;; \
/*) ${LN} -sf ${PREFIX}/${X_BASE}$${d} $$l ;; \
esac ; \
done
@cd ${STAGEDIR}${PREFIX}/${X_BASE}/usr/bin; \
for i in *; do \
${LN} -sf ../${X_BASE}/usr/bin/$$i \
${STAGEDIR}${PREFIX}/bin/${X_BASE}-$$i ; \
done
@${RM} -rf ${STAGEDIR}/usr/usr
SHA256 (freebsd/10.0/src.txz) = b85bdebf7efdabf9b89f7881b550ce89949c646decf49a3a3fcf8941bde67fe8
SIZE (freebsd/10.0/src.txz) = 112367292
--- ./Makefile.inc1.orig 2014-01-16 21:31:35.000000000 +0100
+++ ./Makefile.inc1 2014-04-02 18:02:36.525312133 +0200
@@ -1857,21 +1857,23 @@
CPUTYPE=${XDEV_CPUTYPE}
XDDIR=${XDEV_ARCH}-freebsd
-XDTP=/usr/${XDDIR}
+XDTP?=usr/${XDDIR}
CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
CDENV= ${CDBENV} \
_SHLIBDIRPREFIX=${XDDESTDIR} \
- TOOLS_PREFIX=${XDDESTDIR}
+ TOOLS_PREFIX=${XDTP}
CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
- -B${XDDESTDIR}/usr/lib
-CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \
+ --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/bin
+CD2CXXFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \
+ --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/bin
+CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CXXFLAGS}"\
MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH}
CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp
CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
-CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
-XDDESTDIR=${DESTDIR}${XDTP}
+CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN}
+XDDESTDIR?=${DESTDIR}/${XDTP}
.if !defined(OSREL)
OSREL!= uname -r | sed -e 's/[-(].*//'
.endif
@@ -1904,11 +1906,11 @@
_xb-cross-tools:
.for _tool in \
- gnu/usr.bin/binutils \
- gnu/usr.bin/cc \
- usr.bin/ar \
${_clang_libs} \
- ${_clang}
+ ${_clang} \
+ ${_binutils} \
+ ${_cc} \
+ usr.bin/ar
${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
cd ${.CURDIR}/${_tool} && \
${CDMAKE} DIRPRFX=${_tool}/ obj && \
@@ -1932,10 +1934,11 @@
_xi-cross-tools:
@echo "_xi-cross-tools"
.for _tool in \
- gnu/usr.bin/binutils \
- gnu/usr.bin/cc \
- usr.bin/ar \
- ${_clang}
+ ${_clang_libs} \
+ ${_clang} \
+ ${_binutils} \
+ ${_cc} \
+ usr.bin/ar
${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
@@ -1951,6 +1954,7 @@
_xi-links:
${_+_}cd ${XDDESTDIR}/usr/bin; \
+ mkdir -p ../../../../usr/bin; \
for i in *; do \
ln -sf ../../${XDTP}/usr/bin/$$i \
../../../../usr/bin/${XDDIR}-$$i; \
FreeBSD 10.0 Cross Developement Environment for armv6
WWW: http://www.FreeBSD.org
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment