From 263203ec28584d5c9c671257016b510783ef7c9f Mon Sep 17 00:00:00 2001 From: Aaron Wood <aaronjwood@gmail.com> Date: Sat, 28 Jan 2017 17:16:34 -0500 Subject: Produce a position independent executable (#4011) * Produce a position independent executable * Add OS detection to the main Makefile so we don't apply -pie on OS X --- scripts/build_linux64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build_linux64.sh b/scripts/build_linux64.sh index 528fc54c..8b3a68c2 100755 --- a/scripts/build_linux64.sh +++ b/scripts/build_linux64.sh @@ -5,7 +5,7 @@ outPath=./output_$outPlattform_$outArch rm -rf $outPath mkdir $outPath -CGO_ENABLED=0 GOOS=$outPlattform GOARCH=$outArch go build ../gogs.go +CGO_ENABLED=0 GOOS=$outPlattform GOARCH=$outArch go build -buildmode=pie ../gogs.go chmod +x gogs mv gogs $outPath/ -- cgit v1.2.3