From: "drbrain (Eric Hodel)" Date: 2012-12-12T10:42:14+09:00 Subject: [ruby-core:50803] [ruby-trunk - Bug #7485] ruby cannot build on mingw32 or FreeBSD 8 due to missing __sync_val_compare_and_swap Issue #7485 has been updated by drbrain (Eric Hodel). =begin I'm also experiencing this on FreeBSD 8 with gcc 4.2.1: $ gcc -v Using built-in specs. Target: i386-undermydesk-freebsd Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070719 [FreeBSD] $ make linking miniruby thread.o(.text+0x3f20): In function `rb_threadptr_execute_interrupts': /data/home/drbrain/Work/svn/ruby/thread.c:1807: undefined reference to `__sync_val_compare_and_swap_4' *** Error code 1 Stop in /data/home/drbrain/Work/svn/ruby. So it seems to be an old GCC issue, not a mingw-specific issue. Is ruby 2.0 abandoning gcc 4.2.x? =end ---------------------------------------- Bug #7485: ruby cannot build on mingw32 or FreeBSD 8 due to missing __sync_val_compare_and_swap https://bugs.ruby-lang.org/issues/7485#change-34645 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/