config.guess.uclibc.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --- config.guess
  2. +++ config.guess
  3. @@ -140,6 +141,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  4. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  5. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  6. +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
  7. + eval $set_cc_for_build
  8. + cat << EOF > $dummy.c
  9. + #include <features.h>
  10. + #ifdef __UCLIBC__
  11. + # ifdef __UCLIBC_CONFIG_VERSION__
  12. + LIBC=uclibc __UCLIBC_CONFIG_VERSION__
  13. + # else
  14. + LIBC=uclibc
  15. + # endif
  16. + #else
  17. + LIBC=gnu
  18. + #endif
  19. +EOF
  20. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
  21. +fi
  22. +
  23. # Note: order is significant - the case branches are not exclusive.
  24. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  25. @@ -872,33 +890,32 @@ EOF
  26. EV68*) UNAME_MACHINE=alphaev68 ;;
  27. esac
  28. objdump --private-headers /bin/sh | grep -q ld.so.1
  29. - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  30. - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  31. + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  32. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  33. exit ;;
  34. arm*:Linux:*:*)
  35. eval $set_cc_for_build
  36. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  37. | grep -q __ARM_EABI__
  38. then
  39. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  40. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  41. else
  42. echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  43. fi
  44. exit ;;
  45. avr32*:Linux:*:*)
  46. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  47. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  48. exit ;;
  49. cris:Linux:*:*)
  50. - echo cris-axis-linux-gnu
  51. + echo cris-axis-linux-${LIBC}
  52. exit ;;
  53. crisv32:Linux:*:*)
  54. - echo crisv32-axis-linux-gnu
  55. + echo crisv32-axis-linux-${LIBC}
  56. exit ;;
  57. frv:Linux:*:*)
  58. - echo frv-unknown-linux-gnu
  59. + echo frv-unknown-linux-${LIBC}
  60. exit ;;
  61. i*86:Linux:*:*)
  62. - LIBC=gnu
  63. eval $set_cc_for_build
  64. sed 's/^ //' << EOF >$dummy.c
  65. #ifdef __dietlibc__
  66. @@ -909,13 +926,13 @@ EOF
  67. echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  68. exit ;;
  69. ia64:Linux:*:*)
  70. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  71. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  72. exit ;;
  73. m32r*:Linux:*:*)
  74. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  75. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  76. exit ;;
  77. m68*:Linux:*:*)
  78. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  79. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  80. exit ;;
  81. mips:Linux:*:* | mips64:Linux:*:*)
  82. eval $set_cc_for_build
  83. @@ -934,10 +951,10 @@ EOF
  84. #endif
  85. EOF
  86. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  87. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  88. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  89. ;;
  90. or32:Linux:*:*)
  91. - echo or32-unknown-linux-gnu
  92. + echo or32-unknown-linux-${LIBC}
  93. exit ;;
  94. padre:Linux:*:*)
  95. echo sparc-unknown-linux-gnu
  96. @@ -948,40 +965,40 @@ EOF
  97. parisc:Linux:*:* | hppa:Linux:*:*)
  98. # Look for CPU level
  99. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  100. - PA7*) echo hppa1.1-unknown-linux-gnu ;;
  101. - PA8*) echo hppa2.0-unknown-linux-gnu ;;
  102. - *) echo hppa-unknown-linux-gnu ;;
  103. + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  104. + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  105. + *) echo hppa-unknown-linux-${LIBC} ;;
  106. esac
  107. exit ;;
  108. ppc64:Linux:*:*)
  109. - echo powerpc64-unknown-linux-gnu
  110. + echo powerpc64-unknown-linux-${LIBC}
  111. exit ;;
  112. ppc:Linux:*:*)
  113. - echo powerpc-unknown-linux-gnu
  114. + echo powerpc-unknown-linux-${LIBC}
  115. exit ;;
  116. s390:Linux:*:* | s390x:Linux:*:*)
  117. echo ${UNAME_MACHINE}-ibm-linux
  118. exit ;;
  119. sh64*:Linux:*:*)
  120. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  121. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  122. exit ;;
  123. sh*:Linux:*:*)
  124. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  125. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  126. exit ;;
  127. sparc:Linux:*:* | sparc64:Linux:*:*)
  128. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  129. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  130. exit ;;
  131. tile*:Linux:*:*)
  132. echo ${UNAME_MACHINE}-tilera-linux-gnu
  133. exit ;;
  134. vax:Linux:*:*)
  135. - echo ${UNAME_MACHINE}-dec-linux-gnu
  136. + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  137. exit ;;
  138. x86_64:Linux:*:*)
  139. - echo x86_64-unknown-linux-gnu
  140. + echo x86_64-unknown-linux-${LIBC}
  141. exit ;;
  142. xtensa*:Linux:*:*)
  143. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  144. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  145. exit ;;
  146. i*86:DYNIX/ptx:4*:*)
  147. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.