1. 30 Sep, 2011 9 commits
    • David 'Digit' Turner's avatar
      build-host-sed.sh: new script to build sed from sources · a6dfe5f7
      David 'Digit' Turner authored
      This patch adds build-host-sed.sh that can be used to rebuild
      host versions of the sed tool, which will be placed under
      prebuilt/<system>/bin/
      
      This is mainly for native Win32 support, since we can't rely
      on having a working sed in this environment.
      
      A future patch will modify the NDK build system to use the
      prebuilt binary automatically.
      
      + Add prebuilt/ to .gitignore
      + Remove prebuilt/ in dev-cleanup.sh
      
      Change-Id: Ibe3561c189e90dde68023b7cbe1e9dc03dff1004
      a6dfe5f7
    • David 'Digit' Turner's avatar
      prebuilt-common.sh: Distinguish host and target builds · 3da53797
      David 'Digit' Turner authored
      This patch modifies the helper functions inside prebuilt-common.sh
      to distinguish between host and target builds more easily.
      
      A target build is used to build target Android binaries, while a host
      one is used to build binaries that will run on the host machine, i.e.
      invoked by the NDK build script.
      
      We will use host builds to generate the Windows helper binaries that
      the NDK depends on (sed, awk, make, etc...) in future patches.
      
      Change-Id: Ifbc2a112ee08fa42c9987ee26fee4539476e91a4
      3da53797
    • David Turner's avatar
      run-standalone-tests.sh: use prebuilt-common.sh · a719d890
      David Turner authored
      Change-Id: I19d6f065aa1e3c25b24e4031b4199501a242c141
      a719d890
    • David 'Digit' Turner's avatar
      prebuilt-common.sh: allow inclusion from any script · 32849be7
      David 'Digit' Turner authored
      This patch allows any script to source prebuilt-common.sh
      properly. Before that, only patches in the same directory,
      i.e. build/tools/, could source it without errors.
      
      Note: To do that, the parent script must define NDK_BUILDTOOLS_PATH
      to point to the build/tools/ directory. If the variable is not defined,
      prebuilt-common.sh assumes that it is sources from build/tools/
      
      Change-Id: If91360a0a10571f968049003c8f7192ad98c7f5c
      32849be7
    • David Turner's avatar
      prebuilt-common.sh: get_prebuilt_install_prefix · 9ac252a1
      David Turner authored
      This patch adds a new function to prebuilt-common.sh that can
      return the install location of prebuilt host binaries. It
      currently is: $NDK/prebuilt/$HOST_TAG/
      
      This will be used to store host binaries, like the Win32 versions
      of GNU Make, Awk, Sed and others.
      
      Change-Id: I8a543b4f4d6b728e13046f3759a5b8584cea6001
      9ac252a1
    • David 'Digit' Turner's avatar
      Define HOST_OS as 'cygwin' on Cygwin · 462c6319
      David 'Digit' Turner authored
      This patch changes the definition of HOST_OS to 'cygwin' when
      we detect that the build system is invoked from a Cygwin-compatible
      GNU Make program.
      
      The old value of 'windows' will now be used for the case where the
      build system is invoked from a vanilla Win32 GNU Make binary, e.g.
      from a standard Windows shell.
      
      First step towards getting rid of Cygwin.
      
      Change-Id: I4f355a5d254b8d0f544ab6de60c0d7ff85ca23ec
      462c6319
    • David 'Digit' Turner's avatar
      Make STLPort support RTTI through GAbi++ · c8f94396
      David 'Digit' Turner authored
      This patch modifies our build of stlport to include the GAbi++
      runtime in order to support RTTI.
      
      Change-Id: I8ff1853ad886e217f3d0d8a9366fc5075c63cc34
      c8f94396
    • David 'Digit' Turner's avatar
      gabi++: Add missing new and delete operators · bb499f5b
      David 'Digit' Turner authored
      Also, for now we still need to depend on the system libstdc++
      to implement one-time-construction properly. We should probably
      implement that in GAbi++ itself, but this will come in another
      patch.
      
      Note that the system libstdc++ uses private Bionic functions
      that cannot easily be used in the NDK. Especially those related
      to device-specific memory barriers. A correct NDK implementation
      will likely use pthread mutexes instead.
      
      Change-Id: I2cd78aa4b0d9cf2d1e3036b38cbc223f4e0d4d5a
      bb499f5b
    • David 'Digit' Turner's avatar
      run-tests.sh: exact string match for --test=<name> option · bcb316b0
      David 'Digit' Turner authored
      This patch ensures that run-tests.sh uses an exact match.
      Before that, when using --test=test-stlport, it would
      try to run both test-stlport-rtti and test-stlport
      
      Change-Id: Id67e0e783b559639240d49f6c6803f5e71b1c065
      bcb316b0
  2. 29 Sep, 2011 2 commits
    • David 'Digit' Turner's avatar
      build-gcc.sh: Generate SOURCES file in final archive · dbb47199
      David 'Digit' Turner authored
      This patch modifies download-toolchain-sources.sh so that it
      creates a SOURCES file listing the SHA-1 states of every toolchain
      git repository that has been downloaded.
      
      Similarly, build-gcc.sh is modified to copy the file to the final
      install location / archive.
      
      Change-Id: Ifcc40a7e671c6e3f23613ac8bcc705bb9b9be448
      dbb47199
    • David 'Digit' Turner's avatar
      Support several C++ source file extensions · c6faf8bf
      David 'Digit' Turner authored
      This patch modifies the build system to allow one to
      list several C++ source file extensions in LOCAL_CPP_EXTENSION.
      
      + Check the value of LOCAL_CPP_EXTENSION and warn about values
        that do not start with a dot (and ignore them).
      
      Note that this doesn't change the default (which is to use '.cpp')
      
      Change-Id: I0b5dfe8699f90955560cd0dbf9f52336970aaabd
      c6faf8bf
  3. 21 Sep, 2011 9 commits
    • David 'Digit' Turner's avatar
      GAbi++: new C++ runtime with RTTI support · c38f5f52
      David 'Digit' Turner authored
      This patch adds a new C++ runtime that can be used by modules
      by setting APP_STL to either 'gabi++_static' or 'gabi++_shared'
      in their Application.mk
      
      GAbi++ is an alternative to the GNU libsupc++ that provides
      RTTI support (with exceptions added in the future).
      
      The goal is to use it to support RTTI (and later exceptions)
      with our version of STLport, or even a different non-GNU STL.
      
      + new build-gabi++.sh script to rebuild the prebuilt libraries
        from sources.
      
      + support in rebuild-all-prebuilt.sh
      
      + support in package-release.sh
      
      + Unit test to check that RTTI actually works, both in the
        static and shared library case.
      
      Change-Id: I7e73a31a4d24b5baa36fef357b69064c192ddc56
      c38f5f52
    • David 'Digit' Turner's avatar
      builder-funcs.sh: new shell functions · 13f38e96
      David 'Digit' Turner authored
      This patch introduces build/tools/builder-funcs.sh which contains
      several functions that can be used to build source files into
      static or shared libraries either directly or with the help of
      an auto-generated Makefile (in order to allow for parallel builds).
      
      Most of the functions come originally from build-stlport.sh which
      has been modified to use the new stuff in builder-funcs.sh
      
      Other NDK scripts will use this in the future to rebuild other
      prebuilt binaries.
      
      + Support for NDK_CCACHE to speed up rebuilds. E.g. build-stlport.sh
        now takes 0.9s on my machine (used to be 26s before that).
      
      Change-Id: I8ef97e62987f6aac6713821455d9a1ddcbbde796
      13f38e96
    • David 'Digit' Turner's avatar
      Add LOCAL_CPP_FEATURES support to Android.mk · c55bfcf6
      David 'Digit' Turner authored
      This is a new variable that can be used to specify that a
      given module relies on C++ exceptions or RTTI.
      
      This is done for several reasons:
      
      - First, we want to avoid always linking GNU libsupc++
        to every final binary, because we're soon going to
        provide an alternative.
      
      - Second, it is useful to declare prebuilt binaries that
        have been compiled with these features. It allows the
        final link to work correctly.
      
      Note that the change is backwards-compatible. You can still
      use -frtti or -fexceptions in your compiler flags to enable
      the features too.
      
      Change-Id: I24b28935e4446c55b169d35990ec2a379ac08500
      c55bfcf6
    • David 'Digit' Turner's avatar
      run-tests.sh: misc fixes. · 2364cdd5
      David 'Digit' Turner authored
      Fix 1: Ensure shared libraries can be loaded: When running
      test programs on the device that rely on a shared library,
      ensure that LD_LIBRARY_PATH is properly define to allow the
      program to load normally.
      
      Previously, launching the program from the script would fail
      with a "Can't link ..." error.
      
      Fix 2: Build unit tests in a non-random directory:
      
      This patch changes run-tests.sh to build all unit tests in a
      non random directory (/tmp/ndk-$USER/tests/build/).
      
      This speeds up (about 2x) running the test suite when NDK_CCACHE
      is being used, because the content of the auto-generated dependency
      files are no longer random anymore.
      
      Change-Id: I0c24d5b50cca4a36a0b7a05cad1e0c2dbcbe4822
      2364cdd5
    • David 'Digit' Turner's avatar
      Use shorter source/object/binary paths when possible. · 4507f6d3
      David 'Digit' Turner authored
      This patch modifies the way the NDK build script computes the
      value of NDK_PROJECT_PATH when it is not already defined.
      
      If we are in the project's top-level directory when ndk-build
      is invoked, we can use the value '.' for NDK_PROJECT_PATH.
      
      This reduces the length of all paths passed to build commands
      (source files, object files, binaries), which can be useful
      for modules with a ton of sources (especially on Cygwin where
      the maximum command-line lenght is quite limited).
      
      Change-Id: I35a60df243c156690dc3020983b6232cd9b92ec6
      4507f6d3
    • David 'Digit' Turner's avatar
      Fix transitive static library imports · 1208fe62
      David 'Digit' Turner authored
      Ensure that if 'foo' imports static library 'bar' which
      imports static library 'zoo', then libfoo.so will be linked
      against both libbar.a and libzoo.a
      
      Before this patch, only libbar.a was used, which resulted
      in a link error.
      
      Change-Id: Icabb2d8eaa4c09b12d00b71919b4c3723d4f90e6
      1208fe62
    • David 'Digit' Turner's avatar
      Allow imported shared libraries to be installed by default. · 5edfe75d
      David 'Digit' Turner authored
      This patch ensures that imported shared libraries are now copied
      to the install location (libs/<abi>) by default. Previously, one
      had to list them explicitely in APP_MODULES to do that (only
      top-level project modules were installed).
      
      Change-Id: I5a8628d2246d1ce4b4a8a56970fda64541bf3f19
      5edfe75d
    • David 'Digit' Turner's avatar
      Simplify non-Cygwin source compiles. · 8d06600a
      David 'Digit' Turner authored
      We don't need to rename the auto-generated dependency file when
      we're not running inside Cygwin, so simplify operations.
      
      In other words, before this patch, we would compile a source file
      on Unix with something like:
      
        gcc -c -MF foo.d.org   -o foo.o foo.c &&
        mv foo.d.org foo.d
      
      Now we will simply do:
      
        gcc -c -MF foo.d -o foo.o foo.c
      
      Compilation on Cygwin isn't changed.
      
      This makes the build commands dumped with V=1 easier to read.
      
      Change-Id: Ic6f256ecb779de6c75ff940a1f14680bfd87127b
      8d06600a
    • David 'Digit' Turner's avatar
      Add NDK_CCACHE support to GCC build · 53359177
      David 'Digit' Turner authored
      This patch allows host rebuild scripts to use NDK_CCACHE when
      it is defined.
      
      Unfortunately, this doesn't speed build-gcc.sh tremendously on
      my machine, because most of the build time is done with the second-phase
      "xgcc" binary that is generated during the first phase. Still shaves off
      20s out of 4m40s on my machine with -j32.
      
      Improvements should definitely be better for other host binaries.
      
      Change-Id: I7c0c8cfcab9600dc3317f1c9569602a457b88d57
      53359177
  4. 15 Sep, 2011 2 commits
    • David 'Digit' Turner's avatar
      Add ccache support to speed up rebuilds · 97f5b9de
      David 'Digit' Turner authored
      Define NDK_CCACHE=ccache in your environment and the NDK build
      system will automatically use the tool to speed-up your rebuilds.
      See http://ccache.samba.org for more details.
      
      Change-Id: I34c8084d4ef6e25326bbe1fd895d6fafd997e997
      97f5b9de
    • David 'Digit' Turner's avatar
      Support APP_ABI=all in Application.mk · bff91cbd
      David 'Digit' Turner authored
      This patch allows the use of 'APP_ABI := all' in your
      Application.mk or on the command-line to indicate that you
      want to build for all NDK-supported ABIs.
      
      This is shorter than typing the full list of known ABIs,
      and allows for an easy upgrade path when we'll introduce
      new supported ABIs in the future (if any).
      
      Change-Id: Ib5515727323fe1e3498b89acd0200969e2f793c5
      bff91cbd
  5. 14 Sep, 2011 1 commit
    • David 'Digit' Turner's avatar
      Improve NDK_DEBUG_MODULES output. · bb16bc70
      David 'Digit' Turner authored
      This improves the output of the module database when you
      define NDK_DEBUG_MODULES=1 when calling ndk-build.
      
      This really means that:
      
       - only dump the fields that are not empty
       - break multiple field value into several lines
         (it the value only has an item, print it in-line as before).
      
      + Fix doc typo
      
      Change-Id: Icbdd7fbd0b50bcaab2a18dd3898c732310958992
      bb16bc70
  6. 23 Aug, 2011 2 commits
  7. 19 Aug, 2011 1 commit
  8. 18 Aug, 2011 3 commits
    • David 'Digit' Turner's avatar
      Support project.properties file in project path. · 96f29ea3
      David 'Digit' Turner authored
      This patch modifies the NDK build system to support a file
      named 'project.properties' in the application's project directory
      to hold the value of the target platform.
      
      If the file is not present, 'default.properties' will be searched
      instead.
      
      This patch is in preparation of future changes to the SDK tools,
      which will rename/split default.properties and build.properties.
      
      Change-Id: I17da187f495a2dec21b1b8c7cbfd716ae7878f8b
      96f29ea3
    • David 'Digit' Turner's avatar
      Merge "Update NDK doc" · f110f83c
      David 'Digit' Turner authored
      f110f83c
    • David 'Digit' Turner's avatar
      Update NDK doc · 6b431897
      David 'Digit' Turner authored
      Change-Id: I66e7f2c2b4deb278b8cacd4dc60682d304fdf96a
      6b431897
  9. 09 Aug, 2011 1 commit
  10. 05 Aug, 2011 1 commit
  11. 15 Jul, 2011 2 commits
  12. 14 Jul, 2011 7 commits