From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 0CB743858C78 for ; Mon, 4 Dec 2023 06:49:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CB743858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0CB743858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701672587; cv=none; b=HS7geYaKqn7k0H5VtEEZAf9OgmjmO0T/ryObHYRGdtjrAB0r7+RTPgLYGhCQ/1d+oSO5glH+t3DbnQm4doEIaWATjrxmRYP7LPWEI4YQ4SH/Hv38DWkOiQ1YNWqhEguGwx1n5HcSzHKjHf6UUgXsdOuDZgk5k5k7NE0edCAzRsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701672587; c=relaxed/simple; bh=9iJejfHPVkrH1UKglX9DBWT39gcY3pv0WtYNwTq6i3s=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=RmWixvMhjuHDJNJO8qebUR9zgLuGOX0JrLeDm+UAd/QW3hktLcYWiURMO7HUzcyGU2hv0UQ/EIQFtmqE8YhvZrBe4Dlh6b093YEBlVXrRRUOm2Kk/8GlfvY3FywZ2hYUe+9X9DZg/5uwgSCHgk7QAanJdCIzCoqHxDBxitNnmrA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 4EA6D335D6D; Mon, 4 Dec 2023 06:49:45 +0000 (UTC) Date: Mon, 4 Dec 2023 01:49:44 -0500 From: Mike Frysinger To: Richard Earnshaw Cc: Jeff Johnston , Jeff Law , newlib@sourceware.org Subject: Re: Various libgloss problems after recent changes Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Hx5TKh6wP9CdOYGt" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Hx5TKh6wP9CdOYGt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 10 Feb 2023 11:21, Richard Earnshaw wrote: > On 09/02/2023 22:54, Jeff Johnston wrote: > > On Sun, Feb 5, 2023 at 7:48 PM Jeff Law wrote: > >> The fr30-elf and xstormy16-elf ports have been failing to build for > >> about a month with this error: > >> > >> > fr30-elf-as -I. -I../../../../..//newlib-cygwin/libgloss/fr30/.. > >> -I./.. -idirafter > >> ../../../../..//newlib-cygwin/libgloss/fr30/../../include -o crt0.o > >> ../../../../..//newlib-cygwin/libgloss/fr30/crt0.s > >>> fr30-elf-as: unrecognized option '-idirafter' >=20 > I'm slightly confused. Why would some ports have -idirafter and some=20 > not, unless they're not using GCC (or a very old one). >=20 > So wouldn't a autoconf test for -idirafter be a better approach rather=20 > than hard-coding it. >=20 > Note that if it's due to the option not being supported in old versions= =20 > of gcc, then that's a bigger problem because the reason the option was=20 > added in the first place (IIRC) was to support moving arm-acle-compat.h= =20 > out of the newlib subdir so it could be used with libgloss. And=20 > arm-acle-compat.h is there to support older versions of GCC. the problem isn't gcc age, it's that $CPPFLAGS is being used with $AS, and that's never correct. filtering the flags for some ports hides the issue by default ... if people set CPPFLAGS to include something else, it will continue to fail. really all $AS usage should switch to $CCAS which will compile .s files with the compiler driver (i.e. `gcc`) which respects $CPPFLAGS. a short term fix is prob to stop using $(INCLUDES) in the .s.o rule. i can't see how this was ever useful tbh. we don't use `.include` in any of the .s files, and `#include` doesn't work. -mike --- a/libgloss/config/default.mh +++ b/libgloss/config/default.mh @@ -14,7 +14,7 @@ AR_FLAGS =3D rc .C.o: $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< .s.o: - $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< + $(AS) $(ASFLAGS_FOR_TARGET) $(ASFLAGS) -o $*.o $< =20 # # GCC knows to run the preprocessor on .S files before it assembles them. --Hx5TKh6wP9CdOYGt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmVtdogACgkQQWM7n+g3 9YGZQRAA4EzCCAVUTdO+gdMKZefwu9cngqm3maHR/Qkypc6JtqIVIjOvzLP8N2nn lnmJXxoQj9g8a8j57+d52fIteLkc1L6CoJEZ5OyhZ2wNIJn1rZpFGBd0xD0IYjJG Y5FZec8oLO/Q8924j7At3shyj6K1EkpgfUBzz3NWX3aNmr3kLDgU4q11TLv790JN Gq4/7NgaOUs1wbY4iMlCVDXG9spqrUnD8k6CBd5uv1cueaPWCHC7XAoR5lRZKgPO vtDUtj6HG3sGp7Es2PBbZ+U9xr/LnGjiJ+NMcxQAyBjg9VTTgWxM92EC+Le+L2/Y Mf29UWXyDArCM+74I2yLLkUtC9zke9E2xySlGIuhfFR0UABVQ+WUNvK8w4LlUgOr p/pEQfZget/wCtrW6h3uzMWwUONWcD0XRMwVaJimstlfAkLOfYtfNjoWoGRliOeM lip8vKPNFG22rTY2DbRpqB4WXM8aV7kuSEb91uDFeFwpVk+sgT81ppNGevVTtl9i dJ9FVRD+Dct/koIFoZXGkKO3B1OmQfv2qljw+/RUk2Y/ssq/nhYD37ehHWBxby8b jKKDYLQigExC2gwy+zx28vyaE7fflK1u2X0eLkp2cIjmPM4Kr1NWyIxkZepSNfae 3XCBoIjHeTqCoZ6aWE0+k3nBgRGduJ2/PMEoEe3FUJ23DccjLHM= =npCA -----END PGP SIGNATURE----- --Hx5TKh6wP9CdOYGt--