From: "jonforums (Jon Forums)" Date: 2012-12-03T00:55:35+09:00 Subject: [ruby-core:50482] [ruby-trunk - Bug #7485] ruby cannot build on mingw32 due to missing __sync_val_compare_and_swap Issue #7485 has been updated by jonforums (Jon Forums). I agree with Luis' results and think we've just not fully debugged Eric's XP VM setup as in #7427. With this snippet http://pastie.org/5460872 and Kosaki-san's feedback I see: ## mingw-w64 32bit gcc 4.7.2 C:\sandbox>gcc --version gcc (rubenvb-4.7.2-release) 4.7.2 C:\sandbox>gcc -Wall -o atomics.exe gcc_atomic.c C:\sandbox>atomics.exe Got 1 C:\sandbox>gcc -Wall -march=i386 -o atomics.exe gcc_atomic.c C:\Users\Jon\AppData\Local\Temp\ccK9GPwk.o:gcc_atomic.c:(.text+0x2e): undefined reference to `__sync_val_compare_and_swap_4' collect2.exe: error: ld returned 1 exit status ## mingw 32bit gcc 4.6.2 C:\sandbox>gcc --version gcc (GCC) 4.6.2 C:\sandbox>gcc -Wall -o atomics.exe gcc_atomic.c C:\Users\Jon\AppData\Local\Temp\ccpeH4Vt.o:gcc_atomic.c:(.text+0x2e): undefined reference to `__sync_val_compare_and_swap_4' collect2: ld returned 1 exit status C:\sandbox>gcc -Wall -march={i486,i586,i686,native,core2} -o atomics.exe gcc_atomic.c C:\Users\Jon\Documents\CDev\sandbox>atomics.exe Got 1 Bottom line: even with these snippet results I see no build failures due to the current mingw32 build configuration. ---------------------------------------- Bug #7485: ruby cannot build on mingw32 due to missing __sync_val_compare_and_swap https://bugs.ruby-lang.org/issues/7485#change-34322 Author: drbrain (Eric Hodel) Status: Open Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: build Target version: 2.0.0 ruby -v: trunk mingw32 GCC has the other atomic builtins but not this one. The attached patch checks for the GCC builtins used in ruby_atomic.h but not checked for by configure. -- http://bugs.ruby-lang.org/