@ -9,33 +9,45 @@
# for instance mpfr, mpc and gmp development packages!
# for instance mpfr, mpc and gmp development packages!
#
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := gcc
PKG_NAME := gcc
PKG_VERSION := linaro-4.6-2013.05
PKG_VERSION := 4.6.3
PKG_RELEASE := 1
PKG_RELEASE := 1
PKG_SOURCE_URL := https://releases.linaro.org/13.05/components/toolchain/gcc-linaro/4.6/
PKG_SOURCE := gcc-$( PKG_VERSION) .tar.bz2
PKG_MD5SUM := 26b48802ae1203cd99415026fbf56ed7
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 := 773092fe5194353b02bb0110052a972e
PKG_INSTALL := 1
PKG_FIXUP := libtool
PKG_BUILD_PARALLEL := 1
PKG_BUILD_PARALLEL := 1
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
SEP := ,
SEP := ,
TARGET_LANGUAGES := " c $( if $( CONFIG_INSTALL_LIBSTDCPP) ,$( SEP) c++) $( if $( CONFIG_INSTALL_LIBGCJ) ,$( SEP) java) "
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)
d e f i n e P a c k a g e / g c c
d e f i n e P a c k a g e / g c c
SECTION:= devel
SECTION:= devel
CATEGORY:= Development
CATEGORY:= Development
TITLE:= gcc
TITLE:= gcc
MAINTAINER:= Christian Beier <cb@shoutrlabs.com>
MAINTAINER:= Christian Beier <cb@shoutrlabs.com>
DEPENDS:= +binutils
DEPENDS:= +binutils +libstdcpp
e n d e f
e n d e f
d e f i n e P a c k a g e / g c c / d e s c r i p t i o n
d e f i n e P a c k a g e / g c c / d e s c r i p t i o n
build a native toolchain for compiling on target
build a native toolchain for compiling on target
e n d e f
e n d e f
STRIP := $( STAGING_DIR_HOST) /bin/sstrip
RSTRIP := \
NM = " $( TARGET_CROSS) nm " \
STRIP = " $( STRIP) --strip-debug " \
STRIP_KMOD = " $( TARGET_CROSS) strip --strip-debug " \
$( SCRIPT_DIR) /rstrip.sh
d e f i n e B u i l d / P r e p a r e
d e f i n e B u i l d / P r e p a r e
$( PKG_UNPACK)
$( PKG_UNPACK)
# we have to download additional stuff before patching
# we have to download additional stuff before patching
@ -52,7 +64,11 @@ define Build/Configure
$( TARGET_CONFIGURE_OPTS) \
$( TARGET_CONFIGURE_OPTS) \
$( PKG_BUILD_DIR) /configure \
$( PKG_BUILD_DIR) /configure \
$( CONFIGURE_ARGS) \
$( CONFIGURE_ARGS) \
--build= $( GNU_HOST_NAME) \
--host= $( REAL_GNU_TARGET_NAME) \
--target= $( REAL_GNU_TARGET_NAME) \
--enable-languages= $( TARGET_LANGUAGES) \
--enable-languages= $( TARGET_LANGUAGES) \
--enable-shared \
--disable-__cxa_atexit \
--disable-__cxa_atexit \
--enable-target-optspace \
--enable-target-optspace \
--with-gnu-ld \
--with-gnu-ld \
@ -61,10 +77,12 @@ define Build/Configure
--disable-multilib \
--disable-multilib \
--disable-libgomp \
--disable-libgomp \
--disable-libquadmath \
--disable-libquadmath \
--disable-libssp \
--disable-decimal-float \
--disable-decimal-float \
--with-host-libstdcxx= -lstdc++ \
--disable-libstdcxx-pch \
--disable-libstdcxx-pch \
$( EXTRA_TARGET) \
--with-host-libstdcxx= -lstdc++ \
--prefix= /usr \
--libexecdir= /usr/lib \
$( SOFT_FLOAT_CONFIG_OPTION) \
$( SOFT_FLOAT_CONFIG_OPTION) \
$( call qstrip,$( CONFIG_EXTRA_GCC_CONFIG_OPTIONS) ) \
$( call qstrip,$( CONFIG_EXTRA_GCC_CONFIG_OPTIONS) ) \
$( if $( CONFIG_mips64) $( CONFIG_mips64el) ,--with-arch= mips64 \
$( if $( CONFIG_mips64) $( CONFIG_mips64el) ,--with-arch= mips64 \
@ -75,24 +93,22 @@ endef
d e f i n e B u i l d / C o m p i l e
d e f i n e B u i l d / C o m p i l e
export SHELL = " $( BASH) " ; $( MAKE_VARS) $( MAKE) -C $( PKG_BUILD_DIR) \
export SHELL = " $( BASH) " ; $( MAKE_VARS) $( MAKE) -C $( PKG_BUILD_DIR) \
DESTDIR = " $( PKG_INSTALL_DIR) " $( MAKE_ARGS) all install
DESTDIR = " $( PKG_INSTALL_DIR) " $( MAKE_ARGS) all install
# Set up the symlinks to enable lying about target name.
set -e; \
( cd $( TOOLCHAIN_DIR) ; \
ln -sf $( REAL_GNU_TARGET_NAME) $( GNU_TARGET_NAME) ; \
cd bin; \
for app in $( REAL_GNU_TARGET_NAME) -* ; do \
ln -sf $$ $$ { app} \
$( GNU_TARGET_NAME) $$ $$ { app##$( REAL_GNU_TARGET_NAME) } ; \
done ; \
) ;
e n d e f
e n d e f
d e f i n e P a c k a g e / g c c / i n s t a l l
d e f i n e P a c k a g e / g c c / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib/
cp -r $( PKG_INSTALL_DIR) /* $( 1)
cp -r $( TOOLCHAIN_DIR) /include $( 1) /usr/
cp $( TOOLCHAIN_DIR) /lib/crt* $( 1) /usr/lib/
cp $( TOOLCHAIN_DIR) /lib/libc.so $( 1) /usr/lib/
$( 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
cp -a $( PKG_INSTALL_DIR) /usr/bin/{ $( REAL_GNU_TARGET_NAME) -{ g++,gcc} ,cpp,gcov} $( 1) /usr/bin
ln -s $( REAL_GNU_TARGET_NAME) -g++ $( 1) /usr/bin/c++
ln -s $( REAL_GNU_TARGET_NAME) -g++ $( 1) /usr/bin/g++
ln -s $( REAL_GNU_TARGET_NAME) -g++ $( 1) /usr/bin/$( REAL_GNU_TARGET_NAME) -c++
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 -a $( TOOLCHAIN_DIR) /lib/*.{ o,so*} $( 1) /usr/lib/$( PKG_NAME) /$( REAL_GNU_TARGET_NAME) /$( PKG_VERSION)
cp -a $( TOOLCHAIN_DIR) /lib/uclibc_nonshared.a $( 1) /usr/lib/$( PKG_NAME) /$( REAL_GNU_TARGET_NAME) /$( PKG_VERSION)
e n d e f
e n d e f
$( eval $ ( call BuildPackage ,gcc ) )
$( eval $ ( call BuildPackage ,gcc ) )