mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

93 lines
2.8 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/dietlibc/dietlibc.conf
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
dietlibc_stage0() {
rm -rf $toolsinc
cp -rv include $toolsinc
}
dietlibc_main() {
if [ $toolsdir = tools.cross ] ; then
rm -rf $toolsbin; mkdir -p $toolsbin
for x in gcc as ld ar ranlib nm ; do
cat > $toolsbin/${arch_target}-$x << EOT
#!/bin/sh
PATH=\${PATH/\$(dirname \$( type -p \$0 ))/}; PATH=\${PATH/::/:}
exec ${pkg_dietlibc_orig_target}-$x
EOT
chmod +x $toolsbin/${arch_target}-$x
done
fi
if [ "$crossnative" = native ] ; then
eval "$MAKE $makeopt"
if [ $toolsdir = tools.cross ] ; then
cp -v bin-*/diet-i $toolsbin/diet || true
cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
fi
eval "$MAKE $makeinstopt"
else
mkdir bin-$cpu ; ln -s bin-$cpu "bin-${CC%%-*}"
eval "$MAKE $makeopt"
if [ $toolsdir = tools.cross ] ; then
cp -v bin-*/diet-i $toolsbin/diet || true
cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
fi
eval "$MAKE $makeopt ARCH=$cpu CROSS=$archprefix"
eval "$MAKE $makeinstopt ARCH=$cpu MYARCH=$cpu"
fi
if [ -d $root/$prefix/dietlibc/lib-ppc ] ; then
rm -vf $root/$prefix/dietlibc/lib-powerpc
ln -vs lib-ppc $root/$prefix/dietlibc/lib-powerpc
fi
}
if [ "$prefix" = "usr" -o "$prefix" = "usr/local" ] ; then
makeinstopt="$makeinstopt prefix=/$prefix/dietlibc"
makeinstopt="$makeinstopt BINDIR=/$prefix/bin"
makeinstopt="$makeinstopt MAN1DIR=/$prefix/man/man1"
makeopt="$makeopt prefix=/$prefix/dietlibc CC=gcc all"
else
makeinstopt="$makeinstopt prefix=/$prefix"
makeopt="$makeopt prefix=/$prefix CC=gcc all"
fi
makeinstopt="$makeinstopt DESTDIR=$root"
toolsbin=$base/build/$ROCKCFG_ID/$toolsdir/diet-bin
toolsinc=$base/build/$ROCKCFG_ID/$toolsdir/diet-include
if [ "$arch" = arm -o "$arch" = x86 ] ; then
makeopt="$makeopt dyn"
fi
cpu=`echo "$arch" | sed -e s/x86/i386/ -e s/powerpc/ppc/`
if [ "$stagelevel" -eq 0 ]; then
custmain="dietlibc_stage0"
else
custmain="dietlibc_main"
fi