public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/users/vapier/wip] libgloss: add per-file & per-dir flag support Date: Tue, 2 Jan 2024 04:35:44 +0000 (GMT) [thread overview] Message-ID: <20240102043544.CCE9E3858437@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=616db3e80ca4d49c138f2f9db49b3b81b40c4504 commit 616db3e80ca4d49c138f2f9db49b3b81b40c4504 Author: Mike Frysinger <vapier@gentoo.org> Date: Fri Dec 29 20:34:38 2023 -0500 libgloss: add per-file & per-dir flag support 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 | 6 +++++- libgloss/Makefile.in | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index aa1c430e3..9d6988ace 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -24,7 +24,11 @@ includetool_DATA = includesystooldir = $(tooldir)/include/sys includesystool_DATA = -AM_CPPFLAGS = -idirafter $(srcroot)/include +# These are useful for standalone object files like crt0.o. +AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F))) +AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F))) +AM_CPPFLAGS = $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include +AM_LDFLAGS = $(AM_LDFLAGS_$(subst /,_,$(@D))) $(AM_LDFLAGS_$(subst -,_,$(subst /,_,$(@D)_$(@F)))) # A fake library so automake will generate rules for plain objects that we want # to install (e.g. our crt0.o objects). diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in index e6441a4c5..2574c7021 100644 --- a/libgloss/Makefile.in +++ b/libgloss/Makefile.in @@ -913,7 +913,12 @@ includetooldir = $(tooldir)/include includetool_DATA = $(am__append_16) includesystooldir = $(tooldir)/include/sys includesystool_DATA = $(am__append_17) -AM_CPPFLAGS = -idirafter $(srcroot)/include + +# These are useful for standalone object files like crt0.o. +AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F))) +AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F))) +AM_CPPFLAGS = $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include +AM_LDFLAGS = $(AM_LDFLAGS_$(subst /,_,$(@D))) $(AM_LDFLAGS_$(subst -,_,$(subst /,_,$(@D)_$(@F)))) # A fake library so automake will generate rules for plain objects that we want # to install (e.g. our crt0.o objects).
reply other threads:[~2024-01-02 4:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240102043544.CCE9E3858437@sourceware.org \ --to=vapier@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).