+*) 2006-10-03
+
+- updated toolchain
+- new Config file
+
*) 2006-06-19
- added hdlmaker package (somehow not nice ...)
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.16.91.0.1
+# [V] 2.17
# [S] 0-1 0-4 0-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/
if [ "$priority" = "1" ] ; then
confopt="$confopt --disable-nls"
- # use host system tools
- hdw_arch_prefix="" ; hdw_cflags=""
- . ./scripts/optimization
- unset CFLAGS
libpath="$prefix/lib"
fi
if [ "$priority" = "4" ] ; then
custmain=1
custmain() {
- # install binutils linking against new libc
- cd $root/tmp/src.binutils/binutils-build
- make -C ld install
- cd -
- rm -rf $root/tmp/src.binutils
+ # install the ld linking against new libc
+ mv -v $bindir/{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
# show new linker to gcc
SPECFILE="`gcc --print-file specs`" &&
-e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \
$SPECFILE > tempspecfile
mv tempspecfile $SPECFILE
+
+ INCDIR="`dirname $SPECFILE`/include"
unset SPECFILE
- rm -f $prefix/lib/gcc-lib/*/*/include/pthread.h
- rm -f $prefix/lib/gcc-lib/*/*/include/bits/sigthread.h
+
+ # 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
}
post_install() {
- # linkers default library path (where our glibc will go)
+ # build ld-new with changed linkers default library search path
+ # (glibc will go there)
make -C ld clean
make -C ld LIB_PATH=$libpath
- # __very__ ___ugly___
- # store binutils tree to reinstall after glibc build
- cd $root && mkdir -p tmp
- rm -rf tmp/src.binutils && mv src.binutils tmp/
+ cp -v ld/ld-new $bindir
}
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 3.4.4
+# [V] 4.1.1
# [S] 0-1 0-4
-# [D] gcc-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/
extraver="-$ver"
confopt="$confopt --enable-shared --with-local-prefix=$prefix"
confopt="$confopt --libexecdir=$prefix/lib"
-unset CFLAGS
-
if [ "$priority" = "1" ] ; then
confopt="$confopt --enable-languages=c --disable-nls"
- # use host system tools
- hdw_arch_prefix="" ; hdw_cflags=""
- . ./scripts/optimization
- unset CFLAGS
-
post_install() {
ln -sf gcc $prefix/bin/cc
}
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.3.5
+# [V] 2.4
# [S] 0-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/
## [D] glibc.tar.bz2 cvs:anoncvs:sources.redhat.com:cvs/glibc:libc
kernver=`grep '^#\ \[V\]' $confdir/../linux/linux | awk '{ print $3 }'`
#
# author: hackbard@hackdaworld.dyndns.org
#
-# [V] 2.6.16.19
+# [V] 2.6.18
# [S] 0-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/
skip=1
-s_reason="i think thats obsolete now ..."
+s_reason="obsolete, there is a linux libc headers package now."
build_main() {
# care for crossbuild
# this script is used to build hdw-linux packages.
#
-hdw_status=""
+stage=""
package=""
no_src_del=""
priority=""
while [ "$1" ] ; do
case "$1" in
- -stage) hdw_status=$2 ; shift 2 ;;
+ -stage) stage=$2 ; shift 2 ;;
-package) package=$2 ; shift 2 ;;
-no_src_del) no_src_del="1" ; shift 1 ;;
-priority) priority=$2 ; shift 2 ;;
exit 1
fi
-if [ -z "$hdw_status" ]; then
+if [ -z "$stage" ]; then
echo "stage level not specified. something went wrong ... hey,"
echo "this is a development version ;)"
exit 1
export priority
# load config andsubroutines
-. ./scripts/Config -stage $hdw_status
+. ./scripts/Config -stage $stage
. ./scripts/subroutines
# optimization
. ./scripts/optimization
# check for dietlibc
-if [ "$hdw_status" != "1" -a "$hdw_use_dietlibc" = "1" ] ; then
+if [ "$stage" != "1" -a "$hdw_use_dietlibc" = "1" ] ; then
export CC="diet-dyn $CC -nostdinc"
export CXX="diet-dyn $CXX -nostdinc"
fi
make_conf=""; install_conf=""
prefix=""; docdir=""
- if [ "$hdw_status" -lt "2" ] ; then
+ if [ "$stage" -lt "2" ] ; then
# use the symlink as prefix
prefix="/${s1_prefix}"
docdir="$prefix/share/doc/$package"
install_conf="PREFIX=$prefix"
else
- if [ "$hdw_status" = "2" -o "$hdw_status" = "3" ] ; then
+ if [ "$stage" = "2" -o "$stage" = "3" ] ; then
prefix="$root/usr"; docdir="$root/usr/doc/$package"
localstatedir="$root/var"
sysconfdir="$root/etc"
- elif [ "$hdw_status" = "4" ] ; then
+ elif [ "$stage" = "4" ] ; then
prefix="$root/opt/$package"
docdir="$root/opt/$package/doc"
localstatedir="$root/var/opt/$package"
confopt="$confopt --datadir=$prefix/share"
confopt="$confopt --infodir=$prefix/info"
confopt="$confopt --mandir=$prefix/man"
- if [ "$hdw_status" -gt "1" ] ; then
+ if [ "$stage" -gt "1" ] ; then
confopt="$confopt --localstatedir=$localstatedir"
confopt="$confopt --sysconfdir=$sysconfdir"
fi
# flist find variables/command
flist_path="bin/ boot/ etc/ lib/ opt/ sbin/ usr/ var/"
- [ "$hdw_status" -lt "2" ] && flist_path="${flist_path} ${s1_prefix}/"
+ [ "$stage" -lt "2" ] && flist_path="${flist_path} ${s1_prefix}/"
flist_cmd="find \$flist_path \( -cnewer $root/.time_$package -o \
-newer $root/.time_$package \) \( -not -type d -o \
-type d -empty \) -print"
umask 0022
# run ldconfig to, maybe we installed some libs before!
- if [ "$hdw_status" != "1" ] ; then
+ if [ "$stage" != "1" ] ; then
echo "running ldconfig ..."
ldconfig
fi
done
fi
# stage specific patches
- for xtra_patch in `ls $confdir/*.patch.${hdw_status} 2> /dev/null`; do
+ for xtra_patch in `ls $confdir/*.patch.${stage} 2> /dev/null`; do
echo "applying patch $xtra_patch ..."
patch -Nfp1 < $xtra_patch
done
done
fi
# setup scripts
- if [ "$hdw_status" != "1" ] ; then
+ if [ "$stage" != "1" ] ; then
for my_setup in `ls $confdir/*.setup 2> /dev/null`; do
create_setup_scripts $my_setup
done
# let's create the flist
append=""
- [ "$hdw_status" = "0" ] && append=".stage0"
- [ "$hdw_status" = "1" ] && append=".stage1"
+ [ "$stage" = "0" ] && append=".stage0"
+ [ "$stage" = "1" ] && append=".stage1"
append="${append}-${priority}"
export package
export append
- export hdw_status
+ export stage
export priority
awk '\
BEGIN { package=ENVIRON["package"] ; append=ENVIRON["append"] ; \
- stage=ENVIRON["hdw_status"] ; priority=ENVIRON["priority"] } \
+ stage=ENVIRON["stage"] ; priority=ENVIRON["priority"] } \
{ print package ": " $0 } \
END { print package ": " "var/adm/logs/" stage "-" priority "-" \
package ; \
print package ": " "var/adm/flists/" package append }' \
$root/flist.$package > $root/var/adm/flists/${package}${append}
# manually add dependency files, calculated after flist
- if [ "$hdw_status" -ge "3" ] ; then
+ if [ "$stage" -ge "3" ] ; then
echo "${package}: var/adm/deps/build/$package" >> \
$root/var/adm/flists/${package}${append}
echo "${package}: var/adm/deps/run/$package" >> \
# build/runtime dependencies (just libs >= stage 3,
# default is 'hardcoded')
# still in development !!
- if [ "$hdw_status" -ge "3" ] ; then
+ if [ "$stage" -ge "3" ] ; then
# build deps
rm -f $root/var/adm/deps/build/$package
echo -n "calculating build dependencies ... "
alldeps=""
for lib in `grep '\ -l[A-Za-z]' \
- $root/var/adm/logs/${hdw_status}-${priority}-$package.out`; do
+ $root/var/adm/logs/${stage}-${priority}-$package.out`; do
if [ -n "`echo $lib | grep '^-l'`" ] ; then
lib=${lib//-l/lib}
for dep in `grep "/$lib\." \
echo_g "done, `date | awk '{ print $4 }'`"
# make binary tar package
if [ "$hdw_make_package" = "1" -a \
- "$hdw_status" -ge "2" ] ; then
+ "$stage" -ge "2" ] ; then
echo -n "creating binary package ..."
if [ -d binaries/{$hdw_arch}-${hdw_arch_opt}/$package ] ; then
echo -n " (deleting old first)"
#
# hdw-linux Config script
#
-# author: hackbard
+# author: hackbard@hackdaworld.org
#
# script initializing environment
#
-hdw_status=""
+stage=""
while [ "$1" ] ; do
case "$1" in
- -stage) hdw_status="$2" ; shift 2 ;;
+ -stage) stage="$2" ; shift 2 ;;
*) echo
echo "Usage:"
echo
echo " ./scripts/Config -stage <stagelevel>"
- echo ;;
+ echo
+ shift 1 ; exit 1 ;;
esac
done
-if [ -z "$hdw_status" ]; then
- echo "something went wrong. stage needs to be specified."
+if [ -z "$stage" ]; then
+ echo "something went wrong, no stage specified."
exit 1
fi
exit 1
fi
-# define the stage 0/1 prefix to use
-# default "static", though no static linking is done anymore in stage1
-if [ -z "$hdw_stage1_prefix" ] ; then
- s1_prefix="static" # default
-else
- s1_prefix=$hdw_stage1_prefix
-fi
+# define the toolchain name, default: "toolchain"
+[ -z "$hdw_tc_name" ] && hdw_tc_name="toolchain"
# lets see what root is:
root=""
-if [ "$hdw_crossbuild" != "0" -o "$hdw_status" -lt "2" ] ; then
+if [ "$hdw_crossbuild" != "0" -o "$stage" -lt "2" ] ; then
# check for properly configured build directory
if [ -z "$hdw_build_dir" ] ; then
echo "please set hdw_build_dir in ./Config!"
set +h
umask 022
export LC_ALL=POSIX
-[ "$hdw_status" -lt "2" -o "$hdw_crossbuild" != "0" ] && \
- export PATH="$root/${s1_prefix}/bin:$PATH"
+[ "$stage" -lt "2" -o "$hdw_crossbuild" != "0" ] && \
+ export PATH="$root/${hdw_tc_name}/bin:$PATH"
# let's do optimization and care for crossbuilds
#
# --host: system where the created executable runs on.
hdw_arch_host=${hdw_arch_build}
-[ "$hdw_status" != "0" ] && hdw_arch_host=${hdw_arch_target}
+[ "$stage" != "0" -a "$hdw_crossbuild" = "0" ] && \
+ hdw_arch_host=${hdw_arch_target}
# -O flag
# optimization only at stages >= 1
-[ -n "$hdw_opt" ] && hdw_cflags="-O${hdw_opt} $hdw_cflags"
+if [ -n "$hdw_opt" -a "$stage" != "0" ] ; then
+ hdw_cflags="-O${hdw_opt} $hdw_cflags"
+else
+ unset hdw_cflags
+fi
# build tools to use
-# should be the same like host imho, right?
-hdw_arch_prefix="$hdw_arch_host-"
+hdw_arch_prefix=""
+[ "$stage" != "0" ] && hdw_arch_prefix="$hdw_arch_target-"
# print decissions for debugging ...
echo "root variable set to '$root'"
echo "hdw_arch_target variable set to $hdw_arch_target"
echo "hdw_arch_build variable set to $hdw_arch_build"
-echo "hdw_arch_host variable ste to $hdw_arch_host"
-echo "hdw_arch_prefix variable set to $hdw_arch_prefix"
-echo "hdw_cflags variable set to $hdw_cflags"
-[ "$hdw_status" = "1" ] && echo "hdw_stage1_prefix set to '$s1_prefix'"
+echo "hdw_arch_host variable set to $hdw_arch_host"
+echo "hdw_arch_prefix variable set to '$hdw_arch_prefix'"
+echo "hdw_cflags variable set to '$hdw_cflags'"
+echo "hdw_tc_name set to '$hdw_tc_name'"
# lets see what we are going to build
if [ -z $hdw_target ] ; then
# hdw - linux ./scripts/optimization
#
-# author: hackbard@hackdaworld.dyndns.org
+# author: hackbard@hackdaworld.org
#
# this script defines optmization flags
# the tools
export CC="${hdw_arch_prefix}gcc"
-#export CPP="${hdw_arch_prefix}cpp"
export CXX="${hdw_arch_prefix}c++"
+#export CPP="${hdw_arch_prefix}cpp"
#export AS="${hdw_arch_prefix}as"
#export STRIP="${hdw_arch_prefix}strip"
#export LD="${hdw_arch_prefix}ld"
-export GASP="${hdw_arch_prefix}gasp"
+#export GASP="${hdw_arch_prefix}gasp"
#export AR="${hdw_arch_prefix}ar"
#export RANLIB="${hdw_arch_prefix}ranlib"
#export NM="${hdw_arch_prefix}nm"
-export KCC="${hdw_arch_prefix}kcc"
+#export KCC="${hdw_arch_prefix}kcc"
# flags - edit this at own risk
export CFLAGS="${hdw_cflags}"