Add LOCAL_LICENSE_KINDS to bionic

Added SPDX-license-identifier-Apache-2.0 to:
  apex/Android.bp
  libdl/Android.bp
  tools/Android.bp
  tools/versioner/Android.bp
  tools/versioner/src/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  benchmarks/Android.bp
  benchmarks/linker_relocation/gen/Android.bp
  libc/malloc_debug/Android.bp
  libc/system_properties/Android.bp
  tests/Android.bp
  tests/libs/Android.bp
  tests/libs/Android.build.dlext_testzip.mk
  tests/make_fortify_compile_test.mk

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-ISC SPDX-license-identifier-MIT
    legacy_notice legacy_unencumbered
to:
  libc/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT legacy_unencumbered
to:
  libm/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered
to:
  libc/tools/Android.bp

Added SPDX-license-identifier-BSD
to:
  benchmarks/linker_relocation/Android.bp
  benchmarks/spawn/Android.bp
  libc/async_safe/Android.bp
  libc/malloc_hooks/Android.bp
  libfdtrack/Android.bp
  linker/Android.bp
  tests/headers/Android.bp
  tests/headers/posix/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Ib05bcaa276b3aa71a7654ccbe8e67e1f16aec9f3
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
index 61084a1..5dfc38f 100644
--- a/benchmarks/Android.bp
+++ b/benchmarks/Android.bp
@@ -14,6 +14,22 @@
 // limitations under the License.
 //
 
+package {
+    default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
+license {
+    name: "bionic_benchmarks_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+    ],
+    license_text: [
+        "NOTICE",
+    ],
+}
+
 cc_defaults {
     name: "bionic-benchmarks-defaults",
     cflags: [
diff --git a/benchmarks/linker_relocation/Android.bp b/benchmarks/linker_relocation/Android.bp
index f8ef9e0..b41d093 100644
--- a/benchmarks/linker_relocation/Android.bp
+++ b/benchmarks/linker_relocation/Android.bp
@@ -24,6 +24,10 @@
 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 // SUCH DAMAGE.
 
+package {
+    default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
 cc_library_headers {
     name: "linker_reloc_bench_headers",
     defaults: ["bionic_spawn_benchmark_targets"],
diff --git a/benchmarks/linker_relocation/gen/Android.bp b/benchmarks/linker_relocation/gen/Android.bp
index e535e53..c8f0b4a 100644
--- a/benchmarks/linker_relocation/gen/Android.bp
+++ b/benchmarks/linker_relocation/gen/Android.bp
@@ -1,4 +1,8 @@
 // AUTO-GENERATED BY gen_bench.py -- do not edit
+package {
+    default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
 cc_defaults {
     name: "linker_reloc_bench_all_libs",
     runtime_libs: [
diff --git a/benchmarks/spawn/Android.bp b/benchmarks/spawn/Android.bp
index 689e7c9..89d22e3 100644
--- a/benchmarks/spawn/Android.bp
+++ b/benchmarks/spawn/Android.bp
@@ -26,6 +26,10 @@
 // SUCH DAMAGE.
 //
 
+package {
+    default_applicable_licenses: ["bionic_benchmarks_license"],
+}
+
 cc_defaults {
     name: "bionic_spawn_benchmark_targets",
     host_supported: true,