From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 3C6D9AFD2 for ; Tue, 27 May 2014 14:55:20 +0200 (CEST) Received: by mail-wg0-f45.google.com with SMTP id m15so9554653wgh.16 for ; Tue, 27 May 2014 05:55:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=rRhO3rWFblIapZbxawwO62f1WjYXaQBPb5K3q50GqYQ=; b=diEu4VZE+0IZHv70U3J2SFd+qfGdJ7EG+fC9BKCZfgq2oqSDix9awZWJAT0mmMRo+v df0phGWDMTEKOl2vWg+I8x+r9+ep79WvrS830bHyngnoIS/+/x+ArbXAXWfhiDh8toGh tFfLgUzY3pYx4KOf7jdss6ir6lVf86rYWRkDRubKVALB1UKegVkKmy8fmzxT8HCccw2Z b45IYXuQcK1lebtRNZNoH/+OC2aV7M2ho5oAsHqcJIMDoZCI/JTs7zv3FKZRnmpRBRTj CylLSuzl/hBSDN7+zwBKJHivK67fLvJbeNFkd9BiOuhCX14yFYisbvnHMU0Jk8ojpqew 2/Og== X-Gm-Message-State: ALoCoQnYITQ1h8A/Ac5Oz9mgONSKRSMm4e+sFEft+rw4TEN9X4UYK4pajdNomqUjP0emlfJZkVE9 X-Received: by 10.180.77.70 with SMTP id q6mr37599877wiw.28.1401195329657; Tue, 27 May 2014 05:55:29 -0700 (PDT) Received: from XPS13.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id l5sm8166985wif.22.2014.05.27.05.55.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 May 2014 05:55:28 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 27 May 2014 14:55:16 +0200 Message-Id: <1401195316-31149-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.9.2 Subject: [dpdk-dev] [PATCH] mk: fix link with gcc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 12:55:20 -0000 Some linker options were not prefixed by -Wl, when using gcc: -z muldefs -melf_i386 (32-bit config) Using macro linkerprefix is fixing it. Signed-off-by: Thomas Monjalon --- mk/rte.lib.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index f5d2789..c58e68e 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -62,6 +62,8 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) ifeq ($(LINK_USING_CC),1) # Override the definition of LD here, since we're linking with CC LD := $(CC) +LD_MULDEFS := $(call linkerprefix,-z$(comma)muldefs) +CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) endif O_TO_A = $(AR) crus $(LIB) $(OBJS-y) @@ -73,7 +75,7 @@ O_TO_A_DO = @set -e; \ $(O_TO_A) && \ echo $(O_TO_A_CMD) > $(call exe2cmd,$(@)) -O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -shared $(OBJS-y) -o $(LIB) +O_TO_S = $(LD) $(CPU_LDFLAGS) $(LD_MULDEFS) -shared $(OBJS-y) -o $(LIB) O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)") O_TO_S_DO = @set -e; \ @@ -89,7 +91,7 @@ O_TO_C_DO = @set -e; \ $(lib_dir) \ $(copy_obj) else -O_TO_C = $(LD) -z muldefs -shared $(OBJS-y) -o $(LIB_ONE) +O_TO_C = $(LD) $(LD_MULDEFS) -shared $(OBJS-y) -o $(LIB_ONE) O_TO_C_STR = $(subst ','\'',$(O_TO_C)) #'# fix syntax highlight O_TO_C_DISP = $(if $(V),"$(O_TO_C_STR)"," LD_C $(@)") O_TO_C_DO = @set -e; \ -- 1.9.2