From a68e2b810c7cd3ce217f7d5f69fd9124eacfa921 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sun, 24 Jul 2022 21:10:41 +0200 Subject: [PATCH] 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 Part-of: --- android/mesa3d_cross.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk index 5375a9f..c6c2157 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) \ -- 2.7.4