hasufell-repository/packages/games-roguelike/dungeon-crawl-stone-soup/files/0003-0.17.1-MAKE-allow-to-skip-automagic-gold-linker-detection.patch

35 lines
1.3 KiB
Diff

From cf5b5111a5bb69ec154f0bd3e96dc53e14d93cbd Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Fri, 19 Feb 2016 14:03:41 +0100
Subject: [PATCH] MAKE: allow to skip automagic gold linker detection
This causes build failures on exherbo otherwise.
---
crawl-ref/source/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 266c3da..e7c60ac 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -46,6 +46,7 @@
# USE_ICC -- set to use Intel's compiler
# LTO -- set for better optimization but slower compilation,
# requires gcc4.6+
+# NO_TRY_GOLD -- if set don't try to detect a working gold linker
# NOASSERTS -- set to disable assertion checks (ignored in debug mode)
# NOWIZARD -- set to disable wizard mode. Use if you have untrusted
# remote players without DGL.
@@ -1058,9 +1059,11 @@ CFWARN := -wd383,810,869,981,1418 -we14,193,304
CFWARN_L :=
endif
+ifndef NO_TRY_GOLD
ifeq (,$(shell echo 'int main(){return 1;}'|$(GXX) -x c++ - -o /dev/null -fuse-ld=gold 2>&1))
LDFLAGS += -fuse-ld=gold
endif
+endif
LDFLAGS += $(CFOPTIMIZE) $(CFOPTIMIZE_L) $(EXTERNAL_LDFLAGS)