summaryrefslogtreecommitdiff
path: root/win32/setup.mak
diff options
context:
space:
mode:
Diffstat (limited to 'win32/setup.mak')
-rw-r--r--win32/setup.mak28
1 files changed, 21 insertions, 7 deletions
diff --git a/win32/setup.mak b/win32/setup.mak
index 2ae4e1cfd5..3b822a33c0 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -59,13 +59,20 @@ USE_RUBYGEMS = $(USE_RUBYGEMS)
!if defined(ENABLE_DEBUG_ENV)
ENABLE_DEBUG_ENV = $(ENABLE_DEBUG_ENV)
!endif
-!if defined(MJIT_SUPPORT)
-MJIT_SUPPORT = $(MJIT_SUPPORT)
+!if defined(RJIT_SUPPORT)
+RJIT_SUPPORT = $(RJIT_SUPPORT)
+!endif
+!if defined(XINCFLAGS)
+CPPFLAGS = $(XINCFLAGS)
+!endif
+!if defined(XLDFLAGS)
+XLDFLAGS = $(XLDFLAGS)
!endif
# TOOLS
<<
!if defined(BASERUBY)
+ $(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat"
@echo BASERUBY = $(BASERUBY:/=\)>> $(MAKEFILE)
!endif
!if "$(RUBY_DEVEL)" == "yes"
@@ -78,8 +85,13 @@ MJIT_SUPPORT = $(MJIT_SUPPORT)
@echo HAVE_GIT = $(HAVE_GIT)>> $(MAKEFILE)
!endif
-!if "$(WITH_GMP)" == "yes"
- @echo>>$(MAKEFILE) USE_GMP = 1
+!if "$(WITH_GMP)" != "no"
+ @($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || exit /b 0) >>$(MAKEFILE)
+#include <gmp.h>
+mpz_t x;
+int main(void) {mpz_init(x); return 0;}
+<<
+ @$(WIN32DIR:/=\)\rm.bat conftest.*
!endif
-osname-section-:
@@ -129,6 +141,7 @@ vs2022-fp-bug:
/* compile with -O2 */
#include <math.h>
#include <float.h>
+#include <stdio.h>
#define value_finite(d) 'f'
#define value_infinity() 'i'
@@ -163,9 +176,10 @@ main(void)
}
<<
@( \
- ($(CC) -O2 -DNO_ASSUME $@.c && .\$@ && $(CC) -O2 $@.c) && \
- (.\$@ || echo>>$(MAKEFILE) VS2022_FP_BUG=1) \
- ) & $(WIN32DIR:/=\)\rm.bat $@.*
+ $(CC) -O2 $@.c && .\$@ || \
+ set bug=%ERRORLEVEL% \
+ echo This compiler has an optimization bug \
+ ) & $(WIN32DIR:/=\)\rm.bat $@.* & exit /b %bug%
-version-: nul verconf.mk