Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing CPU detection for Qt, adding armv6l build support #6

Merged
merged 7 commits into from
Sep 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions doc/build-unix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,44 @@ To Build On i386, amd64
--------

cd src/
make -f makefile.unix # Headless bitcoin
make -f makefile.unix # Headless magi

To Build On armv6l
--------
cd src/
make -f makefile.unix xCPUARCH=armv6l # Headless magi

To Build On armv7l
--------
cd src/
make -f makefile.unix xCPUARCH=armv7l # Headless bitcoin
make -f makefile.unix xCPUARCH=armv7l # Headless magi

See readme-qt.rst for instructions on building Bitcoin QT,
the graphical bitcoin.

Dependencies for i386, amd64
------------

Library Purpose Description
------- ------- -----------
libssl SSL Support Secure communications
libdb4.8 Berkeley DB Blockchain & wallet storage
libboost Boost C++ Library
miniupnpc UPnP Support Optional firewall-jumping support
libqrencode QRCode generation Optional QRCode generation
libgmp3 GMP Multiple precision arithmetic library
Library Purpose Description
------- ------- -----------
libssl SSL Support Secure communications
libdb4.8 Berkeley DB Blockchain & wallet storage
libboost Boost C++ Library
libminiupnpc UPnP Support Optional firewall-jumping support
libqrencode QRCode generation Optional QRCode generation
libgmp GMP Multiple precision arithmetic library

Dependencies for armv7l
Dependencies for armv6l, armv7l
------------

Library Purpose Description
------- ------- -----------
libssl SSL Support Secure communications
libdb5.1 Berkeley DB Blockchain & wallet storage
libboost Boost C++ Library
miniupnpc UPnP Support Optional firewall-jumping support
libqrencode QRCode generation Optional QRCode generation
libgmp3 GMP Multiple precision arithmetic library
Library Purpose Description
------- ------- -----------
libssl SSL Support Secure communications
libdb5.1 Berkeley DB Blockchain & wallet storage
libboost Boost C++ Library
libminiupnpc UPnP Support Optional firewall-jumping support
libqrencode QRCode generation Optional QRCode generation
libgmp GMP Multiple precision arithmetic library

Note that libexecinfo should be installed, if you building under *BSD systems.
This library provides backtrace facility.
Expand Down Expand Up @@ -84,6 +89,8 @@ sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install libgmp-dev
sudo apt-get install libminiupnpc-dev
Boost 1.40+: sudo apt-get install libboost-all-dev
or Boost 1.37: sudo apt-get install libboost1.37-dev
sudo apt-get install libqrencode-dev
Expand All @@ -94,6 +101,8 @@ sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libdb5.1-dev
sudo apt-get install libdb5.1++-dev
sudo apt-get install libgmp-dev
sudo apt-get install libminiupnpc-dev
Boost 1.40+: sudo apt-get install libboost-all-dev
or Boost 1.37: sudo apt-get install libboost1.37-dev
sudo apt-get install libqrencode-dev
Expand Down
6 changes: 3 additions & 3 deletions doc/readme-qt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ distribution are installed, for Debian and Ubuntu (i386, amd64) these are:

apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
libssl-dev libdb4.8++-dev
libssl-dev libdb4.8++-dev libgmp-dev libminiupnpc-dev

then execute the following:

Expand All @@ -23,7 +23,7 @@ then execute the following:
qmake
make

Debian (armv7l)
Debian (armv6l, armv7l)
-------

First, make sure that the required packages for Qt4 development of your
Expand All @@ -33,7 +33,7 @@ distribution are installed, for Debian and Ubuntu (i386, amd64) these are:

apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
libssl-dev libdb5.1++-dev
libssl-dev libdb5.1++-dev libgmp-dev libminiupnpc-dev

then execute the following:

Expand Down
12 changes: 8 additions & 4 deletions magi-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
DEFINES += HAVE_BUILD_INFO
}

# If we have an arm device, we can't use sse2, so define as thumb
# Otherwise, assume sse2 exists
!equals($$QMAKE_HOST.arch, armv7l) {
message(FOUND host = $$QMAKE_HOST.arch)
# If we have an ARM device, we can't use SSE2 instructions, so don't try to use them
QMAKE_XCPUARCH = $$QMAKE_HOST.arch
equals(QMAKE_XCPUARCH, armv7l) {
message(Building without SSE2 support)
}
else:equals(QMAKE_XCPUARCH, armv6l) {
message(Building without SSE2 support)
}
else {
message(Building with SSE2 support)
QMAKE_CXXFLAGS += -msse2
QMAKE_CFLAGS += -msse2
}
Expand Down
6 changes: 3 additions & 3 deletions src/makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ DEBUGFLAGS=-g
xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)

# If we have an arm device, we can't use sse2, so define as thumb
# Otherwise, assume sse2 exists
# xCPUARCH is passed in as a define (xCPUARCH=armv7l)
# If we have an ARM device, we can't use SSE2 instructions, so don't try to use them
# xCPUARCH is passed in as a define (xCPUARCH=armv7l, xCPUARCH=armv6l)
ifeq ($(xCPUARCH),armv7l)
else ifeq ($(xCPUARCH),armv6l)
else
xCXXFLAGS+=-msse2
endif
Expand Down