summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Koenig <Joerg.Koenig@techsat.com>2019-06-06 20:40:24 (GMT)
committerJoerg Koenig <Joerg.Koenig@techsat.com>2019-06-06 20:40:24 (GMT)
commit73245e551e6bad72110383f8cd5eb85ba956854d (patch)
tree02537e196c7a3854a8bfb6f3da47eab3bd124eed
parent874e131bf5e6afd03b44f197920213e51dd2f113 (diff)
downloadQt-73245e551e6bad72110383f8cd5eb85ba956854d.zip
Qt-73245e551e6bad72110383f8cd5eb85ba956854d.tar.gz
Qt-73245e551e6bad72110383f8cd5eb85ba956854d.tar.bz2
Link always with -static-libgcc -static-libstdc++
To be more independent on other linux systems Change-Id: Ic127cbebe8d54fb24897ea406f08ec4648dfbd56
-rw-r--r--Makefile14
-rw-r--r--SOURCE/qt-5.12.3-linux-static-gcc-libs.patch11
2 files changed, 19 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 84fc3f9..4f52e72 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,10 @@ ssl.$(ARCH):
tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE)
cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \
export CFLAGS= && \
- export LDFLAGS=$(CC_LDFLAGS) && \
+ export LDFLAGS="-static-libgcc -static-libstdc++" && \
export PATH=$(GCC_PATH)/bin:$(PATH) && \
export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \
- ./Configure --prefix=$(LOCAL_INST_PATH)/openssl linux-generic64 && \
+ ./Configure -static-libgcc -static-libstdc++ --prefix=$(LOCAL_INST_PATH)/openssl linux-generic64 && \
pwd && \
make clean && \
make -j$(JOBS) && \
@@ -56,10 +56,10 @@ ssl.$(ARCH):
tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE)
cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \
export CFLAGS=-fpic && \
- export LDFLAGS=$(CC_LDFLAGS) && \
+ export LDFLAGS="-static-libgcc -static-libstdc++" && \
export PATH=$(GCC_PATH)/bin:$(PATH) && \
export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \
- ./Configure shared --prefix=$(LOCAL_INST_PATH)/openssl linux-generic64 && \
+ ./Configure -static-libgcc -static-libstdc++ shared --prefix=$(LOCAL_INST_PATH)/openssl linux-generic64 && \
pwd && \
make clean && \
make -j$(JOBS) && \
@@ -74,7 +74,8 @@ qt.x86-linux64.shared:
cd $(LOCAL_BUILD_PATH) && \
tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz
cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \
- rm -f config.cache && \
+ patch -p1 < $(TOP)/SOURCE/qt-5.12.3-linux-static-gcc-libs.patch && \
+ rm -f config.cache && \
export LDFLAGS=$(CXX_LDFLAGS) && \
export PATH=$(GCC_PATH)/bin:$(PATH) && \
export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \
@@ -115,7 +116,8 @@ qt.x86-linux64.static:
cd $(LOCAL_BUILD_PATH) && \
tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz
cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \
- rm -f config.cache && \
+ patch -p1 < $(TOP)/SOURCE/qt-5.12.3-linux-static-gcc-libs.patch && \
+ rm -f config.cache && \
export PATH=$(GCC_PATH)/bin:$(PATH) && \
export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \
gcc --version && \
diff --git a/SOURCE/qt-5.12.3-linux-static-gcc-libs.patch b/SOURCE/qt-5.12.3-linux-static-gcc-libs.patch
new file mode 100644
index 0000000..c9d1806
--- /dev/null
+++ b/SOURCE/qt-5.12.3-linux-static-gcc-libs.patch
@@ -0,0 +1,11 @@
+--- qt-everywhere-src-5.12.3.orig/qtbase/mkspecs/common/linux.conf 2019-04-09 11:51:26.000000000 +0200
++++ qt-everywhere-src-5.12.3/qtbase/mkspecs/common/linux.conf 2019-06-06 22:21:23.860933853 +0200
+@@ -8,6 +8,8 @@
+
+ QMAKE_CFLAGS_THREAD += -D_REENTRANT
+ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
++
++QMAKE_LFLAGS += -static-libgcc -static-libstdc++
+ QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+
+ QMAKE_LFLAGS_REL_RPATH = -Wl,-z,origin