[Bug libgcc/77447] New: /usr/arm-linux-gnueabihf is not in xgcc include path

2016-09-01 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77447

Bug ID: 77447
   Summary: /usr/arm-linux-gnueabihf is not in xgcc include path
   Product: gcc
   Version: 4.9.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: malithyapa at gmail dot com
  Target Milestone: ---

xgcc fails to compile libgcc because it can't find sys/cdefs.h which is in
/usr/arm-linux-gnueabihf.
may not be a bug. but couldn't find the configure option to add to the xgcc
include path.

[Bug libgcc/77447] /usr/arm-linux-gnueabihf is not in xgcc include path

2016-09-01 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77447

--- Comment #3 from malithyapa at gmail dot com ---
Yes! sorry, didn't think it'd matter, i even saw that in the original configure
line. Thanks!

[Bug libgcc/77447] /usr/arm-linux-gnueabihf is not in xgcc include path

2016-09-01 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77447

malithyapa at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-09-05 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #8 from malithyapa at gmail dot com ---
I managed to work around this by building gcc with --with-mode=arm

Configured with: ../gcc-4.9.4/configure --enable-languages=c,c++
--with-mode=arm --with-float=hard --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --with-arch=armv7-a
--with-tune=cortex-a7 --with-sysroot=/ --libexecdir=/usr/lib --libdir=/usr/lib
--enable-threads=posix

but when i look at the thumb code, the linker should not have any problem there
because the symbol is very much in range of the branch instruction (12 bit
two's complement offset)

00c4 <__gnu_h2f_internal>:
  c4:   f3c0 2384   ubfxr3, r0, #10, #5
  c8:   2900cmp r1, #0
  ca:   f1a3 021f   sub.w   r2, r3, #31
  ce:   fab2 f282   clz r2, r2
  d2:   ea4f 1252   mov.w   r2, r2, lsr #5
  d6:   bf08it  eq
  d8:   2200moveq   r2, #0
  da:   4611mov r1, r2
  dc:   f400 4200   and.w   r2, r0, #32768  ; 0x8000
  e0:   f3c0 0009   ubfxr0, r0, #0, #10
  e4:   0412lslsr2, r2, #16
  e6:   b969cbnzr1, 104 <__gnu_h2f_internal+0x40>
  e8:   b92bcbnzr3, f6 <__gnu_h2f_internal+0x32>
  ea:   b180cbz r0, 10e <__gnu_h2f_internal+0x4a>
  ec:   fab0 f380   clz r3, r0
  f0:   3b15subsr3, #21
  f2:   4098lslsr0, r3
  f4:   425bnegsr3, r3
  f6:   3370addsr3, #112; 0x70
  f8:   0340lslsr0, r0, #13
  fa:   eb00 53c3   add.w   r3, r0, r3, lsl #23
  fe:   ea43 0002   orr.w   r0, r3, r2
 102:   4770bx  lr
 104:   ea42 3040   orr.w   r0, r2, r0, lsl #13
 108:   f040 40ff   orr.w   r0, r0, #2139095040 ; 0x7f80
 10c:   4770bx  lr
 10e:   4610mov r0, r2
 110:   4770bx  lr
 112:   bf00nop

0114 <__gnu_f2h_ieee>:
 114:   2101movsr1, #1
 116:   e773b.n 0 <__gnu_f2h_internal>

0118 <__gnu_h2f_ieee>:
 118:   2101movsr1, #1
 11a:   e7feb.n c4 <__gnu_h2f_internal>  ***!!***

The only reason i can think of is if LTO is enabled and it has done something
funny with the organization, but -O0 was specifically mentioned in compilation. 

I don't understand the internals of gcc well enough to debug this, but the more
i look the more it looks like a bug.

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-09-11 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

malithyapa at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from malithyapa at gmail dot com ---
The problem was in fact with linking both libm and libgcc with --whole-archive
and --allow-multiple-definitions options. 
Which makes the linker link to a duplicate function in the other library than
the one its linking from since it'll link to the first one it finds. 
In thumb mode the offset to the other library would be two large for the
instruction. 
Even though it'll be nice if gcc links to the closest symbol rather than the
first one, this is documented behavior and it's not a bug.

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-09-11 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

malithyapa at gmail dot com changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

[Bug c++/71776] New: relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-07-05 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

Bug ID: 71776
   Summary: relocation truncated to fit: R_ARM_THM_JUMP11 against
symbol `__gnu_h2f_internal'
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: malithyapa at gmail dot com
  Target Milestone: ---

Build fails while linking libgcc.

/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_ieee':
(.text+0x11a): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_alternative':
(.text+0x122): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_ieee':
(.text+0x11a): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_alternative':
(.text+0x122): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_ieee':
(.text+0x11a): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o): In function
`__gnu_h2f_alternative':
(.text+0x122): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`__gnu_h2f_internal' defined in .text section in
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(fp16.o)

tried forcing both -static-libgcc and -shared-libgcc with no difference. 
tried -fno-optimize-sibling-calls
(https://bugs.freedesktop.org/show_bug.cgi?id=72064) with no difference

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-07-06 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #2 from malithyapa at gmail dot com ---
4.9.3 isn't in jessie yet. will i have to compile?

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-08-07 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #3 from malithyapa at gmail dot com ---
Tried with 4.9.3 issue is still there

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-08-07 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #4 from malithyapa at gmail dot com ---
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.3-14'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.3 (Debian 4.9.3-14)

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-08-18 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #5 from malithyapa at gmail dot com ---
On Wed, Jul 6, 2016 at 1:39 PM ktkachov at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776
>
> ktkachov at gcc dot gnu.org changed:
>
>What|Removed |Added
> 
> 
>  CC||ktkachov at gcc dot
> gnu.org
>
> --- Comment #1 from ktkachov at gcc dot gnu.org ---
> Can you try the latest 4.9.3 release and if it still fails please provide
> the
> full configure line
>
> --
> You are receiving this mail because:
> You reported the bug.


I tried this on the 4.9.3 build and it still fails. I've updated the bug
with the configure line. Anything else i can do at the moment to get past
this?

Thanks,
Malith

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-08-22 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #6 from malithyapa at gmail dot com ---
Tried with 4.9.4 in debian sid. Still the same

[Bug target/71776] relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__gnu_h2f_internal'

2016-08-31 Thread malithyapa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71776

--- Comment #7 from malithyapa at gmail dot com ---
>From what i understand this is because of a Thumb16 branch instruction in
libgcc. Would it help if i compiled gcc with thumb disabled?