Issue #10272 has been reported by Jack Nagel.

----------------------------------------
Bug #10272: miniruby hangs on Mac OS X 10.7
https://bugs.ruby-lang.org/issues/10272

* Author: Jack Nagel
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: 2.1.3
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
When compiling v2.1.3 with Apple's clang on Mac OS X 10.7, the build hangs while invoking the `miniruby` executable:

```
 $ make V=1 
	CC = clang
	LD = ld
	LDSHARED = clang -dynamic -bundle
	CFLAGS = --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wextra-tokens -pipe 
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
	CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin11.0 -I./include -I.
	DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie -framework CoreFoundation  
	SOLIBS = 
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
./miniruby -I./lib -I. -I.ext/common  ./tool/mkconfig.rb -timestamp=.rbconfig.time \
		-install_name=ruby \
		-so_name=ruby rbconfig.rb
```

alternatively, it can be demonstrated by simply running `make miniruby && ./miniruby -eexit`.

The clang version in question is:

```
$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
```

I bisected it to [r47276](https://bugs.ruby-lang.org/projects/ruby-21/repository/revisions/47276) on the v2_1_3 branch, but the issue is also present on trunk.



-- 
https://bugs.ruby-lang.org/