From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 577883858D31; Sun, 19 Apr 2020 09:41:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 577883858D31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587289294; bh=i5dm7+FcOOWTyHGL/X+jWaOOibeWhHsjHk+By7ZiSBQ=; h=From:To:Subject:Date:From; b=QD0MPyir1L+Mbt2axqtBfFm8YRQGjwywN1FoiXPXIYuTe7LU1ys+3pQBIFtRRRHEh 2bJ8HaheZDkJPYG4xwumAIPGQtx2L/Q6xdy4ZWOlote+p0PFjnPcNDtMKYiL1mgN+X W8vkkTb+PSSxt/NBfTnytVIDTHSJq3bYYyl5JxAQ= From: "slyfox at inbox dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/94657] New: [patch] libcpp uses 'AR = ar' tool even if --build/--host are passed explicitly. Date: Sun, 19 Apr 2020 09:41:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at inbox dot ru 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 bug_severity priority component assigned_to reporter target_milestone attachments.created 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: Sun, 19 Apr 2020 09:41:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94657 Bug ID: 94657 Summary: [patch] libcpp uses 'AR =3D ar' tool even if --build/--host are passed explicitly. Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at inbox dot ru Target Milestone: --- Created attachment 48305 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48305&action=3Dedit libcpp-ar.patch Initially reported by Agostino Sarubbo as https://bugs.gentoo.org/718004. There Gentoo builds gcc-9.3.0 as: --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu and observes 'ar' being called by libcpp. It should be 'x86_64-pc-linux-gnu= -ar' instead. libcpp/Makefile.in hardcodes 'AR =3D ar' (but does not hardcode RANLIB for example: 'RANLIB =3D @RANLIB@').=20 A few other tools do it: $ git grep 'AR =3D ar' | cat gcc/ada/gcc-interface/Makefile.in:AR =3D ar intl/Makefile.in:AR =3D ar libcpp/Makefile.in:AR =3D ar libdecnumber/Makefile.in:AR =3D ar but only libcpp refers 'ar' and fails build when 'ar' does not exist: ar cru libcpp.a charset.o directives.o directives-only.o errors.o expr.o files.o identifiers.o init.o lex.o line-map.o macro.o mkdeps.o pch.o symtab= .o traditional.o /bin/bash: ar: command not found Attached patch adds AR detection similar to other libraries. But maybe it should be set in top-level Makefile?=