OpenSDE Packages Database (without history before r20070)
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.

149 lines
3.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/uclibc.conf
  5. # Copyright (C) 2006 - 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. . $confdir/conffiles-functions.in
  16. # generated set
  17. var_append conffiles ' ' $builddir/.config
  18. # add custom/target configuration from $targetdir
  19. if [ -e $targetdir/uclibc.config ] ; then
  20. var_append conffiles ' ' $targetdir/uclibc.config
  21. fi
  22. uC_arch=$( echo $arch | arch2uname | sed -e 's/ppc/powerpc/' )
  23. default_config() {
  24. echo "X TARGET_$uC_arch"
  25. if [ "$arch_bigendian" = "yes" ]; then
  26. echo "X ARCH_BIG_ENDIAN"
  27. else
  28. echo "X ARCH_LITTLE_ENDIAN"
  29. fi
  30. echo "X CROSS_COMPILER_PREFIX \"${archprefix}\""
  31. # PREFIX
  32. if atstage toolchain; then
  33. echo "X KERNEL_SOURCE \"$base/build/$SDECFG_ID/usr\""
  34. else
  35. echo "X KERNEL_SOURCE \"$root/usr\""
  36. fi
  37. echo "X RUNTIME_PREFIX \"/\""
  38. echo "X DEVEL_PREFIX \"/usr\""
  39. if [ "$SDECFG_STATIC" = 0 ]; then
  40. echo "X SHARED_LIB_LOADER_PREFIX \"/lib\""
  41. # ld.so preload
  42. echo "X LDSO_PRELOAD_FILE_SUPPORT"
  43. echo "X HAVE_SHARED"
  44. else
  45. echo "O HAVE_SHARED"
  46. fi
  47. # locale
  48. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  49. echo "X UCLIBC_HAS_LOCALE"
  50. fi
  51. # turning off locale will break ncurses
  52. # util-linux needs it to build some mounts
  53. # FIXME: this has to be done in the oposite way (disable those mounts
  54. # if libc doesn't have support)
  55. echo "X UCLIBC_HAS_RPC"
  56. echo "X UCLIBC_HAS_FULL_RPC"
  57. # to get rint (iproute2)
  58. echo "X DO_C99_MATH"
  59. # to make reiserfsprogs happy
  60. echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF"
  61. # to make sed happy
  62. echo "X UCLIBC_HAS_WCHAR"
  63. # I want V6
  64. echo "X UCLIBC_HAS_IPV6"
  65. # needed for attr
  66. echo "X UCLIBC_HAS_FTW"
  67. # needed for acl (among others)
  68. echo "X UCLIBC_HAS_GETTEXT_AWARENESS"
  69. # make make happy :)
  70. echo "X MALLOC_GLIBC_COMPAT"
  71. echo "X UCLIBC_HAS_GNU_GETOPT"
  72. echo "X UCLIBC_HAS_GLOB"
  73. # make our ldconfig patch happy :-/
  74. echo "X UCLIBC_HAS_GNU_GLOB"
  75. echo "X UCLIBC_HAS_FLOATS"
  76. }
  77. runconf=0
  78. hook_add premake 5 "uclibc_config"
  79. uclibc_config() {
  80. # generate default config rules
  81. default_config > $builddir/.config
  82. eval $MAKE TARGET_ARCH=$uC_arch ARCH=$uC_arch defconfig
  83. conffiles_loop 2 TARGET_ARCH=$uC_arch ARCH=$uC_arch
  84. }
  85. var_remove_regex makeopt ' ' 'prefix=[^ ]*'
  86. if atstage toolchain; then
  87. var_append makeopt ' ' PREFIX=$base/build/$SDECFG_ID
  88. else
  89. var_append makeopt ' ' "PREFIX=$root"
  90. fi
  91. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  92. hook_add premake 3 'uclibc_locale'
  93. uclibc_locale() {
  94. find "$PWD/extra/locale/charmaps" -name "*.pairs" > "$PWD/extra/locale/codesets.txt"
  95. eval $MAKE -C extra/locale
  96. }
  97. fi
  98. makeinstopt="$makeopt -j 1"
  99. var_append makeopt ' ' "CROSS=${archprefix}"
  100. if atstage toolchain; then
  101. var_append makeopt ' ' "headers"
  102. var_append makeinstopt ' ' "install_headers"
  103. else
  104. var_append makeopt ' ' "pregen"
  105. var_append makeopt ' ' "all"
  106. var_append makeopt ' ' "utils"
  107. var_append makeinstopt ' ' "install_headers"
  108. var_append makeinstopt ' ' "install"
  109. var_append makeinstopt ' ' "install_utils"
  110. fi
  111. # inject kernel symlinks
  112. hook_add preconf 5 'uclibc_kernellinks'
  113. uclibc_kernellinks() {
  114. local x=
  115. for x in $( ls -1d $root/usr/include/{asm,asm-*,scsi,linux} 2> /dev/null ); do
  116. rm -rvf "include/${x##*/}"
  117. ln -svf $x include/
  118. done
  119. }
  120. hook_add postdoc 5 'cp -vf .config $root/$docdir/'