public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43999]  New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
@ 2010-05-06  6:41 cedric at berger dot to
  2010-05-10 23:53 ` [Bug c/43999] " jingyu at google dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cedric at berger dot to @ 2010-05-06  6:41 UTC (permalink / raw)
  To: gcc-bugs

/Users/cedric/software/gcc-4.5.0/build-stm32xx/./gcc/xgcc
-B/Users/cedric/software/gcc-4.5.0/build-stm32xx/./gcc/
-B/nfs/darwin/arm-stm32xx-eabi/bin/ -B/nfs/darwin/arm-stm32xx-eabi/lib/
-isystem /nfs/darwin/arm-stm32xx-eabi/include -isystem
/nfs/darwin/arm-stm32xx-eabi/sys-include    -mcpu=cortex-m3 -mtune=cortex-m3
-mthumb -D__thumb2__ -mabi=aapcs-linux -mfloat-abi=soft -O2
-fomit-frame-pointer -falign-functions=16 -fsigned-char -fwrapv
-fno-strict-aliasing -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -mthumb -O2 
-mcpu=cortex-m3 -mtune=cortex-m3 -mthumb -D__thumb2__ -mabi=aapcs-linux
-mfloat-abi=soft -O2 -fomit-frame-pointer -falign-functions=16 -fsigned-char
-fwrapv -fno-strict-aliasing -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -fno-inline -Wno-missing-prototypes -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc  -I. -I. -I../../.././gcc
-I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc
-I../../../../libgcc/../include  -DHAVE_CC_TLS  -o _udivsi3.o -MT _udivsi3.o
-MD -MP -MF _udivsi3.dep -DL_udivsi3 -xassembler-with-cpp \
          -c ../../../../libgcc/../gcc/config/arm/lib1funcs.asm
../../../../libgcc/../gcc/config/arm/lib1funcs.asm: Assembler messages:
../../../../libgcc/../gcc/config/arm/lib1funcs.asm:624: Warning: conditional
infixes are deprecated in unified syntax
../../../../libgcc/../gcc/config/arm/lib1funcs.asm:624: Error: incorrect
condition in IT block -- `movnes r3,r3,lsr#4'
../../../../libgcc/../gcc/config/arm/lib1funcs.asm:624: Error: incorrect
condition in IT block -- `movne r1,r1,lsr#4'
make[4]: *** [_udivsi3.o] Error 1
make[3]: *** [multi-do] Error 1
make[2]: *** [all-multi] Error 2
make[1]: *** [all-target-libgcc] Error 2


-- 
           Summary: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cedric at berger dot to
 GCC build triplet: arm-stm32xx-eabi-gcc
  GCC host triplet: x86_64-apple-darwin10.3.0
GCC target triplet: arm-stm32xx-eabi-gcc


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
@ 2010-05-10 23:53 ` jingyu at google dot com
  2010-05-11  9:28 ` ramana at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jingyu at google dot com @ 2010-05-10 23:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jingyu at google dot com  2010-05-10 23:52 -------
I see the same error when compiling thumb2 libgcc.
Host=Build=x86_64-unknown-linux-gnu, Target=arm-unknown-eabi

The error message points to following lines in gcc/config/arm/lib1funcs.asm.

        cmp     \dividend, #0                   @ Early termination?
        do_it   hs, t
        movnes  \curbit,   \curbit,  lsr #4     @ No, any more bits to do?
        movne   \divisor,  \divisor, lsr #4
        bne     1b

The condition in "do_it hs,t" seems to be wrong.
This do_it line was committed by Kazu Hirata in Aug 2009.
http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00365.html

I am using binutils-2.20.1.

Thanks.


-- 

jingyu at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kazu at codesourcery dot
                   |                            |com, jingyu at google dot
                   |                            |com


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
  2010-05-10 23:53 ` [Bug c/43999] " jingyu at google dot com
@ 2010-05-11  9:28 ` ramana at gcc dot gnu dot org
  2010-05-11 17:56 ` jingyu at google dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-05-11  9:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ramana at gcc dot gnu dot org  2010-05-11 09:28 -------
How did you configure your tools in  ? Have you considered using the --with-cpu
and --with-mode options while building your tools i.e. --with-cpu=cortex-m3
--with-mode=thumb.

Ramana


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
  2010-05-10 23:53 ` [Bug c/43999] " jingyu at google dot com
  2010-05-11  9:28 ` ramana at gcc dot gnu dot org
@ 2010-05-11 17:56 ` jingyu at google dot com
  2010-06-03  0:55 ` [Bug target/43999] " jingyu at google dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jingyu at google dot com @ 2010-05-11 17:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jingyu at google dot com  2010-05-11 17:56 -------
I configure gcc with --with-arch=armv5te. The default multilib will be compiled
in ARM mode.
The error happens when I build the armv7-a/thumb multilib.
I checked the config.log for armv7-a/thumb/libgcc, libgcc was indeed configured
with -march=armv7-a -mthumb. So the code will be generated in thumb2 mode.

In gcc/config/arm/lib1funcs.asm, "do_it hs, t" means "itt hs".
The condition of the IT block must match the condition of the instructions
inside. "hs" here looks like a typo. I change "hs" into "ne", then
lib1funcs.asm is compiled. This IT block is rephrased into

  5e:   2800            cmp     r0, #0
  60:   bf1c            itt     ne
  62:   ea5f 1313       movsne.w        r3, r3, lsr #4
  66:   0909            lsrne   r1, r1, #4

Am I correct?
Thanks.


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
                   ` (2 preceding siblings ...)
  2010-05-11 17:56 ` jingyu at google dot com
@ 2010-06-03  0:55 ` jingyu at google dot com
  2010-06-12 13:46 ` cedric at berger dot to
  2010-08-14  1:28 ` mbarenh at alios dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jingyu at google dot com @ 2010-06-03  0:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jingyu at google dot com  2010-06-03 00:54 -------
I check out the trunk gcc (4.6.0 20100602). Configure gcc with the following:


/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/configure
--prefix=/usr/local --target=arm-linux-androideabi
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
--enable-languages=c,c++
--with-gmp=/usr/local/google/home/projects/toolchain_build/androideabi/obj/temp-install
--with-mpfr=/usr/local/google/home/projects/toolchain_build/androideabi/obj/temp-install
--with-mpc=/usr/local/google/home/projects/toolchain_build/androideabi/obj/temp-install
--disable-libssp --enable-threads --disable-nls --disable-libmudflap
--disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions
--disable-shared --disable-tls --with-float=soft --with-fpu=vfp
--with-arch=armv5te --enable-target-optspace --with-gcc-version=trunk
--with-binutils-version=2.20.1 --with-arch=armv5te
--with-sysroot=/usr/local/google/home/projects/toolchain_build/master_root
--with-gmp-version=4.2.4 --with-mpfr-version=2.4.1 --with-gdb-version=6.6
--program-transform-name=s&^&arm-linux-androideabi-&

The build of libgcc multilib for armv7-a thumb failed.

/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk/./gcc/xgcc
-B/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk/./gcc/
-B/usr/local/arm-linux-androideabi/bin/ -B/usr/local/arm-linux-androideabi/lib/
-isystem /usr/local/arm-linux-androideabi/include -isystem
/usr/local/arm-linux-androideabi/sys-include    -O2 -Os -g -DTARGET_POSIX_IO
-fno-short-enums -march=armv7-a -mthumb -O2  -O2 -Os -g -DTARGET_POSIX_IO
-fno-short-enums -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include  -fPIC -Wno-missing-prototypes -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../../.././gcc
-I/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc
-I/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/.
-I/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc
-I/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../include
   -o _udivsi3.o -MT _udivsi3.o -MD -MP -MF _udivsi3.dep -DL_udivsi3
-xassembler-with-cpp \
          -c
/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc/config/arm/lib1funcs.asm
/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc/config/arm/lib1funcs.asm:
Assembler messages:
/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc/config/arm/lib1funcs.asm:625:
Warning: conditional infixes are deprecated in unified syntax
/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc/config/arm/lib1funcs.asm:625:
Error: incorrect condition in IT block -- `movnes r3,r3,lsr#4'
/usr/local/google/home/projects/android-toolchain/build/../gcc/gcc-trunk/libgcc/../gcc/config/arm/lib1funcs.asm:625:
Error: incorrect condition in IT block -- `movne r1,r1,lsr#4'
make[5]: *** [_udivsi3.o] Error 1
make[5]: Leaving directory
`/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk/arm-linux-androideabi/armv7-a/thumb/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory
`/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk/arm-linux-androideabi/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory
`/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk/arm-linux-androideabi/libgcc'
make[2]: *** [all-target-libgcc] Error 2
make[2]: Leaving directory
`/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/usr/local/google/home/projects/toolchain_build/androideabi/obj/gcc-trunk'

I also tried the top of trunk assembler (binutils 2010-06-02). It gives the
same error.


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
                   ` (3 preceding siblings ...)
  2010-06-03  0:55 ` [Bug target/43999] " jingyu at google dot com
@ 2010-06-12 13:46 ` cedric at berger dot to
  2010-08-14  1:28 ` mbarenh at alios dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cedric at berger dot to @ 2010-06-12 13:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from cedric at berger dot to  2010-06-12 13:46 -------
What the h*?* is "Status: WAITING"?
It's certainly not on the list under the "Status" link.


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/43999] Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2
  2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
                   ` (4 preceding siblings ...)
  2010-06-12 13:46 ` cedric at berger dot to
@ 2010-08-14  1:28 ` mbarenh at alios dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mbarenh at alios dot org @ 2010-08-14  1:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mbarenh at alios dot org  2010-08-14 01:27 -------
Created an attachment (id=21475)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21475&action=view)
patch fixes build on thumb2 platform - fixes typos


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-14  1:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-06  6:41 [Bug c/43999] New: Gcc (lib1funcs.asm) doesn't build on ARM/Thumb2 cedric at berger dot to
2010-05-10 23:53 ` [Bug c/43999] " jingyu at google dot com
2010-05-11  9:28 ` ramana at gcc dot gnu dot org
2010-05-11 17:56 ` jingyu at google dot com
2010-06-03  0:55 ` [Bug target/43999] " jingyu at google dot com
2010-06-12 13:46 ` cedric at berger dot to
2010-08-14  1:28 ` mbarenh at alios dot org

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).