8a6b18dc6c
- to do this, and make the result runnable on pre-thumb arm, change upstreams assembler snippets and stubs to use "mov pc,reg" instead of the return/call-to-thumb-friendly "bx reg", which is not available in non-thumb-enabled arm CPUs. Whether this is the way to go, or a seperate "armt" architecture for ocaml is needed, needs to be discussed with upstream. Resulting compiler, when running its selftest suite, has 6 errors less than the same on i386. Unison compiled natively with this passes its self-test.
71 lines
2.3 KiB
Makefile
71 lines
2.3 KiB
Makefile
# $NetBSD: Makefile,v 1.68 2010/12/19 08:27:17 is Exp $
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
.include "Makefile.common"
|
|
|
|
CONFIGURE_ARGS+= -no-tk
|
|
CONFIGURE_ARGS+= -cc ${CC}
|
|
CONFIGURE_ENV+= disable_x11=yes
|
|
|
|
BUILD_TARGET= world
|
|
MAKE_JOBS_SAFE= no
|
|
UNLIMIT_RESOURCES= stacksize
|
|
|
|
###
|
|
### PLIST components
|
|
###
|
|
|
|
# Stub libraries for functions missing from base system.
|
|
.if !empty(MACHINE_PLATFORM:MDarwin-*-powerpc) || \
|
|
!empty(MACHINE_PLATFORM:MDarwin-9.*-i386) || \
|
|
!empty(MACHINE_PLATFORM:MDarwin-10.*-x86_64) || \
|
|
${OPSYS} == "DragonFly" || ${OPSYS} == "NetBSD" || \
|
|
${OPSYS} == "FreeBSD" || ${OPSYS} == "SunOS" || \
|
|
${OPSYS} == "Linux"
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.stub
|
|
.endif
|
|
|
|
# Optional components built only on certain platforms.
|
|
.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \
|
|
(${MACHINE_ARCH} == "arm") || \
|
|
(${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "x86_64")
|
|
BUILD_TARGET+= opt opt.opt
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.opt
|
|
. if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \
|
|
empty(MACHINE_PLATFORM:MSunOS-*-i386) && \
|
|
empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) && \
|
|
empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) && \
|
|
empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) && \
|
|
empty(MACHINE_PLATFORM:MNetBSD-*-arm) && \
|
|
empty(MACHINE_PLATFORM:MNetBSD-*-sparc)
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.prof
|
|
. endif
|
|
.endif
|
|
|
|
.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64")
|
|
. if !empty(MACHINE_PLATFORM:MLinux-*-*) || \
|
|
!empty(MACHINE_PLATFORM:MDarwin-*-*) || \
|
|
!empty(MACHINE_PLATFORM:MFreeBSD-*-*)
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.natdynlink
|
|
. endif
|
|
.endif
|
|
|
|
# Common ocaml files.
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
|
|
|
# This is needed because ${WRKSRC}/build/partial-install.sh uses
|
|
# $PWD as part of its script. However, with /bin/sh on SunOS
|
|
# (cd work/foo-1.0 && echo $PWD) will show that the value of PWD is
|
|
# set before the cd takes place and is then passed down. So the end
|
|
# result is when ./build/partial-install.sh is called, PWD is set
|
|
# to /usr/pkgsrc/devel/ocaml instead of ${WRKSRC}. /bin/ksh, which
|
|
# is what ${SH} is on SunOS, doesn't exhibit this behaviour.
|
|
.if ${OPSYS} == "SunOS"
|
|
INSTALL_MAKE_FLAGS+= SHELL=${SH:Q}
|
|
.endif
|
|
|
|
do-test:
|
|
cd $(WRKSRC)/testsuite && $(MAKE_PROGRAM) all
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|