Skip to content

Commit

Permalink
Fixes to build LLVM 3.3 on OS X 10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Viral B. Shah committed Jul 29, 2014
1 parent 43921e0 commit 92ad1b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Make.inc
Expand Up @@ -216,16 +216,17 @@ endif
STDLIBCPP_FLAG =

ifeq ($(OS), Darwin)
DARWINVER = $(shell uname -r | cut -b 1-2)
OSXVER = $(shell sw_vers -productVersion | cut -b 1-4)
DARWINVER := $(shell uname -r | cut -b 1-2)
DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13)
OSXVER := $(shell sw_vers -productVersion | cut -b 1-4)
ifeq ($(DARWINVER), 10) # Snow Leopard specific configuration
USEGCC = 1
USECLANG = 0
OPENBLAS_TARGET_ARCH=NEHALEM
OPENBLAS_DYNAMIC_ARCH=0
USE_SYSTEM_LIBUNWIND=1
else
ifeq ($(DARWINVER),13)
ifeq ($(DARWINVER_GTE13),1)
USE_LIBCPP = 1
STDLIBCPP_FLAG = -stdlib=libstdc++
else
Expand Down
1 change: 1 addition & 0 deletions deps/Makefile
Expand Up @@ -385,6 +385,7 @@ endif
ifeq ($(LLVM_VER),3.3)
patch -p0 < llvm-3.3.patch
patch -p0 < instcombine-llvm-3.3.patch
(cd llvm-$(LLVM_VER) && patch < ../osx-10.10.llvm-3.3.patch)
ifeq ($(OS),WINNT)
ifeq ($(ARCH),x86_64)
patch -p0 < win64-int128.llvm-3.3.patch
Expand Down
14 changes: 14 additions & 0 deletions deps/osx-10.10.llvm-3.3.patch
@@ -0,0 +1,14 @@
--- Makefile.rules.old 2014-07-29 12:01:50.000000000 +0530
+++ Makefile.rules 2014-07-29 12:02:10.000000000 +0530
@@ -571,9 +571,9 @@ ifeq ($(HOST_OS),Darwin)
DARWIN_VERSION := `sw_vers -productVersion`
endif
# Strip a number like 10.4.7 to 10.4
- DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
+ DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]+).*/\1/')
# Get "4" out of 10.4 for later pieces in the makefile.
- DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
+ DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]+).*/\1/')

LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress
SharedLinkOptions := -dynamiclib

1 comment on commit 92ad1b6

@manuamador
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build on OS X 10.10 public beta works fine.

Please sign in to comment.