Small typo in iconv.m4

Message ID 404ed12c-79ec-7731-c013-47e7001e15a5@mentor.com
State New, archived
Headers

Commit Message

Hafiz Abid Qadeer Nov. 6, 2018, 4:37 p.m. UTC
  Hi All,
I was investigating a character set related problem with windows hosted
GDB and I tracked it down to a typo in iconv.m4. This typo caused
libiconv detection to fail and related support was not built into gdb.

The problem is with the following line.
CPPFLAGS="$LIBS $INCICONV"
which should have been
CPPFLAGS="$CPPFLAGS $INCICONV"

OK to commit the attached patch?

2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>

	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
	Append $INCICONV to it.
	* gcc/configure: Regenerate.
	* libcpp/configure: Likewise.
	* libstdc++-v3/configure: Likewise.
	* intl/configure: Likewise.

Thanks,
  

Comments

Simon Marchi Nov. 7, 2018, 3:27 p.m. UTC | #1
On 2018-11-06 11:37, Hafiz Abid Qadeer wrote:
> Hi All,
> I was investigating a character set related problem with windows hosted
> GDB and I tracked it down to a typo in iconv.m4. This typo caused
> libiconv detection to fail and related support was not built into gdb.
> 
> The problem is with the following line.
> CPPFLAGS="$LIBS $INCICONV"
> which should have been
> CPPFLAGS="$CPPFLAGS $INCICONV"
> 
> OK to commit the attached patch?
> 
> 2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
> 
> 	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
> 	Append $INCICONV to it.
> 	* gcc/configure: Regenerate.
> 	* libcpp/configure: Likewise.
> 	* libstdc++-v3/configure: Likewise.
> 	* intl/configure: Likewise.
> 
> Thanks,

Seems good from my point of view, but I can't approve.

Simon
  
Jeff Law Nov. 7, 2018, 10:41 p.m. UTC | #2
On 11/6/18 9:37 AM, Hafiz Abid Qadeer wrote:
> Hi All,
> I was investigating a character set related problem with windows hosted
> GDB and I tracked it down to a typo in iconv.m4. This typo caused
> libiconv detection to fail and related support was not built into gdb.
> 
> The problem is with the following line.
> CPPFLAGS="$LIBS $INCICONV"
> which should have been
> CPPFLAGS="$CPPFLAGS $INCICONV"
> 
> OK to commit the attached patch?
> 
> 2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
> 
> 	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
> 	Append $INCICONV to it.
> 	* gcc/configure: Regenerate.
> 	* libcpp/configure: Likewise.
> 	* libstdc++-v3/configure: Likewise.
> 	* intl/configure: Likewise.
> 
> Thanks,
> 
THanks.  I wasn't sure if you had commit privs, so I went ahead and
installed the patch.

Jeff
  
Eric Gallager Nov. 9, 2018, 5:57 p.m. UTC | #3
On 11/7/18, Jeff Law <law@redhat.com> wrote:
> On 11/6/18 9:37 AM, Hafiz Abid Qadeer wrote:
>> Hi All,
>> I was investigating a character set related problem with windows hosted
>> GDB and I tracked it down to a typo in iconv.m4. This typo caused
>> libiconv detection to fail and related support was not built into gdb.
>>
>> The problem is with the following line.
>> CPPFLAGS="$LIBS $INCICONV"
>> which should have been
>> CPPFLAGS="$CPPFLAGS $INCICONV"
>>
>> OK to commit the attached patch?
>>
>> 2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
>>
>> 	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
>> 	Append $INCICONV to it.
>> 	* gcc/configure: Regenerate.
>> 	* libcpp/configure: Likewise.
>> 	* libstdc++-v3/configure: Likewise.
>> 	* intl/configure: Likewise.
>>
>> Thanks,
>>
> THanks.  I wasn't sure if you had commit privs, so I went ahead and
> installed the patch.
>
> Jeff
>

Does this have any effect on GCC bug 78251?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78251
Or any of the related bugs under "See Also" for that matter?
  
Jeff Law Nov. 9, 2018, 6:28 p.m. UTC | #4
On 11/9/18 10:57 AM, Eric Gallager wrote:
> On 11/7/18, Jeff Law <law@redhat.com> wrote:
>> On 11/6/18 9:37 AM, Hafiz Abid Qadeer wrote:
>>> Hi All,
>>> I was investigating a character set related problem with windows hosted
>>> GDB and I tracked it down to a typo in iconv.m4. This typo caused
>>> libiconv detection to fail and related support was not built into gdb.
>>>
>>> The problem is with the following line.
>>> CPPFLAGS="$LIBS $INCICONV"
>>> which should have been
>>> CPPFLAGS="$CPPFLAGS $INCICONV"
>>>
>>> OK to commit the attached patch?
>>>
>>> 2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
>>>
>>> 	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
>>> 	Append $INCICONV to it.
>>> 	* gcc/configure: Regenerate.
>>> 	* libcpp/configure: Likewise.
>>> 	* libstdc++-v3/configure: Likewise.
>>> 	* intl/configure: Likewise.
>>>
>>> Thanks,
>>>
>> THanks.  I wasn't sure if you had commit privs, so I went ahead and
>> installed the patch.
>>
>> Jeff
>>
> 
> Does this have any effect on GCC bug 78251?
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78251
> Or any of the related bugs under "See Also" for that matter?
Certainly looks related.  Though I think we're still going to see
pollution, just in a slightly different way.

jeff
  

Patch

diff --git a/config/iconv.m4 b/config/iconv.m4
index 5f9304a6ba..f1e54c5aed 100644
--- a/config/iconv.m4
+++ b/config/iconv.m4
@@ -73,7 +73,7 @@  AC_DEFUN([AM_ICONV_LINK],
     if test "$am_cv_func_iconv" != yes; then
       am_save_CPPFLAGS="$CPPFLAGS"
       am_save_LIBS="$LIBS"
-      CPPFLAGS="$LIBS $INCICONV"
+      CPPFLAGS="$CPPFLAGS $INCICONV"
       LIBS="$LIBS $LIBICONV"
       AC_TRY_LINK([#include <stdlib.h>
 #include <iconv.h>],