From: Brian Norris <briannorris@chromium.org>
To: linux-xfs@vger.kernel.org
Cc: Brian Norris <briannorris@chromium.org>
Subject: [PATCH xfsprogs] build: don't assume $BUILD_CC has fsmap.h just because $CC does
Date: Thu, 6 Sep 2018 11:35:29 -0700 [thread overview]
Message-ID: <20180906183529.117251-1-briannorris@chromium.org> (raw)
The $BUILD_CC toolchain might have an older set of Linux headers than
the $CC toolchain. It's generally unsafe to try to build both with the
same definitions, but in particular, this one can cause compilation
failures in the local crc32selftest build:
In file included from crc32.c:37:
In file included from ../include/xfs.h:37:
../include/xfs/linux.h:226:11: fatal error: 'linux/fsmap.h' file not found
# include <linux/fsmap.h>
^~~~~~~~~~~~~~~
It's safe to always assume that the headers don't have getfsmap, since
the alternative just includes our local definitions anyway.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
This isn't exactly a pretty solution, but it fixes cross-compilation
problems I'm seeing.
include/builddefs.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/builddefs.in b/include/builddefs.in
index f7d39a4e4094..209abe1d84dd 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -156,8 +156,9 @@ endif
ifeq ($(NEED_INTERNAL_FSXATTR),yes)
PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
endif
+# Don't assume $BUILD_CC has getfsmap just because $CC does.
ifeq ($(HAVE_GETFSMAP),yes)
-PCFLAGS+= -DHAVE_GETFSMAP
+CFLAGS+= -DHAVE_GETFSMAP
endif
LIBICU_LIBS = @libicu_LIBS@
--
2.19.0.rc2.392.g5ba43deb5a-goog
next reply other threads:[~2018-09-06 23:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 18:35 Brian Norris [this message]
2018-09-06 22:33 ` [PATCH xfsprogs] build: don't assume $BUILD_CC has fsmap.h just because $CC does Eric Sandeen
2018-09-06 22:55 ` Brian Norris
2018-09-21 18:37 ` Brian Norris
2018-09-21 19:12 ` Eric Sandeen
2018-09-21 19:34 ` Brian Norris
2018-09-21 20:53 ` Eric Sandeen
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=20180906183529.117251-1-briannorris@chromium.org \
--to=briannorris@chromium.org \
--cc=linux-xfs@vger.kernel.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 NNTP newsgroup(s).