Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: [Re: mips64 bulk build report] unbreak devel/boost on octeon
To:
Visa Hankala <visa@hankala.org>
Cc:
Klemens Nanni <kn@openbsd.org>, ports@openbsd.org, Brad Smith <brad@comstyle.com>
Date:
Thu, 2 Apr 2026 19:44:34 +0200

Download raw body.

Thread
On Thu, Apr 02, 2026 at 02:04:26PM +0000, Visa Hankala wrote:
> 
> The "relocation truncated to fit: R_MIPS_CALL16" error says that the
> GOT has become too large for R_MIPS_CALL16. This size limitation can
> be avoided by compiling the calling code with -mxgot (this causes
> a slight performance drop in the resulting machine code).
> 
> Here is a revised patch to fix the mips64 build:

ok jca@

> Index: Makefile
> ===================================================================
> RCS file: ports/devel/boost/Makefile,v
> diff -u -p -r1.160 Makefile
> --- Makefile	10 Feb 2026 13:44:09 -0000	1.160
> +++ Makefile	2 Apr 2026 13:48:56 -0000
> @@ -89,6 +89,11 @@ LIB_DEPENDS=	archivers/bzip2 \
>  
>  LIB_DEPENDS-md=	devel/boost
>  
> +BUILD_SH_ARGS=
> +.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
> +BUILD_SH_ARGS+=	--cxxflags='-mxgot'
> +.endif
> +
>  .include <bsd.port.arch.mk>
>  
>  .if ${PROPERTIES:Mclang}
> @@ -137,7 +142,7 @@ do-configure:
>  	@cd ${WRKSRC}/libs/config && \
>  		${SETENV} ${CONFIGURE_ENV} /bin/sh ./configure
>  	@cd ${WRKSRC}/tools/build/src/engine && ${SETENV} ${CONFIGURE_ENV} \
> -		/bin/sh ./build.sh ${TOOLSET} && cp b2 ${WRKSRC}
> +		/bin/sh ./build.sh ${BUILD_SH_ARGS} ${TOOLSET} && cp b2 ${WRKSRC}
>  	@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} /bin/sh ./bootstrap.sh ${BOOTSTRAP}
>  
>  do-build:
> 

-- 
jca