mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
gcc: Update to version 5.4.0, change maintainer
Signed-off-by: Noble Pepper <noblepepper@gmail.com>
This commit is contained in:
+66
-17
@@ -4,17 +4,15 @@
|
||||
# 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:=4.8.3
|
||||
PKG_VERSION:=5.4.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
|
||||
|
||||
PKG_MD5SUM:=4c626ac2a83ef30dfb9260e6f59c2b30
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_MD5SUM:=7c60f24fab389f77af203d2516ee110f
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@@ -28,17 +26,17 @@ PKGVERSION=OpenWrt GCC $(PKG_VERSION)
|
||||
# not using sstrip here as this fucks up the .so's somehow
|
||||
STRIP:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip
|
||||
RSTRIP:= \
|
||||
NM="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)nm" \
|
||||
STRIP="$(STRIP)" \
|
||||
STRIP_KMOD="$(STRIP) --strip-debug" \
|
||||
$(SCRIPT_DIR)/rstrip.sh
|
||||
NM="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)nm" \
|
||||
STRIP="$(STRIP)" \
|
||||
STRIP_KMOD="$(STRIP) --strip-debug" \
|
||||
$(SCRIPT_DIR)/rstrip.sh
|
||||
|
||||
|
||||
define Package/gcc
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=gcc
|
||||
MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
|
||||
MAINTAINER:=Noble Pepper <gccmaintain@noblepepper.com>
|
||||
DEPENDS:= +binutils +libstdcpp
|
||||
endef
|
||||
|
||||
@@ -46,11 +44,42 @@ define Package/gcc/description
|
||||
build a native toolchain for compiling on target
|
||||
endef
|
||||
|
||||
GMPSRC=gmp-4.3.2
|
||||
|
||||
define Download/gmp
|
||||
URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
|
||||
FILE:=$(GMPSRC).tar.bz2
|
||||
MD5SUM:=dd60683d7057917e34630b4a787932e8
|
||||
endef
|
||||
$(eval $(call Download,gmp))
|
||||
|
||||
MPCSRC=mpc-0.8.1
|
||||
|
||||
define Download/mpc
|
||||
URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
|
||||
FILE:=$(MPCSRC).tar.gz
|
||||
MD5SUM:=5b34aa804d514cc295414a963aedb6bf
|
||||
endef
|
||||
$(eval $(call Download,mpc))
|
||||
|
||||
MPFRSRC=mpfr-2.4.2
|
||||
|
||||
define Download/mpfr
|
||||
URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/
|
||||
FILE:=$(MPFRSRC).tar.bz2
|
||||
MD5SUM:=89e59fe665e2b3ad44a6789f40b059a0
|
||||
endef
|
||||
$(eval $(call Download,mpfr))
|
||||
|
||||
define Build/Prepare
|
||||
$(PKG_UNPACK)
|
||||
# we have to download additional stuff before patching
|
||||
(cd $(PKG_BUILD_DIR) && ./contrib/download_prerequisites)
|
||||
# we have to download and unpack additional stuff before patching
|
||||
tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(GMPSRC).tar.bz2
|
||||
ln -sf $(PKG_BUILD_DIR)/$(GMPSRC) $(PKG_BUILD_DIR)/gmp
|
||||
tar -C $(PKG_BUILD_DIR) -xvzf $(DL_DIR)/$(MPCSRC).tar.gz
|
||||
ln -sf $(PKG_BUILD_DIR)/$(MPCSRC) $(PKG_BUILD_DIR)/mpc
|
||||
tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(MPFRSRC).tar.bz2
|
||||
ln -sf $(PKG_BUILD_DIR)/$(MPFRSRC) $(PKG_BUILD_DIR)/mpfr
|
||||
$(Build/Patch)
|
||||
# poor man's fix for `none-openwrt-linux' not recognized when building with musl
|
||||
cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/
|
||||
@@ -72,10 +101,14 @@ define Build/Configure
|
||||
--with-bugurl=$(BUGURL) \
|
||||
--with-pkgversion="$(PKGVERSION)" \
|
||||
--enable-shared \
|
||||
--disable-__cxa_atexit \
|
||||
$(if $(CONFIG_LIBC_USE_GLIBC),--enable,--disable)-__cxa_atexit \
|
||||
--with-default-libstdcxx-abi=gcc4-compatible \
|
||||
--enable-target-optspace \
|
||||
--with-gnu-ld \
|
||||
--disable-nls \
|
||||
--disable-libsanitizer \
|
||||
--disable-libvtv \
|
||||
--disable-libcilkrts \
|
||||
--disable-libmudflap \
|
||||
--disable-multilib \
|
||||
--disable-libgomp \
|
||||
@@ -86,10 +119,9 @@ define Build/Configure
|
||||
--with-host-libstdcxx=-lstdc++ \
|
||||
--prefix=/usr \
|
||||
--libexecdir=/usr/lib \
|
||||
--with-local-prefix=/usr \
|
||||
$(SOFT_FLOAT_CONFIG_OPTION) \
|
||||
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
|
||||
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \
|
||||
--with-abi=$(subst ",,$(CONFIG_MIPS64_ABI))) \
|
||||
);
|
||||
endef
|
||||
|
||||
@@ -98,6 +130,18 @@ define Build/Compile
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install
|
||||
endef
|
||||
|
||||
ENVCFLAGS:="$(TARGET_OPTIMIZATION) $(EXTRA_OPTIMIZATION)
|
||||
ifeq ($(CONFIG_SOFT_FLOAT),y)
|
||||
ifeq ($(CONFIG_arm),y)
|
||||
ENVCFLAGS+= -mfloat-abi=soft
|
||||
else
|
||||
ENVCFLAGS+= -msoft-float
|
||||
endif
|
||||
endif
|
||||
ENVCFLAGS+="
|
||||
|
||||
ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib"
|
||||
|
||||
define Package/gcc/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
||||
cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr
|
||||
@@ -108,11 +152,16 @@ define Package/gcc/install
|
||||
ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc
|
||||
ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION)
|
||||
cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib
|
||||
$(RM) $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/*.a
|
||||
cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
||||
cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr
|
||||
cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
||||
cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
||||
grep "GROUP.*-lgcc" $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc_s.so && cp -a $(PKG_INSTALL_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/ ; true
|
||||
cp -a $(TOOLCHAIN_DIR)/lib/libm.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
||||
rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo*
|
||||
rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1*
|
||||
echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh
|
||||
echo 'export LDFLAGS=$(ENVLDFLAGS)' >> $(1)/usr/bin/gcc_env.sh
|
||||
echo 'export CFLAGS=$(ENVCFLAGS)' >> $(1)/usr/bin/gcc_env.sh
|
||||
chmod +x $(1)/usr/bin/gcc_env.sh
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,gcc))
|
||||
|
||||
Reference in New Issue
Block a user