public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-2972] Darwin, libcc1: Handle hosts with mdynamic-no-pic support.
Date: Tue, 17 Aug 2021 19:04:20 +0000 (GMT)	[thread overview]
Message-ID: <20210817190420.910363858436@sourceware.org> (raw)

https://gcc.gnu.org/g:b240450b630da511fadda98bba4862033ff56950

commit r12-2972-gb240450b630da511fadda98bba4862033ff56950
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sun Jul 4 17:56:05 2021 +0100

    Darwin, libcc1: Handle hosts with mdynamic-no-pic support.
    
    The default for building host-side binaries for mdynamic-no-pic
    hosts is to enable this.  However, it is not compatible with
    dynamic libraries, so must be switched off for libcc1.
    
    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
    
    libcc1/ChangeLog:
    
            * Makefile.am: Switch mdynamic-no-pic to fPIC.
            * Makefile.in: Regenerated.

Diff:
---
 libcc1/Makefile.am | 1 +
 libcc1/Makefile.in | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index 9ec021030e2..49a9543ea7d 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -27,6 +27,7 @@ AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
 if DARWIN_DYNAMIC_LOOKUP
 AM_CXXFLAGS += -Wl,-undefined,dynamic_lookup
 endif
+override CXXFLAGS := $(subst -mdynamic-no-pic,-fPIC,$(CXXFLAGS))
 override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
 override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
 # Can be simplified when libiberty becomes a normal convenience library.
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 395f01a9821..f8f590d71e9 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -810,6 +810,7 @@ uninstall-am: uninstall-cc1libLTLIBRARIES uninstall-pluginLTLIBRARIES
 
 .PRECIOUS: Makefile
 
+override CXXFLAGS := $(subst -mdynamic-no-pic,-fPIC,$(CXXFLAGS))
 override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
 override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))


                 reply	other threads:[~2021-08-17 19:04 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=20210817190420.910363858436@sourceware.org \
    --to=iains@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).