optee: Strip modules using llvm-strip
authorBruno Martins <bgcngm@gmail.com>
Fri, 20 Oct 2023 23:24:58 +0000 (00:24 +0100)
committerBruno Martins <bgcngm@gmail.com>
Fri, 20 Oct 2023 23:24:58 +0000 (00:24 +0100)
With this, the GCC dependency is gone for good.

Change-Id: I5f08e4f32ea223f39aaee9e762f3c825c82e5d41

Android.mk

index 737d58b008ccaf35b4a98e02363c9c3d40ccbba1..67f112cd1175474e8ba3cf06b03d9e2938d98b6c 100644 (file)
@@ -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.
@@ -37,7 +37,7 @@ $(_optee_ko): $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME)
        $(PATH_OVERRIDE) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_OUT) M=$(abspath $(_optee_intermediates)) ARCH=$(TARGET_KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) modules
        modules=$$(find $(_optee_intermediates) -type f -name '*.ko'); \
        for f in $$modules; do \
-               $(KERNEL_TOOLCHAIN_PATH)strip --strip-unneeded $$f; \
+               $(TARGET_KERNEL_CLANG_PATH)/bin/llvm-strip --strip-unneeded $$f; \
                cp $$f $(KERNEL_MODULES_OUT)/lib/modules; \
        done;
        touch $(_optee_intermediates)/optee-module.ko