From 93e576b799bacbe419b1c442d116b41734f8d03b Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Fri, 16 Jan 2004 19:08:39 +0000 Subject: Get soft float working for gcc 3.3.2. Support for arm, mips, mipsel, powerpc. --- make/gcc-uclibc-3.3.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'make/gcc-uclibc-3.3.mk') diff --git a/make/gcc-uclibc-3.3.mk b/make/gcc-uclibc-3.3.mk index 8d2d20db2..532373a19 100644 --- a/make/gcc-uclibc-3.3.mk +++ b/make/gcc-uclibc-3.3.mk @@ -160,6 +160,14 @@ $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); +ifeq ($(SOFT_FLOAT),true) + # Replace specs file with one that defaults to soft float mode. + if [ ! -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ + echo staging dir specs file is missing ; \ + /bin/false ; \ + fi; + cp $(SOURCE_DIR)/specs-$(ARCH)-soft-float $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs +endif touch $(GCC_BUILD_DIR2)/.installed gcc3_3: uclibc-configured binutils gcc3_3_initial $(LIBFLOAT_TARGET) uclibc \ @@ -209,8 +217,19 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled PATH=$(TARGET_PATH) \ $(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install +ifeq ($(SOFT_FLOAT),true) + # Replace specs file with one that defaults to soft float mode. + if [ ! -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ + echo target dir specs file is missing ; \ + /bin/false ; \ + fi; + cp $(SOURCE_DIR)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs + # Make sure gcc does not think we are cross compiling + $(SED) "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs +else # Remove broken specs file (cross compile flag is set). rm -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs +endif -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) -(cd $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) -- cgit v1.2.3