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.

181 lines
4.4 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. # thread support
  48. if [ "$SDECFG_PKG_UCLIBC_THREADSUPPORT" != "none" ]; then
  49. echo "X UCLIBC_HAS_THREADS"
  50. # choose the thread implementation
  51. case "$SDECFG_PKG_UCLIBC_THREADSUPPORT" in
  52. old) echo "X LINUXTHREADS_OLD" ;;
  53. new) echo "X LINUXTHREADS_NEW" ;;
  54. esac
  55. else
  56. echo "X HAS_NO_THREADS"
  57. fi
  58. # SuSv3 legacy support
  59. if [ "$SDECFG_PKG_UCLIBC_SUSV3_LEGACY" = "1" ]; then
  60. echo "X UCLIBC_SUSV3_LEGACY"
  61. fi
  62. # SuSv4 legacy support
  63. if [ "$SDECFG_PKG_UCLIBC_SUSV4_LEGACY" = "1" ]; then
  64. echo "X UCLIBC_SUSV4_LEGACY"
  65. fi
  66. # libresolv support
  67. echo "X UCLIBC_HAS_LIBRESOLV_STUB"
  68. # provide libutil library
  69. # forkpty(), login(), login_tty(), logout(), logwtmp(), openpty()
  70. echo "X UCLIBC_HAS_LIBUTIL"
  71. # locale
  72. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  73. echo "X UCLIBC_HAS_LOCALE"
  74. fi
  75. # turning off locale will break ncurses
  76. # util-linux needs it to build some mounts
  77. # FIXME: this has to be done in the oposite way (disable those mounts
  78. # if libc doesn't have support)
  79. echo "X UCLIBC_HAS_RPC"
  80. echo "X UCLIBC_HAS_FULL_RPC"
  81. # to get rint (iproute2)
  82. echo "X DO_C99_MATH"
  83. # to make reiserfsprogs happy
  84. echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF"
  85. # to make sed happy
  86. echo "X UCLIBC_HAS_WCHAR"
  87. # I want V6
  88. echo "X UCLIBC_HAS_IPV6"
  89. # needed for attr
  90. echo "X UCLIBC_HAS_FTW"
  91. # needed for mdadm
  92. echo "X UCLIBC_HAS_NFTW"
  93. # needed for acl (among others)
  94. echo "X UCLIBC_HAS_GETTEXT_AWARENESS"
  95. # make make happy :)
  96. echo "X MALLOC_GLIBC_COMPAT"
  97. echo "X UCLIBC_HAS_GNU_GETOPT"
  98. echo "X UCLIBC_HAS_GLOB"
  99. # make our ldconfig patch happy :-/
  100. echo "X UCLIBC_HAS_GNU_GLOB"
  101. echo "X UCLIBC_HAS_FLOATS"
  102. }
  103. runconf=0
  104. hook_add premake 5 "uclibc_config"
  105. uclibc_config() {
  106. # generate default config rules
  107. default_config > $builddir/.config
  108. eval $MAKE TARGET_ARCH=$uC_arch ARCH=$uC_arch defconfig
  109. conffiles_loop 2 TARGET_ARCH=$uC_arch ARCH=$uC_arch
  110. }
  111. var_remove_regex makeopt ' ' 'prefix=[^ ]*'
  112. if atstage toolchain; then
  113. var_append makeopt ' ' PREFIX=$base/build/$SDECFG_ID
  114. else
  115. var_append makeopt ' ' "PREFIX=$root"
  116. fi
  117. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  118. hook_add premake 3 'uclibc_locale'
  119. uclibc_locale() {
  120. find "$PWD/extra/locale/charmaps" -name "*.pairs" > "$PWD/extra/locale/codesets.txt"
  121. eval $MAKE -C extra/locale
  122. }
  123. fi
  124. makeinstopt="$makeopt -j 1"
  125. var_append makeopt ' ' "CROSS=${archprefix}"
  126. if atstage toolchain; then
  127. var_append makeopt ' ' "headers"
  128. var_append makeinstopt ' ' "install_headers"
  129. else
  130. var_append makeopt ' ' "pregen"
  131. var_append makeopt ' ' "all"
  132. var_append makeopt ' ' "utils"
  133. var_append makeinstopt ' ' "install_headers"
  134. var_append makeinstopt ' ' "install"
  135. var_append makeinstopt ' ' "install_utils"
  136. fi
  137. # inject kernel symlinks
  138. hook_add preconf 5 'uclibc_kernellinks'
  139. uclibc_kernellinks() {
  140. local x=
  141. for x in $( ls -1d $root/usr/include/{asm,asm-*,scsi,linux} 2> /dev/null ); do
  142. rm -rvf "include/${x##*/}"
  143. ln -svf $x include/
  144. done
  145. }
  146. hook_add postdoc 5 'cp -vf .config $root/$docdir/'