1. 14 Oct, 2011 14 commits
  2. 12 Oct, 2011 2 commits
    • David 'Digit' Turner's avatar
      gen-platforms.sh: No libgcc symbols in shell libraries · 3c41e4cd
      David 'Digit' Turner authored
      This patch ensures that the shell system libraries that are
      generated by gen-platforms.sh never ever expose any symbol from
      libgcc.a.
      
      Fact is that libgcc.a is linked against any shared library on
      Android (be it a system or application library). Because the
      symbols in this library don't have hidden visibility by default,
      they get re-exported by the binaries (e.g. /system/lib/libc.so
      exports __div0 or _Unwind_Resume).
      
      When using the standalone toolchain, one can naively do something
      like the following:
      
        gcc -shared -o libfoo.so foo.o -lc
      
      Which gcc will translate as a link command that looks like:
      
        ld -o libfoo.so foo.o $SYSROOT/usr/lib/libc.so /path/to/libgcc.a
      
      In this case, references in foo.o to symbols like __div0, which
      are automatically created by the compiler under various circumstances,
      will result in a dynamic import for the '__div0' symbol, that will
      be looked inside the system libc.so at runtime.
      
      This is problematic because when we upgrade the toolchain used to
      build the system, we change the set of libgcc symbols exported by
      /system/lib/libc.so, and this may result in ABI breakages.
      
      What we want instead is for libfoo.so to have its own copy of
      __div0 et al. If our shell library in $SYSROOT/usr/lib/libc.so
      doesn't export the symbol, its code will be taken from libgcc.a
      and added to libfoo.so directly.
      
      Note that when we use the NDK build system, it ensures that libgcc.a
      is placed before any shared library in the final link command, i.e.
      that something like the following is used:
      
        ld -o libfoo.so foo.o /path/to/libgcc.a $SYSROOT/usr/lib/libc.so
      
      In this case, the problem doesn't exist because our build system
      enforces the correct ordering. This cannot be guaranteed when using
      the standalone toolchain unless this change is implemented.
      
      Change-Id: Ic195d21fe56c7118366c2536efa5fc264a7fb263
      3c41e4cd
    • David 'Digit' Turner's avatar
      docs/NATIVE-ACTIVITY.HTML: Fix typo · 958ae2d8
      David 'Digit' Turner authored
      Fixes http://code.google.com/p/android/issues/detail?id=20017
      
      Change-Id: Ibec86df874222792c236f943a97b1366c7e6ca58
      958ae2d8
  3. 11 Oct, 2011 4 commits
  4. 10 Oct, 2011 8 commits
  5. 07 Oct, 2011 12 commits
    • David 'Digit' Turner's avatar
      DEV-SCRIPTS-USAGE.TXT: new document · cd4b3969
      David 'Digit' Turner authored
      Change-Id: I298c5b7d84b1cbe9929e0471d940fc69c31aa284
      cd4b3969
    • David 'Digit' Turner's avatar
      ndk-stack: Improve Makefile · c129556e
      David 'Digit' Turner authored
      Change-Id: I735daef01d125f875facbb6141a4829f4950fc8a
      c129556e
    • David 'Digit' Turner's avatar
      prebuilt-common.sh: refinements · 251da5e2
      David 'Digit' Turner authored
      Change-Id: I26e43eef14ced900fade15058bd3d95b4fa3e369
      251da5e2
    • David 'Digit' Turner's avatar
      build-gcc.sh: Remove --copy-libstdcxx and --keep-libstdcxx options · 223fc9fc
      David 'Digit' Turner authored
      These options are obsolete. Instead, the build-gnu-libstdc++.sh
      script can be used to rebuild the GNU libstdc++ library directly.
      
      Change-Id: I281653915a5bce272ac8d593038291b73270c128
      223fc9fc
    • David 'Digit' Turner's avatar
      build-gnu-libstdc++.sh: refinements · d1fdfe9f
      David 'Digit' Turner authored
      + Add a patch to disable libtool versioning when building
        the GNU libstdc++.so
      
      Change-Id: I450513be84e00d02dd52a49ffccf18cfc9064e81
      d1fdfe9f
    • David 'Digit' Turner's avatar
      prebuilt-common.sh: add register_jobs_option · 2397ae75
      David 'Digit' Turner authored
      Change-Id: Ibed2026c0ff80041a4d024b7b15dc2c70240dc27
      2397ae75
    • David 'Digit' Turner's avatar
      gen-platforms.sh: Auto-generate <android/api-level.h> · 3806a2d1
      David 'Digit' Turner authored
      Auto-generate the <android/api-level.h> header which contains
      a single macro definition for the native API level that the code
      is built against.
      
      Previously, the corresponding files were stored under
      ../development/ndk and required manual updating, which is tedious
      and error-prone
      
      + remove obsolete dev-generate-api-levels.sh script
      
      Change-Id: Ibe482281dff7d86e0a46f6dd9d7096e3cc790e8e
      3806a2d1
    • David 'Digit' Turner's avatar
      gen-platforms.sh: Add --minimal flag · 4d704b59
      David 'Digit' Turner authored
      This flag is used to indicate that you only want to generate
      sysroots that can be used to build the host toolchains, so this
      will only copy the system headers and static objects/libraries.
      
      All samples and shared libraries are ignored, and symlinks are not
      used to speed up execution (so --no-samples and --no-symlinks are
      implied)
      
      + Drop --no-samples, and use --samples instead, since we only
        want to regenerate the samples directories when generating
        package releases.
      
      + Rename --no-symlinks to --fast-copy
      
      Change-Id: I110750a736f42ab5b34b5c6ca2a1c35ada3eba3d
      4d704b59
    • David 'Digit' Turner's avatar
      gen-platforms.sh: sort platforms properly · 08132bcb
      David 'Digit' Turner authored
      Ensures that the list of platforms is sorted in proper numerical
      order, i.e. that android-10 appears after android-9 and not before
      android-3
      
      + Don't make error message is a symbols directory doesn't exist
      (e.g. on x86 for API level < 9)
      
      Change-Id: I1fa5b8a43df1de4ee51059065d5c3e24dc90a5e2
      08132bcb
    • David 'Digit' Turner's avatar
      dev-platform-compress.sh: new script · a666d1c4
      David 'Digit' Turner authored
      Introduces a new script that can do the opposite of
      dev-platform-expand-all.sh, which is to compress the content of
      /tmp/ndk-$USER/platforms into /tmp/ndk-$USER/platforms-compressed
      
      This ensures that if two successive platforms to define the same
      header or symbol list, only the first is copied to the destination.
      
      You would typically use this script, then compare the content of
      /tmp/ndk-$USER/platforms-compressed with the one of
      $TOP/development/ndk/platforms to check what has changed.
      
      Change-Id: Id277f786789a2b2395259e0f392d3e9975526197
      a666d1c4
    • David 'Digit' Turner's avatar
      dev-platform-expand-all.sh: new script · 4cda6eb4
      David 'Digit' Turner authored
      This patch provides a new script that can call dev-platform-expand.sh
      for all API levels and all architectures automatically. This is useful
      to build a fully expanded tree in /tmp/ndk-$USER/platforms from the
      content of development/ndk
      
      Note that this only copies files, i.e. headers and symbol lists,
      it doesn't generate any shell libraries.
      
      Change-Id: Ib842c80b8985a7bc1b8f5764eed14ba7daec4216
      4cda6eb4
    • David 'Digit' Turner's avatar
      dev-platform-expand.sh: correct version ordering · fa0e6609
      David 'Digit' Turner authored
      Ensures that the platforms are sorted in numerical order, i.e.
      that android-10 will appear after android-9, instead of before android-3
      
      + Deal with non-existing symbols directories
      
      Change-Id: I58065514d3b8b1bce6bb524b945d5463953b2ffa
      fa0e6609