summarylogtreecommitdiffstats
path: root/010-xd-torrent-use-arch-ldflags.patch
blob: e37e357c9465c9a8982956f6cc94f2b59f3a8ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/Makefile
+++ b/Makefile
@@ -43,10 +43,10 @@ build: $(CLI)
 
 
 $(XD): $(WEBUI_CORE)
-	$(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD)
+	$(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD)
 
 dev: $(WEBUI_CORE)
-	$(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD)
+	$(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD)
 
 $(CLI): $(XD)
 	$(RM) $(CLI)
@@ -81,7 +81,7 @@ $(WEBUI_CORE): $(WEBUI_LOGO)
 webui: $(WEBUI_CORE)
 
 no-webui:
-	$(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -o $(XD)
+	$(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -o $(XD)
 
 install: $(XD) $(CLI)
 	$(MKDIR) $(PREFIX)/bin