NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/48841: gcc -01 generates bad assembly output (ARM)

>Number:         48841
>Category:       toolchain
>Synopsis:       gcc -01 generates bad assembly output (ARM)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 28 07:35:00 +0000 2014
>Originator:     Tyler
>Release:        NetBSD 6.99.43
        gcc version 4.8.3 20140302 (prerelease) (NetBSD nb1 20120916) 
System: NetBSD pris.localdomain 6.99.43 NetBSD 6.99.43 (DRMKMS) #5: Mon May 26 
12:49:43 UTC 2014 
rtr@pris.localdomain:/var/obj/amd64/usr/src/sys/arch/amd64/compile/DRMKMS amd64
Architecture: x86_64 using arm--netbsdelf-gcc
Machine: amd64

When crossbuilding building with -O1 the build fails with.

/var/tools/evbarm/bin/arm--netbsdelf-gcc -g -O1 -pthread -std=gnu99 -Werror   
-msoft-float -Wno-stac
k-protector  --sysroot=/var/obj/evbarm/usr/src/destdir.evbarm -DHAVE_CONFIG_H  
pl3/gcc/dist/libgomp  -I/usr/src/external/gpl3/gcc/dist/libgomp/config/posix  
l3/gcc/dist/libgcc  -I/usr/src/external/gpl3/gcc/lib/libgomp/arch/arm  -c    
-fPIC -g /usr/src/exter
nal/gpl3/gcc/dist/libgomp/task.c -o task.pico
/var/tmp//ccnpdfx1.s: Assembler messages:
/var/tmp//ccnpdfx1.s:942: Error: invalid operands (.text and *UND* sections) 
for `-'

Examination of the assembly (obtained via gcc -S) shows that the error 
originates from

line 942: .word   gomp_tls_data(tlsgd) + (. - .LPIC15 - 8)

where LPIC15 is a label not present in the assembly output file.

This problem does not happen with -O2.  Probably this one just gets kicked 
to gcc.
add DBG= -g -O1 to your mk.conf and -m evbarm

No fix provided, workaround by using more optimisation.

Home | Main Index | Thread Index | Old Index