diff options
author | riggs <riggs@FreeBSD.org> | 2015-09-20 02:22:06 +0800 |
---|---|---|
committer | riggs <riggs@FreeBSD.org> | 2015-09-20 02:22:06 +0800 |
commit | 97a4105eb2c751f89980251f763cd9969d4beff9 (patch) | |
tree | eb960b849807a90f0eb204ca2ed7f098e84c9ced /lang/rust | |
parent | 12d6e6499523b349f8afe80008b3f2a094a2a01c (diff) | |
download | freebsd-ports-gnome-97a4105eb2c751f89980251f763cd9969d4beff9.tar.gz freebsd-ports-gnome-97a4105eb2c751f89980251f763cd9969d4beff9.tar.zst freebsd-ports-gnome-97a4105eb2c751f89980251f763cd9969d4beff9.zip |
Enable rust on i386
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/Makefile | 15 | ||||
-rw-r--r-- | lang/rust/distinfo.amd64 (renamed from lang/rust/distinfo) | 0 | ||||
-rw-r--r-- | lang/rust/distinfo.i386 | 4 | ||||
-rw-r--r-- | lang/rust/files/patch-mk_cfg_i686-unknown-freebsd.mk | 15 |
4 files changed, 30 insertions, 4 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index ebee098548ea..7bf4bf8055d7 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -20,9 +20,11 @@ LICENSE_COMB= dual LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE \ ${WRKSRC}/LICENSE-MIT -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler +DISTINFO_FILE= ${MASTERDIR}/distinfo.${ARCH} + # FIXME: The bootstrapped rustc adds -L/usr/local/lib in front of # the LDFLAGS. When stage0's rustc is linked, it picks the installed # librust*so and fails. @@ -31,8 +33,10 @@ CONFLICTS_BUILD= rust \ CONFLICTS_INSTALL= rust-nightly RUST_SOURCE= ${DISTNAME}-src${EXTRACT_SUFX} -RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2 -RUST_BOOT_SIG= 2015-07-26-a5c12f4-freebsd-x86_64-bc50b0f8d7f6d62f4f5ffa136f5387f5bf6524fd +RUST_BOOT= rust-stage0-${RUST_BOOT_SIG_${ARCH}}.tar.bz2 + +RUST_BOOT_SIG_amd64= 2015-07-26-a5c12f4-freebsd-x86_64-bc50b0f8d7f6d62f4f5ffa136f5387f5bf6524fd +RUST_BOOT_SIG_i386= 2015-07-26-a5c12f4-freebsd-i386-2fee22adec101e2f952a5548fd1437ce1bd8d26f # Rust's libraries are named librustc_${component}-${RUST_VSN_HASH}.so. # The hash depends on Rust version and, if the channel is not "stable", @@ -42,7 +46,10 @@ RUST_CHANNEL= stable RUST_VSN_HASH!= /usr/bin/printf '%s' ${RUST_VSN} | /sbin/md5 -q | cut -c 1-8 PLIST_SUB+= RUST_VSN_HASH=${RUST_VSN_HASH} -PLIST_SUB+= RUST_TARGET=x86_64-unknown-${OPSYS:tl} +# Rust's target arch string is different from *BSD arch strings +RUST_ARCH_amd64= x86_64 +RUST_ARCH_i386= i686 +PLIST_SUB+= RUST_TARGET=${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} USES= gmake libedit python:2,build HAS_CONFIGURE= yes diff --git a/lang/rust/distinfo b/lang/rust/distinfo.amd64 index b4395f37d2ec..b4395f37d2ec 100644 --- a/lang/rust/distinfo +++ b/lang/rust/distinfo.amd64 diff --git a/lang/rust/distinfo.i386 b/lang/rust/distinfo.i386 new file mode 100644 index 000000000000..d62ddcfb8580 --- /dev/null +++ b/lang/rust/distinfo.i386 @@ -0,0 +1,4 @@ +SHA256 (rustc-1.3.0-src.tar.gz) = ea02d7bc9e7de5b8be3fe6b37ea9b2bd823f9a532c8e4c47d02f37f24ffa3126 +SIZE (rustc-1.3.0-src.tar.gz) = 24308223 +SHA256 (rust-stage0-2015-07-26-a5c12f4-freebsd-i386-2fee22adec101e2f952a5548fd1437ce1bd8d26f.tar.bz2) = 4d03c58fc1e424bb0194e6c34c6c5da73e19807688cf28503e399fcf895d2034 +SIZE (rust-stage0-2015-07-26-a5c12f4-freebsd-i386-2fee22adec101e2f952a5548fd1437ce1bd8d26f.tar.bz2) = 14472816 diff --git a/lang/rust/files/patch-mk_cfg_i686-unknown-freebsd.mk b/lang/rust/files/patch-mk_cfg_i686-unknown-freebsd.mk new file mode 100644 index 000000000000..407deef73bab --- /dev/null +++ b/lang/rust/files/patch-mk_cfg_i686-unknown-freebsd.mk @@ -0,0 +1,15 @@ +--- mk/cfg/i686-unknown-freebsd.mk.orig 2015-09-15 21:28:41 UTC ++++ mk/cfg/i686-unknown-freebsd.mk +@@ -7,9 +7,9 @@ CFG_LIB_NAME_i686-unknown-freebsd=lib$(1 + CFG_STATIC_LIB_NAME_i686-unknown-freebsd=lib$(1).a + CFG_LIB_GLOB_i686-unknown-freebsd=lib$(1)-*.so + CFG_LIB_DSYM_GLOB_i686-unknown-freebsd=$(1)-*.dylib.dSYM +-CFG_JEMALLOC_CFLAGS_i686-unknown-freebsd := -m32 -arch i386 -I/usr/local/include $(CFLAGS) +-CFG_GCCISH_CFLAGS_i686-unknown-freebsd := -Wall -Werror -g -fPIC -m32 -arch i386 -I/usr/local/include $(CFLAGS) +-CFG_GCCISH_LINK_FLAGS_i686-unknown-freebsd := -m32 -shared -fPIC -g -pthread -lrt ++CFG_JEMALLOC_CFLAGS_i686-unknown-freebsd := -I/usr/local/include $(CFLAGS) ++CFG_GCCISH_CFLAGS_i686-unknown-freebsd := -Wall -Werror -g -fPIC -I/usr/local/include $(CFLAGS) ++CFG_GCCISH_LINK_FLAGS_i686-unknown-freebsd := -shared -fPIC -g -pthread -lrt + CFG_GCCISH_DEF_FLAG_i686-unknown-freebsd := -Wl,--export-dynamic,--dynamic-list= + CFG_LLC_FLAGS_i686-unknown-freebsd := + CFG_INSTALL_NAME_i686-unknown-freebsd = |