public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "prathamesh3492 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65778] New: v8 build fails with assembly error with LTO enabled on arm-linux-gnueabihf
Date: Wed, 15 Apr 2015 21:28:00 -0000	[thread overview]
Message-ID: <bug-65778-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65778

            Bug ID: 65778
           Summary: v8 build fails with assembly error with LTO enabled on
                    arm-linux-gnueabihf
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prathamesh3492 at gcc dot gnu.org

Hi,
Compiling v8 with LTO enabled on arm-linux-gnueabihf results in following
assembly error messages: 
LINK(target) /home/prathamesh.kulkarni/v8/out/arm.release/d8
d8.ltrans1.s: Assembler messages:
d8.ltrans1.s:58822: Error: offset out of range
d8.ltrans1.s:60616: Error: offset out of range
d8.ltrans1.s:60762: Error: offset out of range
lto-wrapper: fatal error:
/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu/bin/arm-linux-gnueabihf-g++
returned 1 exit status
compilation terminated.
/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu/lib/gcc/arm-linux-gnueabihf/5.0.0/../../../../arm-linux-gnueabihf/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [/home/prathamesh.kulkarni/v8/out/arm.release/d8] Error 1
make[1]: Leaving directory `/home/prathamesh.kulkarni/v8/out'
make: *** [arm.release] Error 2

d8.ltrans1.s:
https://www.dropbox.com/s/3elyf1p2to01mxu/d8.ltrans1.s?dl=0
The offending offset is 983042 (at line 58822)
ldr r7, =983042

The assmebly corresponds to following inline assembly in
CpuFeatures::FlushICache(), which defined in src/arm/cpu-arm.cc 
  register uint32_t beg asm("r0") = reinterpret_cast<uint32_t>(start);
  register uint32_t end asm("r1") = beg + size;
  register uint32_t flg asm("r2") = 0;

  asm volatile(
    // This assembly works for both ARM and Thumb targets.

    // Preserve r7; it is callee-saved, and GCC uses it as a frame pointer for
    // Thumb targets.
    "  push {r7}\n"
                                  // r0 = beg
                                  // r1 = end
                                  // r2 = flags (0)
    "  ldr r7, =%c[scno]\n"       // r7 = syscall number
    "  svc 0\n"

    "  pop {r7}\n"
    :
    : "r" (beg), "r" (end), "r" (flg), [scno] "i" (__ARM_NR_cacheflush)
    : "memory");

gcc -v:
Using built-in specs.
COLLECT_GCC=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu/bin/arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu/libexec/gcc/arm-linux-gnueabihf/5.0.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: /home/prathamesh.kulkarni/gnu-toolchain/src/gcc.git/configure
SHELL=/bin/bash --with-bugurl=https://bugs.linaro.org
--with-mpc=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu
--with-mpfr=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu
--with-gmp=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu
--with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap
--with-cloog=no --with-ppl=no --with-isl=no --disable-nls --enable-multiarch
--disable-multilib --enable-c99 --with-tune=cortex-a9 --with-arch=armv7-a
--with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--with-build-sysroot=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/sysroots/arm-linux-gnueabihf
--enable-lto --enable-linker-build-id --enable-long-long --enable-shared
--with-sysroot=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/sysroot-arm-linux-gnueabihf
--enable-languages=c,c++,lto --enable-fix-cortex-a53-835769
--enable-checking=yes --disable-bootstrap --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf
--prefix=/home/prathamesh.kulkarni/gnu-toolchain/v8-arm/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 5.0.0 20150410 (experimental) (GCC) 


Thank you,
Prathamesh


             reply	other threads:[~2015-04-15 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 21:28 prathamesh3492 at gcc dot gnu.org [this message]
2015-04-15 23:35 ` [Bug lto/65778] " pinskia at gcc dot gnu.org
2015-04-16  7:40 ` rguenth at gcc dot gnu.org
2015-04-22 18:49 ` ramana at gcc dot gnu.org

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-65778-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).