[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


http://llvm.org/bugs/show_bug.cgi?id=19951

            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_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-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
-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
/private/tmp/llvm33-9zPU/llvm-3.3.src/Release+Asserts/lib/LLVMHello.dylib
/private/tmp/llvm33-9zPU/llvm-3.3.src/lib/Transforms/Hello/Release+Asserts/Hello.o
\
      
-Wl,-exported_symbols_list,/private/tmp/llvm33-9zPU/llvm-3.3.src/lib/Transforms/Hello/Release+Asserts/Hello.exports.sed
-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`
  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

-- 
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