summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-07-11 06:51:32 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2026-07-14 13:34:17 +0900
commit7fc9f788c00488359493c2fd6465da872b3b5337 (patch)
treeccb8c822215e2625fd9679da906b28fae15a264f
parent9e46ef483d1b3ee5043d7b87bdff0de20ef2762f (diff)
win32/setup.mak: fix dead vs2022-fp-bug checkHEADmaster
The whole command runs as a single cmd.exe line due to the line continuations, so %ERRORLEVEL% and %bug% were expanded at parse time and `exit /b %bug%` never propagated the failure; the check always passed even when the bug reproduced. Fail the recipe line directly instead of the variable round-trip.
-rw-r--r--win32/setup.mak9
1 files changed, 4 insertions, 5 deletions
diff --git a/win32/setup.mak b/win32/setup.mak
index 19ace3445c..db04453022 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -160,11 +160,10 @@ main(void)
return c != value_nan();
}
<<
- @( \
- $(CC) -O2 $@.c && .\$@ || \
- (set bug=%ERRORLEVEL% & \
- echo This compiler has an optimization bug) \
- ) & $(WIN32DIR:/=\)\rm.bat $@.* & exit /b %bug%
+ @($(CC) -O2 $@.c && .\$@) || \
+ (echo This compiler has an optimization bug & \
+ $(WIN32DIR:/=\)\rm.bat $@.* & exit /b 1)
+ @$(WIN32DIR:/=\)\rm.bat $@.*
-version-: nul verconf.mk