+*) 2006-10-15
+
+- toolchain modifications
+
*) 2006-10-03
- updated toolchain
custmain() {
# Create directory stage1 prefix ...
-mkdir -p $root/${s1_prefix}
+mkdir -p $root/${tc_name}
# Create directory bin ...
mkdir -p $root/bin
# Create directory boot ...
if [ "$hdw_status" = "1" ] ; then
custmain() {
for i in bash pwd cat stty; do
- ln -sf ../$s1_prefix/bin/$i $root/bin/$i
+ ln -sf ../$tc_name/bin/$i $root/bin/$i
done
ln -sf bash $root/bin/sh
- ln -sf ../../$s1_prefix/bin/perl $root/usr/bin/perl
+ ln -sf ../../$tc_name/bin/perl $root/usr/bin/perl
}
else
custmain() {
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.16.91.0.1
+# [V] 2.17
# [S] 2-4 2-5
-# [D] binutils-2.16.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/
+# [D] binutils-2.17.tar.bz2 http://ftp.gnu.org/gnu/binutils/
libpath="/usr/lib:/lib"
if [ "$priority" = "4" ] ; then
- flist_path="$flist_path ${s1_prefix}/"
+ flist_path="$flist_path ${tc_name}/"
flist_pruned="$flist_pruned|specs"
custmain=1
custmain() {
- # install binutils linking against new libc
- cd $root/tmp/src.binutils/binutils-build
- make -C ld INSTALL=/${s1_prefix}/bin/install install
- cd -
- rm -rf $root/tmp/src.binutils
+ install ld linking against new libc
+ mv -v /${tc_name}/bin/{ld,ld-old}
+ mv -v /${tc_name}/`gcc -dumpmachine`/bin/{ld,ld-old}
+ mv -v /${tc_name}/bin/{ld-new,ld}
+ ln -sv /${tc_name}/bin/ld /tools/`gcc -dumpmachine`/bin/ld
# show new linker to gcc
- cr="" ; [ "$hdw_crossbuild" != "0" ] && cr=/${s1_prefix}
- SPECFILE="`gcc --print-file specs`"
- sed -e "s@ /${s1_prefix}/lib/ld-linux.so.2@ $cr/lib/ld-linux.so.2@g" \
- -e "s@ /${s1_prefix}/lib/ld.so.1@ $cr/lib/ld.so.1@g" \
- $SPECFILE > tempspecfile
- mv tempspecfile $SPECFILE
+ SPECFILE="`gcc --print-libgcc-file-name`"
+ SPECFILE="`dirname $SPECFILE`/specs"
+ gcc -dumpspecs | \
+ sed -e "s@ /${tc_name}/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g" \
+ -e "s@ /${tc_name}/lib/ld.so.1@ /lib/ld.so.1@g" \
+ -e "s@\*startfile_prefix_spec:@& /usr/lib@g" > $SPECFILE
+
+ INCDIR="`dirname $SPECFILE`/include"
unset SPECFILE
+
+ # remove fixed includes from gcc's private include dir
+ find $INCDIR/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
+ rm -vf `grep -l "DO NOT EDIT THIS FILE" $INCDIR/*`
+ unset INCDIR
}
fi
if [ "$priority" = "5" ] ; then
- confopt="$confopt --enable-shared --disable-nls"
+ confopt="$confopt --enable-shared" # no --disable-nls
make_conf="tooldir=$root/usr"
install_conf="tooldir=$root/usr"
post_install() {
- cp ../binutils-$ver/include/libiberty.h \
- $prefix/include
+ cp -v ../binutils-$ver/include/libiberty.h $prefix/include
}
build_main() {
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 3.4.4
+# [V] 4.1.1
# [S] 2-5
-# [D] gcc-3.4.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.4.4/
-# [D] gcc-g++-3.4.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.4.4/
-# [D] gcc-g77-3.4.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.4.4/
+# [D] gcc-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
+# [D] gcc-g++-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
+# [D] gcc-g77-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
extraver="-${ver}"
[ "$ver" = "cvs" ] && extraver=""
echo "extracting c++ and fortran sources ..."
tar --use-compress-program=$compress -xvf $archdir/gcc-g++-$ver.tar.bz2
tar --use-compress-program=$compress -xvf $archdir/gcc-g77-$ver.tar.bz2
- echo "patching source (libiberty) ..."
- mv ./libiberty/Makefile.in ./tmp~
- sed 's%install_to_$(INSTALL_DEST) %%' ./tmp~ > ./libiberty/Makefile.in
+
+ echo "patching Makefile (libiberty) ..."
+ sed 's%install_to_$(INSTALL_DEST) %%' libiberty/Makefile.in > tmp~
+ mv tmp~ libiberty/Makefile.in
+
+ echo "patching Makefile (gcc) ..."
+ sed -e 's@^XCFLAGS =$@& -fomit-frame-pointer@' \
+ -e 's@\./fixincl\.sh@-c true@' gcc/Makefile.in > tmp~
+ mv tmp~ gcc/Makefile.in
+
+ echo "patching gccbug ..."
+ sed 's/@have_mktemp_command@/yes/' gcc/gccbug.in > tmp~
+ mv tmp~ gcc/gccbug.in
}
post_install() {
+++ /dev/null
---- ./gcc/Makefile.in.orig 2004-06-30 15:35:15.000000000 +0200
-+++ ./gcc/Makefile.in 2004-06-30 15:36:23.000000000 +0200
-@@ -2341,10 +2341,6 @@
- rm -f include/limits.h
- cp xlimits.h include/limits.h
- chmod a+r include/limits.h
--# Install the README
-- rm -f include/README
-- cp $(srcdir)/README-fixinc include/README
-- chmod a+r include/README
- $(STAMP) $@
-
- # fixinc.sh depends on this, not on specs directly.
-@@ -2386,7 +2382,6 @@
- (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
- SHELL='$(SHELL)' ;\
- export TARGET_MACHINE srcdir SHELL ; \
-- $(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
- rm -f include/syslimits.h; \
- if [ -f include/limits.h ]; then \
- mv include/limits.h include/syslimits.h; \
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.3.5
+# [V] 2.3.6
# [S] 2-3
-# [D] glibc-2.3.5.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
-# [D] glibc-linuxthreads-2.3.5.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
+# [D] glibc-2.3.6.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
+# [D] glibc-linuxthreads-2.3.6.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
kernver=`grep '^#\ \[V\]' $confdir/../linux/linux | awk '{ print $3 }'`
kernver=`echo $kernver | awk -F. '{ print $1 "." $2 }'`
[ ! -f $root/etc/ld.so.conf ] && touch $root/etc/ld.so.conf
[ ! -c $root/dev/null ] && mknod -m 0666 $root/dev/null c 1 3
echo "done (file creating)"
+
+ echo "patching ..."
+ sed 's/vi_VN.TCVN/d' localedata/SUPPORTED > tmp~
+ mv tmp~ localedata/SUPPORTED
+ echo "patching install test (warning, might not work for every arch)"
+ sed -e \
+ 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
+ scripts/test-installation.pl > tmp~
+ mv tmp~ scripts/test-installation.pl
}
build_main() {
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.6.16.19
+# [V] 2.6.18
# [S] 2-2
-# [D] linux-2.6.16.19.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/
+# [D] linux-2.6.18.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/
custmain="1"
custmain() {
install_conf="udevdir=/dev EXTRAS=$extras"
u_root=$root
-[ "$hdw_status" = "1" ] && u_root=/${s1_prefix}
+[ "$hdw_status" = "1" ] && u_root=/${tc_name}
if [ "$hdw_status" = "1" ] ; then
make_conf="prefix=$prefix etcdir=$prefix/etc $make_conf"
if [ "$priority" = "4" ] ; then
custmain=1
custmain() {
- # install the ld linking against new libc
- mv -v $bindir/{ld,ld-old}
+ # install the ld linking against toolchain libc
+ mv -v $prefix/bin/{ld,ld-old}
mv -v $prefix/`gcc -dumpmachine`/bin/{ld,ld-old}
- mv -v $bindir/{ld-new,ld}
- ln -sfv $bindir/ld $prefix/`gcc -dumpmachine`/bin/ld
+ mv -v $prefix/bin/{ld-new,ld}
+ ln -sfv $prefix/bin/ld $prefix/`gcc -dumpmachine`/bin/ld
# show new linker to gcc
- SPECFILE="`gcc --print-file specs`" &&
+ SPECFILE="`gcc -print-libgcc-file-name`"
+ SPECFILE="`dirname $SPECFILE`/specs"
+ gcc -dumpspecs |
sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \
- -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \
- $SPECFILE > tempspecfile
- mv tempspecfile $SPECFILE
+ -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" > \
+ $SPECFILE
INCDIR="`dirname $SPECFILE`/include"
unset SPECFILE
fi
if [ "$priority" = "5" ] ; then
- confopt="$confopt --enable-shared --with-lib-path=$prefix/lib"
+ confopt="$confopt --disable-nls --with-lib-path=$prefix/lib"
if [ "$hdw_crossbuild" = "0" ] ; then
libpath="/usr/lib:/lib"
else
# (glibc will go there)
make -C ld clean
make -C ld LIB_PATH=$libpath
- cp -v ld/ld-new $bindir
+ cp -v ld/ld-new $prefix/bin
}
confopt="$confopt --enable-languages=c --disable-nls"
post_install() {
- ln -sf gcc $prefix/bin/cc
+ ln -vsf gcc $prefix/bin/cc
}
fi
make_conf=""
pre_install() {
+ # no fix includes
+ echo "patching (no fixincludes)"
+ sed -e 's@\./fixinc\.sh@-c true@' \
+ -e 's@^XCFLAGS =$@/& -fomit-frame-pointer@' \
+ gcc/Makefile.in > tmp~
+ mv tmp~ gcc/Makefile.in
+
+ # specs
echo "patching gcc specs now"
for i in gcc/config/*/{pa-,}linux*.h; do
echo "patching $i ..."
echo "patching gcc/config/linux.h ..."
echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h
echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h
- # no fix includes
- [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \
- patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch
}
fi
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.4
+# [V] 2.3.6
# [S] 0-3
# [D] glibc-2.3.6.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
# [D] glibc-linuxthreads-2.3.6.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
fi
if [ -z "$stage" ]; then
- echo "stage level not specified. something went wrong ... hey,"
- echo "this is a development version ;)"
+ echo "no stage level specified, abort."
exit 1
fi
prefix=""; docdir=""
if [ "$stage" -lt "2" ] ; then
# use the symlink as prefix
- prefix="/${s1_prefix}"
+ prefix="/${tc_name}"
docdir="$prefix/share/doc/$package"
install_conf="PREFIX=$prefix"
else
# flist find variables/command
flist_path="bin/ boot/ etc/ lib/ opt/ sbin/ usr/ var/"
- [ "$stage" -lt "2" ] && flist_path="${flist_path} ${s1_prefix}/"
+ [ "$stage" -lt "2" ] && flist_path="${flist_path} ${tc_name}/"
flist_cmd="find \$flist_path \( -cnewer $root/.time_$package -o \
-newer $root/.time_$package \) \( -not -type d -o \
-type d -empty \) -print"
grep -v '^ldd'`; do
for rpkg in `grep $rdep -r \
$root/var/adm/flists | \
- grep -v $s1_prefix | \
+ grep -v $tc_name | \
awk -F: '{ print $2 }'`; do
add=1
for cmp in $alldeps; do
grep -v '^ldd'`; do
for rpkg in `grep $rdep -r \
$root/var/adm/flists | \
- grep -v $s1_prefix | \
+ grep -v $tc_name | \
awk -F: '{ print $2 }'`; do
add=1
for cmp in $alldeps; do
[ ! -d ${hdw_build_dir}/var/adm/deps ] && \
mkdir -p ${hdw_build_dir}/var/adm/deps/{run,build}
# symlinking the stage 0/1 prefix to hostsystem root
- if [ -d /$s1_prefix ]; then
- if [ ! -L /$s1_prefix ]; then
+ if [ -d /$tc_name ]; then
+ if [ ! -L /$tc_name ]; then
echo_r "WARNING: "
- echo_w "move /$s1_prefix to /${s1_prefix}_old"
- mv /$s1_prefix /${s1_prefix}_old
+ echo_w "move /$tc_name to /${tc_name}_old"
+ mv /$tc_name /${tc_name}_old
fi
fi
- ln -sf $hdw_build_dir/$s1_prefix /
+ ln -sf $hdw_build_dir/$tc_name /
fi
# build according buildorder
echo_c "preparing chroot commands ..."
cat > $root/chroot.sh <<- EOT
# PATH
-export PATH="\$PATH:/${s1_prefix}/bin:/${s1_prefix}/sbin"
+export PATH="\$PATH:/${tc_name}/bin:/${tc_name}/sbin"
# create essential device nodes
mknod -m 600 /dev/console c 5 1
mknod -m 666 /dev/null c 1 3
mount -t devpts devpts $root/dev/pts
echo_w "entering chroot and start building now ..."
echo
- chroot $hdw_build_dir /${s1_prefix}/bin/env PS1='\u@\w\$ ' \
+ chroot $hdw_build_dir /${tc_name}/bin/env PS1='\u@\w\$ ' \
PATH="/bin:/usr/bin:/sbin:/usr/sbin" HOME=/root \
- /${s1_prefix}/bin/bash --login +h /chroot.sh
+ /${tc_name}/bin/bash --login +h /chroot.sh
if [ ! "$?" = "0" ]; then
echo_r "something failed in the chroot, aborting."
exit 1
priority="x"
dir=""
+
+
if [ -z "$1" ] ; then
echo "usage: $0 <package> [-stage <stagelevel 3|4>]"
exit 1
# define the toolchain name, default: "toolchain"
[ -z "$hdw_tc_name" ] && hdw_tc_name="toolchain"
+export tc_name=$hdw_tc_name
# lets see what root is:
root=""