public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] include the %I spec when building the object file for the main function
@ 2013-05-21  7:23 Matthias Klose
  2013-05-21  8:26 ` Andrew Haley
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2013-05-21  7:23 UTC (permalink / raw)
  To: GCJ-patches

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

I recently did see a libjava build failure with glibc-2.17, of the form:

libtool: link:
/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/./gcc/gcj
-B/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libjava/
-B/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/./gcc/
-B/usr/arm-linux-gnueabi/bin/ -B/usr/arm-linux-gnueabi/lib/ -isystem
/usr/arm-linux-gnueabi/include -isystem /usr/arm-linux-gnueabi/sys-include -g
-O2 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc
-Wl,--no-merge-exidx-entries
-L/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libjava/.libs
-L/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libjava
-L/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs
/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libjava/../libstdc++-v3/src/.libs/libstdc++.so
./.libs/libgcj.so
/build/buildd-gcj-4.8_4.8.0-2-armel-YVuMIc/gcj-4.8-4.8.0/build/arm-linux-gnueabi/libstdc++-v3/src/.libs/libstdc++.so
-lm -lpthread -lrt -ldl -lz -Wl,-rpath -Wl,/usr/lib/arm-linux-gnueabi
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h: No such file or
directory
 #include <bits/predefs.h>
                          ^
compilation terminated.
make[5]: *** [jv-convert] Error 1

The inclusion of stdc-predef.h is new in 4.8, the bits/predefs.h is not found in
my case, because this header is on an include path, which is only added when cc1
is passed the -imultiarch <tuple> option.  The solution for me is to add the %I
spec, when calling cc1 to build the main function.

Ok for the trunk, and for 4.8 after the 4.8.1 release?

  Matthias

[-- Attachment #2: jvspec.diff --]
[-- Type: text/plain, Size: 416 bytes --]


	* jvspec.c (jvgenmain_spec): Add %I to cc1 call.

--- a/src/gcc/java/jvspec.c
+++ b/src/gcc/java/jvspec.c
@@ -59,7 +59,7 @@
   "jvgenmain %{findirect-dispatch} %{D*} %b %m.i |\n\
    cc1 %m.i %1 \
 		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*}\
-		   %{g*} %{O*} \
+		   %{g*} %{O*} %I \
 		   %{v:-version} %{pg:-p} %{p}\
 		   %<fbounds-check %<fno-bounds-check\
 		   %<fassume-compiled* %<fno-assume-compiled*\

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-21 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21  7:23 [patch] include the %I spec when building the object file for the main function Matthias Klose
2013-05-21  8:26 ` Andrew Haley
2013-05-21 10:50   ` Matthias Klose
2013-05-21 13:12     ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).