[binutils-gdb] Fix disabling of year 2038 support on 32-bit hosts by default

Thiago Bauermann bauermann@sourceware.org
Mon Feb 5 18:36:52 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9c0aa4c53104b1c4333d55aeaf11b41053307929

commit 9c0aa4c53104b1c4333d55aeaf11b41053307929
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date:   Fri Feb 2 20:40:25 2024 -0300

    Fix disabling of year 2038 support on 32-bit hosts by default
    
    Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
    default") fixed a mismatch between 64-bit time_t in GDB and system headers
    and 32-bit time_t in BFD.
    
    However, since commit 862776f26a59 ("Finalized intl-update patches")
    gnulib's year 2038 support has been accidentally re-enabled — causing
    problems for 32-bit hosts again.  The commit split baseargs into
    {h,b}baseargs, but this hasn't been done for the code that handles
    --disable-year2038.
    
    This patch restores the intended behaviour.  With this change, the number
    of unexpected core files goes from 18 to 4.
    
    Tested on armv8l-linux-gnueabihf.
    
    Approved-By: Luis Machado <luis.machado@arm.com>

Diff:
---
 configure    | 3 ++-
 configure.ac | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 670684d83d1..6466b97f3ec 100755
--- a/configure
+++ b/configure
@@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
 tbaseargs="$tbaseargs --disable-option-checking"
 
 if test "$enable_year2038" = no; then
-  baseargs="$baseargs --disable-year2038"
+  bbaseargs="$bbaseargs --disable-year2038"
+  hbaseargs="$hbaseargs --disable-year2038"
   tbaseargs="$tbaseargs --disable-year2038"
 fi
 
diff --git a/configure.ac b/configure.ac
index 88b4800e298..1300a805fd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
 tbaseargs="$tbaseargs --disable-option-checking"
 
 if test "$enable_year2038" = no; then
-  baseargs="$baseargs --disable-year2038"
+  bbaseargs="$bbaseargs --disable-year2038"
+  hbaseargs="$hbaseargs --disable-year2038"
   tbaseargs="$tbaseargs --disable-year2038"
 fi


More information about the Binutils-cvs mailing list