From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsoundtouch/
Date: Fri, 07 Feb 2025 17:50:28 +0000 (UTC) [thread overview]
Message-ID: <1738950560.7f9ace99e7d38f320e69320d21c4f2787333f071.sam@gentoo> (raw)
commit: 7f9ace99e7d38f320e69320d21c4f2787333f071
Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Mon Feb 3 11:15:15 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 7 17:49:20 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9ace99
media-libs/libsoundtouch: fix undefined symbol: __kmpc_xxx
when called with "-fopenmp" and "-nostdlib", clang won't add "-lomp"
automatically, while gcc always add "-lgomp". See below:
For gcc, "-lgomp" is added always:
# echo 'int main() { return 0; }' | gcc -fopenmp -v -x c - 2>&1 | grep -- "-lgomp"
/usr/libexec/gcc/x86_64-pc-linux-gnu/14/collect2 -plugin ... -lgomp -lgcc ...
# echo 'int main() { return 0; }' | gcc -fopenmp -nostdlib -v -x c - 2>&1 | grep -- "-lgomp"
/usr/libexec/gcc/x86_64-pc-linux-gnu/14/collect2 -plugin ... -lgomp
For clang, "-lomp" is not added when both "-fopenmp" and "-nostdlib" exist:
# echo 'int main() { return 0; }' | clang -fopenmp -v -x c - 2>&1 | grep -- "-lomp"
"/usr/bin/x86_64-pc-linux-gnu-ld.bfd" --hash-style=gnu ... -lomp -L/usr/lib/llvm/19/lib64 ...
# echo 'int main() { return 0; }' | clang -fopenmp -nostdlib -v -x c - 2>&1 | grep -- "-lomp"
In case of libsoundtouch, command to build .so is:
clang++ -fPIC -DPIC -shared -nostdlib ... -Wl,-soname -Wl,libSoundTouchDll.so.1 -o .libs/libSoundTouchDll.so.1.0.0
So LDFLAGS "-lomp" is needed if compiler is clang and openmp is enabled.
Otherwise, libomp.so won't be defined in Dynamic Section as show bellow:
# LC_ALL=C objdump -x /usr/lib64/libSoundTouch.so
...
Dynamic Section:
NEEDED libomp.so
...
cause package depend on libsoundtouch either failed to build or failed
to start (if libsoundtouch is reemerged with openmp).
Closes: https://bugs.gentoo.org/740310
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40424
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/libsoundtouch/libsoundtouch-2.3.3.ebuild | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/media-libs/libsoundtouch/libsoundtouch-2.3.3.ebuild b/media-libs/libsoundtouch/libsoundtouch-2.3.3.ebuild
index 27b608d12942..fbf04002b684 100644
--- a/media-libs/libsoundtouch/libsoundtouch-2.3.3.ebuild
+++ b/media-libs/libsoundtouch/libsoundtouch-2.3.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit autotools multilib-minimal toolchain-funcs
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
MY_PN=${PN/lib}
MY_P=${MY_PN}-${PV}
@@ -31,6 +31,11 @@ pkg_setup() {
src_prepare() {
default
sed -i "s:^\(dist_doc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
+
+ if tc-is-clang && use openmp ; then
+ append-libs omp
+ fi
+
eautoreconf
}
next reply other threads:[~2025-02-07 17:50 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 17:50 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-14 12:28 [gentoo-commits] repo/gentoo:master commit in: media-libs/libsoundtouch/ Miroslav Šulc
2025-06-14 12:21 Miroslav Šulc
2025-06-14 12:20 Miroslav Šulc
2024-05-01 8:52 Sam James
2024-05-01 8:46 Sam James
2024-05-01 8:44 Sam James
2024-05-01 8:44 Sam James
2024-03-24 7:46 Sam James
2024-03-24 7:46 Sam James
2023-09-06 18:43 WANG Xuerui
2023-04-21 6:49 Miroslav Šulc
2023-04-20 22:44 Sam James
2023-04-20 22:40 Sam James
2022-12-15 16:51 Arthur Zamarin
2022-12-15 16:51 Arthur Zamarin
2022-12-15 16:51 Arthur Zamarin
2022-11-14 6:50 Miroslav Šulc
2022-05-14 21:30 David Seifert
2021-10-24 8:42 Miroslav Šulc
2021-10-24 8:13 Sam James
2021-10-24 8:13 Sam James
2021-10-24 8:08 Sam James
2021-10-24 8:08 Sam James
2021-09-24 6:46 Miroslav Šulc
2021-09-23 13:58 Agostino Sarubbo
2021-09-23 6:53 Miroslav Šulc
2021-09-23 6:40 Agostino Sarubbo
2021-09-22 21:53 Sam James
2021-09-22 21:53 Sam James
2021-09-22 14:30 Yixun Lan
2021-08-22 9:26 Miroslav Šulc
2021-05-30 10:40 Miroslav Šulc
2021-05-30 9:50 Agostino Sarubbo
2021-05-29 15:23 Sam James
2021-05-29 13:28 Sam James
2021-05-29 9:02 Sam James
2021-04-27 17:45 Miroslav Šulc
2020-08-06 2:35 Sam James
2019-04-28 22:06 Thomas Deutschmann
2019-04-08 0:39 Aaron Bauman
2019-04-07 20:52 Sergei Trofimovich
2019-01-07 10:11 Lars Wendler
2019-01-04 8:20 Tim Harder
2018-08-25 18:55 Sergei Trofimovich
2018-08-25 18:25 Sergei Trofimovich
2018-08-24 3:42 Mikle Kolyada
2018-08-24 1:40 Thomas Deutschmann
2018-08-22 17:07 Andreas Sturmlechner
2017-08-31 12:37 Tim Harder
2017-08-01 8:05 Lars Wendler
2017-08-01 8:04 Lars Wendler
2017-08-01 8:04 Lars Wendler
2015-10-20 14:19 Alexis Ballier
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1738950560.7f9ace99e7d38f320e69320d21c4f2787333f071.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox