From bb52d711d0eab2a612da9553c0e07fdb5249cc5e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 12 Mar 2016 23:25:05 +0000 Subject: [PATCH] Use the newly minted Makefile.libcompat to implement libsoft libraries for the armv6 ABI switch. This also make WITH_LIBSOFT functional on the arm platform. As a transition thing, this seems to work even without switching the ABI (we basically build the same libraries twice when MK_LIBSOFT=yes until the ABI cut over next month). MK_LIBSOFT remains default no. --- Makefile | 3 ++- Makefile.inc1 | 3 +++ Makefile.libcompat | 11 ++++++++++- lib/Makefile | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e8b3902fae25..a72d5aab1b71 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,8 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ obj objlink rerelease showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend \ - build32 builddtb distribute32 install32 xdev xdev-build xdev-install \ + build32 distribute32 install32 build32 distribute32 install32 \ + builddtb xdev xdev-build xdev-install \ xdev-links native-xtools installconfig \ TGTS+= ${SUBDIR_TARGETS} diff --git a/Makefile.inc1 b/Makefile.inc1 index 980c7188c1d4..077789f82547 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -458,6 +458,9 @@ XCXXFLAGS+= ${BFLAGS} ${TARGET_ARCH} == "powerpc64") LIBCOMPAT= 32 .include "Makefile.libcompat" +.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" +LIBCOMPAT= SOFT +.include "Makefile.libcompat" .endif WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} diff --git a/Makefile.libcompat b/Makefile.libcompat index 32075fe0f435..8a336b9d5997 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -39,11 +39,20 @@ LIB32CFLAGS= -m32 -DCOMPAT_32BIT LIB32DTRACE= ${DTRACE} -32 LIB32WMAKEFLAGS+= -DCOMPAT_32BIT +# ------------------------------------------------------------------- +# soft-fp world +.if ${TARGET_ARCH} == "armv6" +LIBSOFTCFLAGS= -DCOMPAT_SOFTFP +LIBSOFTCPUFLAGS= -mfloat-abi=softfp +LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=armv6 +LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP +.endif + # ------------------------------------------------------------------- # Generic code for each type. # Set defaults based on type. libcompat= ${LIBCOMPAT:tl} -_LIBCOMPAT_MAKEVARS= _OBJTREE TMP CFLAGS WMAKEENV WMAKEFLAGS WMAKE +_LIBCOMPAT_MAKEVARS= _OBJTREE TMP CPUFLAGS CFLAGS WMAKEENV WMAKEFLAGS WMAKE .for _var in ${_LIBCOMPAT_MAKEVARS} .if !empty(LIB${LIBCOMPAT}${_var}) LIBCOMPAT${_var}?= ${LIB${LIBCOMPAT}${_var}} diff --git a/lib/Makefile b/lib/Makefile index cfa0ea9d2b70..57fb3c35c02b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -172,7 +172,7 @@ _libbsnmp= libbsnmp _libcasper= libcasper .endif -.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) +.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) _clang= clang .endif