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 179FBA054C for ; Fri, 14 Feb 2020 18:04:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FA43F72; Fri, 14 Feb 2020 18:04:37 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id F028CF72 for ; Fri, 14 Feb 2020 18:04:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x+tbBhXVpyVUVajt8YEpOsShJOObwcMdXQ+5KkeZd2w=; b=V9dnZk1ftCDOIuzMqJ4EBTif78bQdlw5fK1WzM7w84bwwKZu127KXiY1dnbaRdg0Z0TEUp q8kZyLhZDoWaxbl6ckOg4L+v1B97ceDSrWX9ZrSV3CkCU2vy3YdIIiV+ASZkxtmLp3tYls h15aSAQ+hqx2hql3HNQrM49AY1NgQOI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-76-KVoNjgcHMPW2Vg3IuWCr8g-1; Fri, 14 Feb 2020 12:04:25 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BB63800D5B; Fri, 14 Feb 2020 17:04:24 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 272E08AC4D; Fri, 14 Feb 2020 17:04:22 +0000 (UTC) From: Kevin Traynor To: Cc: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= , dpdk stable Date: Fri, 14 Feb 2020 17:03:02 +0000 Message-Id: <20200214170337.25093-8-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: KVoNjgcHMPW2Vg3IuWCr8g-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' has been queued to LTS release 18.11.7 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 LTS release 18.11.7 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/20/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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/bad8e72a9709911cf3= ab60b8ae249753bdb8e69d Thanks. Kevin. --- >From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Rafael=3D20=3DC3=3D81vila=3D20de=3D20Esp=3DC3=3DADndola?= =3D 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=3DUTF-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=3D43552). 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 dri= ver") Signed-off-by: Rafael =C3=81vila de Esp=C3=ADndola --- 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.m= k index 0cf3791b4d..82fe098f7c 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -62,5 +62,5 @@ CHECK_EXPERIMENTAL =3D $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(= EXPORT_MAP) $@ PMDINFO_GEN =3D $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c PMDINFO_CC =3D $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o = $@.pmd.c -PMDINFO_LD =3D $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ +PMDINFO_LD =3D $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $= @.o $@.pmd.o $@ PMDINFO_TO_O =3D if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \ =09echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \ --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:37.500280292 +0000 +++ 0008-mk-avoid-combining-r-and-export-dynamic-linker-optio.patch=092020-= 02-14 17:02:36.932408335 +0000 @@ -1 +1 @@ -From 5a352a3a98e3297555cb08d2db6e45a93ce7e058 Mon Sep 17 00:00:00 2001 +From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001 @@ -9,0 +10,2 @@ +[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ] + @@ -30 +31,0 @@ -Cc: stable@dpdk.org