aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-10 16:37:55 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-10 20:56:46 +0100
commit9cccc5910ad74154f36cff349f96f7aa3a2e8b62 (patch)
treef81cf7beb1200f7fd933fb8acad3294ce5c60173
parent26362882ee57b7174509c909c45ce228c530ca60 (diff)
downloadhardware_replicant_libsamsung-ipc-9cccc5910ad74154f36cff349f96f7aa3a2e8b62.tar.gz
hardware_replicant_libsamsung-ipc-9cccc5910ad74154f36cff349f96f7aa3a2e8b62.tar.bz2
hardware_replicant_libsamsung-ipc-9cccc5910ad74154f36cff349f96f7aa3a2e8b62.zip
scripts: guix.scm: Add Replicant 6 TARGET_ERROR_FLAGS
The TARGET_ERROR_FLAGS are available from build/core/config.mk in Replicant 6. -Werror=non-virtual-dtor was only added to CLANG because it fails to be recognized with GCC: cc1: error: ‘-Werror=’ argument ‘-Werror=non-virtual-dtor’ is not valid for C [-Werror] Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--scripts/guix.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/guix.scm b/scripts/guix.scm
index 6a03e31..c6e033a 100644
--- a/scripts/guix.scm
+++ b/scripts/guix.scm
@@ -61,18 +61,25 @@
(gnu packages python-xyz)
(gnu packages tls))
-(define %strict-cflags
+(define %common-strict-cflags
(string-append
" CFLAGS="
" -W"
" -Wall"
" -Werror"
+ " -Werror=address"
+ " -Werror=return-type"
+ " -Werror=sequence-point"
" -Winit-self"
" -Wno-unused"
" -Wpointer-arith"
" -Wunused"
" -Wunused-function"))
+(define %clang-strict-cflags
+ (string-append
+ "-Werror=non-virtual-dtor"))
+
(define %commit
(let* ((port (open-input-pipe
"git --no-pager log --oneline HEAD -1 --format='%H'"))
@@ -136,7 +143,7 @@ found in many Samsung smartphones and tablets.")
(("BUILD_STATIC_LIBRARY") "BUILD_HOST_STATIC_LIBRARY")
(("BUILD_STATIC_EXECUTABLE") "BUILD_HOST_STATIC_EXECUTABLE"))
#t)))
- #:make-flags (list ,%strict-cflags)))))
+ #:make-flags (list ,%common-strict-cflags)))))
(define-public libsamsung-ipc-gcc-autotools
(package
@@ -150,7 +157,7 @@ found in many Samsung smartphones and tablets.")
(substitute* (find-files "tools" ".*\\.py$")
(("/usr/bin/env python") (which "python3")))
#t)))
- #:make-flags (list ,%strict-cflags)))))
+ #:make-flags (list ,%common-strict-cflags)))))
(define-public libsamsung-ipc-clang-autotools
(package
@@ -173,7 +180,7 @@ found in many Samsung smartphones and tablets.")
(substitute* (find-files "tools" ".*\\.py$")
(("/usr/bin/env python") (which "python3")))
#t)))
- #:make-flags (list ,%strict-cflags)))))
+ #:make-flags (list ,%common-strict-cflags ,%clang-strict-cflags)))))
(define-public libsamsung-ipc-clang-android
(package
@@ -200,7 +207,7 @@ found in many Samsung smartphones and tablets.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CC" "clang")
#t)))
- #:make-flags (list ,%strict-cflags)))))
+ #:make-flags (list ,%common-strict-cflags ,%clang-strict-cflags)))))
;; Combinaisons:
;; +--------------------------------+----------+----------+--------------+--------------+