From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9C8AA385840F; Mon, 13 Dec 2021 10:40:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C8AA385840F From: "syq at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/103604] [12 Regression] trunk 20210506 fails to build in libphobos on mips64el-linux-gnu Date: Mon, 13 Dec 2021 10:40:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: syq at debian dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2021 10:40:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103604 --- Comment #6 from YunQiang Su --- Index: gcc-12-12-20211211/src/libphobos/libdruntime/core/sys/posix/sys/stat= .d =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc-12-12-20211211.orig/src/libphobos/libdruntime/core/sys/posix/sys/st= at.d +++ gcc-12-12-20211211/src/libphobos/libdruntime/core/sys/posix/sys/stat.d @@ -347,7 +347,7 @@ version (CRuntime_Glibc) { c_ulong st_dev; int[3] st_pad1; - static if (!__USE_FILE_OFFSET64) + static if (__WORDSIZE =3D=3D 64 || !__USE_FILE_OFFSET64) { ino_t st_ino; } @@ -360,7 +360,7 @@ version (CRuntime_Glibc) uid_t st_uid; gid_t st_gid; c_ulong st_rdev; - static if (!__USE_FILE_OFFSET64) + static if (__WORDSIZE =3D=3D 64 || !__USE_FILE_OFFSET64) { uint[2] st_pad2; off_t st_size; @@ -394,7 +394,7 @@ version (CRuntime_Glibc) } blksize_t st_blksize; uint st_pad4; - static if (!__USE_FILE_OFFSET64) + static if (__WORDSIZE =3D=3D 64 || !__USE_FILE_OFFSET64) { blkcnt_t st_blocks; } This patch can solve this problem: of course, we need to back port it to gcc-10/gcc-11 also. The problem is due to that:=20 N32 and N64 uses different "struct stat" In the older version, __USE_FILE_OFFSET64 may be not defined for N64 while now, it is defined.=