mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 13:36:36 +01:00
build-system/gnu: Explicity declare the _FILE_OFFSET_BITS we want.
* guix/build/gnu-build-system.scm (set-FILE-OFFSET-BITS): New procedure. (%standard-phases): Add it.
This commit is contained in:
parent
156e6ef349
commit
410520afa8
1 changed files with 12 additions and 1 deletions
|
@ -60,6 +60,17 @@ (define* (set-SOURCE-DATE-EPOCH #:rest _)
|
|||
(setenv "SOURCE_DATE_EPOCH" "1")
|
||||
#t)
|
||||
|
||||
(define* (set-FILE-OFFSET-BITS #:rest _)
|
||||
"Define '_FILE_OFFSET_BITS' using the C preprocessor.
|
||||
This ensures that 32 bit and 64 bit user space both can handle results
|
||||
returned from a 64 bit kernel.
|
||||
See https://bugzilla.kernel.org/show_bug.cgi?id=205957."
|
||||
;; Setting CFLAGS here makes packages not default CFLAGS.
|
||||
;; Since glibc (and probably other packages) don't like being built without optimization, enable optimization here.
|
||||
(setenv "CFLAGS" "-D_FILE_OFFSET_BITS=64 -g -O2")
|
||||
(setenv "CXXFLAGS" "-D_FILE_OFFSET_BITS=64 -g -O2")
|
||||
#t)
|
||||
|
||||
(define (first-subdirectory directory)
|
||||
"Return the file name of the first sub-directory of DIRECTORY."
|
||||
(match (scandir directory
|
||||
|
@ -803,7 +814,7 @@ (define %standard-phases
|
|||
;; Standard build phases, as a list of symbol/procedure pairs.
|
||||
(let-syntax ((phases (syntax-rules ()
|
||||
((_ p ...) `((p . ,p) ...)))))
|
||||
(phases set-SOURCE-DATE-EPOCH set-paths install-locale unpack
|
||||
(phases set-SOURCE-DATE-EPOCH set-FILE-OFFSET-BITS set-paths install-locale unpack
|
||||
bootstrap
|
||||
patch-usr-bin-file
|
||||
patch-source-shebangs configure patch-generated-file-shebangs
|
||||
|
|
Loading…
Reference in a new issue