From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4082 invoked by alias); 22 Aug 2013 08:36:52 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 4049 invoked by uid 48); 22 Aug 2013 08:36:52 -0000 From: "pj at csc dot fi" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pj at csc dot fi X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00007.txt.bz2 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