summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-03-22 19:21:59 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-03-22 19:21:59 (GMT)
commit715b83bde15557a6346689d63f0e30207173de84 (patch)
treedd6dd6922960674202f226ff18ddf44f1d1e6567
parent7716f93ed91656cc93ab0b2ecb02476b51955a64 (diff)
downloadmxe-715b83bde15557a6346689d63f0e30207173de84.zip
mxe-715b83bde15557a6346689d63f0e30207173de84.tar.gz
mxe-715b83bde15557a6346689d63f0e30207173de84.tar.bz2
New package: libiberty
-rw-r--r--doc/index.html4
-rw-r--r--src/libiberty-test.c24
-rw-r--r--src/libiberty.mk34
3 files changed, 60 insertions, 2 deletions
diff --git a/doc/index.html b/doc/index.html
index 649a947..74dd4fc 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -1314,8 +1314,8 @@ https://...</pre>
Many new packages are supported:
atkmm, cairomm, cunit, faac, faad2, ffmpeg, gdk-pixbuf, glibmm,
gtkglextmm, gtkmm, gtksourceview, gtksourceviewmm, imagemagick,
- lame, libsigc++, libvpx, matio, openal, opencore-amr, pangomm,
- pfstools, plotmm, sdl_sound and x264.
+ lame, libiberty, libsigc++, libvpx, matio, openal, opencore-amr,
+ pangomm, pfstools, plotmm, sdl_sound and x264.
</p>
</dd>
diff --git a/src/libiberty-test.c b/src/libiberty-test.c
new file mode 100644
index 0000000..aca6c48
--- /dev/null
+++ b/src/libiberty-test.c
@@ -0,0 +1,24 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <libiberty.h>
+
+int main(int argc, char *argv[])
+{
+ char *s;
+
+ (void)argc;
+ (void)argv;
+
+ if (asprintf(&s, "Test%i", 123) >= 0) {
+ printf("asprintf output: %s\n", s);
+ free(s);
+ return 0;
+ } else {
+ printf("asprintf() failed!\n");
+ return 1;
+ }
+}
diff --git a/src/libiberty.mk b/src/libiberty.mk
new file mode 100644
index 0000000..f6ed3f0
--- /dev/null
+++ b/src/libiberty.mk
@@ -0,0 +1,34 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# libiberty
+PKG := libiberty
+$(PKG)_IGNORE = $(binutils_IGNORE)
+$(PKG)_VERSION = $(binutils_VERSION)
+$(PKG)_CHECKSUM = $(binutils_CHECKSUM)
+$(PKG)_SUBDIR = $(binutils_SUBDIR)/libiberty
+$(PKG)_FILE = $(binutils_FILE)
+$(PKG)_WEBSITE = http://gcc.gnu.org/onlinedocs/libiberty/
+$(PKG)_URL = $(binutils_URL)
+$(PKG)_URL_2 = $(binutils_URL_2)
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ echo $(binutils_VERSION)
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)' && ./configure \
+ --host='$(TARGET)' \
+ --enable-static \
+ --disable-shared \
+ --prefix='$(PREFIX)/$(TARGET)' \
+ --enable-install-libiberty
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ $(MAKE) -C '$(1)' -j 1 install target_header_dir=libiberty
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libiberty.exe' \
+ -I$(PREFIX)/$(TARGET)/include/libiberty -liberty
+endef