diff options
author | Koenig, Joerg <Joerg.Koenig@techsat.com> | 2020-04-23 12:17:31 (GMT) |
---|---|---|
committer | Koenig, Joerg <Joerg.Koenig@techsat.com> | 2020-04-23 12:17:31 (GMT) |
commit | e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd (patch) | |
tree | 41eb6237aeb586cdfdf2ebc9ac47264f347d3710 | |
parent | 65f96f24f243372c9828847c00390e3b2b860851 (diff) | |
download | Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.zip Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.tar.gz Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.tar.bz2 |
Merged changes from Branch QT_5_14_0refs/changes/34/11034/1
Change-Id: Iabfa3d407e26b80d9a4d2875c0e1e202b4902482
-rw-r--r-- | Jenkinsfile | 119 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | Makefile.mingw64 | 13 | ||||
-rw-r--r-- | Makefile.qtcreator | 100 | ||||
-rw-r--r-- | Makefile.qtwintools | 56 | ||||
-rw-r--r-- | Makefile.x86-linux | 4 | ||||
-rw-r--r-- | Makefile.xmingw64 | 174 | ||||
-rw-r--r-- | SOURCE/Makefile | 14 | ||||
-rw-r--r-- | SOURCE/mkspecs-static-runtimes.patch | 35 | ||||
-rw-r--r-- | SOURCE/mkspecs-static-runtimes2.patch | 35 | ||||
-rw-r--r-- | SOURCE/qt-5.12.3-cross-static-gcc-libs.patch | 2 |
11 files changed, 508 insertions, 51 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 34f510a..5ad5f5a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,19 +21,35 @@ properties([ stage('Build') { parallel linux: { node('bslp02-centos6-64') { - deleteDir() - checkout([$class: 'GitSCM', - branches: [[name: BRANCH]], - doGenerateSubmoduleConfigurations: false, - extensions: [], - submoduleCfg: [], - userRemoteConfigs: [[url: REPO]]]) + try { + deleteDir() + checkout([$class: 'GitSCM', + branches: [[name: BRANCH]], + doGenerateSubmoduleConfigurations: false, + extensions: [], + submoduleCfg: [], + userRemoteConfigs: [[url: REPO]]]) - stage("Linux 64 Bit Build") { + stage("Qt Build") { + sh '''#!/bin/bash + export PATH=$GCC_PATH/bin:$PATH + make GCC_PATH=/master/DEV-Tools/gcc-suite/1.6.0/x86-linux64/gcc -f Makefile all + ''' + } + stage("Qt-Creator Build") { + sh '''#!/bin/bash + export PATH=/master/DEV-Tools/gcc-suite/1.6.0/x86-linux64/gcc/bin:$PATH + make ARCH=x86-linux64 GCC_PATH=/master/DEV-Tools/gcc-suite/1.6.0/x86-linux64/gcc/bin -f Makefile.qtcreator all + ''' + } + } catch (e) { + echo 'Linux build failed' + } finally { sh '''#!/bin/bash - GCC_PATH=/master/DEV-Tools/gcc-suite/1.5.0/x86-linux64/gcc make + echo "Build failed" + exit 1 ''' - } + } } }, windows: { @@ -47,26 +63,38 @@ stage('Build') { submoduleCfg: [], userRemoteConfigs: [[url: REPO]]]) - stage ("Windows 64 Bit MinGW Build") { - sh '''#!/bin/bash - set -x - echo "Cleanup prev. builds ..." - WS=$(cygpath $WORKSPACE) - rm -f openssl-1.0.2r/NUL - rm -Rf openssl-1.0.2r - echo "Done." - cp -Rvf /c/dev-tools/gcc-suite/1.5.0/x86-mingw64/gcc $WS/ - cp $WS/gcc/bin/make.exe $WS/gcc/bin/mingw32-make.exe - export PATH=$WS/gcc/bin:/c/dev-tools/msys/x86/usr/bin:$PATH - export PATH=/c/dev-tools/Python/2.7/x86-windows:$PATH - export CC=$WS/gcc/bin/gcc - export CXX=$WS/gcc/bin/g++ - gcc -v - make -f Makefile.mingw64 all - rm -Rf build.$(ARCH) - rm -Rf install.$(ARCH) - ''' - } + stage ("MinGW Qt Build") { + sh '''#!/bin/bash + set -x + echo "Cleanup prev. builds ..." + WS=$(cygpath $WORKSPACE) + cp -Rvf /c/dev-tools/gcc-suite/1.6.0/x86-mingw64/gcc $WS/ + cp $WS/gcc/bin/make.exe $WS/gcc/bin/mingw32-make.exe + export PATH=$WS/gcc/bin:/c/dev-tools/msys/x86/usr/bin:$PATH + export PATH=/c/dev-tools/Python/2.7/x86-windows:$PATH + export CC=$WS/gcc/bin/gcc + export CXX=$WS/gcc/bin/g++ + gcc -v + mkdir -p /c/tmp + make -f Makefile.mingw64 all + ''' + } + stage ("MinGW Qt-Creator Build") { + sh '''#!/bin/bash + set -x + echo "Cleanup prev. builds ..." + WS=$(cygpath $WORKSPACE) + cp -Rvf /c/dev-tools/gcc-suite/1.6.0/x86-mingw64/gcc $WS/ + cp $WS/gcc/bin/make.exe $WS/gcc/bin/mingw32-make.exe + export PATH=$WS/gcc/bin:/c/dev-tools/msys/x86/usr/bin:$PATH + export PATH=/c/dev-tools/Python/2.7/x86-windows:$PATH + export CC=$WS/gcc/bin/gcc + export CXX=$WS/gcc/bin/g++ + gcc -v + make -f Makefile.qtcreator ARCH=x86-mingw64 GCC_PATH=$WS/gcc QTDIR=/c/tmp/qt all + ''' + } + stage ("Windows 64 Bit MSVC Build") { sh '''#!/bin/bash set -x @@ -82,13 +110,14 @@ stage('Build') { buildqt64.bat ''' } - stash name: "qtwin", includes: "*-msvc.zip, *-x86-mingw64.tgz" + stash name: "qtwin", includes: "qt-*-msvc.zip,*qt-*-x86-mingw64.tgz,qtcreator-*-x86-mingw64.zip" } catch (e) { echo 'Windows build failed' } finally { sh ''' export PATH=/c/msys/x86/usr/bin rm -Rf $(cygpath $WORKSPACE)/openssl-1.0.2r + exit 1 ''' } } @@ -102,33 +131,37 @@ stage ("Post processing") { # # cleanup temporary destination folder for final distribution ... # unpack Linux archives ... + mkdir -p $WORKSPACE/INST/$QT_VER/x86-linux64-shared tar -xzf $WORKSPACE/qt-$QT_VER-shared-x86-linux64.tgz -C $WORKSPACE/INST/$QT_VER/x86-linux64-shared mkdir -p $WORKSPACE/INST/$QT_VER/x86-linux64-static tar -xzf $WORKSPACE/qt-$QT_VER-static-x86-linux64.tgz -C $WORKSPACE/INST/$QT_VER/x86-linux64-static - mkdir -p $WORKSPACE/INST/$QT_VER/x86_64-msvc - unzip -o $WORKSPACE/qt-$QT_VER-x86_64-msvc.zip -d $WORKSPACE/INST/$QT_VER/x86_64-msvc - mkdir -p $WORKSPACE/INST/$QT_VER/x86-mingw64 tar -xzf $WORKSPACE/qt-$QT_VER-x86-mingw64.tgz -C $WORKSPACE/INST/$QT_VER/x86-mingw64 - mkdir -p $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64 cp -f $WORKSPACE/INST/$QT_VER/x86-linux64-shared/bin/* $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64 + mkdir -p $WORKSPACE/INST/$QT_VER/x86_64-msvc + unzip -o $WORKSPACE/qt-$QT_VER-x86_64-msvc.zip -d $WORKSPACE/INST/$QT_VER/x86_64-msvc + # generate qt.conf for linux to windows cross builds ... - rm -f $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "[Paths]" > $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "Prefix=.." >> $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "Libraries = lib" >> $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "Plugins = plugins" >> $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "HostBinaries=xbin" >> $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf - echo "TargetSpec=x-win32-g++" >> $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/qt.conf + rm -f $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "[Paths]" > $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "Prefix=.." >> $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "Libraries = lib" >> $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "Plugins = plugins" >> $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "HostBinaries=xbin" >> $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + echo "TargetSpec=win32-g++" >> $WORKSPACE/INST/$QT_VER/x86-mingw64-shared/bin/qt.conf + # - # finally recreate the whole mingw64 archive ... + # finally recreate the whole mingw64-shared archive ... rm -f $WORKSPACE/qt-$QT_VER-x86-mingw64.tgz cd $WORKSPACE/INST/$QT_VER/x86-mingw64 + cp -f $WORKSPACE/INST/$QT_VER/x86-mingw64/bin/qt.conf \ + $WORKSPACE/INST/$QT_VER/x86-mingw64/xbin-x86-linux64/ tar -zcf $WORKSPACE/qt-$QT_VER-x86-mingw64.tgz . + cd $WORKSPACE/ rm -Rf $WORKSPACE/INST ''' @@ -16,7 +16,7 @@ SSL_ARCHIVE=openssl-$(SSL_VERSION).tar.gz PACKAGE_NAME = qt-$(VERSION) -GCC_PATH ?= /opt/dev-tools/gcc-suite/1.5.0/x86-linux64/gcc +GCC_PATH ?= /opt/dev-tools/gcc-suite/1.6.0/x86-linux64/gcc CC ?= $(GCC_PATH)/bin/gcc CXX ?= $(GCC_PATH)/bin/g++ @@ -86,6 +86,9 @@ qt.x86-linux64.shared: -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-shared \ -release \ -opensource \ + -no-rpath \ + -silent \ + -no-rpath \ -strip \ -ssl \ -openssl \ @@ -130,6 +133,8 @@ qt.x86-linux64.static: -strip \ -ssl \ -openssl \ + -silent \ + -no-rpath \ -I$(LOCAL_INST_PATH)/openssl/include \ -L$(LOCAL_INST_PATH)/opensll/lib \ -L$(GCC_PATH)/lib64 \ diff --git a/Makefile.mingw64 b/Makefile.mingw64 index 498a9ae..78978ef 100644 --- a/Makefile.mingw64 +++ b/Makefile.mingw64 @@ -6,7 +6,7 @@ LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH) LOCAL_INST_PATH = $(TOP)/install.$(ARCH) VERSION_SHORT = 5.14 -VERSION_RELEASE = 0 +VERSION_RELEASE = 2 VERSION = $(VERSION_SHORT).$(VERSION_RELEASE) SSL_VERSION = 1.0.2r @@ -33,7 +33,8 @@ ssl: ssl.$(ARCH) qt: qt.$(ARCH) download: - $(MAKE) -C ./SOURCE + $(MAKE) -C ./SOURCE qtzip + $(MAKE) -C ./SOURCE ssltgz ssl.$(ARCH): rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) @@ -42,7 +43,7 @@ ssl.$(ARCH): tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE) cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \ export CFLAGS="-m64 -fpic" && \ - ./Configure --prefix=$(QT_INST_PATH) shared mingw64 && \ + ./Configure --prefix=$(QT_INST_PATH) -m64 -static-libgcc -static-libstdc++ shared mingw64 && \ make clean && \ make && \ make install @@ -53,7 +54,7 @@ qt.$(ARCH): rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) ; \ fi cd $(LOCAL_BUILD_PATH); \ - $(7ZIP) x $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz -so | $(7ZIP) x -aoa -si -ttar -o"." + $(7ZIP) x $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).zip cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) ;\ patch -p1 < $(TOP)/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch rm -Rf $(QT_SRC_PATH) @@ -68,9 +69,13 @@ qt.$(ARCH): -shared \ -release \ -strip \ + -silent \ + -no-rpath \ + -no-pch \ -ssl \ -nomake examples \ -nomake tests \ + -skip activeqt \ -skip qtwebengine \ -skip qtwebglplugin \ -skip qtwebchannel \ diff --git a/Makefile.qtcreator b/Makefile.qtcreator new file mode 100644 index 0000000..9dd025d --- /dev/null +++ b/Makefile.qtcreator @@ -0,0 +1,100 @@ +# +# Makefile to compile QT-Creator +# +CWD = $(shell readlink -f .) + +VERSION = 4.11 +RELEASE = 2 +QT_VERSION = 5.14 +QT_RELEASE = 2 +TARURL = https://download.qt.io/official_releases/qtcreator/$(VERSION)/$(VERSION).$(RELEASE)/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz +ZIPURL = https://download.qt.io/official_releases/qtcreator/$(VERSION)/$(VERSION).$(RELEASE)/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip +7ZIP = $(TOP)/wintools/7za.exe + +ifeq ($(ARCH),) + $(error ARCH is not set) +endif + +ifeq ($(GCC_PATH),) + $(error GCC_PATH is not set) +endif + +ifeq ($(BUILD_NUMBER),) + BUILD = unsupported +else + BUILD = $(BUILD_NUMBER) +endif + +BUILD_OS = $(shell uname -s) + +QTDIR = $(PWD)/install.$(ARCH)/qt-5.14.2-shared +BUILDDIR = $(PWD)/build-qtcreator.$(ARCH) +INSTDIR = $(PWD)/inst-qtcreator.$(ARCH) + +ifeq ($(ARCH),x86-linux64) + MKSPEC = linux-g++-64 + CROSS_COMPILE = +else + MKSPEC = win32-g++ +ifeq ($(BUILD_OS),Linux) + CROSS_COMPILE = x86_64-w64-mingw32- +endif +endif + +PKGNAME = qtcreator-$(VERSION)-$(RELEASE)-$(BUILD)-$(ARCH) + +# --------------------------------------------------------------------------- +# +all: download unpack patchit build install pack.$(ARCH) + +ifeq ($(BUILD_OS),Linux) +download: $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz +else +download: $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip +endif + +unpack: + mkdir -p $(BUILDDIR) +ifeq ($(BUILD_OS),Linux) + tar -zxf $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz \ + -C $(BUILDDIR) +else + cd $(BUILDDIR) && \ + $(7ZIP) x $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip +endif + +patchit: + cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \ + patch -p1 < $(PWD)/SOURCE/qt-creator-dllexport.patch + +$(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz: + cd $(PWD)/SOURCE && \ + wget -c "$(TARURL)" + +$(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip: + cd $(PWD)/SOURCE && \ + wget -c "$(ZIPURL)" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +build: + cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \ + export PATH=$(GCC_PATH):$(PATH) && \ + CROSS_COMPILE=$(CROSS_COMPILE) \ + $(QTDIR)/bin/qmake -o Makefile -spec $(MKSPEC) && \ + make + +install: + cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \ + make INSTALL_ROOT=$(INSTDIR) install + +pack.x86-linux64: + cd $(INSTDIR) && \ + tar -zcf $(PWD)/$(PKGNAME).tgz . + +pack.x86-mingw64: + cd $(INSTDIR) && \ + zip -q -r $(PWD)/$(PKGNAME).zip . + +clean: + rm -Rf $(BUILDDIR) diff --git a/Makefile.qtwintools b/Makefile.qtwintools new file mode 100644 index 0000000..405b1a4 --- /dev/null +++ b/Makefile.qtwintools @@ -0,0 +1,56 @@ +TOP = $(shell readlink -f .) + +VERSION_SHORT = 5.14 +VERSION_RELEASE = 2 +VERSION = $(VERSION_SHORT).$(VERSION_RELEASE) + +7ZIP = $(TOP)/wintools/7za.exe +LOCAL_BUILD_PATH = c:/tmp/qtbuild +SRCDIR = $(LOCAL_BUILD_PATH)/qt-everywhere-src-5.14.2 + +TOOLS = moc rcc uic qlalr qvkgen tracegen + +all: download unpack configure tools pack clean + +download: + $(MAKE) -C ./SOURCE zip + +unpack: + mkdir -p $(LOCAL_BUILD_PATH) + cd $(LOCAL_BUILD_PATH); \ + rm -Rf qt-everywhere-src-$(VERSION) ; \ + $(7ZIP) x $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).zip + +configure: + cd $(SRCDIR) && \ + ./configure.bat -opensource -confirm-license + +tools: + cd $(SRCDIR)/qtbase/src/tools/bootstrap && \ + $(SRCDIR)/qtbase/bin/qmake -o Makefile && \ + make -f Makefile + cd $(SRCDIR)/qtbase/src/tools/moc && \ + $(SRCDIR)/qtbase/bin/qmake -o Makefile && \ + make -f Makefile + cd $(SRCDIR)/qtbase/src/tools/rcc && \ + $(SRCDIR)/qtbase/bin/qmake -o Makefile && \ + make -f Makefile + cd $(SRCDIR)/qtbase/src/3rdparty/pcre2 && \ + $(SRCDIR)/qtbase/bin/qmake -o Makefile && \ + make -f Makefile + cd $(SRCDIR)/qtbase/src/corelib && \ + $(SRCDIR)/qtbase/bin/qmake -o Makefile && \ + make -f Makefile + for t in $(TOOLS) ; do \ + cd $(SRCDIR)/qtbase/src/tools/$$t ;\ + $(SRCDIR)/qtbase/bin/qmake -o Makefile ;\ + make -f Makefile ;\ + done + +pack: + cd $(SRCDIR)/qtbase/bin && \ + tar -zcf $(TOP)/qtwintools.tgz ./*.exe + +clean: + rm -Rf $(LOCAL_BUILD_PATH) + diff --git a/Makefile.x86-linux b/Makefile.x86-linux index a29e0b7..0bc6b0d 100644 --- a/Makefile.x86-linux +++ b/Makefile.x86-linux @@ -86,6 +86,8 @@ qt.x86-linux.shared: -release \ -opensource \ -strip \ + -silent \ + -no-rpath \ -ssl \ -openssl \ -I$(LOCAL_INST_PATH)/openssl/include \ @@ -127,6 +129,8 @@ qt.x86-linux.static: -strip \ -ssl \ -openssl \ + -silent \ + -no-rpath \ -I$(LOCAL_INST_PATH)/openssl/include \ -L$(LOCAL_INST_PATH)/opensll/lib \ -L$(GCC_PATH)/lib \ diff --git a/Makefile.xmingw64 b/Makefile.xmingw64 new file mode 100644 index 0000000..68c1416 --- /dev/null +++ b/Makefile.xmingw64 @@ -0,0 +1,174 @@ + +TOP = $(shell readlink -f .) +ARCH = x86-mingw64 + +JOBS = 1 + +LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH) +LOCAL_INST_PATH = $(TOP)/install.$(ARCH) + +VERSION_SHORT=5.14 +VERSION_RELEASE=2 +VERSION=$(VERSION_SHORT).$(VERSION_RELEASE) + +SSL_VERSION=1.0.2r +SSL_ARCHIVE=openssl-$(SSL_VERSION).tar.gz + +PACKAGE_NAME = qt-$(VERSION) + +GCC_PATH ?= /opt/dev-tools/gcc-suite/1.6.0/x86-linux64/gcc +CROSS_COMPILE ?= /opt/dev-tools/gcc-suite/1.6.0/x86-linux64/mingw64/bin/x86_64-w64-mingw32- + +CC ?= $(GCC_PATH)/bin/gcc +CXX ?= $(GCC_PATH)/bin/g++ + +#CC_LDFLAGS = "-m64 -shared -fpic -static-libgcc" +#CXX_LDFLAGS = "-m64 -shared -fpic -static-libgcc -static-libstdc++" + +QT_STATIC_FLAGS = -static -static-runtime -no-shared + +all: download qt + +qt: ssl.$(ARCH) qt.$(ARCH) + +download: + $(MAKE) -C $(TOP)/SOURCE + +ssl.$(ARCH): + # static + rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) + mkdir -p $(LOCAL_BUILD_PATH)/ + cd $(LOCAL_BUILD_PATH) && \ + tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE) + cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \ + export CFLAGS= && \ + export LDFLAGS="-static-libgcc -static-libstdc++" && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + ./Configure -static-libgcc -static-libstdc++ \ + --cross-compile-prefix=$(CROSS_COMPILE) \ + --prefix=$(LOCAL_INST_PATH)/openssl mingw64 && \ + pwd && \ + make clean && \ + make -j$(JOBS) && \ + make install + # shared + rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) + mkdir -p $(LOCAL_BUILD_PATH)/ + cd $(LOCAL_BUILD_PATH) && \ + tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE) + cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \ + export CFLAGS=-fpic && \ + export LDFLAGS="-static-libgcc -static-libstdc++" && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + ./Configure -static-libgcc -static-libstdc++ shared \ + --cross-compile-prefix=$(CROSS_COMPILE) \ + --prefix=$(LOCAL_INST_PATH)/openssl mingw64 && \ + pwd && \ + make clean && \ + make -j$(JOBS) && \ + make install + +qt.x86-mingw64: qt.x86-mingw64.unpack qt.x86-mingw64.shared qt.x86-mingw64.static + +qt.x86-mingw64.unpack: + # shared + mkdir -p $(LOCAL_BUILD_PATH) + rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) + cd $(LOCAL_BUILD_PATH) && \ + tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + patch -p1 < $(TOP)/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch + +qt.x86-mingw64.shared: + # shared + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + rm -f config.cache && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + gcc --version && \ + bash ./configure \ + -platform linux-g++-64 \ + -xplatform win32-g++ \ + -device-option CROSS_COMPILE=$(CROSS_COMPILE) \ + -opengl desktop \ + -recheck-all \ + -shared \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-shared \ + -release \ + -opensource \ + -no-rpath \ + -strip \ + -ssl \ + -openssl \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -I/opt/dev-tools/gcc-suite/1.6.0/x86-linux64/mingw64/x86_64-w64-mingw32/include \ + -L$(LOCAL_INST_PATH)/openssl/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -skip activeqt \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -confirm-license && \ + make QMAKE_LFLAGS="-m64 -static-libgcc -static-libstdc++" -j$(JOBS) && \ + make -j$(JOBS) install + cp -f $(TOP)/qt.conf $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin/ + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin && chmod -f a+x *.exe + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared && \ + tar -zcf $(TOP)/qt-$(VERSION)-shared-$(ARCH).tgz ./ + +qt.x86-mingw64.static: + # static + mkdir -p $(LOCAL_BUILD_PATH) + rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) + cd $(LOCAL_BUILD_PATH) && \ + tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + patch -p1 < $(TOP)/SOURCE/qt-5.12.3-cross-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 && \ + ./configure \ + -xplatform win32-g++ \ + -device-option CROSS_COMPILE=$(CROSS_COMPILE) \ + -opengl desktop \ + -recheck-all \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-static \ + -static \ + -release \ + -opensource \ + -strip \ + -ssl \ + -openssl \ + -no-rpath \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -L$(LOCAL_INST_PATH)/opensll/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -skip activeqt \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -confirm-license && \ + make QMAKE_LFLAGS="-m64 -static-libgcc -static-libstdc++" -j$(JOBS) && \ + make -j$(JOBS) install + cp -f $(TOP)/qt.conf $(LOCAL_INST_PATH)/qt-$(VERSION)-static/bin/ + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin && chmod -f a+x *.exe + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-static && \ + tar -zcf $(TOP)/qt-$(VERSION)-static-$(ARCH).tgz ./ + +clean: + rm -Rf build.$(ARCH) + rm -Rf install.$(ARCH) + +dll2a: + for d in $(DLL_DIR)/*.dll; do \ + $(GCC_PATH)/bin/$(XPREFIX)dll2a $$d -l $(LIBDIR) ; \ + done; diff --git a/SOURCE/Makefile b/SOURCE/Makefile index a652954..4c75873 100644 --- a/SOURCE/Makefile +++ b/SOURCE/Makefile @@ -4,7 +4,8 @@ VERSION_SHORT = 5.14 RELEASE = 2 VERSION = $(VERSION_SHORT).$(RELEASE) QT_SOURCE_ARCHIVE=qt-everywhere-src-$(VERSION).tar.xz -DL_URL="https://download.qt.io/official_releases/qt/$(VERSION_SHORT)/$(VERSION)/single/$(QT_SOURCE_ARCHIVE)" +QT_SOURCE_ARCHIVE2=qt-everywhere-src-$(VERSION).zip +DL_URL="https://download.qt.io/official_releases/qt/$(VERSION_SHORT)/$(VERSION)/single" SSL_VERSION=1.0.2r SSL_ARCHIVE=openssl-$(SSL_VERSION).tar.gz @@ -13,9 +14,18 @@ SSL_DL_URL = "https://www.openssl.org/source/$(SSL_ARCHIVE)" all: $(SSL_ARCHIVE) $(QT_SOURCE_ARCHIVE) $(QT_SOURCE_ARCHIVE): - wget -c $(DL_URL) -O $(QT_SOURCE_ARCHIVE) + wget -c $(DL_URL)/$(QT_SOURCE_ARCHIVE) -O $(QT_SOURCE_ARCHIVE) + +$(QT_SOURCE_ARCHIVE2): + wget -c $(DL_URL)/$(QT_SOURCE_ARCHIVE2) -O $(QT_SOURCE_ARCHIVE2) $(SSL_ARCHIVE): wget -c $(SSL_DL_URL) -O $(SSL_ARCHIVE) +qtzip: + $(MAKE) $(QT_SOURCE_ARCHIVE2) +qttar: + $(MAKE) $(QT_SOURCE_ARCHIVE) +ssltgz: + $(MAKE) $(SSL_ARCHIV) diff --git a/SOURCE/mkspecs-static-runtimes.patch b/SOURCE/mkspecs-static-runtimes.patch new file mode 100644 index 0000000..9f5f94b --- /dev/null +++ b/SOURCE/mkspecs-static-runtimes.patch @@ -0,0 +1,35 @@ +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-32/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-32/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-32/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-32/qmake.conf 2020-04-19 21:02:26.869710981 +0200 +@@ -9,7 +9,7 @@ + include(../common/linux.conf) + + QMAKE_CFLAGS = -m32 +-QMAKE_LFLAGS = -m32 ++QMAKE_LFLAGS = -m32 -static-libgcc -static-libstdc++ + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-64/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-64/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-64/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-64/qmake.conf 2020-04-19 21:02:07.453758876 +0200 +@@ -12,7 +12,7 @@ + include(../common/linux.conf) + + QMAKE_CFLAGS = -m64 +-QMAKE_LFLAGS = -m64 ++QMAKE_LFLAGS = -m64 -static-libgcc -static-libstdc++ + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/win32-g++/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/win32-g++/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/win32-g++/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/win32-g++/qmake.conf 2020-04-19 21:03:17.773585413 +0200 +@@ -15,6 +15,7 @@ + QMAKE_CC = $${CROSS_COMPILE}gcc + QMAKE_CFLAGS += -fno-keep-inline-dllexport + QMAKE_CFLAGS_WARN_ON += -Wextra ++QMAKE_LFLAGS += -static-libgcc -static-libstdc++ + + QMAKE_CXX = $${CROSS_COMPILE}g++ + QMAKE_CXXFLAGS += -fno-keep-inline-dllexport diff --git a/SOURCE/mkspecs-static-runtimes2.patch b/SOURCE/mkspecs-static-runtimes2.patch new file mode 100644 index 0000000..11b9083 --- /dev/null +++ b/SOURCE/mkspecs-static-runtimes2.patch @@ -0,0 +1,35 @@ +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-32/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-32/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-32/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-32/qmake.conf 2020-04-19 21:02:26.869710981 +0200 +@@ -9,7 +9,7 @@ + include(../common/linux.conf) + + QMAKE_CFLAGS = -m32 +-QMAKE_LFLAGS = -m32 ++QMAKE_LFLAGS = -m32 -static-libgcc -static-libstdc++ + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-64/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-64/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/linux-g++-64/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/linux-g++-64/qmake.conf 2020-04-19 21:02:07.453758876 +0200 +@@ -12,7 +12,7 @@ + include(../common/linux.conf) + + QMAKE_CFLAGS = -m64 +-QMAKE_LFLAGS = -m64 ++QMAKE_LFLAGS = -m64 -static-libgcc -static-libstdc++ + + include(../common/gcc-base-unix.conf) + include(../common/g++-unix.conf) +diff -ruNb qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/win32-g++/qmake.conf qt-everywhere-src-5.14.2/qtbase/mkspecs/win32-g++/qmake.conf +--- qt-everywhere-src-5.14.2.orig/qtbase/mkspecs/win32-g++/qmake.conf 2020-03-27 10:49:31.000000000 +0100 ++++ qt-everywhere-src-5.14.2/qtbase/mkspecs/win32-g++/qmake.conf 2020-04-19 21:23:18.170624479 +0200 +@@ -15,6 +15,7 @@ + QMAKE_CC = $${CROSS_COMPILE}gcc + QMAKE_CFLAGS += -fno-keep-inline-dllexport + QMAKE_CFLAGS_WARN_ON += -Wextra ++QMAKE_LFLAGS += -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -Wl,-Bdynamic + + QMAKE_CXX = $${CROSS_COMPILE}g++ + QMAKE_CXXFLAGS += -fno-keep-inline-dllexport diff --git a/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch b/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch index 017c5a9..912a5e1 100644 --- a/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch +++ b/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch @@ -6,7 +6,7 @@ diff -ruNb qt-everywhere-src-5.12.3.orig/qtbase/mkspecs/common/g++-win32.conf qt include(angle.conf) include(windows-vulkan.conf) + -+QMAKE_LFLAGS += -static-libgcc -static-libstdc++ ++QMAKE_LFLAGS += -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -Wl,-Bdynamic diff -ruNb qt-everywhere-src-5.12.3.orig/qtbase/mkspecs/x-win32-g++/qmake.conf qt-everywhere-src-5.12.3/qtbase/mkspecs/x-win32-g++/qmake.conf --- qt-everywhere-src-5.12.3.orig/qtbase/mkspecs/x-win32-g++/qmake.conf 1970-01-01 01:00:00.000000000 +0100 +++ qt-everywhere-src-5.12.3/qtbase/mkspecs/x-win32-g++/qmake.conf 2019-05-31 08:59:13.555027712 +0200 |