From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id E14B03858D1E for ; Thu, 10 Feb 2022 21:10:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E14B03858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: wdibSCt0HUrCQZ4+Qo/jpTHLVJNf8gVyMe/OHq40qRSJrPS8qDdbuqRDkhYdDLBVBSBnFqmt+C aWAMO1LMJIhAE0l4+VF+Hyl03CT2nMnELJOu6dC1Urz/NG5TR8t0FBt30JqilvwQ8R4lPqdms+ qO9NM0b0ZsRlvzSUKUY72qDBso/ui1qyt4F/0HkbFa2Ir/GniLQ+pF0Ds9rWFzDAFEKflVQYY9 DwnOqz9H+fkstJX4+zlnCuEQAbcwzt4nXOKkZCrCd0bVZw3lNfjkseY8tKDBtjZM/0BFTnsjzJ uQllDQQCQRF3IrifInrYeFx0 X-IronPort-AV: E=Sophos;i="5.88,359,1635235200"; d="scan'208";a="71689306" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 10 Feb 2022 13:10:23 -0800 IronPort-SDR: klgBl4dtlhbw+zNTcMY2uvEK65kmjtw3OqFiOJGAPrnlp/jzNZ15b7y3AApxqCDug192bWIyLQ 3hdv32S8rFTtqS+buNBf2H/JYyFHVsIGHryq4EgF5M7WKh9yJropH7wh3zpHyLLckdsOddO+1n LLqOhUA1N1mgOqcQ5iDw4yaqpVSg6eO1LufdBJDwPUex4oVo7TMHNXsRuMUpmaT+Il5Gy+yF8y FyCwJgc60Fe205Z3aQkqoTJZX2PqXwIEg9T8/Vcc7dsTaotW3F+w6HGgKuA0EpZSfI4/pPjJGU 9TM= Date: Thu, 10 Feb 2022 21:10:17 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Marek Polacek CC: GCC Patches , Jakub Jelinek , Paolo Bonzini , Alexandre Oliva Subject: Re: [PATCH] configure: Implement --enable-host-pie In-Reply-To: <20220210164805.580636-1-polacek@redhat.com> Message-ID: References: <20220210164805.580636-1-polacek@redhat.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3114.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2022 21:10:26 -0000 Some general observations: * There are various toplevel GCC subdirectories that are built for the host (possibly in addition to the target in some cases) but aren't changed in this patch. Do they get a PIE or PIC build anyway by default? Such directories include, I think: fixincludes (as a corner case, for the installed fixincludes), gmp, mpfr, mpc, isl (host libraries whose configure scripts aren't part of GCC, so any changes to ensure they build as PIE when needed would need to be at top level), intl, libbacktrace, libiberty, gnattools, gotools. (Using a bootstrap compiler that *doesn't* default to PIE might help detect any such issues, though only for directores that get built for the host in that build - some may not get built by default.) For directories that are only used as host libraries but don't install any executables, even if this patch needs additions the -z now one shouldn't. * I don't see anything obvious here (or for the existing --enable-host-shared) that actually causes the configure option to apply only to the host and not to the target, in the case of subdirectories such as libbacktrace that get built for both host and target. (Though static target libraries may well default to PIC in many cases anyway.) -- Joseph S. Myers joseph@codesourcery.com