1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 14:10:48 +02:00

gcc: initial port

This commit is contained in:
kyak 2010-10-09 11:38:12 +04:00
parent 59d9e88c98
commit 285555c1b6
3 changed files with 160 additions and 0 deletions

85
gcc-mips/Makefile Normal file
View File

@ -0,0 +1,85 @@
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gcc
#PKG_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#"))
PKG_VERSION:=4.3.3
PKG_RELEASE:=1
PATCH_DIR=$(TOPDIR)/toolchain/gcc/patches/$(PKG_VERSION)
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \
http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=354853e0b2da90c527e35aabb8d6f1e6
PKG_INSTALL:=1
PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
SEP:=,
TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)"
EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
define Package/gcc-mips
SECTION:=devel
CATEGORY:=Development
TITLE:=gcc-mips
DEPENDS:=+mpfr +binutils
endef
define Package/gcc-mips/description
build a native toolchain for compiling on target
endef
define Build/Prepare
$(call Build/Prepare/Default)
$(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c
$(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c
(cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;);
$(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure
endef
define Build/Configure
(cd $(PKG_BUILD_DIR); rm -f config.cache; \
SHELL="$(BASH)" \
$(TARGET_CONFIGURE_OPTS) \
$(PKG_BUILD_DIR)/configure \
$(TARGET_CONFIGURE_ARGS) \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
--disable-nls \
--disable-libmudflap \
--disable-multilib \
--with-gmp=$(STAGING_DIR)/usr \
--with-mpfr=$(STAGING_DIR)/usr \
--prefix=/usr \
$(EXTRA_TARGET) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
);
endef
define Build/Compile
export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install
endef
define Package/gcc-mips/install
$(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/bin/ $(1)/usr/include/
cp -r $(PKG_INSTALL_DIR)/* $(1)
cp -r $(TOOLCHAIN_DIR)/usr/include/* $(1)/usr/include/
cp -r $(TOOLCHAIN_DIR)/usr/lib/* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,gcc-mips))

51
mpfr/Makefile Normal file
View File

@ -0,0 +1,51 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mpfr
PKG_VERSION:=2.4.1
PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=c5ee0a8ce82ad55fe29ac57edd35d09e
PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
PKG_INSTALL=1
define Package/mpfr
TITLE:=mpfr
SECTION:=libs
CATEGORY:=Libraries
URL:=http://www.mpfr.org
DEPENDS:=+libgmp
endef
CONFIGURE_ARGS += \
--enable-static \
--enable-shared
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/include \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/* \
$(1)/usr/lib/
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/* \
$(1)/usr/include/
endef
define Package/mpfr/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libmpfr.so* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,mpfr))

View File

@ -0,0 +1,24 @@
diff -urN mpfr-2.4.1/Makefile.am mpfr-2.4.1.new/Makefile.am
--- mpfr-2.4.1/Makefile.am 2009-02-20 10:43:17.000000000 +0100
+++ mpfr-2.4.1.new/Makefile.am 2009-08-20 14:59:00.000000000 +0200
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = gnu ansi2knr
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = tests
+SUBDIRS =
EXTRA_DIST = BUGS FAQ.html PATCHES VERSION get_patches.sh round_raw_generic.c gen_inverse.h jyn_asympt.c
include_HEADERS = mpfr.h mpf2mpfr.h
diff -urN mpfr-2.4.1/Makefile.in mpfr-2.4.1.new/Makefile.in
--- mpfr-2.4.1/Makefile.in 2009-02-25 17:18:06.000000000 +0100
+++ mpfr-2.4.1.new/Makefile.in 2009-08-20 14:58:32.000000000 +0200
@@ -295,7 +295,7 @@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = gnu ansi2knr
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = tests
+SUBDIRS =
EXTRA_DIST = BUGS FAQ.html PATCHES VERSION get_patches.sh round_raw_generic.c gen_inverse.h jyn_asympt.c
include_HEADERS = mpfr.h mpf2mpfr.h
lib_LTLIBRARIES = libmpfr.la