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.

102 lines
3.3 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 CC='$CC --specs=specs'"
  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 CC='$CC --specs=specs'"
  51. else
  52. mkdir bin-$cpu ; ln -s bin-$cpu "bin-${CC%%-*}"
  53. eval "$MAKE $makeopt CC=$HOSTCC"
  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. # in the dietlibc Makefile, $CROSS is prepended to $CC
  59. eval "$MAKE ARCH=$cpu $makeopt CROSS=$archprefix CC='gcc --specs=specs'"
  60. eval "$MAKE ARCH=$cpu $makeinstopt"
  61. fi
  62. if [ -d $root/$prefix/dietlibc/lib-ppc ] ; then
  63. rm -vf $root/$prefix/dietlibc/lib-powerpc
  64. ln -vs lib-ppc $root/$prefix/dietlibc/lib-powerpc
  65. fi
  66. }
  67. if [ "$prefix" = "usr" -o "$prefix" = "usr/local" ] ; then
  68. makeinstopt="$makeinstopt prefix=/$prefix/dietlibc"
  69. makeinstopt="$makeinstopt BINDIR=/$prefix/bin"
  70. makeinstopt="$makeinstopt MAN1DIR=/$prefix/man/man1"
  71. makeopt="$makeopt prefix=/$prefix/dietlibc all"
  72. else
  73. makeinstopt="$makeinstopt prefix=/$prefix"
  74. makeopt="$makeopt prefix=/$prefix all"
  75. fi
  76. cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ -e s/powerpc/ppc/`"
  77. var_append makeinstopt " " "DESTDIR=$root"
  78. var_insert patchfiles ' ' "$archdir/sparc64-softfpu-dietlibc0.25-1.0.diff.bz2"
  79. toolsbin=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-bin
  80. toolsinc=$base/build/$ROCKCFG_ID/ROCK/$toolsdir/diet-include
  81. if [ "$cpu" = arm -o "$cpu" = i386 ] ; then
  82. var_append makeopt " " "dyn"
  83. fi
  84. if [ "$stagelevel" -eq 0 ]; then
  85. custmain="dietlibc_stage0"
  86. else
  87. custmain="dietlibc_main"
  88. fi