[dpdk-dev] mlx: fix compilation with older Glibc

Message ID 1465896120-17173-1-git-send-email-adrien.mazarguil@6wind.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Adrien Mazarguil June 14, 2016, 9:22 a.m. UTC
  A missing define in the previous patch causes additional compilation
issues.

Fixes: 3025206f5060 ("mlx: fix compilation with recent Glibc")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/Makefile | 1 +
 drivers/net/mlx5/Makefile | 1 +
 2 files changed, 2 insertions(+)
  

Comments

Ferruh Yigit June 17, 2016, 4:29 p.m. UTC | #1
On 6/14/2016 10:22 AM, Adrien Mazarguil wrote:
> A missing define in the previous patch causes additional compilation
> issues.
> 
> Fixes: 3025206f5060 ("mlx: fix compilation with recent Glibc")
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

"older Glibc" or "recent Glibc" can be very hard to trace from git
history later.

Does it make sense to add glibc version info for the failing ones or
fixed one?

Thanks,
ferruh
  
Adrien Mazarguil June 20, 2016, 9:25 a.m. UTC | #2
On Fri, Jun 17, 2016 at 05:29:53PM +0100, Ferruh Yigit wrote:
> On 6/14/2016 10:22 AM, Adrien Mazarguil wrote:
> > A missing define in the previous patch causes additional compilation
> > issues.
> > 
> > Fixes: 3025206f5060 ("mlx: fix compilation with recent Glibc")
> > 
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 
> "older Glibc" or "recent Glibc" can be very hard to trace from git
> history later.

I wasn't sure about the exact version, it appears to be 2.19 and/or 2.20,
where _BSD_SOURCE was modified and subsequently removed.

I suggest squashing this patch into the original broken commit ("mlx: fix
compilation with recent Glibc") if possible, I did not submit a v2 as it is
already applied on dpdk-next-net.

> Does it make sense to add glibc version info for the failing ones or
> fixed one?

Depends if we can modify the first commit. If we do, let's squash them
together before adding version information, otherwise let's modify the
second one only.

I can submit a v2 that overrides both commits or only the second one, tell
me what you think is best.
  
Bruce Richardson June 20, 2016, 10:04 a.m. UTC | #3
On Mon, Jun 20, 2016 at 11:25:18AM +0200, Adrien Mazarguil wrote:
> On Fri, Jun 17, 2016 at 05:29:53PM +0100, Ferruh Yigit wrote:
> > On 6/14/2016 10:22 AM, Adrien Mazarguil wrote:
> > > A missing define in the previous patch causes additional compilation
> > > issues.
> > > 
> > > Fixes: 3025206f5060 ("mlx: fix compilation with recent Glibc")
> > > 
> > > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > 
> > "older Glibc" or "recent Glibc" can be very hard to trace from git
> > history later.
> 
> I wasn't sure about the exact version, it appears to be 2.19 and/or 2.20,
> where _BSD_SOURCE was modified and subsequently removed.
> 
> I suggest squashing this patch into the original broken commit ("mlx: fix
> compilation with recent Glibc") if possible, I did not submit a v2 as it is
> already applied on dpdk-next-net.
> 
> > Does it make sense to add glibc version info for the failing ones or
> > fixed one?
> 
> Depends if we can modify the first commit. If we do, let's squash them
> together before adding version information, otherwise let's modify the
> second one only.
> 
> I can submit a v2 that overrides both commits or only the second one, tell
> me what you think is best.
> 
> -- 

While I don't like squashing or modifying already-applied commits on the next
tree, since this is for a compilation issue, I may be able to make an exception.

To evaluate it, please send on the proposed updated commit message for the
combined commits. I assume the code to be squashed is as in this V1 patch.

Regards,
/Bruce
  

Patch

diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index ca6e483..efed953 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -48,6 +48,7 @@  CFLAGS += -O3
 CFLAGS += -std=gnu99 -Wall -Wextra
 CFLAGS += -g
 CFLAGS += -I.
+CFLAGS += -D_BSD_SOURCE
 CFLAGS += -D_DEFAULT_SOURCE
 CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 283d8eb..66687e8 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -60,6 +60,7 @@  CFLAGS += -O3
 CFLAGS += -std=gnu99 -Wall -Wextra
 CFLAGS += -g
 CFLAGS += -I.
+CFLAGS += -D_BSD_SOURCE
 CFLAGS += -D_DEFAULT_SOURCE
 CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += $(WERROR_FLAGS)