This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 1/3] or1k: libgcc: initial support for openrisc


On Tue, Nov 13, 2018 at 5:53 AM Joel Sherrill <joel@rtems.org> wrote:
>
>
>
> On Mon, Nov 12, 2018 at 1:26 AM Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:
>>
>> Hello Stafford,
>>
>> I tried to build the or1k-rtems5 target with GCC
>> 4c0c3d1029e79b6709b43fed8c5a5944f245516d and Binutils
>> 417e50dbcfd4b8dd699f48df5ac9b9a733fd80e2. It failed in the libgcc build:
>>
>> /scratch/git-rtems-source-builder/rtems/build/or1k-rtems5-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d-newlib-2ab57ad59bc35dafffa69cd4da5e228971de069f-x86_64-linux-gnu-1/build/./gcc/xgcc
>> -B/scratch/git-rtems-source-builder/rtems/build/or1k-rtems5-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d-newlib-2ab57ad59bc35dafffa69cd4da5e228971de069f-x86_64-linux-gnu-1/build/./gcc/
>> -nostdinc
>> -B/scratch/git-rtems-source-builder/rtems/build/or1k-rtems5-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d-newlib-2ab57ad59bc35dafffa69cd4da5e228971de069f-x86_64-linux-gnu-1/build/or1k-rtems5/mcmov/newlib/
>> -isystem
>> /scratch/git-rtems-source-builder/rtems/build/or1k-rtems5-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d-newlib-2ab57ad59bc35dafffa69cd4da5e228971de069f-x86_64-linux-gnu-1/build/or1k-rtems5/mcmov/newlib/targ-include
>> -isystem
>> /scratch/git-rtems-source-builder/rtems/build/or1k-rtems5-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d-newlib-2ab57ad59bc35dafffa69cd4da5e228971de069f-x86_64-linux-gnu-1/gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/newlib/libc/include
>> -B/build/rtems/5/or1k-rtems5/bin/ -B/build/rtems/5/or1k-rtems5/lib/
>> -isystem /build/rtems/5/or1k-rtems5/include -isystem
>> /build/rtems/5/or1k-rtems5/sys-include  -mcmov -g -O2 -O2
>> -I../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc/../newlib/libc/sys/rtems/include
>> -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
>> -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
>> -Wold-style-definition  -isystem ./include -g -DIN_LIBGCC2
>> -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I.
>> -I../../.././gcc
>> -I../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc
>> -I../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc/.
>> -I../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc/../gcc
>> -I../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc/../include
>> -o _ffssi2.o -MT _ffssi2.o -MD -MP -MF _ffssi2.dep -DL_ffssi2 -c
>> ../../../../gnu-mirror-gcc-4c0c3d1029e79b6709b43fed8c5a5944f245516d/libgcc/libgcc2.c
>> -fvisibility=hidden -DHIDE_EXPORTS -save-temps
>> libgcc2.s: Assembler messages:
>> libgcc2.s:60: Error: junk at end of line `l.movhi r17,ha(__clz_tab)'
>>
>> The file content in this area is:
>>
>> .L4:
>> .LVL4:
>> .LM17:
>> .LBE3:
>> .LM18:
>> .LBE2:
>> .LM19:
>> .LBB6:
>> .LBB4:
>> .LM20:
>>      l.movhi    r17, ha(__clz_tab)
>>      l.addi    r17, r17, lo(__clz_tab)
>>      l.add    r3, r17, r3
>> .LVL5:
>>      l.lbz    r11, 0(r3)
>
>
> This reminded me of what happened when I had the old or1k-rtems binutils in my PATH when I built.
>
> I did a build with the binutils-gdb master and no RTEMS tools directory in my PATH and the build completed successfully.
>
> Can you confirm that you are not using an old or1k binutils?
>
> --joel
>

Thanks Joel,

I havent had time to try reproduce this yet, but I was expecting an
old version of gas too.  The error " junk at end of line `l.movhi
r17,ha(__clz_tab)'"  is saying that gas doesn't understand ha().
Which is something we added fairly recently [0].

If that still doesn't work let us know.

[0] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=cpu/or1k.opc;hb=HEAD#l290

-Stafford


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]