aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-28 12:59:58 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-28 12:59:58 +0100
commitd158172a05c2d3afe987f0b95ffa763a04362353 (patch)
tree4020659bf08ef5fd92de1671ac79c150d6b4aeb7
parentui: use unicode … (diff)
downloadwireguard-windows-d158172a05c2d3afe987f0b95ffa763a04362353.tar.xz
wireguard-windows-d158172a05c2d3afe987f0b95ffa763a04362353.zip
build: go 1.13 now passes correct os version to ld
-rw-r--r--Makefile2
-rw-r--r--build.bat2
-rw-r--r--embeddable-dll-service/build.bat2
3 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f1891fb3..1fee2326 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
GOFLAGS := -ldflags="-H windowsgui -s -w" -v -tags walk_use_cgo -trimpath
export CGO_ENABLED := 1
export CGO_CFLAGS := -O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
-export CGO_LDFLAGS := -Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1 -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
+export CGO_LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
export GOOS := windows
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
diff --git a/build.bat b/build.bat
index b28da268..5bee6c4e 100644
--- a/build.bat
+++ b/build.bat
@@ -36,7 +36,7 @@ if exist .deps\prepared goto :render
set GOROOT=%BUILDDIR%.deps\go
set CGO_ENABLED=1
set CGO_CFLAGS=-O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
- set CGO_LDFLAGS=-Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1 -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
+ set CGO_LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
call :build_plat x86 i686 386 || goto :error
set CGO_LDFLAGS=%CGO_LDFLAGS% -Wl,--high-entropy-va
call :build_plat amd64 x86_64 amd64 || goto :error
diff --git a/embeddable-dll-service/build.bat b/embeddable-dll-service/build.bat
index 675a9164..cae35f70 100644
--- a/embeddable-dll-service/build.bat
+++ b/embeddable-dll-service/build.bat
@@ -18,7 +18,7 @@ if exist ..\.deps\prepared goto :build
set GOROOT=%BUILDDIR%..\.deps\go
set CGO_ENABLED=1
set CGO_CFLAGS=-O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
- set CGO_LDFLAGS=-Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1 -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
+ set CGO_LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
call :build_plat x86 i686 386 || goto :error
set CGO_LDFLAGS=%CGO_LDFLAGS% -Wl,--high-entropy-va
call :build_plat amd64 x86_64 amd64 || goto :error