Closed issue by pullmoll on void-packages repository https://github.com/void-linux/void-packages/issues/18571 Description: When building `ghc` there is a problem with duplicate `.debug_line` statements emitted into the assembler files because `ghc` seems to pass `-g` to `gas` also. This makes `gas` create its own `.debug_line` statements in addition to what was there before, where the relevant ones are those created by `ghc`. Now since `binutils` treats such duplicated `.debug_line` statements as a fatal error, we can no longer build `ghc`. I tried to turn the fatal error into a warning and it seems this is sufficient to get `ghc` built again. Here's my patch for `binutils`: ``` --- gas/dwarf2dbg.c 2019-09-09 15:19:43.000000000 +0200 +++ gas/dwarf2dbg.c 2020-01-26 16:02:37.951224098 +0100 @@ -2224,7 +2224,7 @@ /* We can't construct a new debug_line section if we already have one. Give an error. */ if (all_segs && !empty_debug_line) - as_fatal ("duplicate .debug_line sections"); + as_warn ("duplicate .debug_line sections"); if ((!all_segs && emit_other_sections) || (!emit_other_sections && !empty_debug_line)) ``` It would however be much better to fix `ghc` and make it strip `-g` from the flags passed to `gas`. I fail to find the place where calling the assembler and passing `CFLAGS` happens, though.