Skip to content

Commit

Permalink
Merge pull request #256 from vertiond/24.x-guix
Browse files Browse the repository at this point in the history
24.x: guix builds linux using -fPIE, windows using --disable-shared
  • Loading branch information
vertiond authored Feb 25, 2024
2 parents 4995601 + 65bee69 commit 8d2f174
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,15 @@ mkdir -p "$OUTDIR"

# CONFIGFLAGS
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
case "$HOST" in
*mingw*) CONFIGFLAGS+=" --disable-shared" ;;
esac

# CFLAGS
HOST_CFLAGS="-O2 -g"
HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
case "$HOST" in
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=. -fPIE" ;;
*mingw*) HOST_CFLAGS+=" -fno-ident" ;;
*darwin*) unset HOST_CFLAGS ;;
esac
Expand Down Expand Up @@ -331,11 +334,11 @@ mkdir -p "$DISTSRC"
(
cd installed

case "$HOST" in
*mingw*)
mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll
;;
esac
# case "$HOST" in
# *mingw*)
# mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll
# ;;
# esac

# Prune libtool and object archives
find . -name "lib*.la" -delete
Expand Down

0 comments on commit 8d2f174

Please sign in to comment.