Edit: Merged! Thanks @metak
Heres a patch to fix clang lto compiling only modifying the PKGBUILD https://gist.github.com/xstefen/546d201257475c0ffbb954369453f692
Git Clone URL: | https://aur.archlinux.org/linux-clear.git (read-only, click to copy) |
---|---|
Keywords: | clear clearlinux intel kernel |
Submitter: | metak |
Maintainer: | metak |
Last Packager: | metak |
Votes: | 71 |
Popularity: | 1.57 |
First Submitted: | 2018-01-18 21:47 (UTC) |
Last Updated: | 2024-04-18 17:48 (UTC) |
« First ‹ Previous 1 2 3 4 5 6 7 8 .. 47 Next › Last »
Edit: Merged! Thanks @metak
Heres a patch to fix clang lto compiling only modifying the PKGBUILD https://gist.github.com/xstefen/546d201257475c0ffbb954369453f692
@seqfault I don't know since I don't run any benchmarks/tests. Upstream Clear team tests and develops with gcc in mind so I can't say anything about clang/llvm.
@metak thanks for explaining! how do you think, what will produce faster kernel binary: llvm16 without patch 162 but with lto, or gcc13 without lto, but with 162 optimizations?
hey @metak, now that llvm16 is in the stable repos, can we compile this with patch 162? if not, is there a way to build with gcc, but still have lto? also, should I use _subarch=44 now instead of 40, if using llvm16?
@tydynrain llvm/clang is unsupported upstream, comment out the latest patch Patch0162: 0162-extra-optmization-flags.patch
.
The past 3 versions of the linux-clear kernel have failed to build for me (it generally builds fine) with the following error message:
clang-15: error: optimization flag '-fivopts' is not supported [-Werror,-Wignored-optimization-argument]
clang-15: error: optimization flag '-fmodulo-sched' is not supported [-Werror,-Wignored-optimization-argument]
make[1]: *** [scripts/Makefile.build:252: scripts/mod/empty.o] Error 1
make: *** [Makefile:1286: prepare0] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Built OK after I first manually compressed /lib/firmware/amd-ucode/microcode_amd_fam19h.bin
into /lib/firmware/amd-ucode/microcode_amd_fam19h.bin.xz
.
6.3.10-1 fails to build for me:
make[5]: *** No rule to make target '/lib/firmware/amd-ucode/microcode_amd_fam19h.bin.xz', needed by 'drivers/base/firmware_loader/builtin/amd-ucode/microcode_amd_fam19h.bin.xz.gen.o'. Stop.
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:494: drivers/base/firmware_loader/builtin] Error 2
make[3]: *** [scripts/Makefile.build:494: drivers/base/firmware_loader] Error 2
Pinned Comments
metak commented on 2022-03-27 13:44 (UTC) (edited on 2022-04-02 13:20 (UTC) by metak)
The PKGBUILD file supports a few different configurable build-time options:
_makenconfig
Tweak kernel options prior to a build via nconfig. Pseudo-graphical menu based on ncurses. 1 2_localmodcfg
Only compile active modules to VASTLY reduce the number of modules built and the build time._subarch
Enable additional optimization/tuning for kernel builds by adding more micro-architectures options. Default isGeneric-x86-64
number36
if nothing else is selected._use_current
Use the current kernel's.config
file. Enabling this option will use the.config
of the RUNNING kernel rather than the ARCH defaults. Useful when the package gets updated and you already went through the trouble of customizing your config options. NOT recommended when a new kernel is released, but again, convenient for package bumps._use_llvm_lto
Compile the kernel with LLVM/Clang._debug
Enabley
some additional debug features present in arch kernel, but not in Clear upstream.n
to force disable or leave empty to ignore.Lastly, build the kernel by setting your environment variable
env _subarch=40 _localmodcfg=y
.metak commented on 2018-01-22 01:49 (UTC) (edited on 2021-12-01 12:47 (UTC) by metak)
1. Binaries available in my repo: http://download.opensuse.org/repositories/home:/metakcahura:/kernel/Arch_Extra_standard/x86_64/
THIS IS OPTIONAL:
2. After install adjust your boot cmd line. ClearLinux uses clr-boot-manager which takes care of that. This is upstream default: