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 A9BAFA04F1; Fri, 13 Dec 2019 15:05:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B7AE1BF7B; Fri, 13 Dec 2019 15:05:13 +0100 (CET) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id F1E1D1BF7A for ; Thu, 12 Dec 2019 18:44:23 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id s64so1498735pgb.9 for ; Thu, 12 Dec 2019 09:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=83QsT51LdS/+vzqYrUjgx3OrB4b0XKJyiRFjqI6u2+c=; b=uTJo7UCuUJFTjHmL3pbRtrJXuZj/jGfZFAFLkoHQNNoEWLjIIIlDt2cBJqNj9WV4/M iJzCJbKpoTPiJtxIpyCluIjet1ILjkCQqhZ+jAjuYv0zIqFP3S7VW/RvYYKdQXE84tqs SRuY3OT5CDEUWNbybBZqLtMT2BUtK+mj43fSMkERIuEwUCskaWuIjj3LiBBZL3tqoQQq Dqbvoci5hptxlFtN6wrfZ2/mUnj8wqor1nJP4eCvgKPlOd2oY210ndqJ22GnXGqVl/Ws FWJd7nkQwa5a4MPno+t8tBBwpTesh49GNIAHInZOxqML9R3sJoAhAhbI82R2bqgyP52d fXSg== 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:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=83QsT51LdS/+vzqYrUjgx3OrB4b0XKJyiRFjqI6u2+c=; b=Hjpf/l+RW4eMJUGyqRKfYvwEZI4lU3ElBgtBEFaE0EXQX3QtgoeXXQ83fKEkJq0+tw ms9wDFfPVvrGq2r1jBTbbTG8o3g6XLn/0bOVHZIQqb3dhIH2SjxI8DC0oPdVNdRJhUvm vGFW+Pj+OnLD+Zywj5T+4wAQ8wfp5QeWGA3/aifNDAP01MnDX6tGeUzcvqp5vAx588Yx LKtP3hV3vWNKpAXQ7oE1QFDd1kMa9wH4hM2QoV9ae083lv+jbp3FtVU91AFyM3JzyVL5 Ys5L3/wJ2Q7DCTWpnhsLCv51uKOWBp9XLsrx4pU0T03yDhwg22U9+KIJ7R4JzOFFIofb A3wA== X-Gm-Message-State: APjAAAXE53Wdkh4RbmPgNDgL6X5nZQI7oCdBtxMueWQeT4C/chDHvQIp PBwttlbkNuhndFyELCeMjOTO8n/Z3r8= X-Google-Smtp-Source: APXvYqzzhmfTPuGXZAVovYlDw7eF/7vR+brw/1ks3q5UK+R+WmuQ4iJzviATETCbegBq5Gr1qQ2V1w== X-Received: by 2002:a62:3706:: with SMTP id e6mr11338503pfa.31.1576172662982; Thu, 12 Dec 2019 09:44:22 -0800 (PST) Received: from localhost (node-1w7jr9ss2r87ipezt91bdu6xx.ipv6.telus.net. [2001:569:bdb0:bb00::7a5]) by smtp.gmail.com with ESMTPSA id t65sm8389776pfd.178.2019.12.12.09.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 09:44:22 -0800 (PST) From: Rafael Avila de Espindola To: Thomas Monjalon Cc: dev@dpdk.org In-Reply-To: <10040104.KzNOl4Vb3s@xps> References: <20191025012013.118919-1-espindola@scylladb.com> <10040104.KzNOl4Vb3s@xps> Date: Thu, 12 Dec 2019 09:44:18 -0800 Message-ID: <87a77xcubx.fsf@espindo.la> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 13 Dec 2019 15:05:12 +0100 Subject: Re: [dpdk-dev] [PATCH] Don't combine '-r' and '--export-dynamic' linker options X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thomas Monjalon writes: > 25/10/2019 03:20, Rafael =C3=81vila de Esp=C3=ADndola: >> Running ld with '-r' switches the linker to a very special mode where >> some other linker options don't make sense. >>=20 >> 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. >>=20 >> When given both options it looks like the gnu linker just ignores >> '--export-dynamic'. >>=20 >> 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. >>=20 >> This patch drops $(LDFLAGS) when using -r. With this patch I can build >> dpdk with lld. > [...] >> -PMDINFO_LD =3D $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ >> +PMDINFO_LD =3D $(CROSS)ld -r -o $@.o $@.pmd.o $@ > > Dealing with compiler bugs is really annoying. > I'm afraid removing LDFLAGS may break in some environments. > Could you just filter-out some incompatible options? Sure, that works. I will send a v2. > And what about meson? Is there some similar issue? As far as I can tell meson produces a .a file instead. In the build.ninja file I see build drivers/librte_pmd_dpaa_event.a: STATIC_LINKER drivers/a715181@@rte_p= md_dpaa_event@sta/meson-generated_.._rte_pmd_dpaa_event.pmd.c.o drivers/a71= 5181@@tmp_rte_pmd_dpaa_event@sta/event_dpaa_dpaa_eventdev.c.o and rule STATIC_LINKER command =3D rm -f $out && gcc-ar $LINK_ARGS $out $in Cheers, Rafael