forked from Imagelibrary/binutils-gdb
ld STRINGIFY
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.
This commit is contained in:
@@ -623,16 +623,13 @@ ldemul-list.h: Makefile
|
|||||||
ldscripts/stamp:
|
ldscripts/stamp:
|
||||||
$(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
|
$(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
|
if AMDEP
|
||||||
GENDEPDIR=$(DEPDIR)
|
GENDEPDIR=$(DEPDIR)
|
||||||
else
|
else
|
||||||
GENDEPDIR=
|
GENDEPDIR=
|
||||||
endif
|
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@
|
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@
|
@TDIRS@
|
||||||
|
|
||||||
@@ -826,7 +823,7 @@ doc/ld/index.html: ld.texi $(ld_TEXINFOS)
|
|||||||
$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
|
$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
|
||||||
--split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
|
--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:
|
distclean-local:
|
||||||
rm -rf ldscripts
|
rm -rf ldscripts
|
||||||
|
|
||||||
|
|||||||
@@ -462,7 +462,6 @@ RANLIB = @RANLIB@
|
|||||||
SED = @SED@
|
SED = @SED@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRINGIFY = @STRINGIFY@
|
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
|
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
|
||||||
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
|
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
|
||||||
@@ -1010,7 +1009,7 @@ BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
|
|||||||
@AMDEP_FALSE@GENDEPDIR =
|
@AMDEP_FALSE@GENDEPDIR =
|
||||||
@AMDEP_TRUE@GENDEPDIR = $(DEPDIR)
|
@AMDEP_TRUE@GENDEPDIR = $(DEPDIR)
|
||||||
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@
|
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
|
||||||
|
|
||||||
# We need this for automake to use YLWRAP.
|
# We need this for automake to use YLWRAP.
|
||||||
# Allow dependency tracking to work for these files, too.
|
# Allow dependency tracking to work for these files, too.
|
||||||
@@ -1075,7 +1074,7 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s spu_ovl.@OBJEXT@ spu_icache.s
|
|||||||
EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \
|
EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.@OBJEXT@_c \
|
||||||
emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS)
|
emultempl/spu_icache.@OBJEXT@_c deffilep.c deffilep.h $(man_MANS)
|
||||||
|
|
||||||
DISTCLEANFILES = site.exp development.exp enablings.exp site.bak stringify.sed
|
DISTCLEANFILES = site.exp development.exp enablings.exp site.bak
|
||||||
all: $(BUILT_SOURCES) config.h
|
all: $(BUILT_SOURCES) config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
@@ -2353,9 +2352,6 @@ ldemul-list.h: Makefile
|
|||||||
ldscripts/stamp:
|
ldscripts/stamp:
|
||||||
$(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
|
$(AM_V_GEN)test -d $(@D) || mkdir $(@D); touch $@
|
||||||
|
|
||||||
stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
|
|
||||||
$(AM_V_GEN)cp ${srcdir}/emultempl/$(STRINGIFY) stringify.sed
|
|
||||||
|
|
||||||
@TDIRS@
|
@TDIRS@
|
||||||
|
|
||||||
e%.c:
|
e%.c:
|
||||||
|
|||||||
44
ld/configure
vendored
44
ld/configure
vendored
@@ -646,7 +646,6 @@ EMUL
|
|||||||
elf_plt_unwind_list_options
|
elf_plt_unwind_list_options
|
||||||
elf_shlib_list_options
|
elf_shlib_list_options
|
||||||
elf_list_options
|
elf_list_options
|
||||||
STRINGIFY
|
|
||||||
ZSTD_LIBS
|
ZSTD_LIBS
|
||||||
ZSTD_CFLAGS
|
ZSTD_CFLAGS
|
||||||
zlibinc
|
zlibinc
|
||||||
@@ -11656,7 +11655,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11659 "configure"
|
#line 11658 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@@ -11762,7 +11761,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11765 "configure"
|
#line 11764 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@@ -17271,45 +17270,6 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ANSI C string concatenation works" >&5
|
|
||||||
$as_echo_n "checking whether ANSI C string concatenation works... " >&6; }
|
|
||||||
if ${ld_cv_string_concatenation+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
char *a = "a" "a";
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
|
||||||
ld_cv_string_concatenation=yes
|
|
||||||
else
|
|
||||||
ld_cv_string_concatenation=no
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_cv_string_concatenation" >&5
|
|
||||||
$as_echo "$ld_cv_string_concatenation" >&6; }
|
|
||||||
if test "$ld_cv_string_concatenation" = "yes"; then
|
|
||||||
STRINGIFY=astring.sed
|
|
||||||
else
|
|
||||||
STRINGIFY=ostring.sed
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# target-specific stuff:
|
# target-specific stuff:
|
||||||
|
|
||||||
all_targets=
|
all_targets=
|
||||||
|
|||||||
@@ -392,25 +392,6 @@ fi
|
|||||||
AM_ZLIB
|
AM_ZLIB
|
||||||
AC_ZSTD
|
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:
|
# target-specific stuff:
|
||||||
|
|
||||||
all_targets=
|
all_targets=
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
s/["\\]/\\&/g
|
|
||||||
s/$/\\n\\/
|
|
||||||
1 s/^/"/
|
|
||||||
$ s/$/n"/
|
|
||||||
@@ -101,7 +101,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2511,7 +2511,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2342,7 +2342,7 @@ then
|
|||||||
# Scripts compiled in.
|
# Scripts compiled in.
|
||||||
|
|
||||||
# sed commands to quote an ld script as a C string.
|
# sed commands to quote an ld script as a C string.
|
||||||
sc="-f stringify.sed"
|
sc="-f ${srcdir}/emultempl/stringify.sed"
|
||||||
|
|
||||||
fragment <<EOF
|
fragment <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user