public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] ld: yet another PDB build fix (or workaround)
@ 2023-01-06 12:36 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-01-06 12:36 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47bb5b33f742b4338bfa9608288830aecb085da4

commit 47bb5b33f742b4338bfa9608288830aecb085da4
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jan 6 13:36:39 2023 +0100

    ld: yet another PDB build fix (or workaround)
    
    Older bash looks to improperly deal with backslashes in here-documents,
    leaving them in place on the escaped double quotes inside the parameter
    expansion. Convert to a model without using such a construct, by simply
    splitting the here-documents into three ones.

Diff:
---
 ld/emultempl/pe.em  | 20 ++++++++++++--------
 ld/emultempl/pep.em | 20 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index bce1d1b9052..323724b84f5 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -15,13 +15,6 @@ case ${target} in
     ;;
 esac
 
-case ${target} in
-  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
-  i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
-    pdb_support=" ";;
-  *)
-esac
-
 rm -f e${EMULATION_NAME}.c
 (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
 fragment <<EOF
@@ -73,7 +66,18 @@ fragment <<EOF
 #include "ldctor.h"
 #include "ldbuildid.h"
 #include "coff/internal.h"
-${pdb_support+#include \"pdb.h\"}
+EOF
+
+case ${target} in
+  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
+  i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
+fragment <<EOF
+#include "pdb.h"
+EOF
+    ;;
+esac
+
+fragment <<EOF
 
 /* FIXME: See bfd/peXXigen.c for why we include an architecture specific
    header in generic PE code.  */
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 69b1c3ec79b..6ac70f9cfa4 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -17,13 +17,6 @@ case ${target} in
     ;;
 esac
 
-case ${target} in
-  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
-  i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
-    pdb_support=" ";;
-  *)
-esac
-
 rm -f e${EMULATION_NAME}.c
 (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
 fragment <<EOF
@@ -82,7 +75,18 @@ fragment <<EOF
 #include "ldctor.h"
 #include "ldbuildid.h"
 #include "coff/internal.h"
-${pdb_support+#include \"pdb.h\"}
+EOF
+
+case ${target} in
+  x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
+  i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
+fragment <<EOF
+#include "pdb.h"
+EOF
+    ;;
+esac
+
+fragment <<EOF
 
 /* FIXME: See bfd/peXXigen.c for why we include an architecture specific
    header in generic PE code.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-06 12:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 12:36 [binutils-gdb] ld: yet another PDB build fix (or workaround) Jan Beulich

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).