aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFred Fish <fnf@ninemoons.com>1998-06-27 22:36:57 +0000
committerJeff Law <law@gcc.gnu.org>1998-06-27 16:36:57 -0600
commit17294adfebc7f5a45d5f6b575c4e1a81b5c3579f (patch)
treeb7d04df23bad4021cace194371d2f102a50bb727 /gcc
parentb5f3e74739bc6c4832ce3dee3ce199eb97d149a9 (diff)
downloadgcc-17294adfebc7f5a45d5f6b575c4e1a81b5c3579f.zip
gcc-17294adfebc7f5a45d5f6b575c4e1a81b5c3579f.tar.gz
gcc-17294adfebc7f5a45d5f6b575c4e1a81b5c3579f.tar.bz2
g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
* g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined. (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY. (lang_specific_driver): Only add -lm automatically if need_math is nonzero. From-SVN: r20765
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/g++spec.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4674938..ff6b55a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
+
+ * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
+ (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
+ (lang_specific_driver): Only add -lm automatically if need_math is
+ nonzero.
+
Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
* Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index ae9edf8..542ca06 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -34,6 +34,9 @@ Boston, MA 02111-1307, USA. */
#ifndef MATH_LIBRARY
#define MATH_LIBRARY "-lm"
#endif
+#ifndef NEED_MATH_LIBRARY
+#define NEED_MATH_LIBRARY 1 /* Default is pass MATH_LIBRARY to linker */
+#endif
extern char *xmalloc PROTO((size_t));
@@ -81,7 +84,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
int *args;
/* By default, we throw on the math library. */
- int need_math = 1;
+ int need_math = NEED_MATH_LIBRARY;
/* The total number of arguments with the new stuff. */
int argc;
@@ -241,7 +244,7 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
}
if (saw_math)
arglist[j++] = saw_math;
- else if (library)
+ else if (library && need_math)
{
arglist[j++] = MATH_LIBRARY;
added_libraries++;