mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 23:06:05 +08:00
Explicitly add -msse2 to compile HF related libgcc source file.
For 32-bit libgcc configure w/o sse2, there's would be an error since GCC only support _Float16 under sse2. Explicitly add -msse2 for those HF related libgcc functions, so users can still link them w/ the upper configuration. libgcc/ChangeLog: * Makefile.in: Adjust to support specific CFLAGS for each libgcc source file. * config/i386/64/t-softfp: Explicitly add -msse2 for HF related libgcc source files. * config/i386/t-softfp: Ditto. * config/i386/_divhc3.c: New file. * config/i386/_mulhc3.c: New file.
This commit is contained in:
parent
a3fb781d4b
commit
637dfcf43c
@ -314,7 +314,7 @@ MULTIOSSUBDIR := $(shell if test $(MULTIOSDIR) != .; then echo /$(MULTIOSDIR); f
|
||||
inst_libdir = $(libsubdir)$(MULTISUBDIR)
|
||||
inst_slibdir = $(slibdir)$(MULTIOSSUBDIR)
|
||||
|
||||
gcc_compile_bare = $(CC) $(INTERNAL_CFLAGS)
|
||||
gcc_compile_bare = $(CC) $(INTERNAL_CFLAGS) $(CFLAGS-$(<F))
|
||||
compile_deps = -MT $@ -MD -MP -MF $(basename $@).dep
|
||||
gcc_compile = $(gcc_compile_bare) -o $@ $(compile_deps)
|
||||
gcc_s_compile = $(gcc_compile) -DSHARED
|
||||
|
@ -1 +1,6 @@
|
||||
softfp_extras := fixhfti fixunshfti floattihf floatuntihf
|
||||
|
||||
CFLAGS-fixhfti.c += -msse2
|
||||
CFLAGS-fixunshfti.c += -msse2
|
||||
CFLAGS-floattihf.c += -msse2
|
||||
CFLAGS-floatunstihf.c += -msse2
|
||||
|
4
libgcc/config/i386/_divhc3.c
Normal file
4
libgcc/config/i386/_divhc3.c
Normal file
@ -0,0 +1,4 @@
|
||||
#ifdef __SSE2__
|
||||
#define L_divhc3
|
||||
#include "libgcc2.c"
|
||||
#endif
|
4
libgcc/config/i386/_mulhc3.c
Normal file
4
libgcc/config/i386/_mulhc3.c
Normal file
@ -0,0 +1,4 @@
|
||||
#ifdef __SSE2__
|
||||
#define L_mulhc3
|
||||
#include "libgcc2.c"
|
||||
#endif
|
@ -1,6 +1,26 @@
|
||||
LIB2ADD += $(srcdir)/config/i386/sfp-exceptions.c
|
||||
|
||||
# Replace _divhc3 and _mulhc3.
|
||||
libgcc2-hf-functions = _divhc3 _mulhc3
|
||||
LIB2FUNCS_EXCLUDE += $(libgcc2-hf-functions)
|
||||
libgcc2-hf-extras = $(addsuffix .c, $(libgcc2-hf-functions))
|
||||
LIB2ADD_ST += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras))
|
||||
|
||||
softfp_extensions := hfsf hfdf hftf hfxf sfdf sftf dftf xftf
|
||||
softfp_truncations := tfhf xfhf dfhf sfhf tfsf dfsf tfdf tfxf
|
||||
|
||||
softfp_extras += eqhf2
|
||||
softfp_extras += eqhf2
|
||||
|
||||
CFLAGS-extendhfsf2.c += -msse2
|
||||
CFLAGS-extendhfdf2.c += -msse2
|
||||
CFLAGS-extendhftf2.c += -msse2
|
||||
CFLAGS-extendhfxf2.c += -msse2
|
||||
|
||||
CFLAGS-truncsfhf2.c += -msse2
|
||||
CFLAGS-truncdfhf2.c += -msse2
|
||||
CFLAGS-truncxfhf2.c += -msse2
|
||||
CFLAGS-trunctfhf2.c += -msse2
|
||||
|
||||
CFLAGS-eqhf2.c += -msse2
|
||||
CFLAGS-_divhc3.c += -msse2
|
||||
CFLAGS-_mulhc3.c += -msse2
|
||||
|
Loading…
Reference in New Issue
Block a user