+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
# 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"
/* 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. */
#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 */
--- /dev/null
+/* 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"