[LLVMbugs] [Bug 19951] New: Makefile.rules broken for OS X >= 10.10

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 5 04:44:46 PDT 2014


            Bug ID: 19951
           Summary: Makefile.rules broken for OS X >= 10.10
           Product: Build scripts
           Version: 3.3
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Makefiles
          Assignee: unassignedbugs at nondot.org
          Reporter: marcello.seri at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compilation of llvm 3.3 is impossible in MacOSX 10.10 Yosemite. The variable
DARWIN_VERSION is stripped improperly giving rise to errors like the following:

clang++ -I/private/tmp/llvm33-9zPU/llvm-3.3.src/include
-I/private/tmp/llvm33-9zPU/llvm-3.3.src/lib/Transforms/Hello  -D_DEBUG
-D__STDC_LIMIT_MACROS -O3  -fvisibility-inlines-hidden -fno-exceptions
-fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual  -O3 -Wl,-rpath
-Wl, at executable_path/../lib
-L/private/tmp/llvm33-9zPU/llvm-3.3.src/Release+Asserts/lib  -m64  -pedantic
-Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings      
-Wl,-flat_namespace -Wl,-undefined,suppress -dynamiclib
-mmacosx-version-min=10.1 -o
-lz -lpthread -lffi -lm 
ld: -rpath can only be used when targeting Mac OS X 10.5 or later

The problem can be fixed as follows:

diff --git a/Makefile.rules b/Makefile.rules
index f0c542b..ec05ac3 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -571,9 +571,9 @@ ifeq ($(HOST_OS),Darwin)
   DARWIN_VERSION := `sw_vers -productVersion`
   # Strip a number like 10.4.7 to 10.4
-  DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E
+  DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E
   # Get "4" out of 10.4 for later pieces in the makefile.
-  DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E
+  DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E

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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140605/1f83a52d/attachment.html>

More information about the llvm-bugs mailing list