From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
Nick Clifton <nickc@redhat.com>,
Jim Wilson <wilson@tuliptree.org>
Cc: binutils@sourceware.org
Subject: [PATCH 0/1] configure: Pass CPPFLAGS_FOR_BUILD to subdirectories
Date: Thu, 15 Sep 2022 05:59:22 +0000 [thread overview]
Message-ID: <cover.1663221557.git.research_trasio@irq.a4lg.com> (raw)
Hello,
While investigating previous -Wstack-usage=262144 removal (on Clang) patch,
I found something intresting.
cf. <https://sourceware.org/pipermail/binutils/2022-September/122817.html>
Here's some excerpt from "$(builddir)/bfd/config.log":
gcc: warning: @CPPFLAGS_FOR_BUILD@: linker input file unused because linking not done
gcc: error: @CPPFLAGS_FOR_BUILD@: linker input file not found: No such file or directory
gcc: warning: @CPPFLAGS_FOR_BUILD@: linker input file unused because linking not done
gcc: error: @CPPFLAGS_FOR_BUILD@: linker input file not found: No such file or directory
gcc: warning: @CPPFLAGS_FOR_BUILD@: linker input file unused because linking not done
gcc: error: @CPPFLAGS_FOR_BUILD@: linker input file not found: No such file or directory
This is because command like this is called:
gcc -E @CPPFLAGS_FOR_BUILD@ conftest.c
I found that this is because "$(build)/Makefile" passes CPPFLAGS_FOR_BUILD
environment variable without substituting with AC_SUBST
(should be placed in "$(srcdir)/configure.ac").
Here's excerpt from "$(builddir)/Makefile":
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
THIS IS NOT "$(srcdir)/Makefile.in" (it's normal in Makefile.in but should
be substituted while generating "$(builddir)/Makefile").
I searched similar examples and found that following environment variables
are unsubstituted in "$(builddir)/Makefile" AND possibly used in subdirs:
- CPPFLAGS_FOR_BUILD
- DSYMUTIL
- DSYMUTIL_FOR_BUILD
- DSYMUTIL_FOR_TARGET
- OTOOL
- OTOOL_FOR_TARGET
note:
There are other unsubstituted variables but I think they are not used by
any subdirectories.
At least, CPPFLAGS_FOR_BUILD can be tested on my own.
For that, I think this simple patch would work.
Request for Feedback (not a part of this patchset):
dsymutil and otool are macOS development tools (used by libtool). Since I
don't have any modern Mac, I don't want to touch them without testing.
I have a test commit "configure: pass OTOOL and DSYMUTIL to subdirs" in
my GitHub and can someone (who has real Mac machine) test it?
<https://github.com/a4lg/binutils-gdb/tree/config-pass-vars-to-children-dev>
Thanks,
Tsukasa
Tsukasa OI (1):
configure: Pass CPPFLAGS_FOR_BUILD to subdirs
configure | 3 +++
configure.ac | 2 ++
2 files changed, 5 insertions(+)
base-commit: fe39ffdc202f04397f31557f17170b40bc42b77a
--
2.34.1
next reply other threads:[~2022-09-15 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 5:59 Tsukasa OI [this message]
2022-09-15 5:59 ` [PATCH 1/1] configure: Pass CPPFLAGS_FOR_BUILD to subdirs Tsukasa OI
2022-09-20 12:53 ` Nick Clifton
2022-09-21 5:56 ` Tsukasa OI
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=cover.1663221557.git.research_trasio@irq.a4lg.com \
--to=research_trasio@irq.a4lg.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--cc=wilson@tuliptree.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: link
Be 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).