GLUED: renamed packages to rules, cfg_dir_packages to cfg_dir_rules.
This commit is contained in:
24
rules/gcc/common.bash
Normal file
24
rules/gcc/common.bash
Normal file
@@ -0,0 +1,24 @@
|
||||
version=\
|
||||
(
|
||||
'4.8.2'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://mirrors.kernel.org/gnu/gcc/gcc-$version/gcc-$version.tar.bz2"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'a3d7d63b9cb6b6ea049469a0c4a43c9d'
|
||||
)
|
||||
|
||||
build_dir=$pkg_var
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$cfg_package_spec_dir/patches-${version}/"*.patch)
|
||||
if [ -n "$patches" ]; then
|
||||
cd "../gcc-$version" && cat $patches | patch -p1
|
||||
fi
|
||||
}
|
62
rules/gcc/cross.bash
Normal file
62
rules/gcc/cross.bash
Normal file
@@ -0,0 +1,62 @@
|
||||
source $pkg_common
|
||||
|
||||
requires=\
|
||||
(
|
||||
'eglibc/cross'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
MAKEINFO='/bin/true' \
|
||||
"../gcc-$version/configure" $cfg_target_gcc_configure_flags \
|
||||
--target="$cfg_target_canonical" \
|
||||
--prefix="$cfg_dir_toolchain" \
|
||||
--with-sysroot="$cfg_dir_toolchain_sysroot" \
|
||||
--with-mpfr="$cfg_dir_toolchain" \
|
||||
--with-gmp="$cfg_dir_toolchain" \
|
||||
--with-mpc="$cfg_dir_toolchain" \
|
||||
--enable-__cxa_atexit \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libmudflap \
|
||||
--disable-nls \
|
||||
--disable-multilib \
|
||||
--enable-languages=c,c++
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install &&
|
||||
|
||||
cp -d \
|
||||
"$cfg_dir_toolchain/$cfg_target_canonical/lib/"libgcc_s.so* \
|
||||
"$cfg_dir_toolchain_sysroot/lib" &&
|
||||
cp -d \
|
||||
"$cfg_dir_toolchain/$cfg_target_canonical/lib/"libstdc++.so* \
|
||||
"$cfg_dir_toolchain_sysroot/usr/lib"
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"$cfg_dir_rootfs/usr/lib" &&
|
||||
|
||||
for f in "$cfg_dir_toolchain/$cfg_target_canonical/lib/"{libgcc_s,libstdc++}.so*; do
|
||||
base="$(basename $f)"
|
||||
|
||||
if [ $(echo "$base" | grep '\.py' 2> /dev/null) ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -L "$f" ]; then
|
||||
cp -vd "$f" "$cfg_dir_rootfs/usr/lib/$base"
|
||||
elif [ -f "$f" ]; then
|
||||
$cmd_target_strip -v --strip-unneeded -o "$cfg_dir_rootfs/usr/lib/$base" "$f"
|
||||
fi
|
||||
done
|
||||
}
|
48
rules/gcc/cross_stage1.bash
Normal file
48
rules/gcc/cross_stage1.bash
Normal file
@@ -0,0 +1,48 @@
|
||||
source $pkg_common
|
||||
|
||||
requires=\
|
||||
(
|
||||
'binutils/cross'
|
||||
'autoconf/host'
|
||||
'mpfr/host'
|
||||
'gmp/host'
|
||||
'mpc/host'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
MAKEINFO='/bin/true' \
|
||||
"../gcc-$version/configure" $cfg_target_gcc_configure_flags \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_host_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--prefix="$cfg_dir_toolchain" \
|
||||
--with-mpfr="$cfg_dir_toolchain" \
|
||||
--with-gmp="$cfg_dir_toolchain" \
|
||||
--with-mpc="$cfg_dir_toolchain" \
|
||||
--without-headers \
|
||||
--disable-shared \
|
||||
--disable-threads \
|
||||
--disable-libatomic \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libmudflap \
|
||||
--disable-libquadmath \
|
||||
--disable-multilib \
|
||||
--with-newlib \
|
||||
--enable-poison-system-directories \
|
||||
--enable-target-optspace \
|
||||
--enable-languages=c \
|
||||
--disable-decimal-float \
|
||||
--disable-nls
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
38
rules/gcc/cross_stage2.bash
Normal file
38
rules/gcc/cross_stage2.bash
Normal file
@@ -0,0 +1,38 @@
|
||||
source $pkg_common
|
||||
|
||||
requires=\
|
||||
(
|
||||
'eglibc/headers'
|
||||
)
|
||||
|
||||
configure()
|
||||
{
|
||||
MAKEINFO='/bin/true' \
|
||||
"../gcc-$version/configure" $cfg_target_gcc_configure_flags \
|
||||
--prefix="$cfg_dir_toolchain" \
|
||||
--with-sysroot="$cfg_dir_toolchain_sysroot" \
|
||||
--target="$cfg_target_canonical" \
|
||||
--host="$cfg_host_canonical" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--with-mpfr="$cfg_dir_toolchain" \
|
||||
--with-gmp="$cfg_dir_toolchain" \
|
||||
--with-mpc="$cfg_dir_toolchain" \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libmudflap \
|
||||
--disable-libquadmath \
|
||||
--disable-libatomic \
|
||||
--enable-languages=c \
|
||||
--disable-multilib \
|
||||
--disable-nls
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install
|
||||
}
|
11
rules/gcc/patches-4.6.3/00-libjava-i786.patch
Normal file
11
rules/gcc/patches-4.6.3/00-libjava-i786.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.6.3/libjava/configure.host 2010-12-06 00:50:04.000000000 +0000
|
||||
+++ gcc-4.6.3.rasm/libjava/configure.host 2012-10-30 20:29:06.192935517 +0000
|
||||
@@ -115,7 +115,7 @@
|
||||
mips*-*)
|
||||
libgcj_interpreter=yes
|
||||
;;
|
||||
- i686-*|i586-*|i486-*|i386-*)
|
||||
+ i786-*|i686-*|i586-*|i486-*|i386-*)
|
||||
sysdeps_dir=i386
|
||||
# With -fomit-frame-pointer -maccumulate-outgoing-args (implied),
|
||||
# the .text section of libgcj.so is 30k larger, and the .eh_frame
|
14
rules/gcc/patches-4.6.3/01-lib64-to-lib.patch
Normal file
14
rules/gcc/patches-4.6.3/01-lib64-to-lib.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff -Nru gcc-4.6.3/gcc/config/i386/t-linux64 gcc-4.6.3.rasm/gcc/config/i386/t-linux64
|
||||
--- gcc-4.6.3/gcc/config/i386/t-linux64 2009-04-21 20:03:23.000000000 +0100
|
||||
+++ gcc-4.6.3.rasm/gcc/config/i386/t-linux64 2012-12-11 19:01:42.549964639 +0000
|
||||
@@ -24,8 +24,8 @@
|
||||
# MULTILIB_OSDIRNAMES according to what is found on the target.
|
||||
|
||||
MULTILIB_OPTIONS = m64/m32
|
||||
-MULTILIB_DIRNAMES = 64 32
|
||||
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
|
||||
+MULTILIB_DIRNAMES = 64 32
|
||||
+MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
|
||||
|
||||
LIBGCC = stmp-multilib
|
||||
INSTALL_LIBGCC = install-multilib
|
Reference in New Issue
Block a user