From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20827 invoked by alias); 28 Jan 2015 17:59:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20705 invoked by uid 48); 28 Jan 2015 17:59:11 -0000 From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/64810] jit not working on armv7hl ("ld: error: /tmp/libgccjit-ZGemdr/fake.so uses VFP register arguments, /tmp/ccJFCBsE.o does not") Date: Wed, 28 Jan 2015 17:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2015-01/txt/msg03283.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64810 --- Comment #9 from David Malcolm --- Thanks Ramana. I attempted a build of the jit with the configuration you suggested, specifically: $ ../src/configure \ --enable-host-shared \ --enable-languages=jit,c++ \ --disable-bootstrap \ --enable-checking=release \ --prefix=/home/dmalcolm/gcc-git-jit/install-jit \ --with-arch=armv7-a \ --with-float=hard \ --with-fpu=vfpv3-d16 Unfortunately, I see the same failures. Hacking in a "-v" into the driver invocation in jit-playback.c... diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c index d2549a0..5f570a7 100644 --- a/gcc/jit/jit-playback.c +++ b/gcc/jit/jit-playback.c @@ -2271,6 +2271,8 @@ invoke_driver (const char *ctxt_progname, time. */ ADD_ARG ("-fno-use-linker-plugin"); + ADD_ARG ("-v"); + /* pex argv arrays are NULL-terminated. */ ADD_ARG (NULL); ...I see that libgccjit attempts to invoke the driver to convert the .s to a .so, but it fails like so: Target: armv7l-unknown-linux-gnueabihf Configured with: ../src/configure --enable-host-shared --enable-languages=jit,c++ --disable-bootstrap --enable-checking=release --prefix=/home/dmalcolm/gcc-git-jit/install-jit --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 Thread model: posix gcc version 5.0.0 20150126 (experimental) (GCC) COLLECT_GCC_OPTIONS='-shared' '-o' '/tmp/libgccjit-VxeXM1/fake.so' '-fno-use-linker-plugin' '-v' '-march=armv7-a' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mtls-dialect=gnu' as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -meabi=5 -o /tmp/ccCY7c5L.o /tmp/libgccjit-VxeXM1/fake.s GNU assembler version 2.24 (armv7hl-redhat-linux-gnueabi) using BFD version version 2.24 COMPILER_PATH= LIBRARY_PATH=/home/dmalcolm/gcc-git-jit/build-jit-comment8/gcc/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-shared' '-o' '/tmp/libgccjit-VxeXM1/fake.so' '-fno-use-linker-plugin' '-v' '-march=armv7-a' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mtls-dialect=gnu' ld --eh-frame-hdr -shared -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o /tmp/libgccjit-VxeXM1/fake.so /lib/crti.o /home/dmalcolm/gcc-git-jit/build-jit-comment8/gcc/crtbeginS.o -L/home/dmalcolm/gcc-git-jit/build-jit-comment8/gcc /tmp/ccCY7c5L.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /home/dmalcolm/gcc-git-jit/build-jit-comment8/gcc/crtendS.o /lib/crtn.o ld: error: /tmp/libgccjit-VxeXM1/fake.so uses VFP register arguments, /tmp/ccCY7c5L.o does not ld: failed to merge target specific data of file /tmp/ccCY7c5L.o That said, with the "test-empty.c" testcase, the generated "fake.s" looks like this: .cpu arm10tdmi .fpu softvfp .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 2 .eabi_attribute 34, 0 .arm .syntax divided .file "fake.c" .text .Ltext0: .cfi_sections .debug_frame .Letext0: .section .debug_line,"",%progbits .Ldebug_line0: .section .debug_str,"MS",%progbits,1 .LASF0: .ascii "/tmp/libgccjit-La3Yzk/fake.c\000" .LASF1: .ascii "libgccjit 5.0.0 20150126 (experimental) -fPIC -O3 -" .ascii "g --param ggc-min-expand=0 --param ggc-min-heapsize" .ascii "=0\000" .ident "GCC: (GNU) 5.0.0 20150126 (experimental)" .section .note.GNU-stack,"",%progbits In particular, I'm guessing that the line: .fpu softvfp is at fault here. This appears to come from arm.c:arm_file_start: 25689 if (TARGET_SOFT_FLOAT) 25690 { 25691 fpu_name = "softvfp"; 25692 } 25693 else and on debugging: (gdb) p global_options.x_arm_float_abi $1 = ARM_FLOAT_ABI_SOFT Is this value bogus, given the configure-time options? (if so, I'm guessing this is a jit-specific state-management issue)