# --- 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 - 2005 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 https://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 # special features if ! [ "$ROCKCFG_DIETWANT_SYSENTER" = "1" ]; then sed -i "s,^#define WANT_SYSENTER$,/*\0*/," dietfeatures.h fi if [ $arch = "powerpc" ] ; then ln -s bin-ppc bin-powerpc fi # build package if [ "$crossnative" = native ] ; then # dietlibc uses uname - so we always need to set MYARCH eval "$MAKE MYARCH=$cpu $makeopt CC='$CC --specs=specs'" if [ $toolsdir = tools.cross ] ; then cp -v `ls bin-*/diet-i | head -n 1` $toolsbin/diet || true cp -v `ls bin-*/diet-dyn-i | head -n 1` $toolsbin/diet-dyn || true fi eval "$MAKE MYARCH=$cpu $makeinstopt CC='$CC --specs=specs'" else mkdir bin-$cpu ; ln -s bin-$cpu "bin-${CC%%-*}" eval "$MAKE $makeopt CC=$HOSTCC" if [ $toolsdir = tools.cross ] ; then cp -v `ls bin-*/diet-i | head -n 1` $toolsbin/diet || true cp -v `ls bin-*/diet-dyn-i | head -n 1` $toolsbin/diet-dyn || true fi # in the dietlibc Makefile, $CROSS is prepended to $CC eval "$MAKE ARCH=$cpu $makeopt CROSS=$archprefix CC='gcc --specs=specs'" eval "$MAKE ARCH=$cpu $makeinstopt" 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 [ -d $root/$prefix/bin/lib-ppc ] ; then rmdir $root/$prefix/bin/lib-ppc 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 all" else makeinstopt="$makeinstopt prefix=/$prefix" makeopt="$makeopt prefix=/$prefix all" fi cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ -e s/powerpc/ppc/`" var_append makeinstopt " " "DESTDIR=$root" var_insert patchfiles ' ' "$archdir/sparc64-softfpu-dietlibc0.25-1.0.diff.bz2" toolsbin=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-bin toolsinc=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-include if [ "$cpu" = arm -o "$cpu" = i386 ] ; then var_append makeopt " " "dyn" fi if [ "$stagelevel" -eq 0 ]; then custmain="dietlibc_stage0" else custmain="dietlibc_main" fi