config.guess.uclibc.patch 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. Index: config.guess
  2. ===================================================================
  3. RCS file: /cvsroot/config/config/config.guess,v
  4. retrieving revision 1.366
  5. diff -u -r1.366 config.guess
  6. --- config.guess 17 May 2007 06:28:53 -0000 1.366
  7. +++ config.guess 9 Jul 2007 17:32:18 -0000
  8. @@ -139,6 +139,23 @@
  9. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  10. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  11. +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
  12. + eval $set_cc_for_build
  13. + cat << EOF > $dummy.c
  14. + #include <features.h>
  15. + #ifdef __UCLIBC__
  16. + # ifdef __UCLIBC_CONFIG_VERSION__
  17. + LIBC=uclibc __UCLIBC_CONFIG_VERSION__
  18. + # else
  19. + LIBC=uclibc
  20. + # endif
  21. + #else
  22. + LIBC=gnu
  23. + #endif
  24. +EOF
  25. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
  26. +fi
  27. +
  28. # Note: order is significant - the case branches are not exclusive.
  29. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  30. @@ -833,28 +850,28 @@
  31. echo ${UNAME_MACHINE}-pc-minix
  32. exit ;;
  33. arm*:Linux:*:*)
  34. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  35. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  36. exit ;;
  37. avr32*:Linux:*:*)
  38. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  39. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  40. exit ;;
  41. cris:Linux:*:*)
  42. - echo cris-axis-linux-gnu
  43. + echo cris-axis-linux-${LIBC}
  44. exit ;;
  45. crisv32:Linux:*:*)
  46. - echo crisv32-axis-linux-gnu
  47. + echo crisv32-axis-linux-${LIBC}
  48. exit ;;
  49. frv:Linux:*:*)
  50. - echo frv-unknown-linux-gnu
  51. + echo frv-unknown-linux-${LIBC}
  52. exit ;;
  53. ia64:Linux:*:*)
  54. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  55. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  56. exit ;;
  57. m32r*:Linux:*:*)
  58. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  59. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  60. exit ;;
  61. m68*:Linux:*:*)
  62. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  63. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  64. exit ;;
  65. mips:Linux:*:*)
  66. eval $set_cc_for_build
  67. @@ -877,7 +894,7 @@
  68. s: ::g
  69. p
  70. }'`"
  71. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  72. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  73. ;;
  74. mips64:Linux:*:*)
  75. eval $set_cc_for_build
  76. @@ -900,16 +917,16 @@
  77. s: ::g
  78. p
  79. }'`"
  80. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  81. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  82. ;;
  83. or32:Linux:*:*)
  84. - echo or32-unknown-linux-gnu
  85. + echo or32-unknown-linux-${LIBC}
  86. exit ;;
  87. ppc:Linux:*:*)
  88. - echo powerpc-unknown-linux-gnu
  89. + echo powerpc-unknown-linux-${LIBC}
  90. exit ;;
  91. ppc64:Linux:*:*)
  92. - echo powerpc64-unknown-linux-gnu
  93. + echo powerpc64-unknown-linux-${LIBC}
  94. exit ;;
  95. alpha:Linux:*:*)
  96. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  97. @@ -922,40 +939,40 @@
  98. EV68*) UNAME_MACHINE=alphaev68 ;;
  99. esac
  100. objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  101. - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  102. - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  103. + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  104. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  105. exit ;;
  106. parisc:Linux:*:* | hppa:Linux:*:*)
  107. # Look for CPU level
  108. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  109. - PA7*) echo hppa1.1-unknown-linux-gnu ;;
  110. - PA8*) echo hppa2.0-unknown-linux-gnu ;;
  111. - *) echo hppa-unknown-linux-gnu ;;
  112. + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  113. + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  114. + *) echo hppa-unknown-linux-${LIBC} ;;
  115. esac
  116. exit ;;
  117. parisc64:Linux:*:* | hppa64:Linux:*:*)
  118. - echo hppa64-unknown-linux-gnu
  119. + echo hppa64-unknown-linux-${LIBC}
  120. exit ;;
  121. s390:Linux:*:* | s390x:Linux:*:*)
  122. echo ${UNAME_MACHINE}-ibm-linux
  123. exit ;;
  124. sh64*:Linux:*:*)
  125. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  126. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  127. exit ;;
  128. sh*:Linux:*:*)
  129. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  130. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  131. exit ;;
  132. sparc:Linux:*:* | sparc64:Linux:*:*)
  133. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  134. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  135. exit ;;
  136. vax:Linux:*:*)
  137. - echo ${UNAME_MACHINE}-dec-linux-gnu
  138. + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  139. exit ;;
  140. x86_64:Linux:*:*)
  141. - echo x86_64-unknown-linux-gnu
  142. + echo x86_64-unknown-linux-${LIBC}
  143. exit ;;
  144. xtensa:Linux:*:*)
  145. - echo xtensa-unknown-linux-gnu
  146. + echo xtensa-unknown-linux-${LIBC}
  147. exit ;;
  148. i*86:Linux:*:*)
  149. # The BFD linker knows what the default object file format is, so
  150. @@ -970,20 +987,22 @@
  151. p'`
  152. case "$ld_supported_targets" in
  153. elf32-i386)
  154. - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  155. + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
  156. ;;
  157. a.out-i386-linux)
  158. - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  159. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
  160. exit ;;
  161. coff-i386)
  162. - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
  163. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
  164. exit ;;
  165. "")
  166. # Either a pre-BFD a.out linker (linux-gnuoldld) or
  167. # one that does not give us useful --help.
  168. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  169. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
  170. exit ;;
  171. esac
  172. + # This should get integrated into the C code below, but now we hack
  173. + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
  174. # Determine whether the default compiler is a.out or elf
  175. eval $set_cc_for_build
  176. sed 's/^ //' << EOF >$dummy.c