summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-12-15 08:39:04 (GMT)
committerAlexey Neyman <stilor@att.net>2018-12-15 08:39:04 (GMT)
commit9fc729b4b0335ea80d5bdd03705f2868d2f51db0 (patch)
treecf60d1c0dda636a29e856a53d21fef16cd0b2fc2 /scripts
parente46f6d9966770ddf0ddebf10af22237186f70219 (diff)
Bionic modifies CT_TARGET_CFLAGS
... which, after a recent change, is not reflected into CT_ALL_TARGET_CFLAGS for non-multilib configurations. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/libc/bionic.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh
index 9f04e61..e122d86 100644
--- a/scripts/build/libc/bionic.sh
+++ b/scripts/build/libc/bionic.sh
@@ -21,10 +21,14 @@ bionic_main()
CT_DoStep INFO "Installing C library binaries"
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
- # NB: Modifying CT_TARGET_CFLAGS here, not CT_ALL_TARGET_CFLAGS: the __ANDROID_API__
+ # NB: Modifying both CT_TARGET_CFLAGS and CT_ALL_TARGET_CFLAGS: the __ANDROID_API__
# definition needs to be passed into GCC build, or the resulting libstdc++ gets
# miscompiled (attempt to link against it results in unresolved symbols to stdout/...).
# And since __ANDROID_API__ is a user config option, placing it with other user-supplied
# options isn't completely out of character.
+ # On the other hand, CT_ALL_TARGET_CFLAGS in non-multilib builds is already set and does
+ # not get recalculated after GCC build, so setting CT_TARGET_CFLAGS is not reflected
+ # on other libraries/apps, such as gdbserver.
CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
+ CT_EnvModify CT_ALL_TARGET_CFLAGS "${CT_ALL_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
}