commit: 1adaddf5110adeaf1e3b84d1d15d42e66798c4ef Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Oct 25 12:38:23 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Oct 25 12:38:23 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1adaddf5
dev-lang/tcc: add musl/uclibc support Closes: https://bugs.gentoo.org/765652 Bug: https://bugs.gentoo.org/715428 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-lang/tcc/tcc-0.9.27_p20211022.ebuild | 6 ++++++ dev-lang/tcc/tcc-9999.ebuild | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild b/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild index f53743b5e6b..3081fc06884 100644 --- a/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild +++ b/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild @@ -51,11 +51,17 @@ src_prepare() { } src_configure() { + local libc + use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise # better fixes welcome, it feels wrong to hack the env like this + use elibc_musl && libc=musl + use elibc_uclibc && libc=uClibc + # not autotools, so call configure directly ./configure --cc="$(tc-getCC)" \ + ${libc:+--config-${libc}} \ --prefix="${EPREFIX}/usr" \ --libdir="${EPREFIX}/usr/$(get_libdir)" \ --docdir="${EPREFIX}/usr/share/doc/${PF}" diff --git a/dev-lang/tcc/tcc-9999.ebuild b/dev-lang/tcc/tcc-9999.ebuild index f53743b5e6b..3081fc06884 100644 --- a/dev-lang/tcc/tcc-9999.ebuild +++ b/dev-lang/tcc/tcc-9999.ebuild @@ -51,11 +51,17 @@ src_prepare() { } src_configure() { + local libc + use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise # better fixes welcome, it feels wrong to hack the env like this + use elibc_musl && libc=musl + use elibc_uclibc && libc=uClibc + # not autotools, so call configure directly ./configure --cc="$(tc-getCC)" \ + ${libc:+--config-${libc}} \ --prefix="${EPREFIX}/usr" \ --libdir="${EPREFIX}/usr/$(get_libdir)" \ --docdir="${EPREFIX}/usr/share/doc/${PF}"
