1 1.6 bad # $NetBSD: Makefile,v 1.6 2024/09/28 21:18:55 bad Exp $ 2 1.1 mrg # 3 1.1 mrg 4 1.1 mrg GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/gmp/dist 5 1.1 mrg 6 1.1 mrg CONFIGURE_ARGS+=--disable-shared 7 1.1 mrg 8 1.5 christos CPPFLAGS+= ${HOST_CPPFLAGS} 9 1.5 christos 10 1.1 mrg .include "${.CURDIR}/../Makefile.gnuhost" 11 1.1 mrg 12 1.6 bad # GMP uses 8-byte alignment for 16-byte align-requiring things that break 13 1.6 bad # the build on modern macOS targets, turn off assembly on x86-64 for now. 14 1.6 bad # https://trac.macports.org/ticket/70859 15 1.6 bad .if ${BUILD_OSTYPE} == "Darwin" 16 1.6 bad BUILD_MACHINE!= uname -m 17 1.6 bad . if ${BUILD_MACHINE} == "x86_64" 18 1.6 bad CONFIGURE_ARGS+= --disable-assembly 19 1.6 bad . endif 20 1.6 bad .endif 21 1.6 bad 22 1.1 mrg # Don't override CFLAGS and CXXFLAGS, it breaks ABI detection. 23 1.1 mrg # PATH needs special treating since "make" tries to expand $PATH 24 1.1 mrg # when variable is used. 25 1.1 mrg CONFIGURE_ENV:= ${CONFIGURE_ENV:NPATH=*:NCFLAGS=*:NCXXFLAGS=*} \ 26 1.3 christos PATH="${TOOLDIR:Q}/bin:$$PATH" 27 1.2 mrg 28 1.2 mrg # Force avoiding possibly non-executable install-sh. 29 1.2 mrg CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" 30 1.4 mrg 31 1.4 mrg # mknative-gmp support 32 1.4 mrg # 33 1.4 mrg # XXX early version; does not use mknative.common yet. 34 1.4 mrg 35 1.4 mrg native-gmp: .native/.configure_done 36 1.4 mrg @echo 'Extracting GNU GMP configury for a native toolchain.' 37 1.4 mrg (cd ${.OBJDIR}/.native && \ 38 1.4 mrg ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp copy-files) 39 1.4 mrg @echo 'HA HA, only joking. Manual fixes maybe needed now.' 40 1.4 mrg 41 1.4 mrg .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile 42 1.4 mrg mkdir .native 2>/dev/null || true 43 1.4 mrg (cd ${.OBJDIR}/.native && \ 44 1.4 mrg ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp all) 45