public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "pj at csc dot fi" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/58215] New: -fwhole-program cause gcj undefined reference to `Main::class$'
Date: Thu, 22 Aug 2013 08:36:00 -0000	[thread overview]
Message-ID: <bug-58215-8172@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58215

            Bug ID: 58215
           Summary: -fwhole-program cause gcj undefined reference to
                    `Main::class$'
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pj at csc dot fi

Created attachment 30683
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30683&action=edit
test file to compile

/v/linux212_x86_64/lang/gcc/4.8.1/bin/gcj  -pipe -Wall -O3 -fomit-frame-pointer
 -ffast-math -fprefetch-loop-arrays -fwhole-program -march=core-avx-i -mavx
-mtune=core-avx-i --main=nbody nbody.java -o nbody.gcj -lm
/tmp/ccmUUeIk.o: In function `main':
:(.text.startup+0x13): undefined reference to `nbody::class$'
collect2: error: ld returned 1 exit status
I tested also compiler version 4.8.0

without -fwhole-program it works.
Operating system is RHEL6.

By the way  ecj[1] was missing when ../gcc-4.8.1/configure
--prefix=/v/linux212_x86_64/lang/gcc/4.8.1 --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-libgcj-multifile --with-mpc=/v/linux212_x86_64/appl/math/mpc/latest

-v output:

 /v/linux212_x86_64/lang/gcc/4.8.1/bin/gcj -v  -pipe -Wall -O3
-fomit-frame-pointer -fwhole-program  -ffast-math -fprefetch-loop-arrays 
-march=native --main=nbody nbody.java -o nbody.gcj -lmUsing built-in specs.
Reading specs from
/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
COLLECT_GCC=/v/linux212_x86_64/lang/gcc/4.8.1/bin/gcj
COLLECT_LTO_WRAPPER=/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.1/configure
--prefix=/v/linux212_x86_64/lang/gcc/4.8.1 --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-libgcj-multifile --with-mpc=/v/linux212_x86_64/appl/math/mpc/latest
Thread model: posix
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-v' '-pipe' '-Wall' '-O3'
'-fomit-frame-pointer' '-fwhole-program' '-ffast-math' '-fprefetch-loop-arrays'
'-march=native' '-o' 'nbody.gcj'
'-fbootclasspath=./:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/../../share/java/libgcj-4.8.1.jar'
'-specs=libgcj.spec' '-shared-libgcc'
 ecj1 nbody.java -Wall
-fbootclasspath=./:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/../../share/java/libgcj-4.8.1.jar
-fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/ccmrtjNR.zip -fzip-target
/tmp/ccYW3BtZ.jar
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-v' '-pipe' '-Wall' '-O3'
'-fomit-frame-pointer' '-fwhole-program' '-ffast-math' '-fprefetch-loop-arrays'
'-march=native' '-o' 'nbody.gcj'
'-fbootclasspath=./:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/../../share/java/libgcj-4.8.1.jar'
'-specs=libgcj.spec' '-shared-libgcc'

/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/jc1
/tmp/ccYW3BtZ.jar -fsource-filename=nbody.java -fhash-synchronization
-fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions
-fkeep-inline-functions -march=core2 -mcx16 -msahf -mno-movbe -mno-aes
-mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi
-mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -msse4.1 -mno-lzcnt -mno-rtm
-mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx
-mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=0 --param
l1-cache-line-size=0 --param l2-cache-size=3072 -mtune=core2 -quiet -dumpbase
nbody.java -auxbase nbody -O3 -Wall -version -fsaw-java-file
-fomit-frame-pointer -fwhole-program -ffast-math -fprefetch-loop-arrays
-fbootclasspath=./:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/../../share/java/libgcj-4.8.1.jar
-faux-classpath /tmp/ccmrtjNR.zip -o - |
 as -v --64 -o /tmp/ccP6jDJ8.o
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version
version 2.20.51.0.2-5.36.el6 20100205
GNU Java (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Java (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Class path starts here:
    /tmp/ccmrtjNR.zip/ (zip)
    ./ (system)
   
/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/../../share/java/libgcj-4.8.1.jar/
(system) (zip)
COLLECT_GCC_OPTIONS= '-v' '-pipe' '-Wall' '-O3' '-fomit-frame-pointer'
'-fwhole-program' '-ffast-math' '-fprefetch-loop-arrays' '-march=native' '-o'
'nbody.gcj'  '-specs=libgcj.spec' '-shared-libgcc'

/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/jvgenmain
nbodymain |

/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/cc1
-march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm
-mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx
-mno-avx2 -mno-sse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd
-mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave
-mno-xsaveopt --param l1-cache-size=0 --param l1-cache-line-size=0 --param
l2-cache-size=3072 -mtune=core2 -quiet -dumpbase nbodymain.c -O3 -version
-fomit-frame-pointer -fwhole-program -ffast-math -fprefetch-loop-arrays
-fdollars-in-identifiers -o - |
 as -v --64 -o /tmp/cc8AWOmi.o
GNU C (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version
version 2.20.51.0.2-5.36.el6 20100205
GNU C (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6e97cfc87a38e5c5b2ec8fc9619970a7
COMPILER_PATH=/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/
LIBRARY_PATH=/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS= '-v' '-pipe' '-Wall' '-O3' '-fomit-frame-pointer'
'-fwhole-program' '-ffast-math' '-fprefetch-loop-arrays' '-march=native' '-o'
'nbody.gcj'  '-specs=libgcj.spec' '-shared-libgcc'

/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o
nbody.gcj /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/crtbegin.o
-L/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1
-L/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc
-L/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../..
/tmp/cc8AWOmi.o /tmp/ccP6jDJ8.o -lm -lgcc_s -lgcc -lgcj -lm -lpthread -lrt -ldl
-lgcc_s -lgcc -lc -lgcc_s -lgcc
/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/crtfastmath.o
/fs/appl/linux/linux212_x86_64/lang/gcc/4.8.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/crtend.o
/usr/lib/../lib64/crtn.o
/tmp/cc8AWOmi.o: In function `main':
:(.text.startup+0x13): undefined reference to `nbody::class$'
collect2: error: ld returned 1 exit status


                 reply	other threads:[~2013-08-22  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-58215-8172@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@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).