Commit d42becb9 by Iain Sandoe Committed by Iain Sandoe

Revise Darwin's sysroot handling to be compatible with the clang toolchain.

gcc/
	* config/darwin.h (TARGET_SYSTEM_ROOT): Remove this from here,
	(HAVE_LD_SYSROOT): New.  (SYSROOT_SPEC): New. 
	(LINK_SYSROOT_SPEC): Revise to remove the default for target sysroot.
	(STANDARD_STARTFILE_PREFIX_1): New.
	(STANDARD_STARTFILE_PREFIX_2): New.

From-SVN: r228950
parent 49489608
2015-10-18 Iain Sandoe <iain@codesourcery.com> 2015-10-18 Iain Sandoe <iain@codesourcery.com>
* config/darwin.h (TARGET_SYSTEM_ROOT): Remove this from here,
(HAVE_LD_SYSROOT): New. (SYSROOT_SPEC): New.
(LINK_SYSROOT_SPEC): Revise to remove the default for target sysroot.
(STANDARD_STARTFILE_PREFIX_1): New.
(STANDARD_STARTFILE_PREFIX_2): New.
2015-10-18 Iain Sandoe <iain@codesourcery.com>
* config/darwin-driver.c (darwin_default_min_version): Refactor code. * config/darwin-driver.c (darwin_default_min_version): Refactor code.
(darwin_driver_init): Note a version-min when provided on the c/l. (darwin_driver_init): Note a version-min when provided on the c/l.
* config/darwin.h (%darwin_minversion): Remove. * config/darwin.h (%darwin_minversion): Remove.
...@@ -207,12 +207,21 @@ extern GTY(()) int darwin_ms_struct; ...@@ -207,12 +207,21 @@ extern GTY(()) int darwin_ms_struct;
#undef LINK_GCC_C_SEQUENCE_SPEC #undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC "%G %L" #define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
#ifdef TARGET_SYSTEM_ROOT /* ld64 supports a sysroot, it just has a different name and there's no easy
#define LINK_SYSROOT_SPEC \ way to check for it at config time. */
"%{isysroot*:-syslibroot %*;:-syslibroot " TARGET_SYSTEM_ROOT "}" #undef HAVE_LD_SYSROOT
#else #define HAVE_LD_SYSROOT 1
/* It seems the only (working) way to get a space after %R is to append a
dangling '/'. */
#define SYSROOT_SPEC "%{!isysroot*:-syslibroot %R/ }"
/* Do the same as clang, for now, and insert the sysroot for ld when an
isysroot is specified. */
#define LINK_SYSROOT_SPEC "%{isysroot*:-syslibroot %*}" #define LINK_SYSROOT_SPEC "%{isysroot*:-syslibroot %*}"
#endif
/* Suppress the addition of extra prefix paths when a sysroot is in use. */
#define STANDARD_STARTFILE_PREFIX_1 ""
#define STANDARD_STARTFILE_PREFIX_2 ""
#define DARWIN_PIE_SPEC "%{fpie|pie|fPIE:}" #define DARWIN_PIE_SPEC "%{fpie|pie|fPIE:}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment