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 ED29EA00B8; Sun, 27 Oct 2019 23:36:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 622A01BEFD; Sun, 27 Oct 2019 23:36:30 +0100 (CET) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id D18271E8A4 for ; Fri, 25 Oct 2019 03:20:26 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id 205so431438pfw.2 for ; Thu, 24 Oct 2019 18:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mXKUr/gIV8J0cixWsc23hYQeH4d/klDj4SYg5Lqz0kc=; b=lRPmXJRjBuJmdPqVbDz1kSdGeU9Q57Eb9bt07zW5TEQlKIMv/bIiPm13i42MSP9dhs 3XB0KAnCXIbxiVHdk7s2hqtFV7Q6B5pXX+LCbTq0WuD4bry2HxtHUXR4/PavQr2lqPz/ w+iTXCTYR2pvz823l6C4SwwSKSMGC6UkU1X+NEHuJSrhYMv+9ehIcp/lFq29xQ+tw7bv L9UcRDhGG4Erhl9s0IAyqjBxtRnJUDjrEXyHoZ122BVBkh5hRWfkQpSuKQ1L7xbttF3s xfHoz7CP1gvMuluXzsio83X6wEqeR0x04xqz0ySoHCKvxtAr2VUW1/dhPf7WonzZ7t8q h7Fg== 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:mime-version :content-transfer-encoding; bh=mXKUr/gIV8J0cixWsc23hYQeH4d/klDj4SYg5Lqz0kc=; b=RYCM9nWpwnmX8hL0gPwzYOl4qfxVNAv08fBeJQX1p6WZvquDw7kcCGtmYkWssicz2Y 2mU9ke8e5hHGNezqrTECZSDAEQ7EA7evfdyJYQSWR5xBRpXOciy6qIYeEUoh8VeEh5LX Q6ikBgPYyFiXCoFAPRQvYcrKvAU291nT9H6VfHbRRNbr+bQ9fjhfHGSaIZcPnxNT00nj 1GLGNY+ei/lNUuzYdi635bOdUrXycZC2VyeECaxaeWdjxwArM7NkAM8M+BjHNyr9/NgT HqWPfnRt4uEd1VNx1sEg8Xg+2gSzOuiw/+62RYKm7GaEhc/xTLXGfgHsdGm9r8uaKKlE +6Dw== X-Gm-Message-State: APjAAAWQ+7i0qByqA1X6gGp7Ce9YjkXv/ipxmyBKJ6k2KlRaJn4UTa/u 5tcmUKyG0sFO/wovSPzalUtUlU+x+n0= X-Google-Smtp-Source: APXvYqyYKiEQu+GUAw06OYQXv/phZ36/8xkbzIuySicvHFnj8rdxZ8LM9avgcS10Js056m1JR33sfw== X-Received: by 2002:a63:d802:: with SMTP id b2mr1137632pgh.414.1571966425654; Thu, 24 Oct 2019 18:20:25 -0700 (PDT) Received: from localhost ([2607:c000:8200:4c00::de6]) by smtp.gmail.com with ESMTPSA id l23sm331081pjy.12.2019.10.24.18.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 18:20:25 -0700 (PDT) From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= To: dev@dpdk.org Cc: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Thu, 24 Oct 2019 18:20:13 -0700 Message-Id: <20191025012013.118919-1-espindola@scylladb.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 27 Oct 2019 23:36:29 +0100 Subject: [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" 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 drops $(LDFLAGS) when using -r. With this patch I can build dpdk with lld. 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 0cf3791b4..6cd7e559a 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 -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.21.0