[dpdk-dev] mk: fix shared lib build with stable abi

Message ID 1436778149-18811-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon July 13, 2015, 9:02 a.m. UTC
  When next ABI is enabled, the shared lib extension is .so.x.1.
That's why a double basename was introduced.
But the "ifeq NEXT_ABI" was forgotten, removing the .so
extension when NEXT_ABI is disabled.
It was preventing the linker from finding the .so libraries.

Fixes: 506f51cc0da7 ("mk: enable next abi preview")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.lib.mk | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

John McNamara July 13, 2015, 9:24 a.m. UTC | #1
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, July 13, 2015 10:02 AM
> To: Mcnamara, John
> Cc: dev@dpdk.org
> Subject: [PATCH] mk: fix shared lib build with stable abi
> 
> When next ABI is enabled, the shared lib extension is .so.x.1.
> That's why a double basename was introduced.
> But the "ifeq NEXT_ABI" was forgotten, removing the .so extension when
> NEXT_ABI is disabled.
> It was preventing the linker from finding the .so libraries.
> 
> Fixes: 506f51cc0da7 ("mk: enable next abi preview")
> 
> Reported-by: John McNamara <john.mcnamara@intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

That fixes it. Thanks.

Acked-by: John McNamara <john.mcnamara@intel.com>
  
Thomas Monjalon July 13, 2015, 9:32 a.m. UTC | #2
> > When next ABI is enabled, the shared lib extension is .so.x.1.
> > That's why a double basename was introduced.
> > But the "ifeq NEXT_ABI" was forgotten, removing the .so extension when
> > NEXT_ABI is disabled.
> > It was preventing the linker from finding the .so libraries.
> > 
> > Fixes: 506f51cc0da7 ("mk: enable next abi preview")
> > 
> > Reported-by: John McNamara <john.mcnamara@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> That fixes it. Thanks.
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks.
Now that next ABI can be disabled, patches using it may be applied :)
  

Patch

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index f15de9b..9ff5cce 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -173,7 +173,11 @@  $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
 	@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
 	$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
+ifeq ($(CONFIG_RTE_NEXT_ABI),y)
 	$(Q)ln -s -f $< $(basename $(basename $@))
+else
+	$(Q)ln -s -f $< $(basename $@)
+endif
 endif
 
 #