Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit 055d800

Browse files
committed
Merge pull request #41 from orderthruchaos/master
Allow for better detection of gcc.
2 parents 63107c0 + 3f76898 commit 055d800

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.*.sw?
12
lib/atomic_reference.jar
23
/nbproject
34
ext/*.bundle

ext/extconf.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@
1616

1717
have_header "libkern/OSAtomic.h"
1818

19-
if CONFIG["GCC"] && CONFIG["GCC"] != ""
19+
def compiler_is_gcc
20+
if CONFIG["GCC"] && CONFIG["GCC"] != ""
21+
return true
22+
elsif ( # This could stand to be more generic... but I am afraid.
23+
CONFIG["CC"] =~ /\bgcc\b/
24+
)
25+
return true
26+
end
27+
return false
28+
end
29+
30+
31+
if compiler_is_gcc
2032
case CONFIG["arch"]
2133
when /mswin32|mingw|solaris/
2234
$CFLAGS += " -march=native"

0 commit comments

Comments
 (0)