Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2018 18:31:29 +0100
From:      =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org>
To:        Jan Beich <jbeich@FreeBSD.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, tobik@FreeBSD.org
Subject:   Re: svn commit: r486769 - head/Mk/Uses
Message-ID:  <20181206183129.5c38b77f@kalimero.tijl.coosemans.org>
In-Reply-To: <201812061707.wB6H7gqM041538@repo.freebsd.org>
References:  <201812061707.wB6H7gqM041538@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 6 Dec 2018 17:07:42 +0000 (UTC) Jan Beich <jbeich@FreeBSD.org> wrote:
> Author: jbeich
> Date: Thu Dec  6 17:07:42 2018
> New Revision: 486769
> URL: https://svnweb.freebsd.org/changeset/ports/486769
> 
> Log:
>   USES=cargo to convert LDFLAGS into RUSTFLAGS
>   
>   Approved by:	rust (tobik)
>   Differential Revision:	https://reviews.freebsd.org/D18039
> 
> Modified:
>   head/Mk/Uses/cargo.mk   (contents, props changed)
> 
> Modified: head/Mk/Uses/cargo.mk
> ==============================================================================
> --- head/Mk/Uses/cargo.mk	Thu Dec  6 16:51:51 2018	(r486768)
> +++ head/Mk/Uses/cargo.mk	Thu Dec  6 17:07:42 2018	(r486769)
> @@ -62,15 +62,13 @@ CARGO_TARGET_DIR?=	${WRKDIR}/target
>  #  - RUSTC: path of rustc binary (default to lang/rust)
>  #  - RUSTDOC: path of rustdoc binary (default to lang/rust)
>  #  - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs
> -#
> -# XXX LDFLAGS => -C link-arg=$1 (via RUSTFLAGS)
>  CARGO_ENV+= \
>  	CARGO_HOME=${WRKDIR}/cargo-home \
>  	CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \
>  	CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \
>  	RUSTC=${LOCALBASE}/bin/rustc \
>  	RUSTDOC=${LOCALBASE}/bin/rustdoc \
> -	RUSTFLAGS="${RUSTFLAGS}"
> +	RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:S/^/-C link-arg=/}"

Can you also add -C linker="${CC}"?  It's always using cc at the moment.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181206183129.5c38b77f>