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 0CBF8A04B3 for ; Tue, 28 Jan 2020 12:07:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ECCE71C257; Tue, 28 Jan 2020 12:07:06 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 16C831DB9 for ; Mon, 27 Jan 2020 09:34:06 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id y11so10039416wrt.6 for ; Mon, 27 Jan 2020 00:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PLxt6pm+v0g7KCjQ3YQMCRd0u/fUjeC0AqHot3fRQL4=; b=MKkA5ua2orJLPnOfQErTYXxEy8+lKQ7y5zz06jceu941VPaZpLR/TPQKKHv+QEN+Qz BuDLAqMyJCRGsY96+qOyo/cBVPRvva7aSdCQCQcs1rCZ8+NZAjsG2LpnwHjFfasbtu93 UYk7b6L1J5TEMGN4FErh9HSFiv/xxcHzV0k1N0XjX9T+4+T+OnVXS7We5d+DtG1Cg0w2 TKXypBy67Zg+YftKhm1u7QRbjpHiP+eaqJ5DR0XIgLDyjGCtZltkX9XKXDOpmudMSqpr OwW7sXXuGQpEfd4+dK88Jvm8vQSkhDT82GTJV53yk11S9WlLGidBUExqyMkr8N3hOYxC RTBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=PLxt6pm+v0g7KCjQ3YQMCRd0u/fUjeC0AqHot3fRQL4=; b=D0CWzag8orL3rz6SKwsp/LmZLF4a+1KP387MjbQ8KKDrfmEr0StBf51AaF+G/6Nydt OXcpfc5xRm9LJaQqKl0cM8spl5jA2in5SfrXWrskLSJBy9WPn8Nx9Vq4WuUORUj3Yl3G SuF59TFeLf8UL/P5ydPQWBF9ploh0S7vZxLKkfzl5G2nnZ/N74UXX4fH5SAxBZx/ceGP g9ERfbtG3GPwz3EH9z1tCHlFUvjR2/V74GlbE2Bcgv6FACeBuseYGeIC31bXDTaeL0iT zHcubv62hRWvyil8jFxDSiiPdoklUww9xaCU7rGxekjWu31fwNK01VQeSSqo7/4Lllhf tNMQ== X-Gm-Message-State: APjAAAVUfcjnHt42GTDLywyh2E+d30VYo/wVkZES8N07pUSHOOxPrJMw GZeLGlj+7VVjIQ6jeBRO9sAcbw== X-Google-Smtp-Source: APXvYqwFun5EKPBCgfP0Rmby4IOJATMys7NCL7Mhu77N4TwyLYzpwgBzCWNdBfMFbH8+kRGJHtC29w== X-Received: by 2002:adf:e6c5:: with SMTP id y5mr21473027wrm.210.1580114045697; Mon, 27 Jan 2020 00:34:05 -0800 (PST) Received: from [10.0.0.1] (system.cloudius-systems.com. [199.203.229.89]) by smtp.gmail.com with ESMTPSA id o4sm19952483wrx.25.2020.01.27.00.34.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jan 2020 00:34:04 -0800 (PST) To: =?UTF-8?Q?Rafael_=c3=81vila_de_Esp=c3=adndola?= , seastar-dev@googlegroups.com Cc: stable@dpdk.org References: <20200127013307.22633-1-espindola@scylladb.com> From: Avi Kivity Organization: ScyllaDB Message-ID: Date: Mon, 27 Jan 2020 10:34:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200127013307.22633-1-espindola@scylladb.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Mailman-Approved-At: Tue, 28 Jan 2020 12:07:05 +0100 Subject: Re: [dpdk-stable] [seastar-dev] [PATCH] mk: avoid combining -r and -export-dynamic linker options 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" I'm guessing you need to get it to upstream dpdk.git before the stable@ will be honored. On 27/01/2020 03.33, Rafael Ávila de Espíndola wrote: > 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") > Cc: stable@dpdk.org > > Signed-off-by: Rafael Ávila de Espíndola > (cherry picked from commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058) > --- > Once seastar is updated to use this it should be possible to build > seastar and scylla with lld, which might help with the bots running > out of resources during the link. > > 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 0cf3791b4..82fe098f7 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) && \