Re: Various libgloss problems after recent changes
Mike Frysinger <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <ZW12iF-s_Wys3DXh@vapier> |
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 <[email protected]> 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' > > I'm slightly confused. Why would some ports have -idirafter and some > not, unless they're not using GCC (or a very old one). > > So wouldn't a autoconf test for -idirafter be a better approach rather > than hard-coding it. > > Note that if it's due to the option not being supported in old versions > of gcc, then that's a bigger problem because the reason the option was > added in the first place (IIRC) was to support moving arm-acle-compat.h > out of the newlib subdir so it could be used with libgloss. And > 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 = 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 $< # # GCC knows to run the preprocessor on .S files before it assembles them.
signature.asc
(application/pgp-signature, 833 B)
-----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-----