mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-07-04 07:45:43 +00:00
rosenthal: linux: Build kernels with default compiler and options.
* rosenthal/packages/linux.scm (linux-xanmod,linux-hardened): Build with gcc and default flags. (%cflags,%ldflags): Delete variables. Signed-off-by: Hilton Chain <hako@ultrarare.space>
This commit is contained in:
parent
02e58caf7f
commit
4b82e7f2c8
@ -31,15 +31,6 @@
|
|||||||
(define %upstream-linux-source
|
(define %upstream-linux-source
|
||||||
(@@ (gnu packages linux) %upstream-linux-source))
|
(@@ (gnu packages linux) %upstream-linux-source))
|
||||||
|
|
||||||
(define %cflags
|
|
||||||
(string-append
|
|
||||||
" -flto" " -fpic" " -fpie" " -fvisibility=hidden" " -fwrapv" " -pipe"
|
|
||||||
" -fsanitize=cfi" " -fstack-clash-protection" " -fstack-protector-strong"
|
|
||||||
" -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"
|
|
||||||
" -ftrivial-auto-var-init=zero -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS"))
|
|
||||||
|
|
||||||
(define %ldflags "-Wl,-z,defs -Wl,-z,now -Wl,-z,relro -Wl,-pie")
|
|
||||||
|
|
||||||
(define %xanmod-version "6.1.7")
|
(define %xanmod-version "6.1.7")
|
||||||
(define %xanmod-revision "xanmod1")
|
(define %xanmod-revision "xanmod1")
|
||||||
|
|
||||||
@ -88,17 +79,11 @@
|
|||||||
|
|
||||||
(define-public linux-xanmod
|
(define-public linux-xanmod
|
||||||
(let ((base (customize-linux #:name "linux-xanmod"
|
(let ((base (customize-linux #:name "linux-xanmod"
|
||||||
#:linux linux-libre
|
|
||||||
#:source linux-xanmod-source
|
#:source linux-xanmod-source
|
||||||
#:extra-version %xanmod-revision)))
|
#:extra-version %xanmod-revision)))
|
||||||
(package
|
(package
|
||||||
(inherit base)
|
(inherit base)
|
||||||
(version %xanmod-version)
|
(version %xanmod-version)
|
||||||
(build-system
|
|
||||||
(build-system-with-c-toolchain
|
|
||||||
(package-build-system base)
|
|
||||||
(modify-inputs (standard-packages)
|
|
||||||
(delete "binutils" "gcc" "ld-wrapper"))))
|
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
@ -106,28 +91,7 @@
|
|||||||
(add-after 'unpack 'remove-localversion
|
(add-after 'unpack 'remove-localversion
|
||||||
(lambda _
|
(lambda _
|
||||||
(when (file-exists? "localversion")
|
(when (file-exists? "localversion")
|
||||||
(delete-file "localversion"))))
|
(delete-file "localversion"))))))))
|
||||||
(add-before 'configure 'setenv
|
|
||||||
(lambda _
|
|
||||||
(setenv "LLVM" "1")
|
|
||||||
(setenv "CFLAGS" #$%cflags)
|
|
||||||
(setenv "CXXFLAGS" #$%cflags)
|
|
||||||
(setenv "LDFLAGS" #$%ldflags)
|
|
||||||
|
|
||||||
;; FIXME:
|
|
||||||
;; libgcc_s.so.1 must be installed for pthread_cancel to work
|
|
||||||
;; scripts/link-vmlinux.sh: line 189: 22065 Aborted (core dumped) ${objtree}/scripts/sorttable ${1}
|
|
||||||
;; Failed to sort kernel tables
|
|
||||||
(setenv "LD_PRELOAD"
|
|
||||||
(string-append #$gcc:lib "/lib/libgcc_s.so.1"))))))))
|
|
||||||
(native-inputs
|
|
||||||
(modify-inputs (package-native-inputs base)
|
|
||||||
(append clang-15
|
|
||||||
llvm-15
|
|
||||||
lld-as-ld-wrapper-15
|
|
||||||
python-minimal-wrapper
|
|
||||||
zstd)
|
|
||||||
(delete "gmp" "mpc" "mpfr")))
|
|
||||||
(home-page "https://xanmod.org/")
|
(home-page "https://xanmod.org/")
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(synopsis
|
(synopsis
|
||||||
@ -139,7 +103,6 @@ experience."))))
|
|||||||
|
|
||||||
(define-public linux-hardened
|
(define-public linux-hardened
|
||||||
(let ((base (customize-linux #:name "linux-hardened"
|
(let ((base (customize-linux #:name "linux-hardened"
|
||||||
#:linux linux-xanmod
|
|
||||||
#:source linux-hardened-source
|
#:source linux-hardened-source
|
||||||
#:extra-version %hardened-revision)))
|
#:extra-version %hardened-revision)))
|
||||||
(package
|
(package
|
||||||
|
Loading…
Reference in New Issue
Block a user