aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-04-23 17:56:08 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-04-23 10:56:08 -0700
commit9b2d02a0d2850daeba066f970c95a82cc618a248 (patch)
tree66a83fb283e173f50be8c50c0bae7677a572dc8a /gcc
parentd8fe7b2985c43c7392fac377a2c186db3ac27507 (diff)
downloadgcc-9b2d02a0d2850daeba066f970c95a82cc618a248.zip
gcc-9b2d02a0d2850daeba066f970c95a82cc618a248.tar.gz
gcc-9b2d02a0d2850daeba066f970c95a82cc618a248.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config/darwin.h11
-rw-r--r--gcc/config/darwin7.h28
4 files changed, 49 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e544a23..720bb0a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3ab87d9..bf98002 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -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"
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index b4d8b55..28b58a5 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -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 */
diff --git a/gcc/config/darwin7.h b/gcc/config/darwin7.h
new file mode 100644
index 0000000..0b215c2
--- /dev/null
+++ b/gcc/config/darwin7.h
@@ -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"