[Darwin, Driver/specs] A bit more TLC, factor version-min code, lose some dead specs.

Iain Sandoe iain@codesourcery.com
Sat Sep 12 14:44:00 GMT 2015


This is a clean-up and code re-factoring patch; NFC intended.

a) The arcane version specs that attempted to figure out a version-min on the basis of inspecting other c/l flags have been dead for some time (since the driver started inserting a default); so let's lose those.

b) We'll need access to the version-min at the outer level in the darwin-specific driver code in order to use that to figure out where to find sysroots, so let's factor the code to do that and shorten it at the same time.

c) In the absence of any other information, the best choice we can make for version-min is 10.5, since that's the only version that (fully) supports all of our archs...

d) ... however, we normally do have a version-min default, to let's make sure we provide that as the init.

e) If a user elects to call a compiler (cc1*, f951, etc.) without a version-min, the init provided in (d) will kick in, and stop the compiler from segv-ing.  However, we should warn the User that a default was used, because it's very likely not what was intended.

OK for trunk?

	* config/darwin-driver.c (darwin_default_min_version): Refactor code.
	(darwin_driver_init): Note a version-min when provided on the c/l.
	* config/darwin.c (darwin_override_options): Warn the user if the compiler is
	invoked without a version-min.
	* config/darwin.h (%darwin_minversion): Remove.
	* config/i386/darwin.h: Likewise.
	* config/rs6000/darwin.h: Likewise.
	* config/darwin.opt (mmacosx-version-min=): Use the configured default, rather than
	an arbitrary constant.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: darwin-driver-version-tidy.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150912/5da1ec6e/attachment.txt>
-------------- next part --------------

More information about the Gcc-patches mailing list