From 6c19897c1c1d5d1cdfc1429845fba1ff3bf118c0 Mon Sep 17 00:00:00 2001 From: Joerg Koenig Date: Thu, 16 May 2019 23:06:57 +0200 Subject: Next dev stage Change-Id: I5d1cf803de2f7e1891fe7ba9e5d43aba8d33a650 --- Jenkinsfile | 54 +++++++++++------- Makefile.x86-linux | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+), 20 deletions(-) create mode 100644 Makefile.x86-linux diff --git a/Jenkinsfile b/Jenkinsfile index 621838e..2d1e32b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,19 @@ stage('Build') { extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: REPO]]]) - sh '''#!/bin/bash - GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux64/gcc-8.0.1 make - ''' + + stage("32 Bit Build") { + sh '''#!/bin/bash + GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux/gcc-8.2.0 make -f Makefile.x86-linux + ''' + } + stage("64 Bit Build") { + sh '''#!/bin/bash + GCC_PATH=/master/DEV-Tools/gcc-suite/1.2.0-125/x86-linux64/gcc-8.2.0 make + ''' + } + + archiveArtifacts artifacts: 'qt-*-x86-linux64.tgz' } }, @@ -41,15 +51,17 @@ stage('Build') { extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: REPO]]]) - - bat '''@echo off - set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\ - set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_32\\ - set MSYSDIR=C:\\dev-tools\\msys\\x86\\ - set PERLDIR=C:\\dev-tools\\perl\\x86_64-msvc\\ - set PATH=%PATH%;C:\\dev-tools\\Python\\2.7\\x86-windows\\ - buildqt32.bat - ''' + + stage ("32 Bit Build") { + bat '''@echo off + set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\ + set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_32\\ + set MSYSDIR=C:\\dev-tools\\msys\\x86\\ + set PERLDIR=C:\\dev-tools\\perl\\x86_64-msvc\\ + set PATH=%PATH%;C:\\dev-tools\\Python\\2.7\\x86-windows\\ + buildqt32.bat + ''' + } bat ''' set MSYSDIR=C:\\dev-tools\\msys\\x86 @@ -57,14 +69,16 @@ stage('Build') { sh.exe -c "rm -f openssl-1.0.2r/NUL" sh.exe -c "rm -Rf openssl-1.0.2r*" ''' - bat '''@echo off - set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\ - set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_64 - set MSYSDIR=C:\\dev-tools\\msys\\x86\\ - set PERLDIR=C:\\dev-tools\\perl\\x86_64-msvc\\ - set PATH=%PATH%;C:\\dev-tools\\Python\\2.7\\x86-windows\\ - buildqt64.bat - ''' + stage ("64 Bit Build") { + bat '''@echo off + set SDKDIR=C:\\dev-tools\\WinSDK\\VS2019BT\\ + set NASMDIR=C:\\dev-tools\\nasm\\2.12.01_64 + set MSYSDIR=C:\\dev-tools\\msys\\x86\\ + set PERLDIR=C:\\dev-tools\\perl\\x86_64-msvc\\ + set PATH=%PATH%;C:\\dev-tools\\Python\\2.7\\x86-windows\\ + buildqt64.bat + ''' + } archiveArtifacts artifacts: '*-msvc.zip' } catch (e) { diff --git a/Makefile.x86-linux b/Makefile.x86-linux new file mode 100644 index 0000000..b3f2856 --- /dev/null +++ b/Makefile.x86-linux @@ -0,0 +1,157 @@ + +TOP = $(shell readlink -f .) +ARCH = x86-linux + +JOBS = 2 + +LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH) +LOCAL_INST_PATH = $(TOP)/install.$(ARCH) + +VERSION_SHORT=5.12 +VERSION_RELEASE=3 +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/8.2.0/x86-linux64/gcc-8.2.0 + +CC ?= "$(GCC_PATH)/bin/gcc -m32" +CXX ?= "$(GCC_PATH)/bin/g++ -m32" + +#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=-m32 && \ + export LDFLAGS=$(CC_LDFLAGS) && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + ./Configure --prefix=$(LOCAL_INST_PATH)/openssl linux-generic64 && \ + 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="-m32 -fpic" && \ + export LDFLAGS=$(CC_LDFLAGS) && \ + 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 && \ + pwd && \ + make clean && \ + make -j$(JOBS) && \ + make install + +qt.x86-linux: qt.x86-linux.shared qt.x86-linux.static merge + +qt.x86-linux.shared: + # 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) && \ + rm -f config.cache && \ + export LDFLAGS=$(CXX_LDFLAGS) && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib:$(LD_LIBRARY_PATH) && \ + gcc --version && \ + bash ./configure \ + -recheck-all \ + -shared \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-shared \ + -release \ + -opensource \ + -strip \ + -ssl \ + -openssl \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -L$(LOCAL_INST_PATH)/openssl/lib \ + -L$(GCC_PATH)/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -qt-xcb \ + -fontconfig \ + -system-freetype \ + -confirm-license && \ + make -j$(JOBS) && \ + make -j$(JOBS) install + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared && \ + tar -zcf $(TOP)/qt-$(VERSION)-shared-$(ARCH).tgz ./ + +qt.x86-linux.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) && \ + rm -f config.cache && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib:$(LD_LIBRARY_PATH) && \ + gcc --version && \ + ./configure \ + -recheck-all \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-static \ + -static \ + -release \ + -opensource \ + -strip \ + -ssl \ + -openssl \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -L$(LOCAL_INST_PATH)/opensll/lib \ + -L$(GCC_PATH)/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -qt-xcb \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -fontconfig \ + -system-freetype \ + -confirm-license && \ + make -j$(JOBS) && \ + make -j$(JOBS) install + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-static && \ + tar -zcf $(TOP)/qt-$(VERSION)-static-$(ARCH).tgz ./ +merge: + cp -nr $(LOCAL_INST_PATH)/qt-$(VERSION)-static/lib/* $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/lib/ + cp -nr $(LOCAL_INST_PATH)/qt-$(VERSION)-static/plugins/* $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/plugins/ + cp -nr $(LOCAL_INST_PATH)/qt-$(VERSION)-static/qml/* $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/qml/ + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared && \ + tar -zcf $(TOP)/qt-$(VERSION)-$(ARCH).tgz ./ + +clean: + rm -Rf build.$(ARCH) + rm -Rf install.$(ARCH) -- cgit v0.12