public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-2132] ada: Fix build of GNAT tools
Date: Tue, 27 Jun 2023 12:08:21 +0000 (GMT)	[thread overview]
Message-ID: <20230627120821.B54EF3857C44@sourceware.org> (raw)

https://gcc.gnu.org/g:4a48a38fa99f067b8f3a3d1a5dc7a1e602db351f

commit r14-2132-g4a48a38fa99f067b8f3a3d1a5dc7a1e602db351f
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Wed Jun 21 18:19:36 2023 +0200

    ada: Fix build of GNAT tools
    
    gcc/ada/
    
            * gcc-interface/Makefile.in (LIBIBERTY): Fix condition.
            (TOOLS_LIBS): Add @LD_PICFLAG@.

Diff:
---
 gcc/ada/gcc-interface/Makefile.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index dc0e54f8eb6..b5243a24a8f 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -240,10 +240,10 @@ ALL_CPPFLAGS = $(CPPFLAGS)
 ALL_COMPILERFLAGS = $(ALL_CFLAGS)
 
 # This is where we get libiberty.a from.
-ifeq ($(PICFLAG),)
-LIBIBERTY = ../../libiberty/libiberty.a
-else
+ifneq ($(findstring $(PICFLAG),-fPIC -fPIE),)
 LIBIBERTY = ../../libiberty/pic/libiberty.a
+else
+LIBIBERTY = ../../libiberty/libiberty.a
 endif
 
 # We need to link against libbacktrace because diagnostic.c in
@@ -261,6 +261,9 @@ TOOLS_LIBS = ../version.o ../link.o ../targext.o ../../ggc-none.o \
   $(LIBGNAT) $(LIBINTL) $(LIBICONV) ../$(LIBBACKTRACE) ../$(LIBIBERTY) \
   $(SYSLIBS) $(TGT_LIB)
 
+# Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE.
+TOOLS_LIBS += @LD_PICFLAG@
+
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation

                 reply	other threads:[~2023-06-27 12:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230627120821.B54EF3857C44@sourceware.org \
    --to=dkm@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.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).