- don't rely on buggy gmp/mpfr on the host but use our own build iff we are about to build a somewhat current toolchain.

This commit is contained in:
Bernhard Reutner-Fischer
2007-01-22 19:17:23 +00:00
parent 6440b9fd17
commit 3968d231ff
6 changed files with 123 additions and 54 deletions

View File

@@ -10,7 +10,7 @@ MPFR_CAT:=$(BZCAT)
MPFR_SITE:=http://www.mpfr.org/mpfr-current/
MPFR_DIR:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
MPFR_TARGET_DIR:=$(BUILD_DIR)/mpfr-$(MPFR_VERSION)
MPFR_BINARY:=libmpfr.a
MPFR_BINARY:=libmpfr.so
MPFR_LIBVERSION:=1.0.1
ifeq ($(BR2_ENDIAN),"BIG")
@@ -33,7 +33,7 @@ ifneq ($(MPFR_PATCH),)
$(WGET) -P $(MPFR_DIR) $(MPFR_SITE)/$(MPFR_PATCH)
( cd $(MPFR_DIR) ; patch -p1 < $(MPFR_PATCH) ; )
endif
touch $(MPFR_DIR)/.unpacked
touch $@
$(MPFR_TARGET_DIR)/.configured: $(MPFR_DIR)/.unpacked $(STAGING_DIR)/lib/$(GMP_BINARY)
mkdir -p $(MPFR_TARGET_DIR)
@@ -83,18 +83,18 @@ $(STAGING_DIR)/lib/$(MPFR_BINARY): $(MPFR_TARGET_DIR)/.libs/$(MPFR_BINARY)
mandir=$(STAGING_DIR)/man \
-C $(MPFR_TARGET_DIR) install;
$(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION): $(STAGING_DIR)/lib/$(MPFR_BINARY)
cp -a $(STAGING_DIR)/lib/libmpfr.so* $(STAGING_DIR)/lib/libmpfr.a \
$(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION) $(TARGET_DIR)/lib/libmpfr.a: $(STAGING_DIR)/lib/$(MPFR_BINARY)
cp -dpf $(STAGING_DIR)/lib/libmpfr.so* $(STAGING_DIR)/lib/libmpfr.a \
$(TARGET_DIR)/lib/
ifeq ($(BR2_PACKAGE_LIBMPFR_HEADERS),y)
cp -a $(STAGING_DIR)/include/mpfr.h $(STAGING_DIR)/include/mpf2mpfr.h \
cp -dpf $(STAGING_DIR)/include/mpfr.h $(STAGING_DIR)/include/mpf2mpfr.h \
$(TARGET_DIR)/usr/include/
endif
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libmpfr.so* \
$(TARGET_DIR)/lib/libmpfr.a
libmpfr: uclibc libgmp $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
libmpfr-stage: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
libmpfr: uclibc $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
stage-libmpfr: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
libmpfr-clean:
rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY) $(TARGET_DIR)/lib/libmpfr.so* \
@@ -105,7 +105,7 @@ libmpfr-clean:
libmpfr-dirclean:
rm -rf $(MPFR_TARGET_DIR)
MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)-host
MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr
$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_BINARY)
mkdir -p $(MPFR_DIR2)