From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1EF2E3858D28; Thu, 30 Dec 2021 11:04:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EF2E3858D28 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103866] New: AM_PROG_LIBTOOL not compatible with GCC_NO_EXECUTABLES Date: Thu, 30 Dec 2021 11:04:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Thu, 30 Dec 2021 11:04:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103866 Bug ID: 103866 Summary: AM_PROG_LIBTOOL not compatible with GCC_NO_EXECUTABLES Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: build Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- The libtool setup in the top-level libtool.m4 has this snippet in LT_SYS_DLOPEN_SELF: *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=3D"shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=3D"shl_load" lt_cv_dlopen_libs=3D"-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=3D"dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=3D"dld_link" lt_cv_dlopen_libs=3D"-ldld"]) ]) ]) ]) ]) ]) ;; This can fail if GCC_NO_EXECUTABLES has been used, e.g. for a mips-none-elf cross-compiler (see Bug 100057 comment 33, but ignore all the other comments there). It looks like --disable-dlopen will avoid that snippet, but should that be necessary if --disable-shared has been used? If it can't depend on --disable-shared, is there some other flag we can use to infer that the user doesn't want/need those checks for a bare metal build?=