From patchwork Sat Aug 26 01:26:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 136950 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp2148862vqm; Fri, 25 Aug 2023 18:26:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDJHTI5gGriwo/bxt8fTz12q86dc8oS0YUe9PiEkAGiBiO4I0wNVc7tg791IA3Yy+pJ7W3 X-Received: by 2002:a17:906:7696:b0:9a1:c370:1af2 with SMTP id o22-20020a170906769600b009a1c3701af2mr8632840ejm.3.1693013206043; Fri, 25 Aug 2023 18:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693013205; cv=none; d=google.com; s=arc-20160816; b=M90XnzvwnU4IPBEVlpS1K1OZB+q2Y8FxVrCRjIPJd1Haw/jb2B5C+vern85KAXVuH5 CCviWrcy0gegw0V1xgsNCrK/hEfQ/u+zlqFS90SVWkv5zgYzmC5y6hxLwcIwXGswndou 1Rmsluyx756AtXOQm5Fz0u+MMrWtdX5XSYJisCgtx/m2UgdCn4NqkXxidZiz8fS6t427 pHryK1/VkDlWfD2EwgvLzxf6JGajHSXUlFVkgkHp+oHInCZghGazzN1eyFL7BA15xyoR uf+LV8M4EhraFNOfj0MmjsPirlW2x05myUcWINZbOnXxlkH4t8RTcUP7q7XgyCPv/l7G YO5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=YRyfBUXzcOJv+J/TdRyX1Vf3yjTYNAyjJqAwoduCAkM=; fh=NLxAvL/bDfPg4AGOtxqvQlND8vazkZrNzKLY8+LAbBY=; b=GQ5mnNYCrnGHy0xXgNweehzinTFkdx9TnY1n/MRwAEHFSnWtaiQ2GquYljankBrNYO RBSSA3r3/OQUYBlGWURhwUOqKeL4Z4PRPdVcXzH1/cgiXVjqBR8KJSg/hQL29wag+gOa ZUv0F3X90H1CwpLtDw8fGpz5kN3HdQ+9jIH5q6Zn1uiYo9v9EwoyseSMTN/P4NfxXkFW i1vTD2EiQ1pRjYFpVIwOivBhbAafc9upImZTpnDdzzgA8ZEGHpyA47Z1XwRl/OTqWGJX efsPikLIBaXG8b9usSq2QoQoncQOIMEQuk/MYqvYgRLWqEw6mOL5Q0uO52dLHEbjrer8 32Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=d7g5Wqdz; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id n9-20020a170906b30900b009a1c811a6e3si1564757ejz.922.2023.08.25.18.26.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 18:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=d7g5Wqdz; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B860C3858425 for ; Sat, 26 Aug 2023 01:26:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B860C3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693013204; bh=YRyfBUXzcOJv+J/TdRyX1Vf3yjTYNAyjJqAwoduCAkM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=d7g5Wqdz3sXpifO+HLxaJoXohmUofTLaKVYUYw9s7Zvc1n25EwhMY5kF3gocnnQcn xPLX4IEnEvas7MjfjowyD9pqNRX9ccTIaHe7KG5he3MHJ3Tg1NaN0okDia8IC4IWJx AflfNix2KPzDFIzJEpdXC1NJKW4+XGWa257X4UOQ= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id C87BE3858D37 for ; Sat, 26 Aug 2023 01:26:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C87BE3858D37 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-56d8bc0d909so882829eaf.3 for ; Fri, 25 Aug 2023 18:26:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693013193; x=1693617993; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YRyfBUXzcOJv+J/TdRyX1Vf3yjTYNAyjJqAwoduCAkM=; b=DR7C3snI2bO4PPMCoxBItibtNj4G5eZkNg2aL9qAkHwCb0n6qPoEFgDDZCwafBGTDG /GIIs6L/2iqHdMCGU+bAjEOewKES+ZrOSlwg5tLPmcTB8cC1L+tYi5EO9uXwlWJzDcyg rPulGZ8dz/np428UfwkYFVUX7OStGimRxyQ4nI6u8SZSXwH/iXrqCaCGnWJScqeHOygx I1PV41w9bCW3+h32m0uYnOio2ytRuvwEVsehWmRNc+xa0AdHooHSUukQwWUP+i93mQur WiDjZaMX0VtVhlc0HPfSTN/iB5ISb5LdnnJZca2RpU/UkbIl9GkIe46Jtzk0PpHBoznN HikQ== X-Gm-Message-State: AOJu0YyVG2K92JaVC/w052nMbE2AkP4HK8T8isT6J09TlYO1UY4LIGG2 ZzW4YGapfvSAeDkk+Mu6reEe1+rZ6uzeMQ== X-Received: by 2002:a05:6358:2920:b0:134:d559:2590 with SMTP id y32-20020a056358292000b00134d5592590mr20306232rwb.14.1693013193498; Fri, 25 Aug 2023 18:26:33 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:4d61:bb19:1341:c221]) by smtp.gmail.com with ESMTPSA id v17-20020aa78091000000b00678cb337353sm2179971pff.208.2023.08.25.18.26.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 18:26:32 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 1362F1142930; Sat, 26 Aug 2023 10:56:30 +0930 (ACST) Date: Sat, 26 Aug 2023 10:56:30 +0930 To: binutils@sourceware.org Subject: ld STRINGIFY Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3033.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775253015351362347 X-GMAIL-MSGID: 1775253015351362347 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 <