|
@@ -9,33 +9,45 @@
|
9
|
9
|
# for instance mpfr, mpc and gmp development packages!
|
10
|
10
|
#
|
11
|
11
|
include $(TOPDIR)/rules.mk
|
|
12
|
+
|
12
|
13
|
PKG_NAME:=gcc
|
13
|
|
-PKG_VERSION:=linaro-4.6-2013.05
|
|
14
|
+PKG_VERSION:=4.6.3
|
14
|
15
|
PKG_RELEASE:=1
|
15
|
|
-PKG_SOURCE_URL:=https://releases.linaro.org/13.05/components/toolchain/gcc-linaro/4.6/
|
16
|
|
-PKG_SOURCE:=gcc-$(PKG_VERSION).tar.bz2
|
17
|
|
-PKG_MD5SUM:=26b48802ae1203cd99415026fbf56ed7
|
|
16
|
+PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \
|
|
17
|
+ http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \
|
|
18
|
+ ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
|
18
|
19
|
|
|
20
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
21
|
+PKG_MD5SUM:=773092fe5194353b02bb0110052a972e
|
|
22
|
+PKG_INSTALL:=1
|
|
23
|
+PKG_FIXUP:=libtool
|
19
|
24
|
PKG_BUILD_PARALLEL:=1
|
20
|
25
|
|
21
|
26
|
include $(INCLUDE_DIR)/package.mk
|
22
|
27
|
|
23
|
28
|
SEP:=,
|
24
|
29
|
TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)"
|
25
|
|
-EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
|
26
|
30
|
|
27
|
31
|
define Package/gcc
|
28
|
32
|
SECTION:=devel
|
29
|
33
|
CATEGORY:=Development
|
30
|
34
|
TITLE:=gcc
|
31
|
35
|
MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
|
32
|
|
- DEPENDS:= +binutils
|
|
36
|
+ DEPENDS:= +binutils +libstdcpp
|
33
|
37
|
endef
|
34
|
38
|
|
35
|
39
|
define Package/gcc/description
|
36
|
40
|
build a native toolchain for compiling on target
|
37
|
41
|
endef
|
38
|
42
|
|
|
43
|
+STRIP:=$(STAGING_DIR_HOST)/bin/sstrip
|
|
44
|
+RSTRIP:= \
|
|
45
|
+ NM="$(TARGET_CROSS)nm" \
|
|
46
|
+ STRIP="$(STRIP) --strip-debug" \
|
|
47
|
+ STRIP_KMOD="$(TARGET_CROSS)strip --strip-debug" \
|
|
48
|
+ $(SCRIPT_DIR)/rstrip.sh
|
|
49
|
+
|
|
50
|
+
|
39
|
51
|
define Build/Prepare
|
40
|
52
|
$(PKG_UNPACK)
|
41
|
53
|
# we have to download additional stuff before patching
|
|
@@ -52,7 +64,11 @@ define Build/Configure
|
52
|
64
|
$(TARGET_CONFIGURE_OPTS) \
|
53
|
65
|
$(PKG_BUILD_DIR)/configure \
|
54
|
66
|
$(CONFIGURE_ARGS) \
|
|
67
|
+ --build=$(GNU_HOST_NAME) \
|
|
68
|
+ --host=$(REAL_GNU_TARGET_NAME) \
|
|
69
|
+ --target=$(REAL_GNU_TARGET_NAME) \
|
55
|
70
|
--enable-languages=$(TARGET_LANGUAGES) \
|
|
71
|
+ --enable-shared \
|
56
|
72
|
--disable-__cxa_atexit \
|
57
|
73
|
--enable-target-optspace \
|
58
|
74
|
--with-gnu-ld \
|
|
@@ -61,10 +77,12 @@ define Build/Configure
|
61
|
77
|
--disable-multilib \
|
62
|
78
|
--disable-libgomp \
|
63
|
79
|
--disable-libquadmath \
|
|
80
|
+ --disable-libssp \
|
64
|
81
|
--disable-decimal-float \
|
65
|
|
- --with-host-libstdcxx=-lstdc++ \
|
66
|
82
|
--disable-libstdcxx-pch \
|
67
|
|
- $(EXTRA_TARGET) \
|
|
83
|
+ --with-host-libstdcxx=-lstdc++ \
|
|
84
|
+ --prefix=/usr \
|
|
85
|
+ --libexecdir=/usr/lib \
|
68
|
86
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
69
|
87
|
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
|
70
|
88
|
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \
|
|
@@ -75,24 +93,22 @@ endef
|
75
|
93
|
define Build/Compile
|
76
|
94
|
export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
|
77
|
95
|
DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install
|
78
|
|
- # Set up the symlinks to enable lying about target name.
|
79
|
|
- set -e; \
|
80
|
|
- (cd $(TOOLCHAIN_DIR); \
|
81
|
|
- ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
|
82
|
|
- cd bin; \
|
83
|
|
- for app in $(REAL_GNU_TARGET_NAME)-* ; do \
|
84
|
|
- ln -sf $$$${app} \
|
85
|
|
- $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \
|
86
|
|
- done; \
|
87
|
|
- );
|
88
|
96
|
endef
|
89
|
97
|
|
90
|
98
|
define Package/gcc/install
|
91
|
|
- $(INSTALL_DIR) $(1)/usr/lib/
|
92
|
|
- cp -r $(PKG_INSTALL_DIR)/* $(1)
|
93
|
|
- cp -r $(TOOLCHAIN_DIR)/include $(1)/usr/
|
94
|
|
- cp $(TOOLCHAIN_DIR)/lib/crt* $(1)/usr/lib/
|
95
|
|
- cp $(TOOLCHAIN_DIR)/lib/libc.so $(1)/usr/lib/
|
|
99
|
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
|
100
|
+ cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr
|
|
101
|
+ cp -a $(PKG_INSTALL_DIR)/usr/bin/{$(REAL_GNU_TARGET_NAME)-{g++,gcc},cpp,gcov} $(1)/usr/bin
|
|
102
|
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/c++
|
|
103
|
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/g++
|
|
104
|
+ ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++
|
|
105
|
+ ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc
|
|
106
|
+ ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION)
|
|
107
|
+ cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib
|
|
108
|
+ $(RM) $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/*.a
|
|
109
|
+ cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
|
110
|
+ cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
|
111
|
+ cp -a $(TOOLCHAIN_DIR)/lib/uclibc_nonshared.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
|
96
|
112
|
endef
|
97
|
113
|
|
98
|
114
|
$(eval $(call BuildPackage,gcc))
|