From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id B69623858C2F; Sat, 20 Jan 2024 01:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B69623858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705713981; bh=zIOU/kacsFHs4y+nU8AUIBVurpnYvdWowZoFzVdD+mQ=; h=From:To:Subject:Date:From; b=am+r6ivxxEHIaNUDb4sRKnuOSnQ3FZROpZjYy9G/3Gwqm4eNK9KSLbsZhvxW6Tlbh 1SgTDKgHfugS2gmciz8Grbcrf0+eCmNMZ+QayIDG2m9KxuL1XaXWfPAWYCeXZdKAQt eVLzauQjvBfh1GHvObMqLTBbxyUP+cvLz5/4OanI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] libgloss: add per-file & per-dir flag support X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/main X-Git-Oldrev: 0714c6305adfb91b6560da03dc871a564450495c X-Git-Newrev: 58da25856169ca9e64105079f00f4adaefeca35b Message-Id: <20240120012621.B69623858C2F@sourceware.org> Date: Sat, 20 Jan 2024 01:26:20 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D58da2585616= 9ca9e64105079f00f4adaefeca35b commit 58da25856169ca9e64105079f00f4adaefeca35b Author: Mike Frysinger Date: Fri Dec 29 20:34:38 2023 -0500 libgloss: add per-file & per-dir flag support =20 This logic is copied from what's used in newlib today. This allows subdirs to easily define per-directory flags & per-file flags without having to setup unique automake rules for each one. Diff: --- libgloss/Makefile.am | 8 +++++++- libgloss/Makefile.in | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index a035f8d8a..ccfbfc167 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -24,7 +24,13 @@ includetool_DATA =3D includesystooldir =3D $(tooldir)/include/sys includesystool_DATA =3D =20 -AM_CPPFLAGS =3D -idirafter $(srcroot)/include +# These are useful for standalone object files like crt0.o. +AM_CFLAGS =3D $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D= )_$(