From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 039BB385828F; Sat, 24 Feb 2024 18:41:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 039BB385828F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708800070; bh=5mMU9/sErRxvL+cXCfU4sIxCBIR2m/GHOy+gqE4AJQE=; h=From:To:Subject:Date:From; b=udtkws82sT5IRF+IitVxDvrvaA+N9e4CH2T5IdijmMWdsTZx0W9XWvrJYzscXtk42 0wTk+B0hieIxQEh/81HQmZTiDQOyomfaeUQauFVvM4mUnB/tn2463ZgLUoCwZfGQw9 4aXLgPbheozq1TMRwpGpXabIy+OzPyM9BrveUMTg= From: "hjl.tools at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug build/31412] New: GCC 6 failed to build i386 glibc on Fedora 39 Date: Sat, 24 Feb 2024 18:41:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.40 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31412 Bug ID: 31412 Summary: GCC 6 failed to build i386 glibc on Fedora 39 Product: glibc Version: 2.40 Status: NEW Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com CC: carlos at redhat dot com, fweimer at redhat dot com Target Milestone: --- Target: i386 [hjl@gnu-cfl-3 tmp]$ cat x.c #include int main () { std::cout << "Hello, world!"; return 0; } [hjl@gnu-cfl-3 tmp]$ /usr/gcc-6.4.1-x32/bin/g++ -m32 x.c -static /usr/local/bin/ld: /lib/../lib/libc.a(offtime.o): in function `__offtime': (.text+0x3c): undefined reference to `__divmoddi4' /usr/local/bin/ld: (.text+0xa2): undefined reference to `__divmoddi4' /usr/local/bin/ld: (.text+0x22e): undefined reference to `__divmoddi4' collect2: error: ld returned 1 exit status [hjl@gnu-cfl-3 tmp]$ /usr/gcc-7.4.1-x32/bin/g++ -m32 x.c -static [hjl@gnu-cfl-3 tmp]$=20 Since /lib/libc.a on Fedora 39 was compiled with GCC 13, it uses __divmoddi4 which was added to GCC 7 and GCC 6 won't be able to create static binary on Fedora 39. Why is static linking required here? --=20 You are receiving this mail because: You are on the CC list for the bug.=