From 0958bc632763bca1023fdd66239808a7ce50e752 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 12 Jul 2018 16:55:08 -0700 Subject: [PATCH] AOSP: Update Android.bp files. debugfs now links to a new libext2_support library, which only includes cstring.c (Android separates other pieces of libsupport into separate libraries). e2fsck now builds with -Wno-unused-variable to work around an unused variable introduced by cabde4999d1d10b6ace32eaddc99699b91e40551. libext_e2p builds the new ljs.c file, and links to ws2_32 on Windows for ntohl(). Signed-off-by: Theodore Ts'o Change-Id: I42edce0478f1529f44acdbef1495ec5270e3a61e From AOSP commit: af14814afe0cb3389ecc4b9e9422bd7e8962e0ed --- debugfs/Android.bp | 1 + e2fsck/Android.bp | 2 +- lib/e2p/Android.bp | 10 ++++++++-- lib/support/Android.bp | 12 ++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/debugfs/Android.bp b/debugfs/Android.bp index 2a7d622..9f9a9f0 100644 --- a/debugfs/Android.bp +++ b/debugfs/Android.bp @@ -51,6 +51,7 @@ debugfs_libs = [ "libext2_quota", "libext2_com_err", "libext2_e2p", + "libext2_support", ] cc_binary { diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp index 475cea1..54cab96 100644 --- a/e2fsck/Android.bp +++ b/e2fsck/Android.bp @@ -37,7 +37,7 @@ cc_defaults { ], cflags: [ "-Wno-sign-compare", - "-fno-strict-aliasing" + "-fno-strict-aliasing", ], } diff --git a/lib/e2p/Android.bp b/lib/e2p/Android.bp index 148a576..d30272b 100644 --- a/lib/e2p/Android.bp +++ b/lib/e2p/Android.bp @@ -18,6 +18,7 @@ cc_library { "getversion.c", "hashstr.c", "iod.c", + "ljs.c", "ls.c", "mntopts.c", "parse_num.c", @@ -31,7 +32,10 @@ cc_library { "percent.c", ], - cflags: ["-Wno-error=attributes"], + cflags: [ + "-Wno-error=attributes", + "-Wno-unused-parameter", + ], target: { windows: { @@ -39,11 +43,13 @@ cc_library { enabled: true, cflags: [ "-Wno-unused-variable", - "-Wno-unused-parameter", ], clang_cflags: [ "-Wno-error=typedef-redefinition", ], + host_ldlibs: [ + "-lws2_32", + ], }, }, diff --git a/lib/support/Android.bp b/lib/support/Android.bp index e986e0e..894d335 100644 --- a/lib/support/Android.bp +++ b/lib/support/Android.bp @@ -50,3 +50,15 @@ cc_library_shared { export_include_dirs: ["."], export_header_lib_headers: ["libext2-headers"], } + +cc_library { + name: "libext2_support", + host_supported: true, + defaults: ["e2fsprogs-defaults"], + + srcs: [ + "cstring.c", + ], + header_libs: ["libext2-headers"], + export_include_dirs: ["."], +} -- 1.8.3.1