public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: GCJ-patches <java-patches@gcc.gnu.org>
Subject: [patch] include the %I spec when building the object file for the main function
Date: Tue, 21 May 2013 07:23:00 -0000	[thread overview]
Message-ID: <519B20D6.5070806@ubuntu.com> (raw)

[-- 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*\

             reply	other threads:[~2013-05-21  7:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  7:23 Matthias Klose [this message]
2013-05-21  8:26 ` Andrew Haley
2013-05-21 10:50   ` Matthias Klose
2013-05-21 13:12     ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519B20D6.5070806@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).