public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/65294] New: No easy way of setting default Mac OS X target - darwin_minversion not enough
@ 2015-03-03  8:27 astrand at cendio dot se
  2015-03-03  8:31 ` [Bug driver/65294] " astrand at cendio dot se
  0 siblings, 1 reply; 2+ messages in thread
From: astrand at cendio dot se @ 2015-03-03  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65294
           Summary: No easy way of setting default Mac OS X target -
                    darwin_minversion not enough
           Product: gcc
           Version: 4.6.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: astrand at cendio dot se

Host: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Target: x86_64-apple-darwin10
Mac OS X SDK: 10.6

We want to configure GCC so that OS X 10.6 is the default target. For this, we
changed DARWIN_MINVERSION_SPEC to be "10.6". This seemed to work -
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is 1060. However, we later then
realized that calling gcc with -mmacosx-version-min=10.6 gave a different
behaviour. For example, in the latter case, ld is called with
-no_compact_unwind. In other words, changing DARWIN_MINVERSION_SPEC /
%(darwin_minversion) to say 10.6 causes GCC to run with a split personality,
where some parts thinks it's 10.4 and others thinks it's 10.6. 

In order to solve this, either a lot of spec logics needs to be changed, or the
-mmacosx-version-min argument needs to be "faked". This is actually done when
the environment variable MACOSX_DEPLOYMENT_TARGET is found - but not when cross
compiling. Any good reason for this? 

Also, it seems to me that DARWIN_MINVERSION_SPEC / %(darwin_minversion) is not
that useful, when most of the specs are checking the -mmacosx-version-min
argument anyway. 

The patch from gkeating
(https://gcc.gnu.org/ml/gcc-patches/2007-02/msg01484.html) had the explicit
goal of "fix or avoid a bunch of bugs where one part or another of the
toolchain differed from the compiler in the minimum system version to be
targetted.", but this is exactly the problem we are seeing here, thus I believe
some additional work is required.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug driver/65294] No easy way of setting default Mac OS X target - darwin_minversion not enough
  2015-03-03  8:27 [Bug driver/65294] New: No easy way of setting default Mac OS X target - darwin_minversion not enough astrand at cendio dot se
@ 2015-03-03  8:31 ` astrand at cendio dot se
  0 siblings, 0 replies; 2+ messages in thread
From: astrand at cendio dot se @ 2015-03-03  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Peter Åstrand <astrand at cendio dot se> ---
Created attachment 34933
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34933&action=edit
Activate parts of darwin_default_min_version() even when not cross

The attached patch activates darwin_default_min_version() even when
CROSS_DIRECTORY_STRUCTURE, and if MACOSX_DEPLOYMENT_TARGET is set, it falls
back to a hardcoded 10.6 default. This solves our particular problem, but some
additional work would be required to make e generic solution. For example,
perhaps the fallback should be based on expanding %(darwin_minversion), or
perhaps the default target kan be fetched from the SDK file tree?
>From gcc-bugs-return-479109-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 03 08:39:19 2015
Return-Path: <gcc-bugs-return-479109-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 75647 invoked by alias); 3 Mar 2015 08:39:19 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 75620 invoked by uid 48); 3 Mar 2015 08:39:15 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65282] [5 Rgression] wrong code at -Os and above on x86_64-linux-gnu
Date: Tue, 03 Mar 2015 08:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-65282-4-XcrH3H3AU0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65282-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65282-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg00253.txt.bz2
Content-length: 885

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide282

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-03
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.0
            Summary|wrong code at -Os and above |[5 Rgression] wrong code at
                   |on x86_64-linux-gnu         |-Os and above on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r221099.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-03  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03  8:27 [Bug driver/65294] New: No easy way of setting default Mac OS X target - darwin_minversion not enough astrand at cendio dot se
2015-03-03  8:31 ` [Bug driver/65294] " astrand at cendio dot se

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).