Skip to content
Snippets Groups Projects
Unverified Commit f5c27ba9 authored by Nowa Ammerlaan's avatar Nowa Ammerlaan
Browse files

gui/build.sh: properly respect user variables

This ensures proper building when cross-compiling
and allows users to use different toolchain tools if
desired

Bug: https://bugs.gentoo.org/814017
Closes: #550


Signed-off-by: default avatarAndrew Ammerlaan <andrewammerlaan@gentoo.org>
parent 2d4f6f72
No related branches found
No related tags found
1 merge request!145gui/build.sh: properly respect user variables and also upstream some other Gentoo patches
...@@ -65,13 +65,13 @@ function buildGoLib { ...@@ -65,13 +65,13 @@ function buildGoLib {
if [ "$XBUILD" == "no" ] if [ "$XBUILD" == "no" ]
then then
echo "[+] Building Go library with standard Go compiler" echo "[+] Building Go library with standard Go compiler"
CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi fi
if [ "$XBUILD" == "$WIN64" ] if [ "$XBUILD" == "$WIN64" ]
then then
echo "[+] Building Go library with mxe" echo "[+] Building Go library with mxe"
echo "[+] Using cc:" $CC echo "[+] Using cc:" $CC
CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi fi
} }
...@@ -79,7 +79,7 @@ function buildQmake { ...@@ -79,7 +79,7 @@ function buildQmake {
echo "[+] Now building Qml app with Qt qmake" echo "[+] Now building Qml app with Qt qmake"
echo "[+] Using qmake in:" $QMAKE echo "[+] Using qmake in:" $QMAKE
mkdir -p $QTBUILD mkdir -p $QTBUILD
$QMAKE -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT $QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT
#CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release #CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release
} }
...@@ -120,7 +120,7 @@ function buildDefault { ...@@ -120,7 +120,7 @@ function buildDefault {
buildQmake buildQmake
make -C $QTBUILD clean make -C $QTBUILD clean
make -C $QTBUILD -j4 all make -C $QTBUILD $MAKEFLAGS all
renameOutput renameOutput
echo "[+] Done." echo "[+] Done."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment