diff options
author | Colin Cross <ccross@android.com> | 2021-09-08 15:00:20 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2021-10-01 12:21:28 -0700 |
commit | d848717095ce5ea00ada2890191064d073bb238f (patch) | |
tree | b7f45b50228c3600614814cdd31d120cb4770388 | |
parent | 3f150c198b93fa5e49d48bb535ac995f786edd0a (diff) | |
download | obstack-d848717095ce5ea00ada2890191064d073bb238f.tar.gz |
Compile libobstack for the platform
elfutils uses the obstack glibc extension, which isn't provided by musl.
Compile obstack.c from gcc's libiberty into libobstack for use alongside
musl.
Bug: 199322054
Test: m USE_HOST_MUSL=true libobstack
Change-Id: I26e28c9f967c493bad7f9150205c060bb602579a
-rw-r--r-- | Android.bp | 29 | ||||
-rw-r--r-- | android/config.h | 0 |
2 files changed, 29 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..e37836e --- /dev/null +++ b/Android.bp @@ -0,0 +1,29 @@ +package { + default_applicable_licenses: ["external_obstack_license"], +} + +license { + name: "external_obstack_license", + license_kinds: ["SPDX-license-identifier-LGPL-2.1"], + license_text: ["LICENSE"], +} + +cc_library_host_static { + name: "libobstack", + enabled: false, + target: { + musl: { + enabled: true, + }, + }, + srcs: [ + "libiberty/obstack.c", + ], + local_include_dirs: ["android"], + export_include_dirs: [ + "include", + ], + visibility: [ + "//external/elfutils:__subpackages__", + ], +} diff --git a/android/config.h b/android/config.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/android/config.h |