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.

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