[libc++] Patch for AIX port

David Chisnall theraven at FreeBSD.org
Wed Aug 14 00:45:34 PDT 2013


On 14 Aug 2013, at 01:59, Howard Hinnant <hhinnant at apple.com> wrote:

> 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
> +        ;;
>     *)

This part doesn't affect us, as we don't have any triples with -ibm- in the middle.

>         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

This does, however.  We don't usually use a.b version numbers.  It isn't of vital importance, however, as we don't use the upstream build system for the libc++ that we ship, although it would be mildly inconvenient for people who are building a newer version for testing.

Oh, and ln -sf is generally better than rm then ln, as it allows the operation to be atomic.

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130814/bf7350ce/attachment.sig>


More information about the cfe-commits mailing list