From 1adaddf5110adeaf1e3b84d1d15d42e66798c4ef Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 25 Oct 2021 13:38:23 +0100 Subject: dev-lang/tcc: add musl/uclibc support Closes: https://bugs.gentoo.org/765652 Bug: https://bugs.gentoo.org/715428 Signed-off-by: Sam James --- dev-lang/tcc/tcc-0.9.27_p20211022.ebuild | 6 ++++++ dev-lang/tcc/tcc-9999.ebuild | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'dev-lang') diff --git a/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild b/dev-lang/tcc/tcc-0.9.27_p20211022.ebuild index f53743b5e6b9..3081fc06884e 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 f53743b5e6b9..3081fc06884e 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}" -- cgit v1.2.3-65-gdbad