pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   he
Date:           Mon Jul  6 19:09:29 UTC 2020

Modified Files:
        pkgsrc/lang/rust: Makefile
Added Files:
        pkgsrc/lang/rust: cross.mk

Log Message:
Based on suggestion, add the "cross.mk" file which contains
settings which may be tweaked to do a cross-build of rust.
Include it from the main Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/rust/cross.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.184 pkgsrc/lang/rust/Makefile:1.185
--- pkgsrc/lang/rust/Makefile:1.184     Mon Jul  6 16:12:14 2020
+++ pkgsrc/lang/rust/Makefile   Mon Jul  6 19:09:29 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.184 2020/07/06 16:12:14 he Exp $
+# $NetBSD: Makefile,v 1.185 2020/07/06 19:09:29 he Exp $
 
 DISTNAME=      rustc-1.44.0-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -48,6 +48,9 @@ CONFIGURE_ARGS+=              --disable-ninja
 #BUILD_TARGET=         dist
 BUILD_TARGET=          build
 
+# Include (optional) settings to cross-build rust
+.include "cross.mk"
+
 # Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
 # uncommenting the LD_LIBRARY_PATH setting may be required to run
 # the bootstrap

Added files:

Index: pkgsrc/lang/rust/cross.mk
diff -u /dev/null pkgsrc/lang/rust/cross.mk:1.1
--- /dev/null   Mon Jul  6 19:09:29 2020
+++ pkgsrc/lang/rust/cross.mk   Mon Jul  6 19:09:29 2020
@@ -0,0 +1,50 @@
+# $Id: cross.mk,v 1.1 2020/07/06 19:09:29 he Exp $
+
+# These settings may be used to cross-build rust.
+#
+# They interact with the files/gcc-wrap script to pick the
+# right compiler for the different phases of the build, and
+# use the headers for the target when required.  Note that the
+# cross-root tree will need to have the required binary packages
+# installed (curl etc., see list of buildlink3.mk includes in main
+# Makefile).
+
+# The gcc-wrap / c++-wrap script takes CROSS_ROOT environment variable
+# to do a cross-build.  The wrapper script assumes dest/ and tools/
+# as a result of a cross-build of NetBSD as subdirectories of this root
+#CROSS_ROOT=           /u/evbarm-armv7hf
+#CROSS_ROOT=           /u/sparc64
+#CROSS_ROOT=           /u/macppc
+#CROSS_ROOT=           /u/9.0-macppc
+#CROSS_ROOT=           /u/evbarm64
+#CROSS_ROOT=           /u/i386
+#MAKE_ENV+=            CROSS_ROOT=${CROSS_ROOT}
+
+# The GNU cross target designation
+#GNU_CROSS_TARGET=     armv7--netbsdelf-eabihf
+#GNU_CROSS_TARGET=     sparc64--netbsd
+#GNU_CROSS_TARGET=     i486--netbsdelf
+#GNU_CROSS_TARGET=     powerpc--netbsd
+#GNU_CROSS_TARGET=     aarch64--netbsd
+#MAKE_ENV+=            GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
+
+# To cross-build rust, you need to specify
+# the ultimate target to built for, as well as the
+# host the compiler is supposed to run on.
+# Rust's target designation
+#TARGET=               armv7-unknown-netbsd-eabihf
+#TARGET=               sparc64-unknown-netbsd
+#TARGET=               powerpc-unknown-netbsd
+#TARGET=               aarch64-unknown-netbsd
+#TARGET=               i686-unknown-netbsd
+#
+#SCRIPTS=              ${WRKDIR}/scripts
+#CONFIGURE_ARGS+=      --host=${TARGET}
+#CONFIGURE_ARGS+=      --target=${TARGET}
+#CONFIGURE_ARGS+=      --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
+#CONFIGURE_ARGS+=      --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
+#CONFIGURE_ARGS+=      --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
+#CONFIGURE_ARGS+=      --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
+
+# May be required when cross-building on NetBSD
+#MAKE_ENV+=            OPENSSL_DIR=/usr



Home | Main Index | Thread Index | Old Index