From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 604A5A051C for ; Tue, 11 Feb 2020 12:29:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 594B81BF98; Tue, 11 Feb 2020 12:29:37 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by dpdk.org (Postfix) with ESMTP id 250782BD8 for ; Tue, 11 Feb 2020 12:29:36 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id g1so3024929wmh.4 for ; Tue, 11 Feb 2020 03:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nGLWskvvLuYtEnObqw4zIEq6LqkZ2fUgBEy//MXdwso=; b=XuFgehsKnmNN/D832yt6vLARc772QE4g1e8UZAVtCQ+tg6Ie+3O2ZOC6hg18z1eyMU Y79OkxoU+UVXEdyUALbn9ydDSEYrqlM8L0XCcHWEXT1KLIXbiNlqClsm1xigt6rrz7Xp Mow/WByUMtu/52Ox5uJasZauaCFhQf9XYxcAVwAl67RGs8wwPM4OjavESfrURLqIQFMW 5+A2mIi1pBe9SDXEXtEPr8K3pp3qOsR5ORtZiogp0NTxUkf7CjN7Rf7NGIfRxzXoNYE3 WnHIOipBUbyJMLQcj80MUW02yk6/lDto2aYTRY3FmvoucvQY7qfb3fRIRst1z7sa1Hz/ QFzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nGLWskvvLuYtEnObqw4zIEq6LqkZ2fUgBEy//MXdwso=; b=rVI73eWR3vweQFg3n2b3CVNcCWZiV7nBFSW0mq994GBNtoLPfxDE7DabBmIKkLHXI0 pw4d5mGJqGBxZwpFVeJa1BaYvu/cTNHeW2mdbrtbKHEAf/0JVqn6kIrFKrVEguGqbHUI qNHqE4I8KpbNShx7kgefhT6QBaMeTKZOUbshqDJANup5MDjau+IyG81pIAjx0bXI3bjJ /57ZBknM0+OChFe8/puDkSZOYNJaG9J786sRowPvhnJVKna9WaQ95HlmaJLsBFciPOXe hc7GvALXfRrNLeZpq1c1OLGQx5S1+/3HFE8lH4M/emUW9j94J+DElkGTVaSSInOCcaJf rYsg== X-Gm-Message-State: APjAAAUCkV9WAABz7oThz763qZOJlXvKXMZ295h0BFUWlh/AapqPMCbj WQznyFkE1m691SrBIVbN4r8= X-Google-Smtp-Source: APXvYqw4da8D4BE0k923qOQoMVoE5gxau969ijDf9oQT0z22EeDP/G46dMt74zrQYg/6YNj/Yfgy8Q== X-Received: by 2002:a1c:f008:: with SMTP id a8mr5031467wmb.81.1581420575851; Tue, 11 Feb 2020 03:29:35 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x14sm3220358wmj.42.2020.02.11.03.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:29:35 -0800 (PST) From: luca.boccassi@gmail.com To: Cc: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= , dpdk stable Date: Tue, 11 Feb 2020 11:20:50 +0000 Message-Id: <20200211112216.3929-104-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 4d7f82d2113dd9d7170ffd5a07a846c95af7fc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Thu, 12 Dec 2019 09:53:12 -0800 Subject: [PATCH] mk: avoid combining -r and -export-dynamic linker options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ] Running ld with -r switches the linker to a very special mode where some other linker options don't make sense. In particular, -export-dynamic normally requires that all global symbols be included in the dynamic symbol table, but a .o file doesn't even have a dynamic symbol table. When given both options it looks like the gnu linker just ignores -export-dynamic. Unfortunately some versions of lld (https://lld.llvm.org/) have a bug that causes it to try to create a dynamic symbol table in the output .o file and ends up corrupting it (https://bugs.llvm.org/show_bug.cgi?id=43552). Current (git) version of lld now issues an error. This patch filters out -export-dynamic from $(LDFLAGS) when using -r. With this patch I can build dpdk with lld. Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver") Signed-off-by: Rafael Ávila de Espíndola --- mk/internal/rte.compile-pre.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk index 0cf3791b4d..82fe098f7c 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -61,7 +61,7 @@ CHECK_EXPERIMENTAL = $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(EXPORT_MAP) $@ PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c -PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ +PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@ PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \ echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \ $(PMDINFO_GEN) && \ -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:42.468892392 +0000 +++ 0104-mk-avoid-combining-r-and-export-dynamic-linker-optio.patch 2020-02-11 11:17:38.572004563 +0000 @@ -1,4 +1,4 @@ -From 5a352a3a98e3297555cb08d2db6e45a93ce7e058 Mon Sep 17 00:00:00 2001 +From 4d7f82d2113dd9d7170ffd5a07a846c95af7fc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Thu, 12 Dec 2019 09:53:12 -0800 @@ -7,6 +7,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ] + Running ld with -r switches the linker to a very special mode where some other linker options don't make sense. @@ -27,7 +29,6 @@ -r. With this patch I can build dpdk with lld. Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver") -Cc: stable@dpdk.org Signed-off-by: Rafael Ávila de Espíndola ---