From: nbd Date: Mon, 25 Apr 2005 22:59:52 +0000 (+0000) Subject: add uclibc++ X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/58065e3715b7d2684df76d2f125da422d6dcf2b2 add uclibc++ git-svn-id: svn://svn.openwrt.org/openwrt/trunk@717 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index d9a9cd804..cc666ed69 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -56,6 +56,7 @@ comment "Libraries" source "package/libgcc/Config.in" source "package/libpthread/Config.in" source "package/zlib/Config.in" +source "package/uclibc++/Config.in" source "package/glib/Config.in" source "package/gmp/Config.in" source "package/libpcap/Config.in" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 16839ebff..c024fc167 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -58,6 +58,7 @@ package-$(BR2_PACKAGE_SNORT) += snort package-$(BR2_PACKAGE_SPEEX) += speex package-$(BR2_PACKAGE_STRACE) += strace package-$(BR2_PACKAGE_TCPDUMP) += tcpdump +package-$(BR2_PACKAGE_UCLIBCXX) += uclibc++ package-$(BR2_PACKAGE_USBUTILS) += usbutils package-$(BR2_PACKAGE_WIRELESS_TOOLS) += wireless-tools package-$(BR2_PACKAGE_WOL) += wol diff --git a/openwrt/package/uclibc++/Config.in b/openwrt/package/uclibc++/Config.in new file mode 100644 index 000000000..41dcf9f36 --- /dev/null +++ b/openwrt/package/uclibc++/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_UCLIBCXX + tristate "uClibc++" + default m if CONFIG_DEVEL + help + A standard C++ library for embedded systems diff --git a/openwrt/package/uclibc++/Makefile b/openwrt/package/uclibc++/Makefile new file mode 100644 index 000000000..6cc0ceb59 --- /dev/null +++ b/openwrt/package/uclibc++/Makefile @@ -0,0 +1,77 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uClibc++ +PKG_VERSION:=0.1.9 +PKG_RELEASE:=1 +PKG_MD5SUM:=ebf58e04d72eab5c131c2c9118737024 + +PKG_SOURCE_URL:=http://cxx.uclibc.org/src/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +IPKG_LIBCXX:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +IDIR_LIBCXX:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) +INFO_LIBCXX:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list + +UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ + -e 's/i.86/i386/' \ + -e 's/sparc.*/sparc/' \ + -e 's/arm.*/arm/g' \ + -e 's/m68k.*/m68k/' \ + -e 's/ppc/powerpc/g' \ + -e 's/v850.*/v850/g' \ + -e 's/sh64/sh/' \ + -e 's/sh[234].*/sh/' \ + -e 's/mips.*/mips/' \ + -e 's/mipsel.*/mips/' \ + -e 's/cris.*/cris/' \ +) + + +$(DL_DIR)/$(PKG_SOURCE): + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) + +$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) + $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + $(PATCH) $(PKG_BUILD_DIR) ./patches + touch $(PKG_BUILD_DIR)/.prepared + +$(PKG_BUILD_DIR)/.config: $(PKG_BUILD_DIR)/.prepared + cp ./uclibc++.config $(PKG_BUILD_DIR)/.config + $(SED) 's,^.*TARGET_ARCH.*,TARGET_ARCH="$(UCLIBC_TARGET_ARCH)",g' $(PKG_BUILD_DIR)/.config + $(SED) 's,^.*ARCH_CFLAGS.*,ARCH_CFLAGS="-mno-split-addresses $(TARGET_CFLAGS)",g' $(PKG_BUILD_DIR)/.config + + +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.config + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) + touch $(PKG_BUILD_DIR)/.built + +$(STAGING_DIR)/lib/libuClibc++.so: $(PKG_BUILD_DIR)/.built + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(STAGING_DIR)" \ + install + +$(IPKG_LIBCXX): $(STAGING_DIR)/lib/libuClibc++.so + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBCXX) ./$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_LIBCXX)/usr/lib + cp -fpR $(STAGING_DIR)/lib/libuClibc++.so* $(IDIR_LIBCXX)/usr/lib/ + $(STRIP) $(IDIR_LIBCXX)/usr/lib/*.so* + mkdir -p $(PACKAGE_DIR) + $(IPKG_BUILD) $(IDIR_LIBCXX) $(PACKAGE_DIR) + +$(INFO_LIBCXX): $(IPKG_LIBCXX) + $(IPKG) install $(IPKG_LIBCXX) + +source: $(DL_DIR)/$(PKG_SOURCE) +prepare: $(PKG_BUILD_DIR)/.prepared +compile: $(IPKG_LIBCXX) +install: $(INFO_LIBCXX) + +clean: + rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBCXX) + rm -f $(STAGING_DIR)/lib/libuClibc++.so* diff --git a/openwrt/package/uclibc++/patches/cross-compile.patch b/openwrt/package/uclibc++/patches/cross-compile.patch new file mode 100644 index 000000000..bd1495027 --- /dev/null +++ b/openwrt/package/uclibc++/patches/cross-compile.patch @@ -0,0 +1,14 @@ +diff -urN uClibc++.old/extra/Configs/Config.in uClibc++.dev/extra/Configs/Config.in +--- uClibc++.old/extra/Configs/Config.in 2005-01-14 22:47:46.000000000 +0100 ++++ uClibc++.dev/extra/Configs/Config.in 2005-04-25 21:12:01.000000000 +0200 +@@ -38,8 +38,8 @@ + #config TARGET_microblaze + # bool "microblaze" + +-#config TARGET_mips +-# bool "mips" ++config TARGET_mips ++ bool "mips" + + config TARGET_powerpc + bool "powerpc" diff --git a/openwrt/package/uclibc++/uClibc++.control b/openwrt/package/uclibc++/uClibc++.control new file mode 100644 index 000000000..2e37df899 --- /dev/null +++ b/openwrt/package/uclibc++/uClibc++.control @@ -0,0 +1,6 @@ +Package: uclibc++ +Priority: optional +Section: libs +Maintainer: Felix Fietkau +Source: buildroot internal +Description: A standard c++ library for embedded systems diff --git a/openwrt/package/uclibc++/uclibc++.config b/openwrt/package/uclibc++/uclibc++.config new file mode 100644 index 000000000..91229cd14 --- /dev/null +++ b/openwrt/package/uclibc++/uclibc++.config @@ -0,0 +1,72 @@ +# +# Automatically generated make config: don't edit +# +# TARGET_arm is not set +# TARGET_i386 is not set +TARGET_mips=y +# TARGET_powerpc is not set + +# +# Target Architecture Features and Options +# +HAVE_ELF=y +TARGET_ARCH="mips" +ARCH_CFLAGS="-mno-split-addresses" +# CONFIG_GENERIC_386 is not set +# CONFIG_386 is not set +# CONFIG_486 is not set +# CONFIG_586 is not set +# CONFIG_586MMX is not set +# CONFIG_686 is not set +# CONFIG_PENTIUMIII is not set +# CONFIG_PENTIUM4 is not set +# CONFIG_K6 is not set +# CONFIG_K7 is not set +# CONFIG_CRUSOE is not set +# CONFIG_WINCHIPC6 is not set +# CONFIG_WINCHIP2 is not set +# CONFIG_CYRIXIII is not set +# CONFIG_MIPS_ISA_1 is not set +# CONFIG_MIPS_ISA_2 is not set +# CONFIG_MIPS_ISA_3 is not set +# CONFIG_MIPS_ISA_4 is not set +CONFIG_MIPS_ISA_MIPS32=y +# CONFIG_MIPS_ISA_MIPS64 is not set +ARCH_LITTLE_ENDIAN=y +# ARCH_BIG_ENDIAN is not set +UCLIBCXX_HAS_FLOATS=y +WARNINGS="-Wall" +HAVE_DOT_CONFIG=y + +# +# String and I/O Stream Support +# +UCLIBCXX_HAS_WCHAR=y +UCLIBCXX_IOSTREAM_BUFSIZE=32 +UCLIBCXX_HAS_LFS=y +UCLIBCXX_SUPPORT_CDIR=y +UCLIBCXX_SUPPORT_CIN=y +UCLIBCXX_SUPPORT_COUT=y +UCLIBCXX_SUPPORT_CERR=y + +# +# STL and Code Expansion +# +UCLIBCXX_STL_BUFFER_SIZE=32 +UCLIBCXX_CODE_EXPANSION=y +UCLIBCXX_EXPAND_STRING_CHAR=y +UCLIBCXX_EXPAND_VECTOR_BASIC=y +UCLIBCXX_EXPAND_ISTREAM_CHAR=y +UCLIBCXX_EXPAND_OSTREAM_CHAR=y +UCLIBCXX_EXPAND_FSTREAM_CHAR=y + +# +# Library Installation Options +# +UCLIBCXX_RUNTIME_PREFIX="" +UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include" +UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib" +UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin" +UCLIBCXX_EXCEPTION_SUPPORT=y +IMPORT_LIBSUP=y +# DODEBUG is not set