Commit 4afd7f6c by Geoffrey Keating Committed by Geoffrey Keating

g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.

	* g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
	(lang_specific_driver): If the C++ or math library options don't
	start with '-l', don't count them as added libraries.

From-SVN: r85201
parent 261139ce
2004-07-26 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
(lang_specific_driver): If the C++ or math library options don't
start with '-l', don't count them as added libraries.
2004-07-26 Nathan Sidwell <nathan@codesourcery.com> 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (xref_basetypes): Adjust base access vector creation. * decl.c (xref_basetypes): Adjust base access vector creation.
......
...@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
#define LIBSTDCXX "-lstdc++" #define LIBSTDCXX "-lstdc++"
#endif #endif
#ifndef LIBSTDCXX_PROFILE #ifndef LIBSTDCXX_PROFILE
#define LIBSTDCXX_PROFILE "-lstdc++" #define LIBSTDCXX_PROFILE LIBSTDCXX
#endif #endif
void void
...@@ -297,15 +297,19 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, ...@@ -297,15 +297,19 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
/* Add `-lstdc++' if we haven't already done so. */ /* Add `-lstdc++' if we haven't already done so. */
if (library > 0) if (library > 0)
{ {
arglist[j++] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX; arglist[j] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
added_libraries++; if (arglist[j][0] != '-' || arglist[j][1] == 'l')
added_libraries++;
j++;
} }
if (saw_math) if (saw_math)
arglist[j++] = saw_math; arglist[j++] = saw_math;
else if (library > 0 && need_math) else if (library > 0 && need_math)
{ {
arglist[j++] = saw_profile_flag ? MATH_LIBRARY_PROFILE : MATH_LIBRARY; arglist[j] = saw_profile_flag ? MATH_LIBRARY_PROFILE : MATH_LIBRARY;
added_libraries++; if (arglist[j][0] != '-' || arglist[j][1] == 'l')
added_libraries++;
j++;
} }
if (saw_libc) if (saw_libc)
arglist[j++] = saw_libc; arglist[j++] = saw_libc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment