OLD | NEW |
---|---|
1 .. _devcycle-building: | 1 .. _devcycle-building: |
2 | 2 |
3 ######## | 3 ######## |
4 Building | 4 Building |
5 ######## | 5 ######## |
6 | 6 |
7 .. contents:: Table Of Contents | 7 .. contents:: Table Of Contents |
8 :local: | 8 :local: |
9 :backlinks: none | 9 :backlinks: none |
10 :depth: 2 | 10 :depth: 2 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 C libraries | 62 C libraries |
63 ----------- | 63 ----------- |
64 | 64 |
65 The Native Client SDK comes with two C libraries: `newlib | 65 The Native Client SDK comes with two C libraries: `newlib |
66 <http://sourceware.org/newlib/>`_ and `glibc | 66 <http://sourceware.org/newlib/>`_ and `glibc |
67 <http://www.gnu.org/software/libc/>`_. See :doc:`Dynamic Linking & Loading with | 67 <http://www.gnu.org/software/libc/>`_. See :doc:`Dynamic Linking & Loading with |
68 glibc <dynamic-loading>` for information about these libraries, including | 68 glibc <dynamic-loading>` for information about these libraries, including |
69 factors to help you decide which to use. | 69 factors to help you decide which to use. |
70 | 70 |
71 C++ libraries | |
72 ------------- | |
73 | |
74 Native Client can only use GCC's `libstdc++ | |
75 <http://gcc.gnu.org/libstdc++>`_, whereas Portable Native Client can use | |
76 either `libstdc++ <http://gcc.gnu.org/libstdc++>`_ (the current default) | |
77 or LLVM's `libc++ <http://libcxx.llvm.org/>`_. The | |
78 ``-stdlib=[libstdc++|libc++]`` command line argument can be used to | |
79 choose which standard library to use. | |
80 | |
81 C++11 library support is only complete in libc++ but other non-library | |
82 language features should work regardless of which standard library is | |
83 used. The ``-std=[c++98|c++11]`` command line argument can be used to | |
84 indicate which C++ language standard to use. | |
Derek Schuff
2013/10/02 18:10:15
we should really indicated that libc++ is basicall
JF
2013/10/02 18:15:46
Done.
| |
85 | |
71 SDK toolchains | 86 SDK toolchains |
72 -------------- | 87 -------------- |
73 | 88 |
74 The Native Client SDK includes multiple toolchains, differentiated by target | 89 The Native Client SDK includes multiple toolchains, differentiated by target |
75 architectures and C libraries. The toolchains are located in directories named | 90 architectures and C libraries. The toolchains are located in directories named |
76 ``toolchain/<platform>_<architecture>_<library>``, where: | 91 ``toolchain/<platform>_<architecture>_<library>``, where: |
77 | 92 |
78 * *<platform>* is the platform of your development machine (win, mac, or linux) | 93 * *<platform>* is the platform of your development machine (win, mac, or linux) |
79 * *<architecture>* is your target architecture (x86 or arm) | 94 * *<architecture>* is your target architecture (x86 or arm) |
80 * *<library>* is the C library you are compiling with (newlib or glibc) | 95 * *<library>* is the C library you are compiling with (newlib or glibc) |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 | 463 |
449 If your code uses mkdir or other file system calls, you might find nacl-mounts | 464 If your code uses mkdir or other file system calls, you might find nacl-mounts |
450 useful. Nacl-mounts essentially does option (3) for you: It lets your code | 465 useful. Nacl-mounts essentially does option (3) for you: It lets your code |
451 use POSIX-like file system calls, and implements the calls using various | 466 use POSIX-like file system calls, and implements the calls using various |
452 technologies (e.g., App Engine or an in-memory filesystem). | 467 technologies (e.g., App Engine or an in-memory filesystem). |
453 | 468 |
454 Can't find libraries containing necessary symbols | 469 Can't find libraries containing necessary symbols |
455 Here is one way to find the appropriate library for a given symbol:: | 470 Here is one way to find the appropriate library for a given symbol:: |
456 | 471 |
457 nm -o toolchain/<platform>_x86_<library>/x86_64-nacl/lib64/*.a | grep <MySym bolName> | 472 nm -o toolchain/<platform>_x86_<library>/x86_64-nacl/lib64/*.a | grep <MySym bolName> |
OLD | NEW |