public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: ld STRINGIFY
@ 2023-08-27  4:41 Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2023-08-27  4:41 UTC (permalink / raw)
  To: binutils

Oops there was a reference to the old name.

	* emultempl/aix.em: Use stringify.sed.

diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em
index 5913649e26c..f95ae091a3f 100644
--- a/ld/emultempl/aix.em
+++ b/ld/emultempl/aix.em
@@ -1614,7 +1614,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f ${srcdir}/emultempl/ostring.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

* ld STRINGIFY
@ 2023-08-26  1:26 Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2023-08-26  1:26 UTC (permalink / raw)
  To: binutils

Delete support for old compilers that don't support string
concatentation.

	* Makefile.am (stringify.sed): Delete rule.
	(GEN_DEPENDS, DISTCLEANFILES): Adjust.
	* configure.ac (STRINGIFY): Delete.
	* emultempl/beos.em: Use stringify.sed from srcdir.
	* emultempl/elf.em: Likewise.
	* emultempl/generic.em: Likewise.
	* emultempl/msp430.em: Likewise.
	* emultempl/pdp11.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/stringify.sed: Renamed from..
	* emultempl/astring.sed: ..this.
	* emultempl/ostring.sed: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

diff --git a/ld/Makefile.am b/ld/Makefile.am
index da885b68370..49dd3b5056e 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -623,16 +623,13 @@ ldemul-list.h: Makefile
 ldscripts/stamp:
 	$(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
 
-stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
-	$(AM_V_GEN)cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
-
 if AMDEP
   GENDEPDIR=$(DEPDIR)
 else
   GENDEPDIR=
 endif
 GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "$(GENDEPDIR)" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
-GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed ldscripts/stamp
+GEN_DEPENDS = $(srcdir)/genscripts.sh ldscripts/stamp
 
 @TDIRS@
 
@@ -826,7 +823,7 @@ doc/ld/index.html: ld.texi $(ld_TEXINFOS)
 	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 	  --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
 
-DISTCLEANFILES = site.exp development.exp enablings.exp site.bak stringify.sed
+DISTCLEANFILES = site.exp development.exp enablings.exp site.bak
 distclean-local:
 	rm -rf ldscripts
 
diff --git a/ld/configure.ac b/ld/configure.ac
index 14628e5dcef..c3ebd3ec7e4 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -392,25 +392,6 @@ fi
 AM_ZLIB
 AC_ZSTD
 
-# When converting linker scripts into strings for use in emulation
-# files, use astring.sed if the compiler supports ANSI string
-# concatenation, or ostring.sed otherwise.  This is to support the
-# broken Microsoft MSVC compiler, which limits the length of string
-# constants, while still supporting pre-ANSI compilers which do not
-# support string concatenation.
-AC_MSG_CHECKING([whether ANSI C string concatenation works])
-AC_CACHE_VAL(ld_cv_string_concatenation,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [char *a = "a" "a";])],
-  ld_cv_string_concatenation=yes,
-  ld_cv_string_concatenation=no)])
-AC_MSG_RESULT($ld_cv_string_concatenation)
-if test "$ld_cv_string_concatenation" = "yes"; then
-  STRINGIFY=astring.sed
-else
-  STRINGIFY=ostring.sed
-fi
-AC_SUBST(STRINGIFY)
-
 # target-specific stuff:
 
 all_targets=
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index 521d92797ec..e597f34ae57 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -718,7 +718,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
index 3f67f8b09d9..1c5030d5e1c 100644
--- a/ld/emultempl/elf.em
+++ b/ld/emultempl/elf.em
@@ -199,7 +199,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/generic.em b/ld/emultempl/generic.em
index c280ed3a46a..b37a1e7e95c 100644
--- a/ld/emultempl/generic.em
+++ b/ld/emultempl/generic.em
@@ -86,7 +86,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/msp430.em b/ld/emultempl/msp430.em
index 33fff78495e..65be0452ee9 100644
--- a/ld/emultempl/msp430.em
+++ b/ld/emultempl/msp430.em
@@ -104,7 +104,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/ostring.sed b/ld/emultempl/ostring.sed
deleted file mode 100644
index a526d3ffc4c..00000000000
--- a/ld/emultempl/ostring.sed
+++ /dev/null
@@ -1,4 +0,0 @@
-s/["\\]/\\&/g
-s/$/\\n\\/
-1 s/^/"/
-$ s/$/n"/
diff --git a/ld/emultempl/pdp11.em b/ld/emultempl/pdp11.em
index c6dbdeedd6a..f5d2f4f5256 100644
--- a/ld/emultempl/pdp11.em
+++ b/ld/emultempl/pdp11.em
@@ -101,7 +101,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 36f60d53ea3..24dc19afff3 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -2511,7 +2511,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 1df959a6a50..289c72e3036 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -2342,7 +2342,7 @@ then
 # Scripts compiled in.
 
 # sed commands to quote an ld script as a C string.
-sc="-f stringify.sed"
+sc="-f ${srcdir}/emultempl/stringify.sed"
 
 fragment <<EOF
 {
diff --git a/ld/emultempl/astring.sed b/ld/emultempl/stringify.sed
similarity index 100%
rename from ld/emultempl/astring.sed
rename to ld/emultempl/stringify.sed

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-27  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27  4:41 ld STRINGIFY Alan Modra
  -- strict thread matches above, loose matches on Subject: below --
2023-08-26  1:26 Alan Modra

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