Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update makefiles/gitian for LevelDB 1.7, Ubuntu Precise, MinGW-W64

Updates:
 * Update linux-mingw and bitcoin-qt.pro for LevelDB 1.7
 * Update gitian base VM image to precise
 * Use MinGW-w64 for Win32 builds
  • Loading branch information...
commit 8fd3e1e74c4f9eac79c1cff275021951d024a7c9 1 parent 6c3f8a1
@sipa authored Pieter Wuille committed
View
6 bitcoin-qt.pro
@@ -45,6 +45,8 @@ QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
+win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
+
# use: qmake "USE_QRCODE=1"
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
contains(USE_QRCODE, 1) {
@@ -95,7 +97,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
}
INCLUDEPATH += src/leveldb/include src/leveldb/helpers
-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
+LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a -lshlwapi -ldbghelp
!windows {
genleveldb.commands = cd $$PWD/src/leveldb && $(MAKE) libleveldb.a libmemenv.a
} else {
@@ -103,7 +105,7 @@ LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
isEmpty(QMAKE_RANLIB) {
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
}
- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" $(MAKE) libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
+ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
genleveldb.depends = FORCE
View
14 contrib/gitian-descriptors/boost-win32.yml
@@ -1,11 +1,11 @@
---
name: "boost"
suites:
-- "lucid"
+- "precise"
architectures:
- "i386"
packages:
-- "mingw32"
+- "mingw-w64"
- "faketime"
- "zip"
reference_datetime: "2011-01-30 00:00:00"
@@ -17,10 +17,10 @@ script: |
mkdir -p $TMPDIR/bin/$GBUILD_BITS $TMPDIR/include
tar xjf boost_1_50_0.tar.bz2
cd boost_1_50_0
- echo "using gcc : 4.4 : i586-mingw32msvc-g++
+ echo "using gcc : 4.6 : i686-w64-mingw32-g++
:
- <rc>i586-mingw32msvc-windres
- <archiver>i586-mingw32msvc-ar
+ <rc>i686-w64-mingw32-windres
+ <archiver>i686-w64-mingw32-ar
<cxxflags>-frandom-seed=boost1
;" > user-config.jam
./bootstrap.sh --without-icu
@@ -34,5 +34,5 @@ script: |
cd $TMPDIR
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
- zip -r boost-win32-1.50.0-gitian2.zip *
- cp boost-win32-1.50.0-gitian2.zip $OUTDIR
+ zip -r boost-w64-win32-1.50.0-gitian2.zip *
+ cp boost-w64-win32-1.50.0-gitian2.zip $OUTDIR
View
19 contrib/gitian-descriptors/deps-win32.yml
@@ -1,15 +1,16 @@
---
name: "bitcoin-deps"
suites:
-- "lucid"
+- "precise"
architectures:
- "i386"
packages:
-- "mingw32"
+- "mingw-w64"
- "git-core"
- "zip"
- "faketime"
- "wine"
+- "psmisc"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
@@ -27,13 +28,13 @@ script: |
#
tar xzf openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
- ./Configure --cross-compile-prefix=i586-mingw32msvc- mingw
+ ./Configure --cross-compile-prefix=i686-w64-mingw32- mingw
make
cd ..
#
tar xzf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
- ../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include"
+ ../dist/configure --enable-mingw --enable-cxx --host=i686-w64-mingw32 CFLAGS="-I/usr/i686-w64-mingw32/include"
make $MAKEOPTS
cd ../..
#
@@ -41,28 +42,28 @@ script: |
cd miniupnpc-1.6
sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw
sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw
- make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar
+ make -f Makefile.mingw DLLWRAP=i686-w64-mingw32-dllwrap CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar
cd ..
mv miniupnpc-1.6 miniupnpc
#
tar xzf zlib-1.2.6.tar.gz
cd zlib-1.2.6
- make -f win32/Makefile.gcc PREFIX=i586-mingw32msvc- $MAKEOPTS
+ make -f win32/Makefile.gcc PREFIX=i686-w64-mingw32- $MAKEOPTS
cd ..
#
tar xzf libpng-1.5.9.tar.gz
cd libpng-1.5.9
- ./configure -disable-shared CC=i586-mingw32msvc-cc AR=i586-mingw32msvc-ar STRIP=i586-mingw32msvc-strip RANLIB=i586-mingw32msvc-ranlib OBJDUMP=i586-mingw32msvc-objdump LD=i586-mingw32msvc-ld LDFLAGS="-L../zlib-1.2.6/" CFLAGS="-I../zlib-1.2.6/"
+ ./configure -disable-shared CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar STRIP=i686-w64-mingw32-strip RANLIB=i686-w64-mingw32-ranlib OBJDUMP=i686-w64-mingw32-objdump LD=i686-w64-mingw32-ld LDFLAGS="-L../zlib-1.2.6/" CFLAGS="-I../zlib-1.2.6/"
make $MAKEOPTS
cd ..
#
tar xjf qrencode-3.2.0.tar.bz2
cd qrencode-3.2.0
- ./configure CC=i586-mingw32msvc-cc AR=i586-mingw32msvc-ar STRIP=i586-mingw32msvc-strip RANLIB=i586-mingw32msvc-ranlib OBJDUMP=i586-mingw32msvc-objdump LD=i586-mingw32msvc-ld png_LIBS="../libpng-1.5.9/.libs/libpng15.a ../zlib-1.2.6/libz.a" png_CFLAGS="-I../libpng-1.5.9"
+ ./configure --build=mingw32 CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar STRIP=i686-w64-mingw32-strip RANLIB=i686-w64-mingw32-ranlib OBJDUMP=i686-w64-mingw32-objdump LD=i686-w64-mingw32-ld png_LIBS="../libpng-1.5.9/.libs/libpng15.a ../zlib-1.2.6/libz.a" png_CFLAGS="-I../libpng-1.5.9"
make $MAKEOPTS
cd ..
#
- zip -r $OUTDIR/bitcoin-deps-0.0.5.zip \
+ zip -r $OUTDIR/bitcoin-deps-w64-win32-0.0.5.zip \
$(ls qrencode-*/{qrencode.h,.libs/libqrencode.{,l}a} | sort) \
$(ls db-*/build_unix/{libdb_cxx.a,db.h,db_cxx.h,libdb.a,.libs/libdb_cxx-?.?.a} | sort) \
$(find openssl-* -name '*.a' -o -name '*.h' | sort) \
View
23 contrib/gitian-descriptors/gitian-win32.yml
@@ -1,11 +1,11 @@
---
name: "bitcoin"
suites:
-- "lucid"
+- "precise"
architectures:
- "i386"
packages:
-- "mingw32"
+- "g++-mingw-w64"
- "git-core"
- "unzip"
- "nsis"
@@ -15,31 +15,31 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
-- "qt-win32-4.8.3-gitian-r1.zip"
-- "boost-win32-1.50.0-gitian2.zip"
-- "bitcoin-deps-0.0.5.zip"
+- "qt-w64-win32-4.8.3-gitian-r1.zip"
+- "boost-w64-win32-1.50.0-gitian2.zip"
+- "bitcoin-deps-w64-win32-0.0.5.zip"
script: |
#
mkdir $HOME/qt
cd $HOME/qt
- unzip ../build/qt-win32-4.8.3-gitian-r1.zip
+ unzip ../build/qt-w64-win32-4.8.3-gitian-r1.zip
cd $HOME/build/
export PATH=$PATH:$HOME/qt/bin/
#
mkdir boost_1_50_0
cd boost_1_50_0
mkdir -p stage/lib
- unzip ../boost-win32-1.50.0-gitian2.zip
+ unzip ../boost-w64-win32-1.50.0-gitian2.zip
cd bin/$GBUILD_BITS
for lib in *; do
- i586-mingw32msvc-ar rc ../../stage/lib/libboost_${lib}-mt-s.a $lib/*.o
- i586-mingw32msvc-ranlib ../../stage/lib/libboost_${lib}-mt-s.a
+ i686-w64-mingw32-ar rc ../../stage/lib/libboost_${lib}-mt-s.a $lib/*.o
+ i686-w64-mingw32-ranlib ../../stage/lib/libboost_${lib}-mt-s.a
done
cd ../..
mv include/boost .
cd ..
#
- unzip bitcoin-deps-0.0.5.zip
+ unzip bitcoin-deps-w64-win32-0.0.5.zip
#
find -type f | xargs touch --date="$REFERENCE_DATETIME"
#
@@ -60,7 +60,8 @@ script: |
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0 DEBUGFLAGS="-frandom-seed=bitcoin"
- i586-mingw32msvc-strip bitcoind.exe
+ i686-w64-mingw32-strip bitcoind.exe
+
mkdir $OUTDIR/daemon
cp bitcoind.exe $OUTDIR/daemon
cd ..
View
20 contrib/gitian-descriptors/qt-win32.yml
@@ -1,11 +1,11 @@
---
name: "qt"
suites:
-- "lucid"
+- "precise"
architectures:
- "i386"
packages:
-- "mingw32"
+- "mingw-w64"
- "zip"
- "faketime"
reference_datetime: "2011-01-30 00:00:00"
@@ -21,21 +21,21 @@ script: |
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz
cd qt-everywhere-opensource-src-4.8.3
sed 's/$TODAY/2011-01-30/' -i configure
- sed 's/i686-pc-mingw32-/i586-mingw32msvc-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
- sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/i586-mingw32msvc/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed 's/i686-pc-mingw32-/i686-w64-mingw32-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/i686-w64-mingw32/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
- sed --posix 's/QMAKE_MOC\t\t= i586-mingw32msvc-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
- sed --posix 's/QMAKE_RCC\t\t= i586-mingw32msvc-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
- sed --posix 's/QMAKE_UIC\t\t= i586-mingw32msvc-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed --posix 's/QMAKE_MOC\t\t= i686-w64-mingw32-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed --posix 's/QMAKE_RCC\t\t= i686-w64-mingw32-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed --posix 's/QMAKE_UIC\t\t= i686-w64-mingw32-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
# ar adds timestamps to every object file included in the static library
# providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script...
# which somehow cannot be combined with other flags.
# use faketime only for ar, as it confuses make/qmake into hanging sometimes
- sed --posix "s|QMAKE_LIB\t\t= i586-mingw32msvc-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
+ sed --posix "s|QMAKE_LIB\t\t= i686-w64-mingw32-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
echo '#!/bin/bash' > $HOME/ar
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
- echo 'i586-mingw32msvc-ar "$@"' >> $HOME/ar
+ echo 'i686-w64-mingw32-ar "$@"' >> $HOME/ar
chmod +x $HOME/ar
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
@@ -51,4 +51,4 @@ script: |
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
- zip -r $OUTDIR/qt-win32-4.8.3-gitian-r1.zip *
+ zip -r $OUTDIR/qt-w64-win32-4.8.3-gitian-r1.zip *
View
16 src/makefile.linux-mingw
@@ -2,7 +2,7 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-DEPSDIR:=/usr/i586-mingw32msvc
+DEPSDIR:=/usr/i686-w64-mingw32
USE_UPNP:=0
USE_IPV6:=1
@@ -33,7 +33,7 @@ LIBS= \
DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
DEBUGFLAGS=-g
CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
-LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat
+LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static-libgcc -static-libstdc++
TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
@@ -90,11 +90,11 @@ OBJS= \
all: bitcoind.exe
-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
+LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a -lshlwapi -ldbghelp
DEFS += -I"$(CURDIR)/leveldb/include"
DEFS += -I"$(CURDIR)/leveldb/helpers"
leveldb/libleveldb.a:
- @echo "Building LevelDB ..." && cd leveldb && CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" $(MAKE) libleveldb.a libmemenv.a && i586-mingw32msvc-ranlib libleveldb.a && i586-mingw32msvc-ranlib libmemenv.a && cd ..
+ @echo "Building LevelDB ..." && cd leveldb && CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE" $(MAKE) libleveldb.a libmemenv.a && i686-w64-mingw32-ranlib libleveldb.a && i686-w64-mingw32-ranlib libmemenv.a && cd ..
obj/leveldb.o: leveldb/libleveldb.a
obj/build.h: FORCE
@@ -103,18 +103,18 @@ version.cpp: obj/build.h
DEFS += -DHAVE_BUILD_INFO
obj/%.o: %.cpp $(HEADERS)
- i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
+ i686-w64-mingw32-g++ -c $(CFLAGS) -o $@ $<
bitcoind.exe: $(OBJS:obj/%=obj/%)
- i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
+ i686-w64-mingw32-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
obj-test/%.o: test/%.cpp $(HEADERS)
- i586-mingw32msvc-g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
+ i686-w64-mingw32-g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
- i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS)
+ i686-w64-mingw32-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS)
clean:
Please sign in to comment.
Something went wrong with that request. Please try again.