diff options
author | Alexey Neyman <stilor@att.net> | 2018-12-15 01:11:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-15 01:11:31 -0800 |
commit | eb72b4eb1ded5492ba839cb1aa33cbe9f5f11584 (patch) | |
tree | cf60d1c0dda636a29e856a53d21fef16cd0b2fc2 | |
parent | de48268390eacb4a3e69c7d504e618a45d2a19eb (diff) | |
parent | 9fc729b4b0335ea80d5bdd03705f2868d2f51db0 (diff) | |
download | crosstool-ng-eb72b4eb1ded5492ba839cb1aa33cbe9f5f11584.tar.gz crosstool-ng-eb72b4eb1ded5492ba839cb1aa33cbe9f5f11584.tar.bz2 crosstool-ng-eb72b4eb1ded5492ba839cb1aa33cbe9f5f11584.zip |
Merge pull request #1117 from stilor/fix-android
Fix android sample
-rw-r--r-- | scripts/build/libc.sh | 4 | ||||
-rw-r--r-- | scripts/build/libc/bionic.sh | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/build/libc.sh b/scripts/build/libc.sh index fb1ebe54..0d03bf00 100644 --- a/scripts/build/libc.sh +++ b/scripts/build/libc.sh @@ -4,8 +4,8 @@ # Define default hooks - download/unpack just the main package; no-op build hooks. # The actual implementation can override just what it needs then. -eval "${CT_LIBC//[^A-Za-z0-9]/_}_get() { CT_Fetch ${CT_LIBC_CHOICE_KSYM}; }" -eval "${CT_LIBC//[^A-Za-z0-9]/_}_extract() { CT_ExtractPatch ${CT_LIBC_CHOICE_KSYM}; }" +eval "${CT_LIBC//[^A-Za-z0-9]/_}_get() { CT_Fetch \"\${CT_LIBC_${CT_LIBC_CHOICE_KSYM}_PKG_KSYM}\"; }" +eval "${CT_LIBC//[^A-Za-z0-9]/_}_extract() { CT_ExtractPatch \"\${CT_LIBC_${CT_LIBC_CHOICE_KSYM}_PKG_KSYM}\"; }" for _m in start_files main post_cc; do eval "${CT_LIBC//[^A-Za-z0-9]/_}_${_m}() { :; }" done diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh index 9f04e61c..e122d860 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}" } |