aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@debian.org>2024-08-29 14:29:16 -0700
committerVagrant Cascadian <vagrant@debian.org>2024-09-06 14:04:27 -0700
commit4e60d5dfb40ba604db114384469b8ebb2014efe3 (patch)
treee162c75ce98194f135be531f2368f86c781400c5 /gnu
parent695eb1e41cada73baece3272953f0cebada27a8f (diff)
downloadguix-4e60d5dfb40ba604db114384469b8ebb2014efe3.tar
guix-4e60d5dfb40ba604db114384469b8ebb2014efe3.tar.gz
gnu: lcrq: Add compiler optimizations.
* gnu/packages/networking.scm (lcrq)[arguments]: Pass compiler optimizations to configure. [phases]: Add 'speedtest phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/networking.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 880a6b3011..956fef80dc 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -289,9 +289,20 @@ protocols.")
(arguments
(list
#:parallel-tests? #f
+ ;; Use recommended optimizations from lcrq README.md
+ #:configure-flags
+ #~(list (string-append "CFLAGS=-Wall -Wextra -pedantic -O3 -flto "
+ "-funroll-loops -ffast-math -DNDEBUG"))
#:make-flags
#~(list (string-append "CC=" #$(cc-for-target))
(string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Leave some speed comparisons in the build log
+ (add-after 'check 'speedtest
+ (lambda _
+ (invoke "make" "-C" "test" "speedtest"
+ (string-append "CC=" #$(cc-for-target))))))
#:test-target "test"))
(home-page "https://librecast.net/lcrq.html")
(synopsis "Librecast RaptorQ library")