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

41 lines
1.3 KiB
Diff

From 2c22f71a1d853e720a1daf1c6cf83b9b0b6f7b18 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.
Upstream pull-request:
https://github.com/crawl/crawl/pull/237
---
crawl-ref/source/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 484f801..6fbd534 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.
@@ -1048,9 +1049,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)
--
2.7.1