Message ID | CBD32A0D-4296-49CA-B5A5-6147011AEA84@comcast.net |
---|---|
State | New |
Headers | show |
On Sep 3, 2013, at 2:39 PM, Mike Stump <mikestump@comcast.net> wrote: > I'm on a openSUSE 11.4 system with a: > > gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585] > > host compiler. When I building gdb trunk, I get a failure to build because configure tests g++ to see if these work, but gdb links with gcc and 4.5.1 errors out with the flag. You can't set LDFLAGS, because that is given to gcc, without testing the flag with gcc. Hum, I was confused by other build errors. I was assuming that the diagnostic: gcc: unrecognized option '-static-libstdc++' was necessary to fix to get the link to not fail. I was wrong. It is however, unsightly.
On Tuesday 03 September 2013 17:39:10 Mike Stump wrote: > host compiler. When I building gdb trunk, I get a failure to build because > configure tests g++ to see if these work, but gdb links with gcc and 4.5.1 > errors out with the flag. You can't set LDFLAGS, because that is given to > gcc, without testing the flag with gcc. So, either: it's a bug in gcc code. random subdirs (like binutils) shouldn't be working around it: http://gcc.gnu.org/PR56750 -mike
diff --git a/binutils/configure b/binutils/configure index a2671fb..d9cb7b8 100755 --- a/binutils/configure +++ b/binutils/configure @@ -4981,7 +4981,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) #error -static-libstdc++ not implemented #endif int main() {} diff --git a/binutils/configure.ac b/binutils/configure.ac index 04cf83f..c819263 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -1269,7 +1269,7 @@ if test "$GCC" = yes; then AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) AC_LANG_PUSH(C++) AC_LINK_IFELSE([ -#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) #error -static-libstdc++ not implemented #endif int main() {}],