diff options
author | Sam James <sam@gentoo.org> | 2024-11-01 08:17:03 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-01 08:17:03 +0000 |
commit | e7cf23fa4728ef5ab8ab1e0bde2c1475d91cb7ed (patch) | |
tree | 5886150b0d4fa8c2d15b3238afcf26eaeef4889c /15.0.0/gentoo/31_all_time64.patch | |
parent | 14.2.0: cut patchset 2 for time64 patch (diff) | |
download | gcc-patches-e7cf23fa4728ef5ab8ab1e0bde2c1475d91cb7ed.tar.gz gcc-patches-e7cf23fa4728ef5ab8ab1e0bde2c1475d91cb7ed.tar.bz2 gcc-patches-e7cf23fa4728ef5ab8ab1e0bde2c1475d91cb7ed.zip |
15.0.0: add time64 patch
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '15.0.0/gentoo/31_all_time64.patch')
-rw-r--r-- | 15.0.0/gentoo/31_all_time64.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/15.0.0/gentoo/31_all_time64.patch b/15.0.0/gentoo/31_all_time64.patch new file mode 100644 index 0000000..ac972b9 --- /dev/null +++ b/15.0.0/gentoo/31_all_time64.patch @@ -0,0 +1,39 @@ +From b2ee3846dfcea638e0fbf2d550234f1c7594fcdb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 1 Nov 2024 07:48:37 +0100 +Subject: [PATCH] Support forcing _TIME_BITS=64 for time64 profiles +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Support forcing _TIME_BITS=64 and _FILE_OFFSET_BITS=64 +via -D_GENTOO_TIME64_FORCE=1, for time64 profiles. + +Signed-off-by: Michał Górny <mgorny@gentoo.org> +--- + gcc/c-family/c-cppbuiltin.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc +index 8bbfe84b2..962cbd414 100644 +--- a/gcc/c-family/c-cppbuiltin.cc ++++ b/gcc/c-family/c-cppbuiltin.cc +@@ -1593,6 +1593,15 @@ c_cpp_builtins (cpp_reader *pfile) + builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); + #endif + ++#ifndef _GENTOO_TIME64_FORCE ++ #define _GENTOO_TIME64_FORCE 0 ++#endif ++ ++ if (_GENTOO_TIME64_FORCE) { ++ cpp_define (pfile, "_FILE_OFFSET_BITS=64"); ++ cpp_define (pfile, "_TIME_BITS=64"); ++ } ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); +-- +2.47.0 + |