summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-01 22:16:28 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-01 22:16:28 +0000
commit3096f34d27f32fc179ca051ad78ac9ee2165c72e (patch)
tree4e8bf2d890181cc77f0fd74e339d6db6721c2331 /package
parent961229caf56a6a3e3bc9fd58805d8e83dd6a84ae (diff)
downloadbuildroot-novena-3096f34d27f32fc179ca051ad78ac9ee2165c72e.tar.gz
buildroot-novena-3096f34d27f32fc179ca051ad78ac9ee2165c72e.zip
- add BR2_PREFER_STATIC_LIB config option to be able to select if we prefer to build static or dynamic libs/bins.
- depending on the BR2_GNU_BUILD_SUFFIX, set the respective EXEEXT, LIBEXT, SHREXT extensions for use on the target. Thanks to Tom for suplying a diff which implements these.
Diffstat (limited to 'package')
-rw-r--r--package/gmp/gmp.mk15
1 files changed, 12 insertions, 3 deletions
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index 93a5d653a..b70fffa5f 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -18,6 +18,14 @@ else
GMP_BE:=no
endif
+# this is a workaround for a bug in GMP, please see
+# http://gmplib.org/list-archives/gmp-devel/2006-April/000618.html
+ifeq ($(EXEEXT),.exe)
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+else
+GMP_CPP_FLAGS:=
+endif
+
$(DL_DIR)/$(GMP_SOURCE):
$(WGET) -P $(DL_DIR) $(GMP_SITE)/$(GMP_SOURCE)
@@ -35,6 +43,7 @@ $(GMP_TARGET_DIR)/.configured: $(GMP_DIR)/.unpacked
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
+ CPPFLAGS="$(GMP_CPP_FLAGS)" \
ac_cv_c_bigendian=$(GMP_BE) \
$(GMP_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
@@ -52,7 +61,7 @@ $(GMP_TARGET_DIR)/.configured: $(GMP_DIR)/.unpacked
--includedir=/include \
--mandir=/usr/man \
--infodir=/usr/info \
- --enable-shared \
+ $(PREFERRED_LIB_FLAGS) \
$(DISABLE_NLS) \
);
touch $@
@@ -105,12 +114,12 @@ $(GMP_DIR2)/.configured: $(GMP_DIR)/.unpacked
CC_FOR_BUILD="$(HOSTCC)" \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
+ CPPFLAGS="$(GMP_CPP_FLAGS)" \
$(GMP_DIR)/configure \
--prefix="$(GMP_HOST_DIR)" \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
- --enable-shared \
- --enable-static \
+ $(PREFERRED_LIB_FLAGS) \
$(DISABLE_NLS) \
);
touch $@