Github messages for voidlinux
 help / color / mirror / Atom feed
From: pullmoll <pullmoll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] ghc: fails to build; passes -g to GNU assembler
Date: Sun, 17 Jan 2021 17:07:20 +0100	[thread overview]
Message-ID: <20210117160720.2t2gKYcVfRPSW9NiMqYNDh5yAss4AAIOXDOVoH9txc4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18571@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

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.


      parent reply	other threads:[~2021-01-17 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 16:00 [ISSUE] " voidlinux-github
2020-01-26 16:05 ` voidlinux-github
2021-01-17 16:07 ` pullmoll [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210117160720.2t2gKYcVfRPSW9NiMqYNDh5yAss4AAIOXDOVoH9txc4@z \
    --to=pullmoll@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).