commit aa4c482b06e3fcd5bbb7247a006ca6cd9c4192a0 Author: Nicolas Vigier boklm@torproject.org Date: Sat Oct 25 17:44:44 2014 +0200
Add linux-i686 build --- Makefile | 5 ++++- projects/binutils/config | 2 +- projects/gcc/build | 3 ++- projects/gcc/config | 12 +++++++++++- projects/instantbird/build | 17 ++++++++++------- projects/instantbird/config | 11 ++++++++++- projects/instantbird/mozconfig | 23 ----------------------- projects/instantbird/mozconfig-linux-i686 | 27 +++++++++++++++++++++++++++ projects/instantbird/mozconfig-linux-x86_64 | 23 +++++++++++++++++++++++ projects/libgcrypt/build | 2 +- projects/libgcrypt/config | 5 +++++ projects/libgpg-error/build | 2 +- projects/libgpg-error/config | 5 +++++ projects/libotr/build | 2 +- projects/libotr/config | 5 +++++ projects/python/config | 2 +- projects/tor-browser/config | 6 +++++- rbm.conf | 1 + 18 files changed, 113 insertions(+), 40 deletions(-)
diff --git a/Makefile b/Makefile index 55f06c2..9ef012f 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ rbm=./rbm/rbm
-all: submodule-update tor-messenger-linux-x86_64 +all: submodule-update tor-messenger-linux-x86_64 tor-messenger-linux-i686
tor-messenger-linux-x86_64: $(rbm) build tor-messenger --target linux-x86_64
+tor-messenger-linux-i686: + $(rbm) build tor-messenger --target linux-i686 + submodule-update: git submodule update --init
diff --git a/projects/binutils/config b/projects/binutils/config index b030a58..c7db2dd 100644 --- a/projects/binutils/config +++ b/projects/binutils/config @@ -1,5 +1,5 @@ version: 2.24 -filename: '[% project %]-[% c("version") %]-[% c("var/build_osname") %]-[% c("var/build_id") %].tar.gz' +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' remote_docker: 1 lsb_release: id: Ubuntu diff --git a/projects/gcc/build b/projects/gcc/build index 9f8aa0a..5b2e687 100644 --- a/projects/gcc/build +++ b/projects/gcc/build @@ -3,7 +3,8 @@ set -e distdir=/tmp/dist/[% project %] tar xf [% project %]-[% c("version") %].tar.bz2 cd [% project %]-[% c("version") %] -./configure --prefix=$distdir --disable-multilib --enable-languages=c,c++ +./configure --prefix=$distdir --enable-multilib --enable-languages=c,c++ \ + --with-arch_32=i686 make -j4 make install cd /tmp/dist diff --git a/projects/gcc/config b/projects/gcc/config index a61e017..b6c0a67 100644 --- a/projects/gcc/config +++ b/projects/gcc/config @@ -1,4 +1,4 @@ -filename: '[% project %]-[% c("version") %]-[% c("var/build_osname") %]-[% c("var/build_id") %].tar.gz' +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' version: 4.9.1 remote_docker: 1 lsb_release: @@ -9,6 +9,16 @@ var: deps: - build-essential - libmpc-dev + - libc6-dev-i386 + setup_gcc: | + mkdir -p /tmp/dist + tar -C /tmp/dist -xf [% c("gcc_tarfile") %] + export PATH="/tmp/dist/gcc/bin:$PATH" + [% IF c("var/osname") == "linux-i686" -%] + export LD_LIBRARY_PATH=/tmp/dist/gcc/lib32 + [% ELSE -%] + export LD_LIBRARY_PATH=/tmp/dist/gcc/lib64 + [% END -%] input_files: - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-%5B% c("version") %]/gcc-[% c("version") %].tar.bz2' sha256sum: d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e diff --git a/projects/instantbird/build b/projects/instantbird/build index 05abace..66179ee 100644 --- a/projects/instantbird/build +++ b/projects/instantbird/build @@ -3,19 +3,22 @@ set -e rootdir=$(pwd) export SHELL=/bin/sh export HOME=$rootdir -mkdir /tmp/dist +[% pc('gcc', 'var/setup_gcc', { gcc_tarfile => c('input_files_by_name/gcc') }) %] +mkdir -p /tmp/dist cd /tmp/dist tar xf $rootdir/[% c('input_files_by_name/python') %] export PATH="/tmp/dist/python/bin:$PATH" python $rootdir/get-pip.py tar xf $rootdir/[% c('input_files_by_name/binutils') %] export PATH="/tmp/dist/binutils/bin:$PATH" -tar xf $rootdir/[% c('input_files_by_name/gcc') %] -export PATH="/tmp/dist/gcc/bin:$PATH" -export LD_LIBRARY_PATH=/tmp/dist/gcc/lib64 # LD_BIND_NOW needed to avoid this error: # undefined symbol: _ZNSt14error_categoryD2Ev export LD_BIND_NOW=1 +[% IF c("var/osname") == "linux-i686" -%] +export LDFLAGS=-m32 +export CFLAGS=-m32 +export CC='gcc -m32' +[% END -%] mkdir -p /tmp/dist/yasm/bin ln -s /usr/bin/yasm-1 /tmp/dist/yasm/bin/yasm export PATH="/tmp/dist/yasm/bin:$PATH" @@ -23,14 +26,14 @@ cd $rootdir tar xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %] mkdir moz cd moz -tar xvf ../[% c('input_files_by_name/mozilla-src') %] +tar xf ../[% c('input_files_by_name/mozilla-src') %] mv mozilla-* ../[% project %]-[% c('version') %]/mozilla cd ../[% project %]-[% c('version') %] for patch in $(ls -1 ../*.patch | sort) do patch -p1 < $patch done -cp ../mozconfig .mozconfig -./mozilla/mach build +cp ../[% c('input_files_by_name/mozconfig') %] .mozconfig +./mozilla/mach build || ./mozilla/mach/build ./mozilla/mach package mv obj-*/dist/*.tar.bz2 [% dest_dir _ '/' _ c('filename') %] diff --git a/projects/instantbird/config b/projects/instantbird/config index c655d63..02bedcf 100644 --- a/projects/instantbird/config +++ b/projects/instantbird/config @@ -29,6 +29,14 @@ var: - libgstreamer-plugins-base0.10-dev - libpulse-dev - ccache +targets: + linux-i686: + var: + arch_deps: + - libc6-dev-i386 + - ia32-libs + - lib32z1-dev + - lib32asound2-dev input_files: - name: mozilla-src project: mozilla @@ -42,7 +50,8 @@ input_files: - filename: Send-raw-msgs-through-the-conversation-service.patch - filename: null.patch - filename: purple-tests.patch - - filename: mozconfig + - filename: 'mozconfig-[% c("var/osname") %]' + name: mozconfig - name: python project: python - URL: https://bootstrap.pypa.io/get-pip.py diff --git a/projects/instantbird/mozconfig b/projects/instantbird/mozconfig deleted file mode 100644 index 71782cf..0000000 --- a/projects/instantbird/mozconfig +++ /dev/null @@ -1,23 +0,0 @@ -no_tooltool=1 - -export MOZILLA_OFFICIAL=1 -mk_add_options MOZILLA_OFFICIAL=1 - -export CFLAGS="-gdwarf-2 -Wno-sign-compare" -export CXXFLAGS="-gdwarf-2" - -# For NSS symbols -export MOZ_DEBUG_SYMBOLS=1 -ac_add_options --enable-debug-symbols="-gdwarf-2" - -mk_add_options MOZ_MAKE_FLAGS="-j4" - -ac_add_options --with-ccache -ac_add_options --enable-application=im -ac_add_options --enable-update-channel=release -ac_add_options --enable-update-packaging -ac_add_options --enable-optimize -ac_add_options --disable-debug - -ac_add_options --enable-official-branding -ac_add_options --with-l10n-base=.. diff --git a/projects/instantbird/mozconfig-linux-i686 b/projects/instantbird/mozconfig-linux-i686 new file mode 100644 index 0000000..c2710eb --- /dev/null +++ b/projects/instantbird/mozconfig-linux-i686 @@ -0,0 +1,27 @@ +no_tooltool=1 + +export MOZILLA_OFFICIAL=1 +mk_add_options MOZILLA_OFFICIAL=1 + +export CFLAGS="-m32 -gdwarf-2 -Wno-sign-compare" +export CXXFLAGS="-m32 -gdwarf-2" +export LDFLAGS=-m32 +export XLDOPTS=-m32 +export ASFLAGS=-m32 + +# For NSS symbols +export MOZ_DEBUG_SYMBOLS=1 +ac_add_options --enable-debug-symbols="-gdwarf-2" + +mk_add_options MOZ_MAKE_FLAGS="-j4" + +ac_add_options --with-ccache +ac_add_options --enable-application=im +ac_add_options --enable-update-channel=release +ac_add_options --enable-update-packaging +ac_add_options --enable-optimize +ac_add_options --disable-debug + +ac_add_options --enable-official-branding +ac_add_options --with-l10n-base=.. +ac_add_options --host=i686-linux-gnu diff --git a/projects/instantbird/mozconfig-linux-x86_64 b/projects/instantbird/mozconfig-linux-x86_64 new file mode 100644 index 0000000..71782cf --- /dev/null +++ b/projects/instantbird/mozconfig-linux-x86_64 @@ -0,0 +1,23 @@ +no_tooltool=1 + +export MOZILLA_OFFICIAL=1 +mk_add_options MOZILLA_OFFICIAL=1 + +export CFLAGS="-gdwarf-2 -Wno-sign-compare" +export CXXFLAGS="-gdwarf-2" + +# For NSS symbols +export MOZ_DEBUG_SYMBOLS=1 +ac_add_options --enable-debug-symbols="-gdwarf-2" + +mk_add_options MOZ_MAKE_FLAGS="-j4" + +ac_add_options --with-ccache +ac_add_options --enable-application=im +ac_add_options --enable-update-channel=release +ac_add_options --enable-update-packaging +ac_add_options --enable-optimize +ac_add_options --disable-debug + +ac_add_options --enable-official-branding +ac_add_options --with-l10n-base=.. diff --git a/projects/libgcrypt/build b/projects/libgcrypt/build index c49d3de..e06636a 100644 --- a/projects/libgcrypt/build +++ b/projects/libgcrypt/build @@ -10,7 +10,7 @@ distdir=/tmp/dist/[% project %] mkdir -p $distdir tar xf [% project %]-[% c('version') %].tar.bz2 cd [% project %]-[% c('version') %] -./configure --prefix=$distdir +./configure --prefix=$distdir [% c("var/configure_opt") %] make -j4 make prefix=$distdir install cd /tmp/dist diff --git a/projects/libgcrypt/config b/projects/libgcrypt/config index a5884c7..88a3c8c 100644 --- a/projects/libgcrypt/config +++ b/projects/libgcrypt/config @@ -8,6 +8,11 @@ lsb_release: var: deps: - build-essential +targets: + linux-i686: + var: + arch_deps: + - libc6-dev-i386 input_files: - URL: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.2.tar.bz2 sig_ext: sig diff --git a/projects/libgpg-error/build b/projects/libgpg-error/build index e504ee9..b1c10e9 100644 --- a/projects/libgpg-error/build +++ b/projects/libgpg-error/build @@ -4,7 +4,7 @@ distdir="/tmp/dist/[% project %]" mkdir -p "$distdir" tar xf [% project %]-[% c('version') %].tar.bz2 cd [% project %]-[% c('version') %] -./configure --prefix="$distdir" +./configure --prefix="$distdir" [% c("var/configure_opt") %] make -j4 make prefix="$distdir" install cd /tmp/dist diff --git a/projects/libgpg-error/config b/projects/libgpg-error/config index 2ed198e..af24f3b 100644 --- a/projects/libgpg-error/config +++ b/projects/libgpg-error/config @@ -8,6 +8,11 @@ lsb_release: var: deps: - build-essential +targets: + linux-i686: + var: + arch_deps: + - libc6-dev-i386 input_files: - URL: 'ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-[% c("version") %].tar.bz2' sig_ext: sig diff --git a/projects/libotr/build b/projects/libotr/build index baa001e..8f52c71 100644 --- a/projects/libotr/build +++ b/projects/libotr/build @@ -11,7 +11,7 @@ cd $rootdir distdir=/tmp/dist/[% project %] tar xf libotr-[% c('version') %].tar.gz cd libotr-[% c('version') %] -./configure --prefix=$distdir +./configure --prefix=$distdir [% c("var/configure_opt") %] make -j4 make prefix=$distdir install cd /tmp/dist diff --git a/projects/libotr/config b/projects/libotr/config index d808170..e8e4a16 100644 --- a/projects/libotr/config +++ b/projects/libotr/config @@ -9,6 +9,11 @@ var: deps: - build-essential - file +targets: + linux-i686: + var: + arch_deps: + - libc6-dev-i386 input_files: - filename: 'libotr-[% c("version") %].tar.gz' URL: 'https://otr.cypherpunks.ca/libotr-%5B% c("version") %].tar.gz' diff --git a/projects/python/config b/projects/python/config index e48aed9..4007a29 100644 --- a/projects/python/config +++ b/projects/python/config @@ -1,5 +1,5 @@ version: 2.7.8 -filename: 'python-[% c("arch") %]-[% c("lsb_release/id") %]-[% c("lsb_release/codename") %]-[% c("var/build_id") %].tar.gz' +filename: 'python-[% c("lsb_release/id") %]-[% c("lsb_release/codename") %]-[% c("var/build_id") %].tar.gz' lsb_release: id: Ubuntu release: 10.04 diff --git a/projects/tor-browser/config b/projects/tor-browser/config index edd5d7f..2e67451 100644 --- a/projects/tor-browser/config +++ b/projects/tor-browser/config @@ -5,7 +5,11 @@ input_files: - filename: "tor-browser-[% c('var/tb_osname') %]-[% c('version') %]_en-US.tar.xz" URL: "https://dist.torproject.org/torbrowser/%5B% c('version') %]/tor-browser-[% c('var/tb_osname') %]-[% c('version') %]_en-US.tar.xz" name: torbrowser - sha256sum: a90e1c2520064bcdd9f3f78d8a9bb0c7b01170ee28846bb0132b9d87c9c46099 + targets: + linux-x86_64: + sha256sum: a90e1c2520064bcdd9f3f78d8a9bb0c7b01170ee28846bb0132b9d87c9c46099 + linux-i686: + sha256sum: b2fad95b8f20f09ce2ad9bb638e66b7790e91ce8ca14faea56a5ab0495504c22
targets: linux-x86_64: diff --git a/rbm.conf b/rbm.conf index 10ae724..5b41fd2 100644 --- a/rbm.conf +++ b/rbm.conf @@ -42,6 +42,7 @@ targets: var: linux: 1 osname: linux-i686 + configure_opt: '--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32' windows-i686: arch: i686 var:
tor-commits@lists.torproject.org