From 5a0ff57c48cbaeedfac667d5e808baca8dbcb83c Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Wed, 6 May 2015 12:01:05 -0400 Subject: unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o. 2015-05-06 Sandra Loosemore Chris Jones Joshua Conner gcc/ * config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o. * config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise. libgcc/ * config.host (arm*-*-linux*): Add support for crtfastmath.o. (arm*-*-uclinux*): Likewise. (arm*-*-eabi* | arm*-*-rtems*): Likewise. * config/arm/crtfastmath.c: New file. Co-Authored-By: Chris Jones Co-Authored-By: Joshua Conner From-SVN: r222857 --- gcc/config/arm/linux-eabi.h | 1 + gcc/config/arm/unknown-elf.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/config') diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index e9d65dc..2cf3ca7 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -107,6 +107,7 @@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h index 2e5ab7e..d1d4f7a 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h @@ -32,7 +32,9 @@ #define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" #undef STARTFILE_SPEC -#define STARTFILE_SPEC UNKNOWN_ELF_STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ + UNKNOWN_ELF_STARTFILE_SPEC #define UNKNOWN_ELF_ENDFILE_SPEC "crtend%O%s crtn%O%s" -- cgit v1.1