From eda7a61bf78771315d6741961ecd313fbc1d7c62 Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Fri, 31 Dec 2021 16:53:33 +0100 Subject: [PATCH] CONFIGURE: Don't use DWARF in nasm when linking using gold This raises `internal error in relocate_section, at ../../gold/i386.cc:3683` --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 65e47314749..c2b6c757e4d 100755 --- a/configure +++ b/configure @@ -5676,6 +5676,10 @@ if test "$_have_x86" = yes ; then ;; *) append_var NASMFLAGS "-f elf" + if $LD $LDFLAGS -Wl,--version 2>/dev/null | grep -q -e 'GNU gold'; then + # gold throws an internal error when nasm uses dwarf, force older stabs in this case + append_var NASMFLAGS "-F stabs" + fi ;; esac _nasm=yes