linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Steve French <stfrench@microsoft.com>, linux-cifs@vger.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: cifs: Fix tracing build error with O=
Date: Thu, 20 Jun 2019 14:40:23 +0800	[thread overview]
Message-ID: <20190620064023.cwvcj5g4rgnmkmmn@gondor.apana.org.au> (raw)

Currently if you build the kernel with O= then fs/cifs fails with:

$ make O=build
...
  CC [M]  fs/cifs/trace.o
In file included from ../fs/cifs/trace.h:846:0,
                 from ../fs/cifs/trace.c:8:
../include/trace/define_trace.h:95:43: fatal error: ./trace.h: No such file or directory
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
                                           ^
compilation terminated.

The reason is that -I$(src) expands to -Ifs/cifs which does not
work with O=.  This patch fixes it by adding srctree to the front.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
index 51af69a1a328..616163deee18 100644
--- a/fs/cifs/Makefile
+++ b/fs/cifs/Makefile
@@ -2,7 +2,7 @@
 #
 # Makefile for Linux CIFS/SMB2/SMB3 VFS client
 #
-ccflags-y += -I$(src)		# needed for trace events
+ccflags-y += -I$(srctree)/$(src)		# needed for trace events
 obj-$(CONFIG_CIFS) += cifs.o
 
 cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

             reply	other threads:[~2019-06-20  6:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  6:40 Herbert Xu [this message]
2019-06-20  6:54 ` cifs: Fix tracing build error with O= yamada.masahiro
2019-06-20  7:58   ` Herbert Xu
2019-06-20 11:56     ` Masahiro Yamada
2019-06-20 12:47       ` Herbert Xu
2019-06-20 12:56         ` Masahiro Yamada
2019-06-20 13:36           ` Herbert Xu

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=20190620064023.cwvcj5g4rgnmkmmn@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-cifs@vger.kernel.org \
    --cc=stfrench@microsoft.com \
    --cc=yamada.masahiro@socionext.com \
    /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).