public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Harmstone <mark@harmstone.com>
To: binutils@sourceware.org
Cc: Mark Harmstone <mark@harmstone.com>
Subject: [PATCH] gas: Disable --gcodeview on PE targets with no O_secrel
Date: Wed, 23 Nov 2022 19:43:30 +0000	[thread overview]
Message-ID: <20221123194330.21185-1-mark@harmstone.com> (raw)

As per https://sourceware.org/pipermail/binutils/2022-November/124611.html

---
 gas/as.c       | 6 +++---
 gas/codeview.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gas/as.c b/gas/as.c
index 74ffa71925f..e49b1f0a796 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -334,7 +334,7 @@ Options:\n\
   --gdwarf-cie-version=<N> generate version 1, 3 or 4 DWARF CIEs\n"));
   fprintf (stream, _("\
   --gdwarf-sections       generate per-function section names for DWARF line information\n"));
-#ifdef TE_PE
+#if defined (TE_PE) && defined (O_secrel)
   fprintf (stream, _("\
   --gcodeview             generate CodeView debugging information\n"));
 #endif
@@ -551,7 +551,7 @@ parse_args (int * pargc, char *** pargv)
     ,{"gdwarf2", no_argument, NULL, OPTION_GDWARF_2}
     ,{"gdwarf-sections", no_argument, NULL, OPTION_GDWARF_SECTIONS}
     ,{"gdwarf-cie-version", required_argument, NULL, OPTION_GDWARF_CIE_VERSION}
-#ifdef TE_PE
+#if defined (TE_PE) && defined (O_secrel)
     ,{"gcodeview", no_argument, NULL, OPTION_GCODEVIEW}
 #endif
     ,{"gen-debug", no_argument, NULL, 'g'}
@@ -879,7 +879,7 @@ This program has absolutely no warranty.\n"));
 	  flag_dwarf_sections = true;
 	  break;
 
-#ifdef TE_PE
+#if defined (TE_PE) && defined (O_secrel)
 	case OPTION_GCODEVIEW:
 	  debug_type = DEBUG_CODEVIEW;
 	  break;
diff --git a/gas/codeview.c b/gas/codeview.c
index da7145659f5..13f1a3a3223 100644
--- a/gas/codeview.c
+++ b/gas/codeview.c
@@ -24,7 +24,7 @@
 #include "filenames.h"
 #include "md5.h"
 
-#ifdef TE_PE
+#if defined (TE_PE) && defined (O_secrel)
 
 #define NUM_MD5_BYTES       	16
 
@@ -538,4 +538,4 @@ codeview_generate_asm_lineno (void)
 {
 }
 
-#endif /* TE_PE */
+#endif /* TE_PE && O_secrel */
-- 
2.37.4


             reply	other threads:[~2022-11-23 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 19:43 Mark Harmstone [this message]
2022-11-23 22:20 ` Alan Modra

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=20221123194330.21185-1-mark@harmstone.com \
    --to=mark@harmstone.com \
    --cc=binutils@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).