Sample Header Ad - 728x90

unrecognized option '-EL'

1 vote
0 answers
1984 views
I'm trying to build an android kernel. On every build I get a few errors: - /usr/bin/as: unrecognized option '-EL' clang-16: error: assembler command failed with exit code 1 (use -v to see invocation) - warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct group cgrp; - warning: unused function 'dump_workqueue' [-Wunused-function] static void dump_workqueue(void) {} Here are what I've tried so far 1. I tried different versions of clang, including proton-clang . 2. Tried different build methods, with and without a .sh script - basically followed the advice from YouTube build videos (here are some of them: one , two , three ). 3. Tried changing distribute linux. 4. Tried to change kernel build configuration. 5. At the end, I combined several options and results from this question , but unfortunately it didn't work for me. No more ideas and information on the Internet. Please help me how to solve this. I use clang-r475365b and gcc android-11.0.0_r48 My Kernel: https://github.com/OnePlusOSS/android_kernel_oneplus_sm8250/tree/oneplus/SM8250_R_11.0 My build.sh: #!/usr/bin/bash if [[ -d "out" ]] then cd out && make clean && make distclean && make mrproper && cd .. else mkdir -p out fi make O=out ARCH=arm64 vendor/bengal-perf_defconfig PATH="${HOME}/heh/Desktop/clang/bin:${HOME}/heh/Desktop/toolchains/bin${PATH}" \ LD_LIBRARY_PATH="${HOME}/heh/Desktop/clang/lib:${HOME}/heh/Desktop/toolchains/lib${PATH}" \ make O=out \ ARCH=arm64 \ SUBARCH=arm64 \ CROSS_COMPILE=aarch64-linux-android- \ CROSS_COMPILER=$PATH \ CLANG_TRIPLE=aarch64-linux-gnu- \ RANLIB=/home/heh/Desktop/clang/bin/llvm-ranlib \ CC='/home/heh/Desktop/clang/bin/clang -fintegrated-as' \ AR=/home/heh/Desktop/clang/bin/llvm-ar \ AS=/home/heh/Desktop/clang/bin/llvm-as \ NM=/home/heh/Desktop/clang/bin/llvm-nm \ OBJCOPY=/home/heh/Desktop/clang/bin/llvm-objcopy \ OBJDUMP=/home/heh/Desktop/clang/bin/llvm-objdump \ READELF=/home/heh/Desktop/clang/bin/llvm-readelf \ OBJSIZE=/home/heh/Desktop/clang/bin/llvm-size \ STRIP=/home/heh/Desktop/clang/bin/llvm-strip \ -j4 I took it from here , but the solution presented there did not help
Asked by JohnTit (11 rep)
Feb 11, 2023, 03:16 PM
Last activity: Feb 11, 2023, 11:21 PM