From 09390e9386c2f34c084b896d3e11174854578aa4 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 16 Oct 2017 10:06:28 +0000 Subject: [PATCH] lang/rust: unbreak FFI for returning struct on i386 As this fixes Stylo on i386, remove the workaround in www/firefox. PR: 223047 Suggested by: Sebastien Marie Submitted by: jbeich MFH: 2017Q4 (required by Firefox 57 scheduled on 2017-11-14) --- lang/rust/Makefile | 1 + .../files/patch-src_librustc__back_target_freebsd__base.rs | 12 ++++++++++++ www/firefox/Makefile | 2 +- www/firefox/files/patch-bug1401093 | 11 ----------- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs delete mode 100644 www/firefox/files/patch-bug1401093 diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 7c394d37e7dd..62cb77e1d69e 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -3,6 +3,7 @@ PORTNAME= rust PORTVERSION?= 1.20.0 +PORTREVISION?= 1 CATEGORIES= lang MASTER_SITES= http://static.rust-lang.org/dist/:src \ https://static.rust-lang.org/dist/:rust_bootstrap \ diff --git a/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs b/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs new file mode 100644 index 000000000000..40890bb39ab8 --- /dev/null +++ b/lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs @@ -0,0 +1,12 @@ +Return struct like OpenBSD, see src/librustc_trans/cabi_x86.rs + +--- src/librustc_back/target/freebsd_base.rs.orig 2017-07-17 22:10:50 UTC ++++ src/librustc_back/target/freebsd_base.rs +@@ -31,6 +31,7 @@ pub fn opts() -> TargetOptions { + target_family: Some("unix".to_string()), + linker_is_gnu: true, + has_rpath: true, ++ is_like_openbsd: true, + pre_link_args: args, + position_independent_executables: true, + exe_allocation_crate: super::maybe_jemalloc(), diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 55843d99c5ee..b3cd8d70106c 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -4,7 +4,7 @@ PORTNAME= firefox DISTVERSION= 56.0.1 DISTVERSIONSUFFIX=.source -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ diff --git a/www/firefox/files/patch-bug1401093 b/www/firefox/files/patch-bug1401093 deleted file mode 100644 index a573d678dd11..000000000000 --- a/www/firefox/files/patch-bug1401093 +++ /dev/null @@ -1,11 +0,0 @@ ---- toolkit/moz.configure.orig 2017-08-08 06:07:58 UTC -+++ toolkit/moz.configure -@@ -620,7 +620,7 @@ def stylo_config(value, _, target): - - # If nothing is specified, default to building stylo where possible. - if value.origin == 'default': -- if target.os == 'GNU' and target.bitness == 32: -+ if target.os != 'WINNT' and target.bitness == 32: - # The clang setup we use in automation is a little unusual, and - # doesn't play well with bindgen on 32-bit Linux. - pass