summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-13 19:57:05 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-13 19:57:05 +0000
commit0d90c8ad1787975d514f04786ed013ec40e7bf73 (patch)
treef889c2a711ee0cfe274bf87e1845d99191bca8f2
parentee1285f23fe5a043c6fdc40067117ddff0915042 (diff)
downloadbuildroot-novena-0d90c8ad1787975d514f04786ed013ec40e7bf73.tar.gz
buildroot-novena-0d90c8ad1787975d514f04786ed013ec40e7bf73.zip
- Add libgmp-host and libmpfr-host support. I'll need this for fortran support.
-rw-r--r--package/gmp/gmp.mk32
-rw-r--r--package/mpfr/mpfr.mk36
2 files changed, 67 insertions, 1 deletions
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index 3da378e17..acd9e0ecc 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -85,6 +85,7 @@ endif
$(TARGET_DIR)/lib/libgmp.a
libgmp: uclibc $(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION)
+libgmp-stage: uclibc $(STAGING_DIR)/lib/$(GMP_BINARY)
libgmp-clean:
rm -f $(TARGET_DIR)/lib/$(GMP_BINARY)
@@ -93,6 +94,37 @@ libgmp-clean:
libgmp-dirclean:
rm -rf $(GMP_DIR)
+GMP_HOST_DIR:=$(TOOL_BUILD_DIR)/gmp-$(GMP_VERSION)
+$(GMP_HOST_DIR)/.configured: $(GMP_DIR)/.unpacked
+ [ -d $(GMP_HOST_DIR) ] || mkdir $(GMP_HOST_DIR)
+ (cd $(GMP_HOST_DIR); \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CC="$(HOSTCC)" \
+ CFLAGS="$(HOST_CFLAGS)" \
+ $(GMP_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --exec_prefix=$(STAGING_DIR) \
+ --libdir=$(STAGING_DIR)/lib \
+ --includedir=$(STAGING_DIR)/include \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --enable-static \
+ $(DISABLE_NLS) \
+ ) && \
+ touch $(GMP_HOST_DIR)/.configured
+
+$(GMP_HOST_DIR)/.libs/$(GMP_BINARY): $(GMP_HOST_DIR)/.configured
+ $(MAKE) -C $(GMP_HOST_DIR)
+
+libgmp-host: $(GMP_HOST_DIR)/.libs/$(GMP_BINARY)
+
#############################################################
#
# Toplevel Makefile options
diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk
index 9f3ae3301..4ff586350 100644
--- a/package/mpfr/mpfr.mk
+++ b/package/mpfr/mpfr.mk
@@ -34,11 +34,12 @@ ifneq ($(MPFR_PATCH),)
endif
touch $(MPFR_DIR)/.unpacked
-$(MPFR_DIR)/.configured: $(MPFR_DIR)/.unpacked
+$(MPFR_DIR)/.configured: $(MPFR_DIR)/.unpacked $(STAGING_DIR)/lib/$(GMP_BINARY)
(cd $(MPFR_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_c_bigendian=$(MPFR_BE) \
+ CXX="" \
./configure \
--host=$(REAL_GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
@@ -55,6 +56,7 @@ $(MPFR_DIR)/.configured: $(MPFR_DIR)/.unpacked
--mandir=/usr/man \
--infodir=/usr/info \
--enable-shared \
+ --with-gmp=$(STAGING_DIR) \
$(DISABLE_NLS) \
);
touch $(MPFR_DIR)/.configured
@@ -90,6 +92,7 @@ endif
$(TARGET_DIR)/lib/libmpfr.a
libmpfr: uclibc libgmp $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
+libmpfr-stage: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
libmpfr-clean:
rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY)
@@ -98,6 +101,37 @@ libmpfr-clean:
libmpfr-dirclean:
rm -rf $(MPFR_DIR)
+MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
+$(MPFR_HOST_DIR)/.configured: $(MPFR_DIR)/.unpacked libgmp-host
+ [ -d $(MPFR_HOST_DIR) ] || mkdir $(MPFR_HOST_DIR)
+ (cd $(MPFR_HOST_DIR); \
+ CC="$(HOSTCC)" \
+ CXX="$(HOSTCXX)" \
+ $(MPFR_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --exec_prefix=$(STAGING_DIR) \
+ --libdir=$(STAGING_DIR)/lib \
+ --includedir=$(STAGING_DIR)/include \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --enable-static \
+ --with-gmp-build=$(GMP_HOST_DIR) \
+ $(DISABLE_NLS) \
+ ) && \
+ touch $(MPFR_DIR)/.configured
+
+$(MPFR_HOST_DIR)/.libs/$(MPFR_BINARY): $(MPFR_HOST_DIR)/.configured
+ $(MAKE) -C $(MPFR_HOST_DIR)
+
+libmpfr-host: $(MPFR_HOST_DIR)/.libs/$(MPFR_BINARY)
+
#############################################################
#
# Toplevel Makefile options