public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/63929] New: GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file.
@ 2014-11-18 10:29 nataliia.koval at globallogic dot com
2014-11-21 18:03 ` [Bug other/63929] " rearnsha at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: nataliia.koval at globallogic dot com @ 2014-11-18 10:29 UTC (permalink / raw)
To: gcc-bugs
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug other/63929] GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file.
2014-11-18 10:29 [Bug other/63929] New: GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file nataliia.koval at globallogic dot com
@ 2014-11-21 18:03 ` rearnsha at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2014-11-21 18:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63929
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
This is nothing to do with the compiler. Attributes are derived from
annotations in the assembly file (GCC generates assembly code when compiling
C/C++/Fortran, etc and puts the relevant annotations in for you, but can't do
that for assembler source).
If you write assembly code, you'll have to manually attribute your source code.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-21 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 10:29 [Bug other/63929] New: GCC sets soft-float ABI even is specified -mfloat-abi=hard when compiling an assembler file nataliia.koval at globallogic dot com
2014-11-21 18:03 ` [Bug other/63929] " rearnsha at gcc dot gnu.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).