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

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/dietlibc/dietlibc.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. dietlibc_stage0() {
  23. rm -rf $toolsinc
  24. cp -rv include $toolsinc
  25. }
  26. dietlibc_main() {
  27. if [ $toolsdir = tools.cross ] ; then
  28. rm -rf $toolsbin; mkdir -p $toolsbin
  29. for x in gcc as ld ar ranlib nm ; do
  30. cat > $toolsbin/${arch_target}-$x << EOT
  31. #!/bin/sh
  32. PATH=\${PATH/\$(dirname \$( type -p \$0 ))/}; PATH=\${PATH/::/:}
  33. exec ${pkg_dietlibc_orig_target}-$x
  34. EOT
  35. chmod +x $toolsbin/${arch_target}-$x
  36. done
  37. fi
  38. if [ "$crossnative" = native ] ; then
  39. eval "$MAKE $makeopt"
  40. if [ $toolsdir = tools.cross ] ; then
  41. cp -v bin-*/diet-i $toolsbin/diet || true
  42. cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
  43. fi
  44. eval "$MAKE $makeinstopt"
  45. else
  46. mkdir bin-$cpu ; ln -s bin-$cpu "bin-${CC%%-*}"
  47. eval "$MAKE $makeopt"
  48. if [ $toolsdir = tools.cross ] ; then
  49. cp -v bin-*/diet-i $toolsbin/diet || true
  50. cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
  51. fi
  52. eval "$MAKE $makeopt ARCH=$cpu CROSS=$archprefix"
  53. eval "$MAKE $makeinstopt ARCH=$cpu MYARCH=$cpu"
  54. fi
  55. if [ -d $root/$prefix/dietlibc/lib-ppc ] ; then
  56. rm -vf $root/$prefix/dietlibc/lib-powerpc
  57. ln -vs lib-ppc $root/$prefix/dietlibc/lib-powerpc
  58. fi
  59. }
  60. if [ "$prefix" = "usr" -o "$prefix" = "usr/local" ] ; then
  61. makeinstopt="$makeinstopt prefix=/$prefix/dietlibc"
  62. makeinstopt="$makeinstopt BINDIR=/$prefix/bin"
  63. makeinstopt="$makeinstopt MAN1DIR=/$prefix/man/man1"
  64. makeopt="$makeopt prefix=/$prefix/dietlibc CC=gcc all"
  65. else
  66. makeinstopt="$makeinstopt prefix=/$prefix"
  67. makeopt="$makeopt prefix=/$prefix CC=gcc all"
  68. fi
  69. makeinstopt="$makeinstopt DESTDIR=$root"
  70. toolsbin=$base/build/$ROCKCFG_ID/$toolsdir/diet-bin
  71. toolsinc=$base/build/$ROCKCFG_ID/$toolsdir/diet-include
  72. if [ "$arch" = arm -o "$arch" = x86 ] ; then
  73. makeopt="$makeopt dyn"
  74. fi
  75. cpu=`echo "$arch" | sed -e s/x86/i386/ -e s/powerpc/ppc/`
  76. if [ "$stagelevel" -eq 0 ]; then
  77. custmain="dietlibc_stage0"
  78. else
  79. custmain="dietlibc_main"
  80. fi