X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=misc%2FAndroid.bp;h=78e18e420719fca3ef9137757f052460b7bb73c5;hb=59eed5421c2ccb262d31c08e6d07535d76fe5688;hp=9267b413114ab0a78c4d08fde2225b9ecb8f2421;hpb=88ca49f99becad31b8193b5e8e0c9719430745c9;p=tools%2Fe2fsprogs.git diff --git a/misc/Android.bp b/misc/Android.bp index 9267b41..78e18e4 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -2,26 +2,41 @@ // Library used to export files from this directory to other programs in this // project. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-LGPL + // SPDX-license-identifier-LGPL-2.1 + // SPDX-license-identifier-LGPL-3.0 + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_misc", host_supported: true, + recovery_available: true, + defaults: ["e2fsprogs-defaults"], target: { windows: { include_dirs: [ "external/e2fsprogs/include/mingw" ], - enabled: true + enabled: true, + cflags: ["-Wno-unused-variable"], }, }, srcs: [ "create_inode.c", ], - cflags: ["-W", "-Wall"], + cflags: ["-Wno-error=format-extra-args"], shared_libs: [ - "libext2_quota", "libext2fs", + "libext2_com_err", + "libext2_quota", ], - system_shared_libs: ["libc", "libdl"], export_include_dirs: ["."], } @@ -31,6 +46,8 @@ cc_library { cc_binary { name: "mke2fs", host_supported: true, + recovery_available: true, + defaults: ["e2fsprogs-defaults"], srcs: [ "mke2fs.c", @@ -38,10 +55,11 @@ cc_binary { "mk_hugefiles.c", "default_profile.c", ], - required: [ - "mke2fs.conf", + cflags: [ + "-Wno-error=format", + "-Wno-error=type-limits", + "-Wno-format-extra-args", ], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], target: { host: { static_libs: [ @@ -57,14 +75,29 @@ cc_binary { "libz", ], }, + not_windows: { + required: [ + "mke2fs.conf", + ], + }, windows: { include_dirs: [ "external/e2fsprogs/include/mingw" ], - cflags: ["-D_POSIX", "-D__USE_MINGW_ALARM"], + cflags: [ + "-D_POSIX", + "-D__USE_MINGW_ALARM", + // mke2fs.c has a warning from gcc which cannot be suppressed: + // passing argument 3 of 'ext2fs_get_device_size' from + // incompatible pointer type + "-Wno-error" + ], ldflags: ["-static"], host_ldlibs: ["-lws2_32"], enabled: true }, android: { + required: [ + "mke2fs.conf", + ], shared_libs: [ "libext2fs", "libext2_blkid", @@ -74,6 +107,7 @@ cc_binary { "libext2_com_err", "libext2_e2p", ], + symlinks: ["mkfs.ext2", "mkfs.ext3", "mkfs.ext4"], }, }, stl: "libc++_static", @@ -85,22 +119,18 @@ cc_binary { cc_defaults { name: "tune2fs-defaults", + defaults: ["e2fsprogs-defaults"], srcs: [ "tune2fs.c", "util.c", ], - cflags: [ - "-W", - "-Wall", - "-DNO_RECOVERY", - "-Wno-macro-redefined", - ], + cflags: ["-DNO_RECOVERY"], include_dirs: ["external/e2fsprogs/e2fsck"], } tune2fs_libs = [ - "libext2_com_err", "libext2_blkid", + "libext2_com_err", "libext2_quota", "libext2_uuid", "libext2_e2p", @@ -110,10 +140,10 @@ tune2fs_libs = [ cc_binary { name: "tune2fs", host_supported: true, + vendor_ramdisk_available: true, defaults: ["tune2fs-defaults"], shared_libs: tune2fs_libs, - system_shared_libs: ["libc", "libdl"], } cc_binary { @@ -121,7 +151,16 @@ cc_binary { static_executable: true, defaults: ["tune2fs-defaults"], - static_libs: tune2fs_libs + ["libc"], + static_libs: tune2fs_libs, +} + +cc_binary { + name: "tune2fs_ramdisk", + stem: "tune2fs", + static_executable: true, + ramdisk: true, + defaults: ["tune2fs-defaults"], + static_libs: tune2fs_libs, } cc_library_static { @@ -138,9 +177,9 @@ cc_library_static { cc_binary { name: "badblocks", host_supported: true, + defaults: ["e2fsprogs-defaults"], srcs: ["badblocks.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_com_err", @@ -148,23 +187,21 @@ cc_binary { "libext2_blkid", "libext2_e2p", ], - system_shared_libs: ["libc", "libdl"], } //######################################################################## // Build chattr cc_binary { - name: "chattr", + name: "chattr-e2fsprogs", host_supported: true, + defaults: ["e2fsprogs-defaults"], srcs: ["chattr.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2_com_err", "libext2_e2p", ], - system_shared_libs: ["libc", "libdl"], } //######################################################################## @@ -173,7 +210,7 @@ cc_binary { cc_defaults { name: "lsattr-defaults", srcs: ["lsattr.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], + defaults: ["e2fsprogs-defaults"], } lsattr_libs = [ @@ -182,12 +219,11 @@ lsattr_libs = [ ] cc_binary { - name: "lsattr", + name: "lsattr-e2fsprogs", host_supported: true, defaults: ["lsattr-defaults"], shared_libs: lsattr_libs, - system_shared_libs: ["libc", "libdl"], } cc_binary { @@ -195,7 +231,7 @@ cc_binary { static_executable: true, defaults: ["lsattr-defaults"], - static_libs: lsattr_libs + ["libc"], + static_libs: lsattr_libs, } //######################################################################## @@ -203,16 +239,15 @@ cc_binary { cc_binary { name: "blkid", + defaults: ["e2fsprogs-defaults"], srcs: ["blkid.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_blkid", "libext2_com_err", "libext2_e2p", ], - system_shared_libs: ["libc", "libdl"], } //######################################################################## @@ -221,14 +256,13 @@ cc_binary { cc_binary { name: "e4crypt", host_supported: true, + defaults: ["e2fsprogs-defaults"], srcs: ["e4crypt.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_uuid", ], - system_shared_libs: ["libc", "libdl"], target: { darwin: { @@ -243,14 +277,45 @@ cc_binary { cc_binary { name: "e2image", host_supported: true, + defaults: ["e2fsprogs-defaults"], srcs: ["e2image.c"], - cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", "libext2_blkid", "libext2_com_err", "libext2_quota", ], - system_shared_libs: ["libc", "libdl"], +} + +//########################################################################## +// Build filefrag + +cc_binary { + name: "filefrag", + host_supported: true, + defaults: ["e2fsprogs-defaults"], + + srcs: ["filefrag.c"], + shared_libs: [ + "libext2fs", + ], +} + +//########################################################################## +// Build e2freefrag + +cc_binary { + name: "e2freefrag", + host_supported: true, + defaults: ["e2fsprogs-defaults"], + + srcs: [ + "e2freefrag.c", + ], + header_libs: ["libext2-headers"], + shared_libs: [ + "libext2fs", + "libext2_com_err", + ], }