Index: gcc/ChangeLog

2007-02-20  Geoffrey Keating  <geoffk@apple.com>

	* config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
	if user didn't pass it.
	* config/i386/darwin.h (CC1_SPEC): Likewise.
	* config/rs6000/darwin.h (CC1_SPEC): Likewise.
	(DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
	-mmacosx-version-min.

Index: gcc/testsuite/ChangeLog
2007-02-20  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/darwin-minversion-1.c: New.
	* gcc.dg/darwin-minversion-2.c: New.

From-SVN: r122166
This commit is contained in:
Geoffrey Keating 2007-02-20 16:45:38 +00:00 committed by Geoffrey Keating
parent c7e576cf15
commit 32ec65429c
7 changed files with 41 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2007-02-20 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
if user didn't pass it.
* config/i386/darwin.h (CC1_SPEC): Likewise.
* config/rs6000/darwin.h (CC1_SPEC): Likewise.
(DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
-mmacosx-version-min.
2007-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Uros Bizjak <ubizjak@gmail.com>

View File

@ -297,7 +297,8 @@ extern GTY(()) int darwin_ms_struct;
%{headerpad_max_install_names*} \
%{Zimage_base*:-image_base %*} \
%{Zinit*:-init %*} \
-macosx_version_min %(darwin_minversion) \
%{!mmacosx-version-min=*:-macosx_version_min %(darwin_minversion)} \
%{mmacosx-version-min=*:-macosx_version_min %*} \
%{nomultidefs} \
%{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
%{Zmultiply_defined*:-multiply_defined %*} \

View File

@ -74,7 +74,7 @@ Boston, MA 02110-1301, USA. */
#undef CC1_SPEC
#define CC1_SPEC "%{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
-mmacosx-version-min=%(darwin_minversion) \
%{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
#undef ASM_SPEC

View File

@ -93,7 +93,7 @@
#define CC1_SPEC "\
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }} \
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
-mmacosx-version-min=%(darwin_minversion) \
%{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
%{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}}"
#define DARWIN_ARCH_SPEC "%{m64:ppc64;:ppc}"
@ -123,8 +123,7 @@
/* Determine a minimum version based on compiler options. */
#define DARWIN_MINVERSION_SPEC \
"%{mmacosx-version-min=*:%*; \
m64:10.4; \
"%{m64:10.4; \
shared-libgcc:10.3; \
:10.1}"

View File

@ -1,3 +1,8 @@
2007-02-20 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-minversion-1.c: New.
* gcc.dg/darwin-minversion-2.c: New.
2007-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases.

View File

@ -0,0 +1,11 @@
/* Basic test for -mmacosx-version-min switch on Darwin. */
/* { dg-options "-mmacosx-version-min=10.1" } */
/* { dg-do run { target *-*-darwin* } } */
int main(void)
{
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010
fail me;
#endif
return 0;
}

View File

@ -0,0 +1,11 @@
/* Basic test for -mmacosx-version-min switch on Darwin. */
/* { dg-options "-mmacosx-version-min=10.1 -mmacosx-version-min=10.3" } */
/* { dg-do run { target *-*-darwin* } } */
int main(void)
{
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1030
fail me;
#endif
return 0;
}