This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: another build breakage
On Thu, May 17, 2012 at 11:31 AM, Cary Coutant <ccoutant@google.com> wrote:
>> The build now fails for me in opcodes, I think due to another recent
>> change:
>>
>> make[4]: Entering directory `/home/tromey/gnu/baseline-gdb/build/opcodes'
>> /bin/sh ./libtool --tag=CC ? --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/opcodes ?-I. -I../../src/opcodes -I../bfd -I../../src/opcodes/../include -I../../src/opcodes/../bfd ? ?-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT arc-dis.lo -MD -MP -MF .deps/arc-dis.Tpo -c -o arc-dis.lo ../../src/opcodes/arc-dis.c
>> libtool: compile: ?gcc -DHAVE_CONFIG_H -I. -I../../src/opcodes -I. -I../../src/opcodes -I../bfd -I../../src/opcodes/../include -I../../src/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT arc-dis.lo -MD -MP -MF .deps/arc-dis.Tpo -c ../../src/opcodes/arc-dis.c -o arc-dis.o
>> In file included from ../../src/opcodes/../include/dis-asm.h:36:0,
>> ? ? ? ? ? ? ? ? from ../../src/opcodes/arc-dis.c:25:
>> ../bfd/bfd.h:36:2: error: #error config.h must be included before this header
>
> It's clearly this change, which added that #error to bfd-in.h:
>
> ? http://sourceware.org/ml/binutils-cvs/2012-05/msg00121.html
>
> I found this related bug report:
>
> ? http://sourceware.org/bugzilla/show_bug.cgi?id=14072
>
> Nick, is there supposed to be an #include "sysdep.h" in
> opcodes/arc-dis.c? From the comment stream on that PR, it sounds like
> there are still other problems to be fixed.
>
> -cary
I checked in a fix in gold testsuite.
--
H.J.
----
diff --git a/gold/ChangeLog b/gold/ChangeLog
index bbfcff2..927d83f 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/tls_test.cc: Include "config.h" first.
+ * testsuite/tls_test_c.c: Likewise.
+
2012-05-17 Daniel Richard G. <skunk@iskunk.org>
Nick Clifton <nickc@redhat.com>
diff --git a/gold/testsuite/tls_test.cc b/gold/testsuite/tls_test.cc
index 880bf23..c875752 100644
--- a/gold/testsuite/tls_test.cc
+++ b/gold/testsuite/tls_test.cc
@@ -44,8 +44,8 @@
// last Verify that the above tests left the variables set correctly.
-#include <cstdio>
#include "config.h"
+#include <cstdio>
#include "tls_test.h"
#define CHECK_EQ_OR_RETURN(var, expected) \
diff --git a/gold/testsuite/tls_test_c.c b/gold/testsuite/tls_test_c.c
index 730e46d..896191f 100644
--- a/gold/testsuite/tls_test_c.c
+++ b/gold/testsuite/tls_test_c.c
@@ -23,8 +23,8 @@
/* The only way I know to get gcc to generate a TLS common symbol is
to use a C file and an OpenMP directive. */
-#include <stdio.h>
#include "config.h"
+#include <stdio.h>
#define CHECK_EQ_OR_RETURN(var, expected) \
do \