#1138206 thunderbird: Disable reduce-memory-overheads flag for clang

Package:
thunderbird
Source:
thunderbird
Description:
mail/news client with RSS, chat and integrated spam filter support
Submitter:
Date:
2026-05-31 05:41:02 UTC
Severity:
normal
#1138206#5
Date:
2026-05-29 11:29:40 UTC
From:
To:
Trixie
6.12.88+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.88-1 (2026-05-15) x86_64 GNU/Linux

With standard manner, I am building

thunderbird_140.11.0esr-1~deb13u1_amd64.deb

After doing the following (summary):
$ apt-get source thunderbird
# apt build-dep thunderbird
$ dpkg-buildpackage -b -us -uc -j1

I had the error like this:

***

error: linking with `/.../thunderbird-140.11.0esr/build/cargo-linker` failed: exit status: 1 |

   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: ld.lld: error: unknown argument '--reduce-memory-overheads'
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `proc-macro2` (build script) due to 1 previous error

***

Looks better to disable the flag --reduce-memory-overheads
with clang (like firefox-esr)

I already made the patch and am going to send a pull request at Salsa.

Taro

#1138206#10
Date:
2026-05-31 05:32:57 UTC
From:
To:
Firefox-esr applies the followings in debian/rules
to avoid this issue

1.
ifeq (default,$(origin CC))
ifneq (,$(filter-out bullseye bookworm,$(DIST)))
CC := clang

2.
ifeq (,$(findstring clang,$(CC)))
LDFLAGS += -Wl,--reduce-memory-overheads
endif

but if we do '1' for Thunderbird as well,
we need to do careful examination for the codes,
so disabling
LDFLAGS += -Wl,--reduce-memory-overheads
will be quick fix.

When debian/rules is updated like Firefox-esr in the
future, please consider enable back this option.
Meanwhile, the patch might be applied to
not only Trixie but also SID etc.

The patch will be sent over Salsa soon. thx

Taro