0001-configure-Remove-Check-C-compiler-type-optimization-.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. From 0f5e1658c05746b17f05a1bade263cad19b37e79 Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@openwide.fr>
  3. Date: Thu, 22 Jan 2015 15:20:25 +0100
  4. Subject: [PATCH 1/6] configure: Remove "Check C compiler type (optimization
  5. options)"
  6. This test force optimization to -O3
  7. while it is already set in CFLAGS
  8. Signed-off-by: Romain Naour <romain.naour@openwide.fr>
  9. ---
  10. unix/configure | 98 ----------------------------------------------------------
  11. 1 file changed, 98 deletions(-)
  12. diff --git a/unix/configure b/unix/configure
  13. index 73ba803..4185fee 100644
  14. --- a/unix/configure
  15. +++ b/unix/configure
  16. @@ -22,108 +22,10 @@ LFLAGS1=''
  17. LFLAGS2=''
  18. LN="ln -s"
  19. -CFLAGS_OPT=''
  20. -
  21. # bzip2
  22. IZ_BZIP2=${3-}
  23. CFLAGS_BZ=''
  24. -
  25. -echo 'Check C compiler type (optimization options)'
  26. -# Sun C?
  27. -cat > conftest.c << _EOF_
  28. -int main()
  29. -{
  30. -#ifndef __SUNPRO_C
  31. - bad code
  32. -#endif
  33. - return 0;
  34. -}
  35. -_EOF_
  36. -$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
  37. -if test $? -eq 0; then
  38. - CFLAGS_OPT='-xO3'
  39. - echo " Sun C ($CFLAGS_OPT)"
  40. -else
  41. - # Tru64 DEC/Compaq/HP C?
  42. - cat > conftest.c << _EOF_
  43. -int main()
  44. -{
  45. -#ifndef __DECC
  46. - bad code
  47. -#endif
  48. - return 0;
  49. -}
  50. -_EOF_
  51. - $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
  52. - if test $? -eq 0; then
  53. - CFLAGS_OPT='-O3'
  54. - echo " DEC C ($CFLAGS_OPT)"
  55. - else
  56. - # HP-UX HP C?
  57. - cat > conftest.c << _EOF_
  58. -int main()
  59. -{
  60. -#ifdef __GNUC__
  61. - bad code
  62. -#endif
  63. -#ifndef __hpux
  64. - bad code
  65. -#endif
  66. - return 0;
  67. -}
  68. -_EOF_
  69. - $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
  70. - if test $? -eq 0; then
  71. - # HP-UX, not GCC. Lame bundled or real ANSI compiler?
  72. - CFLAGS_OPT_TRY="+O3 +Onolimit"
  73. - $CC $CFLAGS $CFLAGS_OPT_TRY -c conftest.c 2>&1 | \
  74. - grep '(Bundled)' > /dev/null
  75. - if test $? -ne 0; then
  76. - CFLAGS_OPT="$CFLAGS_OPT_TRY"
  77. - echo " HP-UX ANSI C ($CFLAGS_OPT)"
  78. - else
  79. - echo ' HP-UX Bundled C (no opt)'
  80. - fi
  81. - else
  82. - # GNU C?
  83. - cat > conftest.c << _EOF_
  84. -int main()
  85. -{
  86. -#ifndef __GNUC__
  87. - bad code
  88. -#endif
  89. - return 0;
  90. -}
  91. -_EOF_
  92. - $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
  93. - if test $? -eq 0; then
  94. - CFLAGS_OPT='-O3'
  95. - echo " GNU C ($CFLAGS_OPT)"
  96. - # Special Mac OS X shared library "ld" option?
  97. - if test ` uname -s 2> /dev/null ` = 'Darwin'; then
  98. - lf='-Wl,-search_paths_first'
  99. - $CC $CFLAGS $lf conftest.c > /dev/null 2>/dev/null
  100. - if test $? -eq 0; then
  101. - LFLAGS2="${LFLAGS2} ${lf}"
  102. - fi
  103. - rm -f conftest
  104. - fi
  105. - else
  106. - CFLAGS_OPT='-O'
  107. - echo " Other-unknown C ($CFLAGS_OPT)"
  108. - fi
  109. - fi
  110. - fi
  111. -fi
  112. -
  113. -# optimization flags
  114. -if test -n "${CFLAGS_OPT}"; then
  115. - CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
  116. - CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
  117. -fi
  118. -
  119. -
  120. # bzip2
  121. echo "Check bzip2 support"
  122. --
  123. 1.9.3