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
This commit is contained in:
Bob Badour 2021-02-19 13:06:22 -08:00 committed by Elliott Hughes
parent d29cac66b4
commit aa7d835fdd
24 changed files with 234 additions and 1 deletions

View file

@ -3,6 +3,21 @@
// In Q this contained Bionic, ART and Libcore.
// It keeps the name /apex/com.android.runtime for app compat reasons.
package {
default_applicable_licenses: ["bionic_apex_license"],
}
license {
name: "bionic_apex_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
android_app_certificate {
name: "com.android.runtime.certificate",
certificate: "com.android.runtime",

View file

@ -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: [

View file

@ -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"],

View file

@ -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: [

View file

@ -26,6 +26,10 @@
// SUCH DAMAGE.
//
package {
default_applicable_licenses: ["bionic_benchmarks_license"],
}
cc_defaults {
name: "bionic_spawn_benchmark_targets",
host_supported: true,

View file

@ -1,5 +1,25 @@
// Define the common source files for all the libc instances
// =========================================================
package {
default_applicable_licenses: ["bionic_libc_license"],
}
license {
name: "bionic_libc_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-ISC",
"SPDX-license-identifier-MIT",
"legacy_notice",
"legacy_unencumbered",
],
license_text: [
"NOTICE",
],
}
libc_common_src_files = [
"async_safe/async_safe_log.cpp",
"bionic/ether_aton.c",

View file

@ -1,6 +1,15 @@
// ========================================================
// libasync_safe.a
// ========================================================
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "bionic_libc_license"
// to get the below license kinds:
// SPDX-license-identifier-BSD
default_applicable_licenses: ["bionic_libc_license"],
}
cc_library_static {
defaults: ["libc_defaults"],
srcs: [

View file

@ -2,6 +2,16 @@
// libc_malloc_debug_backtrace.a
// ==============================================================
// Used by libmemunreachable
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "bionic_libc_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
// SPDX-license-identifier-BSD
default_applicable_licenses: ["bionic_libc_license"],
}
cc_library_static {
name: "libc_malloc_debug_backtrace",
vendor_available: true,

View file

@ -1,6 +1,15 @@
// ==============================================================
// libc_malloc_hooks.so
// ==============================================================
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "bionic_libc_license"
// to get the below license kinds:
// SPDX-license-identifier-BSD
default_applicable_licenses: ["bionic_libc_license"],
}
cc_library {
name: "libc_malloc_hooks",

View file

@ -1,3 +1,13 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "bionic_libc_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
// SPDX-license-identifier-BSD
default_applicable_licenses: ["bionic_libc_license"],
}
cc_library_static {
name: "libsystemproperties",
defaults: ["libc_defaults"],

View file

@ -1,3 +1,13 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "bionic_libc_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
// legacy_unencumbered
default_applicable_licenses: ["bionic_libc_license"],
}
filegroup {
name: "bionic-gensyscalls",
srcs: ["gensyscalls.py"]

View file

@ -1,6 +1,21 @@
//
// libdl
//
package {
default_applicable_licenses: ["bionic_libdl_license"],
}
license {
name: "bionic_libdl_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
cc_library_static {
name: "libdl_static",
defaults: ["linux_bionic_supported"],

View file

@ -1,3 +1,18 @@
package {
default_applicable_licenses: ["bionic_libfdtrack_license"],
}
license {
name: "bionic_libfdtrack_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
],
}
cc_library_shared {
name: "libfdtrack",
srcs: ["fdtrack.cpp"],

View file

@ -1,6 +1,24 @@
//
// libm.so and libm.a for target.
//
package {
default_applicable_licenses: ["bionic_libm_license"],
}
license {
name: "bionic_libm_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-MIT",
"legacy_unencumbered",
],
license_text: [
"NOTICE",
],
}
cc_library {
name: "libm",
defaults: ["linux_bionic_supported"],

View file

@ -9,6 +9,21 @@
// embedded as the entry point, and the linker is embedded as ELF sections in
// each binary. There's a linker script that sets all of that up (generated by
// extract_linker), and defines the extern symbols used in this file.
package {
default_applicable_licenses: ["bionic_linker_license"],
}
license {
name: "bionic_linker_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
],
}
cc_object {
name: "linker_wrapper",
host_supported: true,

View file

@ -14,6 +14,22 @@
// limitations under the License.
//
package {
default_applicable_licenses: ["bionic_tests_license"],
}
license {
name: "bionic_tests_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
],
}
cc_defaults {
name: "bionic_tests_defaults",
host_supported: true,

View file

@ -1 +1,5 @@
package {
default_applicable_licenses: ["bionic_tests_license"],
}
subdirs = ["*"]

View file

@ -14,6 +14,10 @@
// limitations under the License.
//
package {
default_applicable_licenses: ["bionic_tests_license"],
}
cc_library_static {
name: "libbionic_tests_headers_posix",
srcs: ["*.c"],

View file

@ -14,6 +14,10 @@
// limitations under the License.
//
package {
default_applicable_licenses: ["bionic_tests_license"],
}
cc_defaults {
name: "bionic_testlib_defaults",
host_supported: true,

View file

@ -24,6 +24,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NATIVE_TESTS
LOCAL_MODULE := libdlext_test_zip_zipaligned
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_SUFFIX := .zip
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test_zip
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
@ -49,6 +52,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NATIVE_TESTS
LOCAL_MODULE := libdlext_test_runpath_zip_zipaligned
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_SUFFIX := .zip
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/bionic-loader-test-libs/libdlext_test_runpath_zip
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
@ -94,4 +100,3 @@ $(LOCAL_BUILT_MODULE) : $(lib_d) $(lib_a) $(lib_b) $(lib_c) $(lib_x) $(lib_y) $(
$(hide) touch $(dir $@)/zipdir/empty_file.txt
$(hide) (cd $(dir $@)/zipdir && zip -qrD0 ../$(notdir $@).unaligned .)
$(hide) $(BIONIC_TESTS_ZIPALIGN) 4096 $@.unaligned $@

View file

@ -9,6 +9,9 @@ LOCAL_CXX := $(LOCAL_PATH)/touch-obj-on-success \
LOCAL_CLANG := true
LOCAL_MODULE := bionic-compile-time-tests$(FORTIFY_LEVEL)-clang++
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_TIDY := false
LOCAL_CPPFLAGS := -Wall -Wno-error
LOCAL_CPPFLAGS += -fno-color-diagnostics -ferror-limit=10000 -Xclang -verify

View file

@ -1,3 +1,18 @@
package {
default_applicable_licenses: ["bionic_tools_license"],
}
license {
name: "bionic_tools_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
subdirs = ["*"]
filegroup {

View file

@ -1,3 +1,7 @@
package {
default_applicable_licenses: ["bionic_tools_license"],
}
subdirs = [
"src",
]

View file

@ -1,3 +1,7 @@
package {
default_applicable_licenses: ["bionic_tools_license"],
}
cc_binary_host {
name: "versioner",