mingw-runtime-3.20-LDBL_MIN_EXP.patch 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3441135&group_id=2435
  2. https://bugs.gentoo.org/395893
  3. ????-??-?? Keith Marshall <keithmarshall@...>
  4. Support pragmatic identification for w32api source directory.
  5. * aclocal.m4 (MINGW_AC_W32API_SRCDIR): New macro; implement it.
  6. * configure.in (W32API_INCLUDE): Assign using MINGW_AC_W32API_SRCDIR.
  7. * Makefile.in (W32API_INCLUDE): Prefix -I flag to AC_SUBST value.
  8. * mingwex/Makefile.in (W32API_INCLUDE): Likewise.
  9. * profile/Makefile.in (W32API_INCLUDE): Likewise.
  10. diff -r 62c176864807 Makefile.in
  11. --- a/Makefile.in Mon Nov 28 11:32:25 2011 +0000
  12. +++ b/Makefile.in Mon Nov 28 21:18:55 2011 +0000
  13. @@ -166,9 +166,9 @@ THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_
  14. # Various libraries.
  15. LIBM_A=@LIBM_A@
  16. -W32API_INCLUDE = @W32API_INCLUDE@
  17. -INCLUDES = -I$(srcdir)/include \
  18. - -I$(srcdir)/../include \
  19. +W32API_INCLUDE = -I @W32API_INCLUDE@
  20. +INCLUDES = -I $(srcdir)/include \
  21. + -I $(srcdir)/../include \
  22. -nostdinc \
  23. -iwithprefixbefore include
  24. ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
  25. diff -r 62c176864807 aclocal.m4
  26. --- a/aclocal.m4 Mon Nov 28 11:32:25 2011 +0000
  27. +++ b/aclocal.m4 Mon Nov 28 21:18:55 2011 +0000
  28. @@ -15,7 +15,65 @@ AC_DEFUN([MINGW_AC_CONFIG_SRCDIR],
  29. AC_MSG_CHECKING([package version])
  30. PACKAGE_VERSION=`awk '$[2] == "'"$1"'" { print $[3] }' ${srcdir}/$2`
  31. AC_MSG_RESULT([$PACKAGE_VERSION])dnl
  32. -]) #MINGW_AC_CONFIG_SRCDIR
  33. +])# MINGW_AC_CONFIG_SRCDIR
  34. +
  35. +# MINGW_AC_W32API_SRCDIR
  36. +# ----------------------
  37. +# Attempt to identify the location of the w32api sources.
  38. +# Accept an explicit location specified by to user, as argument
  39. +# to --with-w32api-srcdir; if unspecified, fall back to standard
  40. +# location relative to ${srcdir}. Identification requires that
  41. +# include/windows.h is present within the nominated directory.
  42. +# This is naive, but AC_CHECK_HEADER cannot be used because
  43. +# the system's w32api headers will interfere.
  44. +#
  45. +AC_DEFUN([MINGW_AC_W32API_SRCDIR],
  46. +[AC_ARG_WITH([w32api-srcdir],
  47. + [AS_HELP_STRING([--with-w32api-srcdir=DIR],
  48. + [locate w32api sources in DIR [SRCDIR/../w32api]])
  49. + ],[],[with_w32api_srcdir=NONE])
  50. + AS_IF([test "x${with_w32api_srcdir}" = xNONE],
  51. + [AC_MSG_CHECKING([include path for w32api headers])
  52. + for with_w32api_srcdir in ${srcdir}/../w32api*; do
  53. + test -f "${with_w32api_srcdir}/include/windows.h" && break
  54. + with_w32api_srcdir=NONE
  55. + done
  56. + AS_IF([test "x${with_w32api_srcdir}" = xNONE],
  57. + [AC_MSG_RESULT([none found])
  58. + AC_MSG_RESULT
  59. + AC_MSG_WARN([source directory containing include/windows.h not found])
  60. + AC_MSG_WARN([ensure w32api sources are installed at \${top_srcdir}/../w32api*])
  61. + AC_MSG_WARN([or use --with-w32api-srcdir=DIR to specify an alternative])
  62. + ],
  63. + [case "${with_w32api_srcdir}" in
  64. + "${srcdir}/"*) with_w32api_srcdir="`echo "${with_w32api_srcdir}"dnl
  65. + | sed s,"^${srcdir}/",'${top_srcdir}/',`" ;;
  66. + esac
  67. + AC_MSG_RESULT([${with_w32api_srcdir}/include])
  68. + ])
  69. + ],
  70. + [AC_MSG_CHECKING([for windows.h in ${with_w32api_srcdir}/include])
  71. + AS_IF([test -f "${with_w32api_srcdir}/include/windows.h"],
  72. + [AC_MSG_RESULT([yes])
  73. + case "${with_w32api_srcdir}" in /*) ;;
  74. + *) with_w32api_srcdir='${top_builddir}/'"${with_w32api_srcdir}" ;;
  75. + esac
  76. + ],
  77. + [AC_MSG_RESULT([no])
  78. + AC_MSG_RESULT
  79. + AC_MSG_WARN([the nominated directory, ${with_w32api_srcdir}])
  80. + AC_MSG_WARN([does not appear to contain valid w32api source code])
  81. + AC_MSG_WARN([(file '${with_w32api_srcdir}/include/windows.h' is not present)])
  82. + with_w32api_srcdir=NONE
  83. + ])
  84. + ])
  85. + AS_IF([test "x${with_w32api_srcdir}" = xNONE],
  86. + [AC_MSG_WARN([please correct this omission and run configure again])
  87. + AC_MSG_RESULT
  88. + AC_MSG_ERROR([unable to continue until this issue is resolved])
  89. + ])
  90. + W32API_INCLUDE="${with_w32api_srcdir}/include"
  91. +])# MINGW_AC_W32API_SRCDIR
  92. # The following is copied from `no-executables.m4', in the top
  93. # `src/config' directory.
  94. diff -r 62c176864807 configure.in
  95. --- a/configure.in Mon Nov 28 11:32:25 2011 +0000
  96. +++ b/configure.in Mon Nov 28 21:18:55 2011 +0000
  97. @@ -44,7 +44,7 @@ AC_CHECK_TOOL([WINDRES], [windres], [win
  98. AC_SUBST([NO_CYGWIN])
  99. AC_SUBST([HEADER_SUBDIR])
  100. -AC_SUBST([W32API_INCLUDE], ['-I ${top_srcdir}/../w32api/include'])
  101. +AC_SUBST([W32API_INCLUDE], [MINGW_AC_W32API_SRCDIR])
  102. # The following are used by the GCC profiling hooks...
  103. #
  104. diff -r 62c176864807 mingwex/Makefile.in
  105. --- a/mingwex/Makefile.in Mon Nov 28 11:32:25 2011 +0000
  106. +++ b/mingwex/Makefile.in Mon Nov 28 21:18:55 2011 +0000
  107. @@ -126,10 +126,9 @@ ifdef NO_CYGWIN
  108. override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC}))
  109. endif
  110. -W32API_INCLUDE = @W32API_INCLUDE@
  111. -INCLUDES = -I${srcdir} -I${top_srcdir} -I${top_srcdir}/include \
  112. - -nostdinc \
  113. - -iwithprefixbefore include
  114. +W32API_INCLUDE = -I @W32API_INCLUDE@
  115. +INCLUDES = -I ${srcdir} -I ${top_srcdir} -I ${top_srcdir}/include \
  116. + -nostdinc -isystem @W32API_INCLUDE@ -iwithprefixbefore include
  117. ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE)
  118. ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
  119. diff -r 62c176864807 profile/Makefile.in
  120. --- a/profile/Makefile.in Mon Nov 28 11:32:25 2011 +0000
  121. +++ b/profile/Makefile.in Mon Nov 28 21:18:55 2011 +0000
  122. @@ -65,10 +65,9 @@ THREAD_DLL = @THREAD_DLL@
  123. THREAD_DLL_VERSION = 10
  124. THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
  125. -W32API_INCLUDE = @W32API_INCLUDE@
  126. -INCLUDES = -I${srcdir} -I${top_srcdir}/include \
  127. - -nostdinc \
  128. - -iwithprefixbefore include
  129. +W32API_INCLUDE = -I @W32API_INCLUDE@
  130. +INCLUDES = -I ${srcdir} -I ${top_srcdir}/include \
  131. + -nostdinc -iwithprefixbefore include
  132. ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
  133. ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)