From 725ecdd3ea1f12a28e1c8f71d771c24b267a7fa6 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Fri, 16 Jan 2015 21:10:35 -0800
Subject: [PATCH 3005/3008] buildit build fix for Leopard

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 9669f74e545ff4cc6b8a515f9690cb151b734101)
---
 lib/buildit | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git libcxx-5.0.1.src/lib/buildit libcxx-5.0.1.src/lib/buildit
index c18de042e..0a585022a 100755
--- libcxx-5.0.1.src/lib/buildit
+++ libcxx-5.0.1.src/lib/buildit
@@ -55,7 +55,7 @@ case $TRIPLE in
       RC_CFLAGS="-arch i386 -arch x86_64"
     fi
     SOEXT=dylib
-    if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.6" ]
+    if [[ "$MACOSX_DEPLOYMENT_TARGET" == 10.[456] ]]
     then
         EXTRA_FLAGS="-nostdinc++ -std=c++11 -U__STRICT_ANSI__"
         LDSHARED_FLAGS="-o libc++.1.dylib \
@@ -64,7 +64,7 @@ case $TRIPLE in
             -install_name /usr/lib/libc++.1.dylib \
             -Wl,-reexport_library,/usr/lib/libc++abi.dylib \
             -Wl,-unexported_symbols_list,libc++unexp.exp  \
-            /usr/lib/libSystem.B.dylib"
+            /usr/lib/libSystem.B.dylib /usr/lib/libgcc_s.1.dylib"
     else
         if [ -n "$SDKROOT" ]
         then
-- 
2.15.1

