[committed] Fix selftest::test_lexer_string_locations_ebcdic for systems without iconv (PR bootstrap/72844)
David Malcolm
dmalcolm@redhat.com
Mon Aug 8 20:50:00 GMT 2016
selftest::test_lexer_string_locations_ebcdic has this clause:
/* EBCDIC support requires iconv. */
if (!HAVE_ICONV)
return;
leading to a build failure on systems without iconv. This conditional
works in libcpp due to this in libcpp/internal.h:
#if HAVE_ICONV
#include <iconv.h>
#else
#define HAVE_ICONV 0
typedef int iconv_t; /* dummy */
#endif
Fix the problem by ensuring that HAVE_ICONV is always defined within
gcc/input.c.
Reported in BZ as fixing the bootstrap on FreeBSD; smoke-tested locally
on x86_64-pc-linux-gnu.
Committed to trunk as r239257.
gcc/ChangeLog:
PR bootstrap/72844
* input.c: Ensure that HAVE_ICONV is defined.
---
gcc/input.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/input.c b/gcc/input.c
index d058b8a..790de93 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -25,6 +25,10 @@ along with GCC; see the file COPYING3. If not see
#include "selftest.h"
#include "cpplib.h"
+#ifndef HAVE_ICONV
+#define HAVE_ICONV 0
+#endif
+
/* This is a cache used by get_next_line to store the content of a
file to be searched for file lines. */
struct fcache
--
1.8.5.3
More information about the Gcc-patches
mailing list