mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Compile really static with no pie
On Alpine Linux (musl-libc based GNU/Linux distribution) Before: $ file yggdrasil yggdrasil: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped After: $ file yggdrasil yggdrasil: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
This commit is contained in:
parent
7c51d9e971
commit
c4aed82f94
1 changed files with 1 additions and 0 deletions
1
build
1
build
|
@ -5,6 +5,7 @@ PKGNAME=${PKGNAME:-$(sh contrib/semver/name.sh)}
|
|||
PKGVER=${PKGVER:-$(sh contrib/semver/version.sh --bare)}
|
||||
|
||||
LDFLAGS="-X $PKGSRC.buildName=$PKGNAME -X $PKGSRC.buildVersion=$PKGVER"
|
||||
LDFLAGS="$LDFLAGS -extldflags '-static -no-pie'"
|
||||
|
||||
while getopts "udtc:l:" option
|
||||
do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue