From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-we0-f174.google.com (mail-we0-f174.google.com
 [74.125.82.174]) by dpdk.org (Postfix) with ESMTP id C79715A1F
 for <dev@dpdk.org>; Wed, 14 Jan 2015 16:48:39 +0100 (CET)
Received: by mail-we0-f174.google.com with SMTP id k48so9543199wev.5
 for <dev@dpdk.org>; Wed, 14 Jan 2015 07:48:39 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=uH9LbbsEonlmTS7M3pwDWvCcFXS2rKxqPPgreRDb8RE=;
 b=ZEjLzQvXk3mKpU7G29Pw1N2LTsojhKe1V+gS4ZY0uKy4/fa2GnnhFGTxOWZN03FOKS
 cbhzD8bZNNIhFGxEhxx2gAxYT+50rX3PecRiOBmFp59QaXp1tWxs+r+g81S77CU3MV9J
 pPsScbx2el/xKX+HOZ1zAOXT/hucueWmJ6r5IoZtrfzjcb1hZcsh/gadqjuMwsCupGOf
 tdKRok9uPY0ZPBXq6liu0AQYpMosLI1rNJJycfByWn36iOcDTcYq6CHuNJyHb39aLLW6
 y4iaQBsEyTCv9+tRtq2KS3uQi6aTt2ck5BR6lg3UH+9Zw4DFhnYpo19Mke/n0da2plYA
 QfnA==
X-Gm-Message-State: ALoCoQk5vcmcPYyLkbc5onwaN2ffIgD0plZZGzB8HqtYL6nlZGDOdQ46hVDkOtwbpf/QIk6zBcMN
X-Received: by 10.180.87.36 with SMTP id u4mr50933223wiz.20.1421250519610;
 Wed, 14 Jan 2015 07:48:39 -0800 (PST)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id w3sm30584338wjf.3.2015.01.14.07.48.38
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 14 Jan 2015 07:48:38 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 14 Jan 2015 16:48:16 +0100
Message-ID: <7480851.rW1TfZW1Fg@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.3 (Linux/3.17.6-1-ARCH; KDE/4.14.3; x86_64; ; )
In-Reply-To: <1419349913-21674-3-git-send-email-nhorman@tuxdriver.com>
References: <1419109299-9603-1-git-send-email-nhorman@tuxdriver.com>
 <1419349913-21674-1-git-send-email-nhorman@tuxdriver.com>
 <1419349913-21674-3-git-send-email-nhorman@tuxdriver.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 3/4] Add library version extenstion
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jan 2015 15:48:39 -0000

2014-12-23 10:51, Neil Horman:
> To differentiate libraries that break ABI, we add a library version number
> suffix to the library, which must be incremented when a given libraries ABI is
> broken.  This patch enforces that addition, sets the initial abi soname
> extension to 1 for each library and creates a symlink to the base SONAME so that
> the test applications will link properly.

[...]

> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -37,10 +37,9 @@ include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
>  
>  # VPATH contains at least SRCDIR
>  VPATH += $(SRCDIR)
> -
>  ifeq ($(RTE_BUILD_SHARED_LIB),y)
> -LIB := $(patsubst %.a,%.so,$(LIB))
>  
> +LIB := $(patsubst %.a,%.so.$(LIBABIVER),$(LIB))
>  CPU_LDFLAGS += --version-script=$(SRCDIR)/$(EXPORT_MAP)
>  
>  endif
> @@ -63,6 +62,7 @@ build: _postbuild
>  
>  exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
>  
> +

Newline changes seem weird.

>  ifeq ($(LINK_USING_CC),1)
>  # Override the definition of LD here, since we're linking with CC
>  LD := $(CC) $(CPU_CFLAGS)
> @@ -113,6 +113,10 @@ lib_dir = [ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib;
>  #
>  ifeq ($(RTE_BUILD_SHARED_LIB),y)
>  $(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
> +ifeq ($(LIBABIVER),)
> +	@echo "Must Specify a $(LIB) ABI version"
> +	@exit 1

I think (not sure) that @false is better handled than @exit in case of parallel processing.

> +endif
>  	@[ -d $(dir $@) ] || mkdir -p $(dir $@)
>  	$(if $(D),\
>  		@echo -n "$< -> $@ " ; \
> @@ -126,6 +130,7 @@ $(LIB): $(OBJS-y) $(DEP_$(LIB)) FORCE
>  		$(depfile_missing),\
>  		$(depfile_newer)),\
>  		$(O_TO_S_DO))
> +
>  ifeq ($(RTE_BUILD_COMBINE_LIBS),y)
>  	$(if $(or \
>          $(file_missing),\
> @@ -163,9 +168,13 @@ endif
>  # install lib in $(RTE_OUTPUT)/lib
>  #
>  $(RTE_OUTPUT)/lib/$(LIB): $(LIB)
> +	$(eval LIBSONAME := $(basename $(LIB)))
>  	@echo "  INSTALL-LIB $(LIB)"
>  	@[ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib
>  	$(Q)cp -f $(LIB) $(RTE_OUTPUT)/lib
> +ifeq ($(RTE_BUILD_SHARED_LIB),y)
> +	$(Q)ln -s -f ./$(LIB) $(RTE_OUTPUT)/lib/$(LIBSONAME)
> +endif

Why using ./ ?
Why using the eval trick for $(LIBSONAME) instead of $(basename $(LIB)) ?
Even better, you could use $< instead of $(LIB), matter of taste.

-- 
Thomas