From: Alex Deymo Date: Thu, 26 Jan 2017 01:47:50 +0000 (-0800) Subject: AOSP: Add "libc" to soong static_executable targets. X-Git-Tag: v1.44.0-rc1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c32f4899a837c7f4c3a421d0a8016d8f4e82224;p=thirdparty%2Fe2fsprogs.git AOSP: Add "libc" to soong static_executable targets. When building a static exectuable for "arm", the libgcc is automatically included by the build system *after* libc, but libgcc has some symbol dependencies on "libc", like for example the "raise" symbol. libgcc, libatomic and libcompiler_rt-extras are passed in a group (enclosed by --start-group and --end-group) so they all are included regardless of the order inside that group. Nevertheless libc only appears outside this group and before them, so the undefined references from libgcc are not resolved. This patch adds "libc" as a explicit static_libs dependency to static_executable targets forcing it to be included in the group. Bug: 34220783 Test: mmma external/e2fsprogs Change-Id: Ia18db10da0f18494600d7e0c870291902d71b287 From AOSP commit: b799ad178fa18c2925a283206496d3f5d6e87f35 Signed-off-by: Theodore Ts'o --- diff --git a/debugfs/Android.bp b/debugfs/Android.bp index be0042ad1..b60b45354 100644 --- a/debugfs/Android.bp +++ b/debugfs/Android.bp @@ -67,5 +67,5 @@ cc_binary { static_executable: true, defaults: ["debugfs-defaults"], - static_libs: debugfs_libs, + static_libs: debugfs_libs + ["libc"], } diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp index 68b475057..0e1f9b881 100644 --- a/e2fsck/Android.bp +++ b/e2fsck/Android.bp @@ -60,5 +60,5 @@ cc_binary { static_executable: true, defaults: ["e2fsck-defaults"], - static_libs: e2fsck_libs, + static_libs: e2fsck_libs + ["libc"], } diff --git a/misc/Android.bp b/misc/Android.bp index be63b4c87..f75c9d158 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -85,7 +85,7 @@ cc_binary { static_executable: true, defaults: ["tune2fs-defaults"], - static_libs: tune2fs_libs, + static_libs: tune2fs_libs + ["libc"], } cc_library_static { @@ -159,7 +159,7 @@ cc_binary { static_executable: true, defaults: ["lsattr-defaults"], - static_libs: lsattr_libs, + static_libs: lsattr_libs + ["libc"], } //########################################################################