From 68e2272224f1d4ae59d619c6804ed346e1291888 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sat, 21 Oct 2023 00:26:26 +0100 Subject: [PATCH] mali-driver: Strip modules using llvm-strip With this, the GCC dependency is gone for good. Change-Id: If420868549f10a11d7c091751ca738b82bb48eef --- bifrost/Android.mk | 4 ++-- midgard/Android.mk | 4 ++-- utgard/Android.mk | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bifrost/Android.mk b/bifrost/Android.mk index 2347730..f1a4bcd 100644 --- a/bifrost/Android.mk +++ b/bifrost/Android.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 The LineageOS Project +# Copyright (C) 2021-2023 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ $(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) @mkdir -p $(dir $@) @cp -R $(MALI_PATH)/* $(dir $@)/ $(PATH_OVERRIDE) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules - $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \ + $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \ cp $(dir $@)/$(GPU_PATH)/mali_kbase.ko $@; include $(BUILD_SYSTEM)/base_rules.mk diff --git a/midgard/Android.mk b/midgard/Android.mk index cc78036..da3c001 100644 --- a/midgard/Android.mk +++ b/midgard/Android.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 The LineageOS Project +# Copyright (C) 2021-2023 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ $(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) @mkdir -p $(dir $@) @cp -R $(MALI_PATH)/* $(dir $@)/ $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules - $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \ + $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali_kbase.ko; \ cp $(dir $@)/$(GPU_PATH)/mali_kbase.ko $@; include $(BUILD_SYSTEM)/base_rules.mk diff --git a/utgard/Android.mk b/utgard/Android.mk index 37c4d6a..5e09215 100644 --- a/utgard/Android.mk +++ b/utgard/Android.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 The LineageOS Project +# Copyright (C) 2021-2023 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ $(_mali_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) @cp -R $(MALI_PATH)/* $(dir $@)/ @cp -R $(MALI_PATH)/$(MALI_GPU_VARIANT)/platform $(dir $@)/$(GPU_PATH) $(hide) +$(KERNEL_MAKE_CMD) $(PATH_OVERRIDE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_mali_intermediates))/$(GPU_PATH) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) EXTRA_CFLAGS="$(GPU_CFLAGS)" $(GPU_CONFIGS) modules - $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali.ko; \ + $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $(dir $@)/$(GPU_PATH)/mali.ko; \ cp $(dir $@)/$(GPU_PATH)/mali.ko $@; include $(BUILD_SYSTEM)/base_rules.mk -- 2.20.1