Skip to content

Commit efb6d9a

Browse files
committed
Minor build fixes
Two changes: make some linux-specific linker options linux and linker specific. And in the cross-compile environment, prefer the $HOME/qt/bin tools to whatever might be somewhere else in the path.
1 parent fbd8602 commit efb6d9a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

bitcoin-qt.pro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ contains(RELEASE, 1) {
2929

3030
!win32:!macx {
3131
# Linux: static link
32-
LIBS += -Wl,-Bstatic
32+
LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
33+
# for extra security (see: https://wiki.debian.org/Hardening)
34+
QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2
3335
}
3436
}
3537

3638
!win32 {
37-
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
38-
QMAKE_CXXFLAGS *= -fstack-protector-all
39-
QMAKE_LFLAGS *= -fstack-protector-all
40-
# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
41-
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
39+
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
40+
QMAKE_CXXFLAGS *= -fstack-protector-all
41+
QMAKE_LFLAGS *= -fstack-protector-all
42+
# Exclude on Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
43+
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
4244
}
43-
# for extra security (see: https://wiki.debian.org/Hardening)
44-
QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now
4545
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
4646
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
4747
# on Windows: enable GCC large address aware linker flag

contrib/gitian-descriptors/gitian-win32.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ script: |
2424
cd $HOME/qt
2525
unzip ../build/qt-win32-4.8.3-gitian-r1.zip
2626
cd $HOME/build/
27-
export PATH=$PATH:$HOME/qt/bin/
27+
export PATH=$HOME/qt/bin/:$PATH
2828
#
2929
mkdir boost_1_50_0
3030
cd boost_1_50_0

0 commit comments

Comments
 (0)