summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorAlessandro Astone <ales.astone@gmail.com>2022-07-24 21:10:41 +0200
committerMarge Bot <emma+marge@anholt.net>2022-09-05 22:10:07 +0000
commita68e2b810c7cd3ce217f7d5f69fd9124eacfa921 (patch)
tree0a169c35c9efeaf82f48eccae073205eeb8bed58 /android
parent554b19b616a16ad049e73d036660a271be00c572 (diff)
Android.mk: Provide a custom entry name to ensure meson checks succeed
When meson tests for the compability of some linker flags, not having the default entry symbol "_start" defined makes the check fail for a warning unrelated to the linker flag meson is testing. Since these tests normally just try to compile a C program with a main, use "main" as the ficticious entry point. Specifically, this makes "-Wl,--build-id=sha1" recognised as valid and allows its use for drivers that rely on it. This is a temporary workaround that is required until Android.mk is changed to support both shared libraries and executables. Cc: "22.0" "22.1" "22.2" mesa-stable Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17715>
Diffstat (limited to 'android')
-rw-r--r--android/mesa3d_cross.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk
index 5375a9f5af4..c6c2157f542 100644
--- a/android/mesa3d_cross.mk
+++ b/android/mesa3d_cross.mk
@@ -149,6 +149,7 @@ $(MESON_GEN_FILES_TARGET): PRIVATE_TARGET_CRTEND_SO_O := $(my_target_crtend_so_o
##
define m-lld-flags
+ -Wl,-e,main \
-nostdlib -Wl,--gc-sections \
$(PRIVATE_TARGET_CRTBEGIN_SO_O) \
$(PRIVATE_ALL_OBJECTS) \