public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug build/31412] GCC 6 failed to build i386 glibc on Fedora 39 Date: Sun, 25 Feb 2024 12:17:43 +0000 [thread overview] Message-ID: <bug-31412-131-nCSyNZkJB7@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31412-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31412 --- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Florian Weimer from comment #1) > H.J., what do you mean by static linking in this context? $ gcc -static .... > I think your GCC 6 environment is misconfigured. Shouldn't it use system > libgcc.a? [hjl@gnu-cfl-1 tmp]$ gcc -print-file-name=libgcc.a /usr/lib/gcc/x86_64-redhat-linux/13/libgcc.a [hjl@gnu-cfl-1 tmp]$ /usr/gcc-14.0.1-x32/bin/gcc -print-file-name=libgcc.a /usr/gcc-14.0.1-x32/lib/gcc/x86_64-pc-linux-gnu/14.0.1/libgcc.a [hjl@gnu-cfl-1 tmp]$ /usr/gcc-6.3.1-x32/bin/gcc -print-file-name=libgcc.a /usr/gcc-6.3.1-x32/lib/gcc/x86_64-pc-linux-gnu/6.3.1/libgcc.a [hjl@gnu-cfl-1 tmp]$ All versions of GCC should use /usr/lib/gcc/x86_64-redhat-linux/13/libgcc.a? It won't work for GCC 14 or higher. The configure.ac change: ommit d337ceb76d898935560dc264cf2ad36b17017db7 Author: Florian Weimer <fweimer@redhat.com> Date: Mon Oct 26 09:41:10 2015 +0100 Use the CXX compiler only if it can create dynamic and static programs * configure.ac (CXX): Clear the variable if the C++ toolchain does not support static linking. * configure: Regenerate. diff --git a/configure.ac b/configure.ac index e502aa5db2..3c7f6c0096 100644 --- a/configure.ac +++ b/configure.ac @@ -57,9 +57,26 @@ AC_PROG_CXX # It's useless to us if it can't link programs (e.g. missing -lstdc++). AC_CACHE_CHECK([whether $CXX can link programs], libc_cv_cxx_link_ok, [dnl AC_LANG_PUSH([C++]) +# Default, dynamic case. AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [libc_cv_cxx_link_ok=yes], [libc_cv_cxx_link_ok=no]) +# Static case. +old_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -static" +AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include <iostream> + +int +main() +{ + std::cout << "Hello, world!"; + return 0; +} +])], + [], + [libc_cv_cxx_link_ok=no]) +LDFLAGS="$old_LDFLAGS" AC_LANG_POP([C++])]) AS_IF([test $libc_cv_cxx_link_ok != yes], [CXX=]) makes it impossible to properly build i386 glibc with GCC 6 on Fedora 39. -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2024-02-25 12:17 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-24 18:41 [Bug build/31412] New: " hjl.tools at gmail dot com 2024-02-24 23:27 ` [Bug build/31412] " fw at deneb dot enyo.de 2024-02-25 12:17 ` hjl.tools at gmail dot com [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31412-131-nCSyNZkJB7@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).