Skip to contentSkip to conversation

bpfilter: remove extra header search paths for bpfilter_umh

PATCH Guenter Roeck 3 participants 4 messages Feb 21, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Masahiro Yamada

Currently, the header search paths -Itools/include and -Itools/include/uapi are not used. Let's drop the unused code.

We can remove -I. too by fixing up one C file.

This patch reintroduces the problem last fixed with commit ae40832e53c3 ("bpfilter: fix a build err"). Seen (at least) with gcc 7.4.0, 8.2.0. binutils version is 2.31.1. Reverting this patch fixes the problem.

Guenter

Quoted 34 lines
---
 net/bpfilter/Makefile | 1 -
 net/bpfilter/main.c   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/bpfilter/Makefile +0 -1
index 0947ee7f70d5..5d6c7760142d 100644
@@ -5,7 +5,6 @@
 
 hostprogs-y := bpfilter_umh
 bpfilter_umh-objs := main.o
-KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
 HOSTCC := $(CC)
 
 ifeq ($(CONFIG_BPFILTER_UMH), y)
net/bpfilter/main.c +1 -1
index 1317f108df8a..61ce8454a88e 100644
@@ -6,7 +6,7 @@
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "include/uapi/linux/bpf.h"
+#include "../../include/uapi/linux/bpf.h"
 #include <asm/unistd.h>
 #include "msgfmt.h"
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 11 lines · Guenter Roeck
Quoted 5 lines · Masahiro Yamada

Currently, the header search paths -Itools/include and -Itools/include/uapi are not used. Let's drop the unused code.

We can remove -I. too by fixing up one C file.

This patch reintroduces the problem last fixed with commit ae40832e53c3 ("bpfilter: fix a build err"). Seen (at least) with gcc 7.4.0, 8.2.0. binutils version is 2.31.1. Reverting this patch fixes the problem.

Hmm. I cannot reproduce the build error with my gcc, but you are right.

I'd like to get back only
'KBUILD_HOSTCFLAGS += -Itools/include/ -Itools/include/uapi' instead of the full revert.

If David is fine with it, I can send a patch with filling commit log.

Thanks.

Quoted 34 lines

Guenter

Quoted 32 lines
---
 net/bpfilter/Makefile | 1 -
 net/bpfilter/main.c   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/bpfilter/Makefile +0 -1
index 0947ee7f70d5..5d6c7760142d 100644
@@ -5,7 +5,6 @@
 
 hostprogs-y := bpfilter_umh
 bpfilter_umh-objs := main.o
-KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
 HOSTCC := $(CC)
 
 ifeq ($(CONFIG_BPFILTER_UMH), y)
net/bpfilter/main.c +1 -1
index 1317f108df8a..61ce8454a88e 100644
@@ -6,7 +6,7 @@
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "include/uapi/linux/bpf.h"
+#include "../../include/uapi/linux/bpf.h"
 #include <asm/unistd.h>
 #include "msgfmt.h"
 
Quoted 2 lines
Quoted 2 lines

--
2.7.4

--
Best Regards

Masahiro Yamada

#2 lore raw
Quoted 9 lines · Masahiro Yamada
Quoted 8 lines · Guenter Roeck
Quoted 5 lines · Masahiro Yamada

Currently, the header search paths -Itools/include and -Itools/include/uapi are not used. Let's drop the unused code.

We can remove -I. too by fixing up one C file.

Quoted 8 lines
Quoted 3 lines

This patch reintroduces the problem last fixed with commit ae40832e53c3 ("bpfilter: fix a build err"). Seen (at least) with gcc 7.4.0, 8.2.0. binutils version is 2.31.1. Reverting this patch fixes the problem.

Hmm. I cannot reproduce the build error with my gcc, but you are right.

Maybe it has less to do with the gcc version and more with how the toolchain is built. I see the problem with toolchains generated using buildroot.

Quoted 5 lines

I'd like to get back only
'KBUILD_HOSTCFLAGS += -Itools/include/ -Itools/include/uapi' instead of the full revert.

That doesn't work for me. I need

KBUILD_HOSTCFLAGS += -I. -Itools/include/uapi

Just don't ask me why.

Guenter

Quoted 51 lines

If David is fine with it, I can send a patch with filling commit log.

Thanks.

Quoted 34 lines

Guenter

Quoted 32 lines
---
 net/bpfilter/Makefile | 1 -
 net/bpfilter/main.c   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/bpfilter/Makefile +0 -1
index 0947ee7f70d5..5d6c7760142d 100644
@@ -5,7 +5,6 @@
 
 hostprogs-y := bpfilter_umh
 bpfilter_umh-objs := main.o
-KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
 HOSTCC := $(CC)
 
 ifeq ($(CONFIG_BPFILTER_UMH), y)
net/bpfilter/main.c +1 -1
index 1317f108df8a..61ce8454a88e 100644
@@ -6,7 +6,7 @@
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "include/uapi/linux/bpf.h"
+#include "../../include/uapi/linux/bpf.h"
 #include <asm/unistd.h>
 #include "msgfmt.h"
 
Quoted 2 lines
Quoted 2 lines

--
2.7.4

--
Best Regards

Masahiro Yamada

maintainer
#3 lore raw
In reply to Masahiro Yamada

From: Masahiro Yamada <[email protected]>
Date: Fri, 22 Feb 2019 00:54:47 +0900

Quoted 18 lines · Guenter Roeck
Quoted 11 lines · Masahiro Yamada
Quoted 5 lines

Currently, the header search paths -Itools/include and -Itools/include/uapi are not used. Let's drop the unused code.

We can remove -I. too by fixing up one C file.

This patch reintroduces the problem last fixed with commit ae40832e53c3 ("bpfilter: fix a build err"). Seen (at least) with gcc 7.4.0, 8.2.0. binutils version is 2.31.1. Reverting this patch fixes the problem.

Hmm. I cannot reproduce the build error with my gcc, but you are right.

Quoted 5 lines

I'd like to get back only
'KBUILD_HOSTCFLAGS += -Itools/include/ -Itools/include/uapi' instead of the full revert.

If David is fine with it, I can send a patch with filling commit log.

If that really fixes the build regression, sure.