mailing list of musl libc
 help / color / mirror / code / Atom feed
* musl live ebuild
@ 2012-07-30 22:54 Luca Barbato
  2012-08-01  0:59 ` John Spencer
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Barbato @ 2012-07-30 22:54 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

It should work fine as system ebuild, using it in crossdev requires the
toolchain to be patched to understand musl isn't a bare-metal libc (the
default search path change between those)

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero


[-- Attachment #2: musl-9999.ebuild --]
[-- Type: text/plain, Size: 1735 bytes --]

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

if [[ ${PV} == *9999 ]] ; then
	SCM="git-2"
#	EGIT_REPO_URI="git://git.etalabs.net/musl"
	EGIT_REPO_URI="/usr/src/musl"
fi


inherit eutils flag-o-matic toolchain-funcs ${SCM}

DESCRIPTION="Lightweight C standard library"
HOMEPAGE="http://www.etalabs.net/musl/"

if [[ ${PV} == *9999 ]] ; then
	SRC_URI=""
elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
	SRC_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz"
else # Official release
	SRC_URI="http://www.etalabs.net/${PN}/releases/${P}.tar.gz"
fi

export CBUILD=${CBUILD:-${CHOST}}
export CTARGET=${CTARGET:-${CHOST}}
if [[ ${CTARGET} == ${CHOST} ]] ; then
	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
		export CTARGET=${CATEGORY/cross-}
	fi
fi

LICENSE="MIT"
[[ ${CTARGET} != ${CHOST} ]] \
	&& SLOT="${CTARGET}" \
	|| SLOT="0"

[[ ${PV} == *9999 ]] || KEYWORDS="~arm ~amd64 ~x86"
IUSE="crosscompile_opts_headers-only debug"

DEPEND=""
RDEPEND="${DEPEND}"

pkt_setup() {
	if [[ ${CTARGET} == ${CHOST} ]] ; then
		case ${CHOST} in
			*-musl) ;;
			*) die "Use sys-devel/crossdev to build a musl toolchain"
		esac
	fi
}

src_configure() {
	tc-export CC
	local myconf="--disable-gcc-wrapper"

	if tc-is-cross-compiler ; then
		myconf+=" --target=${CTARGET}"
	fi

#		$(use_enable static-libs static) \
	./configure ${myconf} \
		--prefix=/usr \
		$(use_enable debug) \
		|| die "configure failed"
}

src_install() {
	local sysroot=${D}
	local target=install
	[[ ${CTARGET} != ${CHOST} ]] && sysroot+="/usr/${CTARGET}"
	emake DESTDIR="${sysroot}" ${target}

	[[ ${CTARGET} != ${CHOST} ]] && \
		dosym usr/include /usr/${CTARGET}/sys-include
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: musl live ebuild
  2012-07-30 22:54 musl live ebuild Luca Barbato
@ 2012-08-01  0:59 ` John Spencer
  2012-08-01  1:12   ` Kyle Sanderson
  2012-08-01  7:33   ` Luca Barbato
  0 siblings, 2 replies; 4+ messages in thread
From: John Spencer @ 2012-08-01  0:59 UTC (permalink / raw)
  To: musl

On 07/31/2012 12:54 AM, Luca Barbato wrote:
> It should work fine as system ebuild, using it in crossdev requires the
> toolchain to be patched to understand musl isn't a bare-metal libc (the
> default search path change between those)
>
> lu
>
could you explain to non-gentoo users (me included) what this is and 
what to do with it ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: musl live ebuild
  2012-08-01  0:59 ` John Spencer
@ 2012-08-01  1:12   ` Kyle Sanderson
  2012-08-01  7:33   ` Luca Barbato
  1 sibling, 0 replies; 4+ messages in thread
From: Kyle Sanderson @ 2012-08-01  1:12 UTC (permalink / raw)
  To: musl

It's essentially a musl build script for use with emerge (the portage
system). I don't think you'll find it useful if you don't use Gentoo.
I do however, so thanks Luca!

Thanks,
Kyle.

On Tue, Jul 31, 2012 at 5:59 PM, John Spencer <maillist-musl@barfooze.de> wrote:
> On 07/31/2012 12:54 AM, Luca Barbato wrote:
>>
>> It should work fine as system ebuild, using it in crossdev requires the
>> toolchain to be patched to understand musl isn't a bare-metal libc (the
>> default search path change between those)
>>
>> lu
>>
> could you explain to non-gentoo users (me included) what this is and what to
> do with it ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: musl live ebuild
  2012-08-01  0:59 ` John Spencer
  2012-08-01  1:12   ` Kyle Sanderson
@ 2012-08-01  7:33   ` Luca Barbato
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Barbato @ 2012-08-01  7:33 UTC (permalink / raw)
  To: musl

On 08/01/2012 02:59 AM, John Spencer wrote:
> could you explain to non-gentoo users (me included) what this is and
> what to do with it ?

It is the recipe to build musl in gentoo (sabayon, and other derivatives).

It should be useful for people wanting to try musl on gentoo and
obviously I'd like to have more feedbacks and help in getting musl
working on crossdev w/out hacks.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-01  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-30 22:54 musl live ebuild Luca Barbato
2012-08-01  0:59 ` John Spencer
2012-08-01  1:12   ` Kyle Sanderson
2012-08-01  7:33   ` Luca Barbato

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).