Преглед на файлове

Make the osx binary compatible with 10.7 and later

Kun Zhang преди 10 години
родител
ревизия
62903ec075
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      protoc-artifacts/build-protoc.sh

+ 3 - 1
protoc-artifacts/build-protoc.sh

@@ -106,7 +106,7 @@ checkDependencies ()
     fi
     fi
   elif [[ "$OS" == osx ]]; then
   elif [[ "$OS" == osx ]]; then
     dump_cmd='otool -L '"$1"' | fgrep dylib'
     dump_cmd='otool -L '"$1"' | fgrep dylib'
-    white_list="libz\.1\.dylib\|libc++\.1\.dylib\|libSystem\.B\.dylib"
+    white_list="libz\.1\.dylib\|libstdc++\.6\.dylib\|libSystem\.B\.dylib"
   fi
   fi
   if [[ -z "$white_list" || -z "$dump_cmd" ]]; then
   if [[ -z "$white_list" || -z "$dump_cmd" ]]; then
     fail "Unsupported platform $OS-$ARCH."
     fail "Unsupported platform $OS-$ARCH."
@@ -184,6 +184,8 @@ elif [[ "$(uname)" == Linux* ]]; then
   fi
   fi
 elif [[ "$(uname)" == Darwin* ]]; then
 elif [[ "$(uname)" == Darwin* ]]; then
   assertEq "$OS" osx $LINENO
   assertEq "$OS" osx $LINENO
+  # Make the binary compatible with OSX 10.7 and later
+  CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.7"
   if [[ "$ARCH" == x86_64 ]]; then
   if [[ "$ARCH" == x86_64 ]]; then
     CXXFLAGS="$CXXFLAGS -m64"
     CXXFLAGS="$CXXFLAGS -m64"
   elif [[ "$ARCH" == x86_32 ]]; then
   elif [[ "$ARCH" == x86_32 ]]; then