LEFT | RIGHT |
1 #! /bin/sh | 1 #! /bin/sh |
2 # | 2 # |
3 # Set the $TRIPLE environment variable to your system's triple before | 3 # Set the $TRIPLE environment variable to your system's triple before |
4 # running this script. If you set $CXX, that will be used to compile | 4 # running this script. If you set $CXX, that will be used to compile |
5 # the library. Otherwise we'll use g++. | 5 # the library. Otherwise we'll use g++. |
6 | 6 |
7 set -e | 7 set -e |
8 | 8 |
9 if [ `basename $(pwd)` != "lib" ] | 9 if [ `basename $(pwd)` != "lib" ] |
10 then | 10 then |
(...skipping 14 matching lines...) Expand all Loading... |
25 fi | 25 fi |
26 SOEXT=dylib | 26 SOEXT=dylib |
27 LDSHARED_FLAGS="-o libc++.1.dylib \ | 27 LDSHARED_FLAGS="-o libc++.1.dylib \ |
28 -dynamiclib -nodefaultlibs -current_version 1 \ | 28 -dynamiclib -nodefaultlibs -current_version 1 \ |
29 -compatibility_version 1 \ | 29 -compatibility_version 1 \ |
30 -install_name /usr/lib/libc++.dylib \ | 30 -install_name /usr/lib/libc++.dylib \ |
31 -Wl,-reexport_library,/usr/lib/libc++abi.dylib \ | 31 -Wl,-reexport_library,/usr/lib/libc++abi.dylib \ |
32 /usr/lib/libSystem.B.dylib" | 32 /usr/lib/libSystem.B.dylib" |
33 ;; | 33 ;; |
34 *) | 34 *) |
| 35 RC_CFLAGS="-fPIC" |
35 SOEXT=so | 36 SOEXT=so |
36 LDSHARED_FLAGS="-o libc++.so.1.0 \ | 37 LDSHARED_FLAGS="-o libc++.so.1.0 \ |
37 -shared -nodefaultlibs -soname libc++.so.1 \ | 38 -shared -nodefaultlibs -Wl,-soname,libc++.so.1 \ |
38 -lstdc++ -lc" | 39 -lstdc++ -lc" |
39 ;; | 40 ;; |
40 esac | 41 esac |
41 | 42 |
42 if [ -z $RC_BUILDIT ] | 43 if [ -z $RC_BUILDIT ] |
43 then | 44 then |
44 rm -f libc++.1.$SOEXT* | 45 rm -f libc++.1.$SOEXT* |
45 fi | 46 fi |
46 | 47 |
47 set -x | 48 set -x |
48 | 49 |
49 for FILE in ../src/*.cpp; do | 50 for FILE in ../src/*.cpp; do |
50 $CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE | 51 $CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE |
51 done | 52 done |
52 | 53 |
53 $CXX *.o $RC_CFLAGS $LDSHARED_FLAGS | 54 $CXX *.o $RC_CFLAGS $LDSHARED_FLAGS |
54 | 55 |
55 #libtool -static -o libc++.a *.o | 56 #libtool -static -o libc++.a *.o |
56 | 57 |
57 if [ -z $RC_BUILDIT ] | 58 if [ -z $RC_BUILDIT ] |
58 then | 59 then |
59 rm *.o | 60 rm *.o |
60 fi | 61 fi |
LEFT | RIGHT |