mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-19 03:08:31 +00:00
139e1875d3
It appears that with recent versions of GCC the explicit "-mhard-float" command line option takes precedence over the ``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer helps to avoid the warnings we get when linking code that uses FP instructions with other code that was built using soft-float. We can remove the ".gnu_attribute" (which appears to carry no other information, at least so far) from the object files, but we also have to make sure we don't pull in the __gcc_qsub() and __gcc_qmul() functions from the standard libgcc, as these would again "infect" our linking. We copy this code from: gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c This old version was chosen because it was still available under a compatible license (GCC v2+). The file was stripped down to the needed parts, and reformatted so it passes checkpatch with only one warning (do not add new typedefs). Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Stefan Roese <sr@denx.de> Cc: Andy Fleming <afleming@gmail.com> Cc: Kim Phillips <kim.phillips@freescale.com> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Anatolij Gustschin <agust@denx.de>
46 lines
1.5 KiB
Makefile
46 lines
1.5 KiB
Makefile
#
|
|
# (C) Copyright 2007
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
#
|
|
# See file CREDITS for list of people who contributed to this
|
|
# project.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License as
|
|
# published by the Free Software Foundation; either version 2 of
|
|
# the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
# MA 02111-1307 USA
|
|
#
|
|
include $(TOPDIR)/config.mk
|
|
|
|
LIB = libpost$(ARCH)fpu.o
|
|
|
|
COBJS-$(CONFIG_HAS_POST) += 20001122-1.o
|
|
COBJS-$(CONFIG_HAS_POST) += 20010114-2.o
|
|
COBJS-$(CONFIG_HAS_POST) += 20010226-1.o
|
|
COBJS-$(CONFIG_HAS_POST) += 980619-1.o
|
|
COBJS-$(CONFIG_HAS_POST) += acc1.o
|
|
COBJS-$(CONFIG_HAS_POST) += compare-fp-1.o
|
|
COBJS-$(CONFIG_HAS_POST) += fpu.o
|
|
COBJS-$(CONFIG_HAS_POST) += mul-subnormal-single-1.o
|
|
|
|
COBJS-$(CONFIG_HAS_POST) += darwin-ldouble.o
|
|
|
|
include $(TOPDIR)/post/rules.mk
|
|
|
|
CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//)
|
|
CFLAGS += -mhard-float -fkeep-inline-functions
|
|
|
|
$(obj)%.o: %.c
|
|
$(CC) $(ALL_CFLAGS) -o $@.fp $< -c
|
|
$(OBJCOPY) -R .gnu.attributes $@.fp $@
|
|
rm -f $@.fp
|