From 5f6614f32e2a319486015d0317f0652af42222e2 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 29 Jan 2019 18:07:55 -0800 Subject: [PATCH] AOSP: E2fsprogs: fix ODR issue Do not use whole_static_libs and shared_libs at the same time. Fix up clients. Signed-off-by: Theodore Ts'o Bug: 123590866 Test: mmma external/e2fsprogs Change-Id: I36d184dd878de2beacbb17c306e47076b44d68bb From AOSP commit: fece156b105719c782351e447298de073d4dab04 --- e2fsck/Android.bp | 1 + lib/ext2fs/Android.bp | 14 ++------------ lib/support/Android.bp | 1 + misc/Android.bp | 4 +++- resize/Android.bp | 1 + 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp index f3f70a0..f344312 100644 --- a/e2fsck/Android.bp +++ b/e2fsck/Android.bp @@ -44,6 +44,7 @@ cc_defaults { e2fsck_libs = [ "libext2fs", "libext2_blkid", + "libext2_com_err", "libext2_uuid", "libext2_quota", "libext2_e2p", diff --git a/lib/ext2fs/Android.bp b/lib/ext2fs/Android.bp index 5d10d3f..e09ec3f 100644 --- a/lib/ext2fs/Android.bp +++ b/lib/ext2fs/Android.bp @@ -91,24 +91,14 @@ cc_library { "test_io.c", ], shared_libs: [ + "libext2_com_err", "libsparse", "libz", ], - whole_static_libs: [ - "libext2_com_err" - ], cflags: ["-Wno-unused-parameter"], target: { - host: { - // Consider removing this library as a whole for the host. It is not - // in the android side. - whole_static_libs: ["libext2_com_err"], - }, android: { - shared_libs: [ - "libext2_com_err", - "libext2_uuid", - ], + shared_libs: [ "libext2_uuid" ], }, windows: { enabled: true, diff --git a/lib/support/Android.bp b/lib/support/Android.bp index 894d335..2bc07b7 100644 --- a/lib/support/Android.bp +++ b/lib/support/Android.bp @@ -21,6 +21,7 @@ cc_library { shared_libs: [ "libext2fs", "libext2_blkid", + "libext2_com_err", ], target: { diff --git a/misc/Android.bp b/misc/Android.bp index 301ce5d..dea2f9f 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -21,8 +21,9 @@ cc_library { ], cflags: ["-Wno-error=format-extra-args"], shared_libs: [ - "libext2_quota", "libext2fs", + "libext2_com_err", + "libext2_quota", ], system_shared_libs: ["libc", "libdl"], export_include_dirs: ["."], @@ -118,6 +119,7 @@ cc_defaults { tune2fs_libs = [ "libext2_blkid", + "libext2_com_err", "libext2_quota", "libext2_uuid", "libext2_e2p", diff --git a/resize/Android.bp b/resize/Android.bp index 22d2408..d55e24c 100644 --- a/resize/Android.bp +++ b/resize/Android.bp @@ -15,6 +15,7 @@ cc_binary { ], shared_libs: [ "libext2fs", + "libext2_com_err", "libext2_e2p", "libext2_uuid", "libext2_blkid", -- 1.8.3.1