From 4bba273416f58aa35180e0d8f1b030ee1bc95623 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 3001/3005] buildit build fix for Leopard

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit b46773a9b7d9867cbfc74d203cd9a444e323d1f7)

Conflicts:
	lib/buildit
---
 lib/buildit | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git llvm_release_34/projects/libcxx/lib/buildit macports_release_34/projects/libcxx/lib/buildit
index af6b466..cdb7826 100755
--- llvm_release_34/projects/libcxx/lib/buildit
+++ macports_release_34/projects/libcxx/lib/buildit
@@ -45,7 +45,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.5" ] || [ "$MACOSX_DEPLOYMENT_TARGET" = "10.6" ]
     then
         EXTRA_FLAGS="-nostdinc++ -std=c++11 -U__STRICT_ANSI__"
         LDSHARED_FLAGS="-o libc++.1.dylib \
@@ -54,7 +54,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.2.2

