[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-build/master] Bug 31584: Clean up mingw-w64 project
commit 67a38dec8014e4ba33dc062527e74df2aca1f3db
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Mon Sep 16 06:41:49 2019 +0000
Bug 31584: Clean up mingw-w64 project
We bump the GCC version to a supported one (9.2.0). The obvious choice
would have been 8.3.0 as we use for our Linux bundles. But, alas, that
one is crashing when cross-compiling Rust for 64bit Windows.
---
projects/mingw-w64/build | 11 ++----
projects/mingw-w64/config | 5 ++-
projects/mingw-w64/libtool-sort.patch | 67 -----------------------------------
projects/tor/build | 3 ++
4 files changed, 7 insertions(+), 79 deletions(-)
diff --git a/projects/mingw-w64/build b/projects/mingw-w64/build
index 4be660d..111205c 100644
--- a/projects/mingw-w64/build
+++ b/projects/mingw-w64/build
@@ -22,17 +22,10 @@ cd /var/tmp/build
mkdir gcc
cd gcc
tar xJf $rootdir/gcc-[% c("var/gcc_version") %].tar.xz
-# https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01115.html
-# From gcc commit 494c17dc2bf45b8155fb9a14178ab48f01bc12a8
-# libtool: Sort output of 'find' to enable deterministic builds.
-patch -p1 -d gcc-[% c("var/gcc_version") %] < $rootdir/libtool-sort.patch
-# We don't want to link against msvcrt.dll due to bug 9084 and want to use
-# pthreads, too, as this is needed for ESR60, at least due to bug 1406542.
-[% c("arch") %]-w64-mingw32-g++ -dumpspecs > $distdir/msvcr100.spec
-sed 's/msvcrt/msvcr100 -lpthread/' -i $distdir/msvcr100.spec
# LDFLAGS_FOR_TARGET does not work for some reason. Thus, we take
# CFLAGS_FOR_TARGET.
-export CFLAGS_FOR_TARGET="-specs=$distdir/msvcr100.spec -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-insert-timestamp"
+export CFLAGS_FOR_TARGET="-Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-insert-timestamp"
+# Rust requires enabling pthreads
gcc-[% c("var/gcc_version") %]/configure --prefix=$distdir --target=[% c("arch") %]-w64-mingw32 --with-gnu-ld --with-gnu-as --disable-multilib --enable-threads=posix --enable-languages=c,c++
make -j[% c("buildconf/num_procs") %] all-gcc
make install-gcc
diff --git a/projects/mingw-w64/config b/projects/mingw-w64/config
index b088c8e..1ccbcdf 100644
--- a/projects/mingw-w64/config
+++ b/projects/mingw-w64/config
@@ -6,7 +6,7 @@ version: '[% c("abbrev") %]'
var:
container:
use_container: 1
- gcc_version: 6.4.0
+ gcc_version: 9.2.0
deps:
- automake
- build-essential
@@ -30,7 +30,6 @@ targets:
input_files:
- project: container-image
- URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("var/gcc_version") %]/gcc-[% c("var/gcc_version") %].tar.xz'
- sha256sum: 850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4
+ sha256sum: ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
- name: binutils
project: binutils
- - filename: libtool-sort.patch
diff --git a/projects/mingw-w64/libtool-sort.patch b/projects/mingw-w64/libtool-sort.patch
deleted file mode 100644
index 7c7fa85..0000000
--- a/projects/mingw-w64/libtool-sort.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 494c17dc2bf45b8155fb9a14178ab48f01bc12a8 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 5 Jul 2018 19:13:45 +0000
-Subject: [PATCH 1/1] * libtool.m4: Sort output of 'find' to enable
- deterministic builds. * ltmain.sh: Likewise.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262451 138bc75d-0d04-0410-961f-82ee72b054a4
----
- ChangeLog | 5 +++++
- libtool.m4 | 8 ++++----
- ltmain.sh | 4 ++--
- 3 files changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/libtool.m4 b/libtool.m4
-index 24d13f3..940faaa 100644
---- a/libtool.m4
-+++ b/libtool.m4
-@@ -6005,20 +6005,20 @@ if test "$_lt_caught_CXX_error" != yes; then
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
-+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 and above use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..79f9ba8 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -2917,7 +2917,7 @@ func_extract_archives ()
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
-- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
-+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
- $LIPO -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
-@@ -2932,7 +2932,7 @@ func_extract_archives ()
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
-- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
---
-2.9.3
-
diff --git a/projects/tor/build b/projects/tor/build
index 6b684a0..0705626 100644
--- a/projects/tor/build
+++ b/projects/tor/build
@@ -39,6 +39,9 @@ openssldir=/var/tmp/dist/openssl
[% END %]
tar -C /var/tmp/build -xf [% c('input_files_by_name/zlib') %]
zlibdir=/var/tmp/build/zlib
+ # XXX: It's a bit unfortunate but we need the pthread dll here as libevent
+ # gets compiled with pthread support once it is enabled in GCC, which we need
+ # to do as otherwise the Rust compilaton breaks.
mingwlibs=/var/tmp/dist/mingw-w64/[% c("arch") %]-w64-mingw32/bin/
cp $zlibdir/lib/*.dll $openssldir/bin/*.dll $libeventdir/bin/*.dll \
$gcclibs/*.dll $mingwlibs/libwinpthread-1.dll $distdir/Tor/
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits