From 80f42e1d15003c38da01eaff8766f449f4f429b4 Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Wed, 16 Jun 2021 18:00:06 +0300 Subject: [PATCH] AOSP: Do not add '-Wl,--gc-sections' to the linker arguments With '-Wl,--gc-sections' meson.build cc.has_function() will never fail, providing wrong input to the build system. Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson") Signed-off-by: Roman Stratiienko Tested-by: Mauro Rossi Part-of: --- android/mesa3d_cross.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk index ac06efcee15..da63cc9393f 100644 --- a/android/mesa3d_cross.mk +++ b/android/mesa3d_cross.mk @@ -170,8 +170,9 @@ define m-lld-flags-cleaned $(subst out/,$(AOSP_ABSOLUTE_PATH)/out/, \ $(subst -Wl$(comma)--fatal-warnings,, \ $(subst -Wl$(comma)--no-undefined-version,, \ - $(patsubst %dummy.o,, \ - $(m-lld-flags)))))) + $(subst -Wl$(comma)--gc-sections,, \ + $(patsubst %dummy.o,, \ + $(m-lld-flags))))))) endef define m-cpp-flags