This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/63929] New: GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file.
- From: "nataliia.koval at globallogic dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Nov 2014 10:29:19 +0000
- Subject: [Bug other/63929] New: GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63929
Bug ID: 63929
Summary: GCC sets soft-float ABI even is specified
-mfloat-abi=hard when compiling an assembler file.
Product: gcc
Version: 4.8.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: nataliia.koval at globallogic dot com
I have a simple source :
---- test.s ----------------------
.syntax unified
.arch armv7-a
.fpu vfpv3-d16
.thumb
.file "test.c"
.global a
.data
.align 2
.type a, %object
.size a, 4
a:
.word 2330
.section .note.GNU-stack,"",%progbits
-----------------------------------
Compile it:
gcc -D_REENTRANT -DU_ATTRIBUTE_DEPRECATED= -O2 -g -march=armv7-a
-mfloat-abi=hard -mthumb -mabi=aapcs-linux -Wall -ansi -pedantic -Wshadow
-Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -c -DPIC
-fPIC -o test.o test.s
gcc -O2 -g -march=armv7-a -mfloat-abi=hard -mthumb -mabi=aapcs-linux -Wall
-ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings
-Wno-long-long -shared -Wl,-Bsymbolic -nodefaultlibs -nostdlib -o test.so
test.o -Wl,-Bsymbolic
So Flags is rewrited to 'soft-float':
readelf -a test.so |grep Flags
Flags: 0x5000200, Version5 EABI, soft-float ABI
Key to Flags:
If specify explicitly .eabi_attribute here:
------ test1.s -------------------
.syntax unified
.arch armv7-a
.eabi_attribute 28, 1
.fpu vfpv3-d16
.thumb
.file "test.c"
.global a
.data
.align 2
.type a, %object
.size a, 4
a:
.word 2330
.section .note.GNU-stack,"",%progbits
----------------------------------------------
it will work correctly now:
readelf -a test1.so |grep Flags
Flags: 0x5000400, Version5 EABI, hard-float ABI
Key to Flags: