Linux-Modules Archive on
 help / color / Atom feed
From: Fabrice Fontaine <>
Cc: Fabrice Fontaine <>
Subject: [PATCH] filter -Wl,--no-undefined
Date: Mon, 18 Nov 2019 22:56:17 +0100
Message-ID: <> (raw)

Commit 1d14ef82f4a3be741bcdf6b1c6d51ce9dce43567 does not completely fix
the build with python 3.8 as we still get link failure due to
'-z undefs' being ignored by some versions of ld.

Indeed, -z undefs was added by commit
97a232d7335f3bd0231fd9cd39455bde1d563922 in upstream binutils, and this
commit was first present in binutils 2.30.
So any toolchain using binutils version older than that won't have
-z undefs and will build fail on:

/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: warning: -z undefs ignored.

/home/naourr/work/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/aarch64_be-linux-gnu/7.3.1/../../../../aarch64_be-linux-gnu/bin/ld: warning: -z undefs ignored.

So filter -Wl,--no-undefined to fix the issue


Signed-off-by: Fabrice Fontaine <>
--- | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ b/
index 8e9c90d..47505c1 100644
--- a/
+++ b/
@@ -173,7 +173,10 @@ CPYTHON_MODULE_CFLAGS = \
-CPYTHON_MODULE_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared -Wl,-z,undefs
+# Filter -Wl,--no-undefined to fix build with python 3.8
+comma = ,
+CPYTHON_MODULE_LDFLAGS = $(subst -Wl$(comma)--no-undefined,,$(AM_LDFLAGS))
+CPYTHON_MODULE_LDFLAGS += -module -avoid-version -shared
 pkgpyexec_LTLIBRARIES = \

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 21:56 Fabrice Fontaine [this message]
2019-11-18 22:18 ` Lucas De Marchi
2019-11-18 22:45   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Modules Archive on

Archives are clonable:
	git clone --mirror linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ \
	public-inbox-index linux-modules

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone