diff --git a/protoc-artifacts/build-protoc.sh b/protoc-artifacts/build-protoc.sh index f8afa95a8..90d9a8ef9 100755 --- a/protoc-artifacts/build-protoc.sh +++ b/protoc-artifacts/build-protoc.sh @@ -85,8 +85,11 @@ fi export CXXFLAGS="-DNDEBUG" # Statically link libgcc and libstdc++. -# -s to produce stripped binary -export LDFLAGS="-static-libgcc -static-libstdc++ -s" +# -s to produce stripped binary. +# And they don't work under Mac. +if [[ "$OS" != osx ]]; then + export LDFLAGS="-static-libgcc -static-libstdc++ -s" +fi cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS && cd src && make clean && make $MAKE_TARGET &&