From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 35D8B3849ADA; Wed, 24 Apr 2024 18:36:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35D8B3849ADA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713983773; bh=WzB9Am3IDlgDyJpGbBbksDhO7KcN+qvRM4S2SJcmyWY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jy1DzZ7Nl7az4D/H4V9x7dLEwXFFE+A/QQkiot/HOvu0dczaCW0YYzJVp4vVwpGft rv2k5HOynke1x30+5oBiJD8jglAwSnwjlfeA3U6kd4kk4tut259fh66pbWgCcH7nKI X4QRlo2u0fgFU6votOsR+bXkEBVTuLGcC1Z9bqCw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105599] g++ by itself is not producing "fatal error: no input files" for darwin target Date: Wed, 24 Apr 2024 18:36:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: trivial X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105599 --- Comment #9 from GCC Commits --- The releases/gcc-11 branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:3bb14f6ed5bc70e25381c67963c90eaab91eca22 commit r11-11353-g3bb14f6ed5bc70e25381c67963c90eaab91eca22 Author: Iain Sandoe Date: Sun May 29 16:14:32 2022 +0100 Darwin: Fix empty g++ command lines [PR105599]. An empty g++ command line should produce a diagnostic that there are no inputs. The PR is that currently Darwin produces a dignostic about mis= sing link items instead - this is because (errnoeously), for this driver, we= are creating a link job for empty command lines. The problem occurs in four stages: The g++ driver appends -shared-libgcc to the command line. The Darwin driver_init code in the backend does not see this (it sees = an empty command line). When the back end driver code driver sees an empty command line, it do= es not add any supplementary flags (e.g. asm-macosx-version-min) - precisely = to avoid anything being claimed as an input_file and therefore triggering= a link line. Since we do not have a value for asm-macosx-version-min when processing the driver specs, we unconditionally inject 'multiply_defined suppress' wh= ich is used with shared libgcc (but only intended on very old Darwin). This = then causes the generation of a link job. The solution, for the present, is to move version-specific link params = to the LINK_SPEC so that they are only processed when a link job has already b= een decided. Signed-off-by: Iain Sandoe PR target/105599 gcc/ChangeLog: * config/darwin.h: Move versions-specific handling of multiply_defined from SUBTARGET_DRIVER_SELF_SPECS to LINK_SPEC. (cherry picked from commit 794737976b9a6418eab817f143bb4eb2d0c834d2)=