OLD | NEW |
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 BuildStep() { | 5 BuildStep() { |
6 # Nothing to build. | 6 # Nothing to build. |
7 return | 7 return |
8 } | 8 } |
9 | 9 |
10 CreateMingnPackage() { | 10 CreateMingnPackage() { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 else | 115 else |
116 local ld_format="elf64-x86-64-nacl" | 116 local ld_format="elf64-x86-64-nacl" |
117 fi | 117 fi |
118 | 118 |
119 # Merge libraries made from native_client_sdk so that you do not | 119 # Merge libraries made from native_client_sdk so that you do not |
120 # need to specify -L option for them. | 120 # need to specify -L option for them. |
121 cp ${NACL_SDK_ROOT}/lib/glibc_${arch_alt}/Release/* ${usr_lib_dir} | 121 cp ${NACL_SDK_ROOT}/lib/glibc_${arch_alt}/Release/* ${usr_lib_dir} |
122 # But also copy the debug ones. | 122 # But also copy the debug ones. |
123 cp ${NACL_SDK_ROOT}/lib/glibc_${arch_alt}/Debug/* ${usr_lib_dir}/debug | 123 cp ${NACL_SDK_ROOT}/lib/glibc_${arch_alt}/Debug/* ${usr_lib_dir}/debug |
124 | 124 |
125 local mingn_ldflags="-lcli_main -lppapi_simple -lnacl_spawn -lnacl_io" | 125 local mingn_ldflags="${NACL_CLI_MAIN_LIB} -lppapi_simple -lnacl_io" |
126 mingn_ldflags+=" -lppapi -lppapi_cpp -lstdc++ -lm" | 126 mingn_ldflags+=" -lppapi -lppapi_cpp -lstdc++ -lm" |
127 # Create libmingn.so ldscripts. | 127 # Create libmingn.so ldscripts. |
128 cat <<EOF > ${TOOLCHAIN_OUT_DIR}/${arch}-nacl/usr/lib/libmingn.so | 128 cat <<EOF > ${TOOLCHAIN_OUT_DIR}/${arch}-nacl/usr/lib/libmingn.so |
129 OUTPUT_FORMAT(${ld_format}) | 129 OUTPUT_FORMAT(${ld_format}) |
130 GROUP(${mingn_ldflags}) | 130 GROUP(${mingn_ldflags}) |
131 EOF | 131 EOF |
132 done | 132 done |
133 | 133 |
134 # Copy in SDK includes. | 134 # Copy in SDK includes. |
135 LogExecute cp -r ${NACL_SDK_ROOT}/include mingn/ | 135 LogExecute cp -r ${NACL_SDK_ROOT}/include mingn/ |
136 | 136 |
137 # Remove shared objects which are symlinked after we resolve them. | 137 # Remove shared objects which are symlinked after we resolve them. |
138 find mingn -name '*.so.*.*' -exec rm -f {} \; | 138 find mingn -name '*.so.*.*' -exec rm -f {} \; |
139 | 139 |
140 # Modify GCC's specs file. E.g., | 140 # Modify GCC's specs file. E.g., |
141 # /path/to/nacl_sdk/pepper_canary/toolchain/linux_x86_glibc | 141 # /path/to/nacl_sdk/pepper_canary/toolchain/linux_x86_glibc |
142 # => /mnt/html5/mingn/toolchain/nacl_x86_glibc. | 142 # => /mnt/html5/mingn/toolchain/nacl_x86_glibc. |
143 sed -i.bak 's@/\S*/pepper_[^/]*/toolchain/[^/]*_x86_glibc@/mnt/html5/mingn/too
lchain/nacl_x86_glibc@g' \ | 143 sed -i.bak 's@/\S*/pepper_[^/]*/toolchain/[^/]*_x86_glibc@/mnt/html5/mingn/too
lchain/nacl_x86_glibc@g' \ |
144 ${TOOLCHAIN_OUT_DIR}/lib/gcc/x86_64-nacl/4.4.3/specs | 144 ${TOOLCHAIN_OUT_DIR}/lib/gcc/x86_64-nacl/4.4.3/specs |
145 | 145 |
146 CreateMingnPackage lib all | 146 CreateMingnPackage lib all |
147 } | 147 } |
OLD | NEW |