public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65351] [5 Regression] libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.
Date: Tue, 31 Mar 2015 16:16:00 -0000	[thread overview]
Message-ID: <bug-65351-4-yBCRcaonMz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65351-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65351

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The patch looks wrong, but passing -mdynamic-no-pic in BOOT_CFLAGS for Darwin
is even more wrong.
BOOT_CFLAGS is feeding STAGE*_CFLAGS which is used to compile various stuff,
not just the compiler binary itself, and given that the flag is incompatible
with -fpic and some libraries are built with that, you just shouldn't pass that
down.
libcc1 isn't the only thing broken by that, I think --enable-host-shared will
fail miserably too on Darwin.
So, either config/mh-darwin should set some other variable (say
NONPIC_HOST_CFLAGS or whatever) to -mdynamic-no-pic and you should arrange for
it to be passed down as NONPIC_CFLAGS for modules being built for host, and
you'd use that in e.g.
 # Enable --enable-host-shared
 AC_ARG_ENABLE(host-shared,
 [AS_HELP_STRING([--enable-host-shared],
                 [build host code as shared libraries])],
-[PICFLAG=-fPIC], [PICFLAG=])
+[PICFLAG=-fPIC], [PICFLAG=$NONPIC_CFLAGS])
 AC_SUBST(enable_host_shared)
 AC_SUBST(PICFLAG)
(in gcc/ and libcpp/, perhaps elsewhere where performance criticial), or you
just not do it in config/mh-darwin, but in these two spots instead.
Really, passing some bogus flag down everywhere and then trying to remove it
again is just too weird.
Another option is to make sure you use -fPIC (or -fpic) together with
-mno-dynamic-no-pic on Darwin and that you pass it after the vars where
-mdynamic-no-pic is set, then tweak libiberty/pic, gcc & libcpp
--enable-host-shared etc. not to use that.


  parent reply	other threads:[~2015-03-31 16:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 17:17 [Bug target/65351] New: [5 Regression] ld: absolute addressing (perhaps -mdynamic-no-pic) used in _byte_common_op_match_null_string_p from ../libiberty/pic/libiberty.a(regex.o) not allowed ... on powerpc-apple-darwin9 dominiq at lps dot ens.fr
2015-03-08 17:34 ` [Bug target/65351] " iains at gcc dot gnu.org
2015-03-08 17:38 ` dominiq at lps dot ens.fr
2015-03-09 12:13 ` rguenth at gcc dot gnu.org
2015-03-29 22:00 ` iains at gcc dot gnu.org
2015-03-31 13:07 ` [Bug target/65351] [5 Regression] libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1 rguenth at gcc dot gnu.org
2015-03-31 13:12 ` iains at gcc dot gnu.org
2015-03-31 16:16 ` jakub at gcc dot gnu.org [this message]
2015-03-31 16:37 ` iains at gcc dot gnu.org
2015-03-31 17:07 ` jakub at gcc dot gnu.org
2015-03-31 17:14 ` jakub at gcc dot gnu.org
2015-04-02 11:57 ` iains at gcc dot gnu.org
2015-04-02 12:06 ` jakub at gcc dot gnu.org
2015-04-07 10:05 ` jakub at gcc dot gnu.org
2015-04-07 21:25 ` howarth.at.gcc at gmail dot com
2015-04-07 21:30 ` iains at gcc dot gnu.org
2015-04-07 21:34 ` howarth.at.gcc at gmail dot com
2015-04-07 23:13 ` iains at gcc dot gnu.org
2015-04-07 23:19 ` iains at gcc dot gnu.org
2015-04-08  5:26 ` jakub at gcc dot gnu.org
2015-04-08  5:47 ` jakub at gcc dot gnu.org
2015-04-08  7:10 ` iains at gcc dot gnu.org
2015-04-08  7:53 ` iains at gcc dot gnu.org
2015-04-08  8:40 ` jakub at gcc dot gnu.org
2015-04-08  9:25 ` iains at gcc dot gnu.org
2015-04-08  9:40 ` jakub at gcc dot gnu.org
2015-04-08 11:16 ` iains at gcc dot gnu.org
2015-04-08 12:49 ` dominiq at lps dot ens.fr
2015-04-08 22:59 ` iains at gcc dot gnu.org
2015-04-09  7:16 ` jakub at gcc dot gnu.org
2015-04-09 11:32 ` iains at gcc dot gnu.org
2015-04-10  6:44 ` iains at gcc dot gnu.org
2015-04-10  6:54 ` jakub at gcc dot gnu.org

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=bug-65351-4-yBCRcaonMz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).