From: Bruno Martins Date: Fri, 20 Oct 2023 23:26:26 +0000 (+0100) Subject: mali-driver: Strip modules using llvm-strip X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=68e2272224f1d4ae59d619c6804ed346e1291888;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git mali-driver: Strip modules using llvm-strip With this, the GCC dependency is gone for good. Change-Id: If420868549f10a11d7c091751ca738b82bb48eef --- 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