darwin7.h: New file.

2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>

        * config/darwin7.h: New file.
        * config.gcc (*-*-darwin*): Add darwin7.h if the
        version is greater than 6.
        * config/darwin.h (TARGET_C99_FUNCTIONS): Define.
        (MATH_LIBRARY): Wrap in ifdefs.

From-SVN: r81100
This commit is contained in:
Andrew Pinski 2004-04-23 17:56:08 +00:00 committed by Andrew Pinski
parent d8fe7b2985
commit 9b2d02a0d2
4 changed files with 49 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
* config/darwin7.h: New file.
* config.gcc (*-*-darwin*): Add darwin7.h if the
version is greater than 6.
* config/darwin.h (TARGET_C99_FUNCTIONS): Define.
(MATH_LIBRARY): Wrap in ifdefs.
2004-04-23 Daniel Jacobowitz <drow@mvista.com>
* config/arm/arm.c (arm_output_epilogue): Reverse the order of

View File

@ -331,6 +331,10 @@ esac
# Common parts for widely ported systems.
case ${target} in
*-*-darwin*)
case ${target} in
*-darwin[0-6]*) ;;
*) tm_file="${tm_file} darwin7.h" ;;
esac
tm_file="${tm_file} darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"
tmake_file="t-darwin t-slibgcc-darwin"

View File

@ -41,9 +41,11 @@ Boston, MA 02111-1307, USA. */
/* Suppress g++ attempt to link in the math library automatically.
(Some Darwin versions have a libm, but they seem to cause problems
for C++ executables.) */
for C++ executables.) This needs to be -lmx for Darwin 7.0 and
above. */
#ifndef MATH_LIBRARY
#define MATH_LIBRARY ""
#endif
/* We have atexit. */
@ -908,4 +910,9 @@ void add_framework_path (char *);
#define TARGET_HAS_F_SETLKW
/* Darwin before 7.0 does not have C99 functions. */
#ifndef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 0
#endif
#endif /* CONFIG_DARWIN_H */

28
gcc/config/darwin7.h Normal file
View File

@ -0,0 +1,28 @@
/* Target definitions for Darwin 7.0 and above (Mac OS X) systems.
Copyright (C) 2004
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Darwin 7.0 and above have C99 functions. */
#define TARGET_C99_FUNCTIONS 1
/* But for some reason they are located in libmx so have it
be included when asked for and automatically when linking
with gfortran and g++. */
#define MATH_LIBRARY "-lmx"