[libc++] Patch for AIX port

Howard Hinnant hhinnant at apple.com
Tue Aug 13 17:59:13 PDT 2013


On Aug 13, 2013, at 4:45 PM, Xing Xue <xingxue at ca.ibm.com> wrote:

> Hi Howard,
> 
> Attached is the first patch to libcxx for IBM XLC++/AIX.  It is based on the checkout revision 188206.  Could you please review?  Thanks very much!
> 
> 
> Diffs of the patch:
> (See attached file: libcxx.diffs)
> 
> The patched source tree:
> (See attached file: libcxx_ibm_130813.tar.gz)
> 
> Thanks,
> Xing Xue
> XLC++ Compiler Development / IBM Software Solutions Toronto Lab.
> Tie Line: 313-3972  Phone: 905-413-3972 Email: xingxue at ca.ibm.com
> 
> 
> <libcxx.diffs><libcxx_ibm_130813.tar.gz>

This looks good to me.  Thanks for the drive-by-fix in <random>!

There's just one line I have a slight concern about.  It does not impact Apple.  However I'm unsure if it impacts other platforms such as __FreeBSD__ or __linux__.  So I'm wanting to draw other's attention to this before I commit it:

diff -ruN libcxx.orig/lib/buildit libcxx/lib/buildit
--- libcxx.orig/lib/buildit	2013-08-13 15:51:00.510247093 -0400
+++ libcxx/lib/buildit	2013-08-12 17:45:00.180244845 -0400
@@ -136,13 +153,23 @@
         ;;
     *-*-mingw*)
         ;;
+    *-ibm-*)
+        if [ $hostOS == "linux" ]
+        then
+           rm -f libc++.so
+           ln -s libc++.so.1.0 libc++.so
+        else #AIX
+           rm -f libc++.a
+           ar r libc++.a shr.o
+        fi
+        ;;
     *)
         rm -f libc++.so
-        ln -s libc++.so.1 libc++.so
+        ln -s libc++.so.1.0 libc++.so
         ;;
 esac

All, please examine the last line:

-        ln -s libc++.so.1 libc++.so
+        ln -s libc++.so.1.0 libc++.so

and ensure that this is ok for your platform.

Thanks!

Howard




More information about the cfe-commits mailing list