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.

101 lines
3.1 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 - 2004 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. # special features
  39. if ! [ "$ROCKCFG_DIETWANT_SYSENTER" = "1" ]; then
  40. sed -i "s,^#define WANT_SYSENTER$,/*\0*/," dietfeatures.h
  41. fi
  42. # build package
  43. if [ "$crossnative" = native ] ; then
  44. # dietlibc uses uname - so we always need to set MYARCH
  45. eval "$MAKE MYARCH=$cpu $makeopt"
  46. if [ $toolsdir = tools.cross ] ; then
  47. cp -v bin-*/diet-i $toolsbin/diet || true
  48. cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
  49. fi
  50. eval "$MAKE MYARCH=$cpu $makeinstopt"
  51. else
  52. mkdir bin-$cpu ; ln -s bin-$cpu "bin-${CC%%-*}"
  53. eval "$MAKE $makeopt"
  54. if [ $toolsdir = tools.cross ] ; then
  55. cp -v bin-*/diet-i $toolsbin/diet || true
  56. cp -v bin-*/diet-dyn-i $toolsbin/diet-dyn || true
  57. fi
  58. eval "$MAKE ARCH=$cpu $makeopt CROSS=$archprefix"
  59. eval "$MAKE ARCH=$cpu $makeinstopt"
  60. fi
  61. if [ -d $root/$prefix/dietlibc/lib-ppc ] ; then
  62. rm -vf $root/$prefix/dietlibc/lib-powerpc
  63. ln -vs lib-ppc $root/$prefix/dietlibc/lib-powerpc
  64. fi
  65. }
  66. if [ "$prefix" = "usr" -o "$prefix" = "usr/local" ] ; then
  67. makeinstopt="$makeinstopt prefix=/$prefix/dietlibc"
  68. makeinstopt="$makeinstopt BINDIR=/$prefix/bin"
  69. makeinstopt="$makeinstopt MAN1DIR=/$prefix/man/man1"
  70. makeopt="$makeopt prefix=/$prefix/dietlibc CC=gcc all"
  71. else
  72. makeinstopt="$makeinstopt prefix=/$prefix"
  73. makeopt="$makeopt prefix=/$prefix CC=gcc all"
  74. fi
  75. cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ -e s/powerpc/ppc/`"
  76. var_append makeinstopt " " "DESTDIR=$root"
  77. var_insert patchfiles ' ' "$archdir/sparc64-softfpu-dietlibc0.25-1.0.diff.bz2"
  78. toolsbin=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-bin
  79. toolsinc=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-include
  80. if [ "$cpu" = arm -o "$cpu" = i386 ] ; then
  81. var_append makeopt " " "dyn"
  82. fi
  83. if [ "$stagelevel" -eq 0 ]; then
  84. custmain="dietlibc_stage0"
  85. else
  86. custmain="dietlibc_main"
  87. fi