Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430702 (musl-porting)

Summary: [TRACKER] sys-libs/musl porting
Product: Gentoo Linux Reporter: Anthony Basile <blueness>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: CONFIRMED ---    
Severity: normal CC: ar, arkamar, bertrand, bugzie, dev-embedded+disabled, embedded, felix.janda, fredric.miscmail, gentoo-bugs, gentoo, gentoo, gentoo, gentoo, gentoo, hadrien.lacour, izarf.mail, lssndrbarbieri, mlen, nikoli, tdalman, toast+misc, tsmksubc
Priority: Normal Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.etalabs.net/musl/
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 527788, 538474, 541694, 546692, 549506, 549966, 550228, 551606, 551620, 551630, 552616, 554416, 560826, 561672, 567674, 567678, 571036, 573170, 574654, 582824, 584352, 588270, 589094, 590094, 591982, 602102, 602108, 602116, 602126, 604260, 615534, 703212, 714106, 738450, 739474, 761352, 762442, 762484, 763996, 764113, 766866, 768069, 768078, 768099, 777375, 782565, 792567, 430838, 431686, 448590, 448592, 473328, 477290, 498114, 498394, 503914, 504142, 504200, 525136, 529348, 529350, 529354, 529384, 530080, 531168, 531368, 531846, 532514, 533570, 533660, 535974, 536834, 538306, 538482, 538956, 539210, 540032, 541508, 541728, 542026, 542030, 542484, 542780, 543826, 543834, 543836, 543838, 544022, 544032, 544062, 544128, 544306, 544476, 545006, 545502, 546272, 546556, 546890, 547368, 548422, 548474, 548886, 549100, 549108, 549116, 549942, 549976, 550204, 550298, 550300, 550842, 551610, 551612, 551614, 551616, 551622, 551624, 551626, 551628, 551640, 551818, 552708, 553936, 554032, 557042, 559516, 559518, 559520, 559688, 559784, 559788, 559818, 560228, 560728, 560860, 563732, 564586, 565978, 566752, 567506, 570474, 570522, 570524, 570838, 570936, 571220, 571230, 571374, 571444, 574160, 574356, 574366, 574610, 574830, 575098, 575394, 575614, 575984, 577098, 577658, 578424, 579104, 580242, 580362, 580686, 581010, 581470, 581660, 583266, 584416, 585560, 585576, 585698, 586002, 586432, 588186, 588248, 589666, 590098, 590738, 590994, 592268, 593030, 595950, 597076, 597646, 600860, 600934, 602092, 602104, 602106, 602114, 602118, 602120, 602124, 602714, 603626, 603648, 604212, 604590, 604594, 607562, 607618, 608172, 609296, 609306, 609364, 609382, 609488, 610936, 615736, 622588, 624316, 624320, 644518, 648008, 660648, 665164, 676528, 687008, 687234, 687236, 688396, 693324, 703210, 706792, 708426, 713378, 737474, 747934, 762997, 763000, 766833, 768027, 779109, 792555, 799266, 799281, 807763    
Bug Blocks: 577280    
Attachments: initial musl ebuild

Description Anthony Basile gentoo-dev 2012-08-10 01:31:23 UTC
musl is a new standard library which aims to be small, fast, and conform to standards.  It should be of interest to embedded systems development as an alternative to other small libc's like uclibc.  It is currently undergoing heavy development.

This bug will track issues to including musl the gentoo maintree.

Reproducible: Always
Comment 1 Luca Barbato gentoo-dev 2012-08-16 19:51:09 UTC
Created attachment 321498 [details]
initial musl ebuild

Here the initial ebuild for musl

there are problems in installing it either on /usr or /usr/${chost} (gcc and binutils consider musl a bare-metal libc and expect everything to reside in /usr/${chost} instead of /usr/${chost}/usr/
Comment 2 SpanKY gentoo-dev 2012-08-16 21:01:11 UTC
we work around that by creating a usr->. symlink in /usr/${CTARGET}/
Comment 3 Anthony Basile gentoo-dev 2012-08-16 21:49:07 UTC
(In reply to comment #1)
> Created attachment 321498 [details]
> initial musl ebuild
> 
> Here the initial ebuild for musl
> 
> there are problems in installing it either on /usr or /usr/${chost} (gcc and
> binutils consider musl a bare-metal libc and expect everything to reside in
> /usr/${chost} instead of /usr/${chost}/usr/

Luca, take a look at the ebuild I posted on the dep bug #430838, comment #1.  musl does allow you to install it on a glibc system as an alternative standard library which can be used as via musl-gcc, a wrapper which calls gcc with a spec file pointing to the musl install location.  I'd like to keep that since I use musl that way.  So mine has

	if [ ${CTARGET} == ${CHOST} ] ; then
		case ${CHOST} in
			*-musl*) do_native_config ;;
			*) do_alternative_config ;;
		esac

while yours has

	if [[ ${CTARGET} == ${CHOST} ]] ; then
		case ${CHOST} in
			*-musl) ;;
			*) die "Use sys-devel/crossdev to build a musl toolchain"
		esac
Comment 4 Luca Barbato gentoo-dev 2012-12-25 17:42:14 UTC
You are right, I'll update the new mine with your change to allow side-install.
Comment 5 Anthony Basile gentoo-dev 2012-12-25 20:39:23 UTC
(In reply to comment #4)
> You are right, I'll update the new mine with your change to allow
> side-install.

Why did you decide against the side by side?
Comment 6 Tim Harder gentoo-dev 2013-12-12 20:13:47 UTC
*** Bug 493876 has been marked as a duplicate of this bug. ***
Comment 7 Anthony Basile gentoo-dev 2015-06-12 19:34:35 UTC
Note to everyone.   The musl overlay has been moved from the musl branch of the hardened-dev overlay to its own overlay at:

    https://gitweb.gentoo.org/proj/musl.git/

I will be removing all the ebuilds from the hardened-dev::musl in a few days and place a deprecation notice in place.  The history in that branch, however, will remain forever.

Also note, I did not migrate the history to the new overlay but started fresh.  There was way too much cruft in the hardened-dev::musl branch since it pulled in all the history from the uclibc and master branch going all the way back to 2008.  The disadvantage is that for patch authorship you have to go back to the old hardened-dev::musl but I will make sure to do so to properly assign credit if I pass any patches upstream.