Closed digitalrayne closed 5 years ago
This can be worked around by disabling CONFIG_CRYPTO_FIPS
.
It seems there are general issues compiling the arm64 crypto portion of the kernel with the prebuilt GCC 4.9 toolchain using the defconfig. Now that I am passed the above error, I am getting:
CC arch/arm64/crypto/sha2-ce-glue.o
/tmp/sha2-ce-glue-b2f90c.s: Assembler messages:
/tmp/sha2-ce-glue-b2f90c.s:668: Error: bad expression
/tmp/sha2-ce-glue-b2f90c.s:668: Error: junk at end of line, first unrecognized character is `3'
/tmp/sha2-ce-glue-b2f90c.s:672: Error: bad expression
/tmp/sha2-ce-glue-b2f90c.s:672: Error: junk at end of line, first unrecognized character is `1'
clang-6.0: error: assembler command failed with exit code 1 (use -v to see invocation)
/srv/src/LINEAGE_16_0/kernel/samsung/exynox-stable-crownlte/scripts/Makefile.build:334: recipe for target 'arch/arm64/crypto/sha2-ce-glue.o' failed
make[2]: *** [arch/arm64/crypto/sha2-ce-glue.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/sha1-ce-glue-4cfe51.s: Assembler messages:
/tmp/sha1-ce-glue-4cfe51.s:637: Error: bad expression
/tmp/sha1-ce-glue-4cfe51.s:637: Error: junk at end of line, first unrecognized character is `2'
/tmp/sha1-ce-glue-4cfe51.s:641: Error: bad expression
/tmp/sha1-ce-glue-4cfe51.s:641: Error: junk at end of line, first unrecognized character is `9'
clang-6.0: error: assembler command failed with exit code 1 (use -v to see invocation)
/srv/src/LINEAGE_16_0/kernel/samsung/exynox-stable-crownlte/scripts/Makefile.build:334: recipe for target 'arch/arm64/crypto/sha1-ce-glue.o' failed
make[2]: *** [arch/arm64/crypto/sha1-ce-glue.o] Error 1
/srv/src/LINEAGE_16_0/kernel/samsung/exynox-stable-crownlte/Makefile:1124: recipe for target 'arch/arm64/crypto' failed
make[1]: *** [arch/arm64/crypto] Error 2
make[1]: Leaving directory '/srv/src/LINEAGE_16_0/out/target/product/crownlte/obj/KERNEL_OBJ'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/srv/src/LINEAGE_16_0/kernel/samsung/exynox-stable-crownlte'
I found a section in my board config where I was enabling (which I understand is the default now) clang 6.0 for compiling the kernel - I've disabled this an will try to rebuild.
Ah, so potentially this kernel is missing the clang patchset - https://android.googlesource.com/kernel/common/+log/5d15d2e00da4bcb0bcc5e6d27dc18fe1646214f1
Namely - https://android.googlesource.com/kernel/common/+/e2b2ca94b0e101b3f24d82a1934151f29b738121
Confirmed that these issues were not present with GCC, and that the clang patchsets seem to be missing from these kernel sources.
SAMSUNG sources for 9810 are not clang ready. Kernel compiles fine with GCC.
It would make sense to leave this open, then, until the CLANG patchset was merged, given all Android kernels are compiled with clang. Otherwise folks wlll keep tripping over this.
Not "all Android kernels" are compiled with clang, but they are with gcc. Also, new devices may compile just fine with clang due to newer source.
When building using the standard LineageOS prebuild arm gcc 4.9 toolchain, I get the following error relating to the
optimize
attribute being ignored. Is gcc 4.9 supported for this branch?