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 BA82BA04B3 for ; Tue, 28 Jan 2020 12:07:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BC621C227; Tue, 28 Jan 2020 12:07:06 +0100 (CET) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 3BF30493D for ; Mon, 27 Jan 2020 02:33:29 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id w62so4130946pfw.8 for ; Sun, 26 Jan 2020 17:33:29 -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:date:message-id:mime-version :content-transfer-encoding; bh=YPBS/6h25gWTf+S+Dj8jUdj+qk0ye/iPfkV1jjUhdYY=; b=e64NfA7bIrY/6wKfyeS6zRQda6gaLHxST6wF/4wOkoJIVgemY6jG9wHltwE6o+30eu sn6CQBkNMijFurNLqs1KPxywdd57PKOnpx++5dBMnRtsZcKsc2nBH/o9SKPRMWiZTZ7q S4tFLsWK2y88iRrczrG6L+t8uHWtUJp9/aGUUO2Yb9wgKHEefHnFgkwLQutZNIEN3k0V 5VQWdd4J3qQQ8oulI6FlLZzl6qvJR4uIBUPrmMG9S2Au/4nQ1kjN0uid1XDgJXxer0Ec +J9tnSi/O2qrrUwof/a4HzNh/ExvLGiejnqejzfb9otszs9ihzO9eLZpKsF8MTvzqeTt 2Wgg== 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=YPBS/6h25gWTf+S+Dj8jUdj+qk0ye/iPfkV1jjUhdYY=; b=D5/CY7zTcB6MzN6f50D9p9MmjQKuNzKAZn77rh9m7IbNIluzxm058V8YRT88bMlnxO WvDGUA68NShR3YOC5e/8H+spjg/GbAyhtqfnhYg4yibpYZCsbEN/hvvypkoHOkbTaD6B lhqiN+rznvbT1SK7TK1u67UUSosQcJEC/knAYcHgOPvrnu7AFyHDKV1Slo5vqGvu77tJ AYh/K+YWAoCZb4pqqjKzAF9w3wlPahRGZPjpEzlhGRXdMZy/kCW/fQK20ULacxCo5BvD VraNuhE/KgM8ev95TP9FwxCyAwT+quL5Chd5R6gkHbUP98QVzXdTq7Lw48doNl3jZ6zg gRRA== X-Gm-Message-State: APjAAAX2yDab1boDyVpPhAnlYL+EVc1i/9hXpG50l+sY+BBy//pLEnBu bKYNq8lQ6UFV9TggCMwbNCMheVIenro= X-Google-Smtp-Source: APXvYqzr+fGpOavY60V9PTqfn9Wb2bsicAbfvL/EArNF2QfkF/JX7Vrr3YnV38z2wpnT1cBFAt4qWw== X-Received: by 2002:a63:ba45:: with SMTP id l5mr16712624pgu.380.1580088808284; Sun, 26 Jan 2020 17:33:28 -0800 (PST) Received: from localhost (node-1w7jr9stfapju4jo3p8q2y7yg.ipv6.telus.net. [2001:569:bef0:4a00::6c8]) by smtp.gmail.com with ESMTPSA id 10sm2826655pfu.132.2020.01.26.17.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 17:33:27 -0800 (PST) From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= To: seastar-dev@googlegroups.com Cc: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= , stable@dpdk.org Date: Sun, 26 Jan 2020 17:33:07 -0800 Message-Id: <20200127013307.22633-1-espindola@scylladb.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 28 Jan 2020 12:07:05 +0100 Subject: [dpdk-stable] [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" 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) && \ -- 2.24.1