Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8631C84F2F for ; Tue, 27 Jun 2023 09:30:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id L5zz_J26pijo for ; Tue, 27 Jun 2023 09:30:59 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 06B3B84E53 for ; Tue, 27 Jun 2023 09:30:59 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 04039FA89; Tue, 27 Jun 2023 09:30:59 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_168785825865780" MIME-Version: 1.0 Date: Tue, 27 Jun 2023 09:30:58 +0000 From: "Taylor R Campbell" Subject: CVS commit: pkgsrc/pkgtools/libnbcompat To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: riastradh@netbsd.org X-Mailer: log_accum Message-Id: <20230627093059.04039FA89@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_168785825865780 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: riastradh Date: Tue Jun 27 09:30:58 UTC 2023 Modified Files: pkgsrc/pkgtools/libnbcompat: inplace.mk Log Message: libnbcompat: Predetermine printf runtime test outcomes in configure. This way libnbcompat can be safely cross-compiled for NetBSD, as it should be for anything NetBSD! While here, use CONFIGURE_ENV.${OPSYS} instead of .if ${OPSYS} == and .if ${USE_CROSS_COMPILE:U:tl} == "yes" instead of .if !empty(USE_CROSS_COMPILE:M[yYe][eE][sS]). To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 pkgsrc/pkgtools/libnbcompat/inplace.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_168785825865780 Content-Disposition: inline Content-Length: 1410 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/libnbcompat/inplace.mk diff -u pkgsrc/pkgtools/libnbcompat/inplace.mk:1.14 pkgsrc/pkgtools/libnbcompat/inplace.mk:1.15 --- pkgsrc/pkgtools/libnbcompat/inplace.mk:1.14 Tue Aug 7 12:04:36 2018 +++ pkgsrc/pkgtools/libnbcompat/inplace.mk Tue Jun 27 09:30:58 2023 @@ -1,4 +1,4 @@ -# $NetBSD: inplace.mk,v 1.14 2018/08/07 12:04:36 jperkin Exp $ +# $NetBSD: inplace.mk,v 1.15 2023/06/27 09:30:58 riastradh Exp $ # # This file should not be included directly. Use USE_FEATURES instead. # @@ -38,14 +38,20 @@ libnbcompat-extract: ${LN} -fs ${PKGSRCDIR}/mk/gnu-config/config.sub ${LIBNBCOMPAT_PICDIR}/config.sub .endif -.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +.if ${USE_CROSS_COMPILE:U:tl} == "yes" NBCOMPAT_CONFIGURE_ARGS+= --build=${NATIVE_MACHINE_GNU_PLATFORM:Q} .endif NBCOMPAT_CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q} # The illumos fts(3) implementation is not (as of August 2018) largefile aware -.if ${OPSYS} == "SunOS" -CONFIGURE_ENV+= ac_cv_func_fts_open=no +CONFIGURE_ENV.SunOS+= ac_cv_func_fts_open=no + +# NetBSD has working printf %lld and correct vsnprintf return values, +# which can only be detected by runtime tests, not permitted when +# cross-compiling. +.if ${USE_CROSS_COMPILE:U:tl} == "yes" +CONFIGURE_ENV.NetBSD+= nb_cv_printf_lld=yes +CONFIGURE_ENV.NetBSD+= nb_cv_std_vsnprintf=yes .endif pre-configure: libnbcompat-build --_----------=_168785825865780--