* 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
+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
#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));
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;
}
if (saw_math)
arglist[j++] = saw_math;
- else if (library)
+ else if (library && need_math)
{
arglist[j++] = MATH_LIBRARY;
added_libraries++;