PicoLibc umtapo wezincwadi we-C wezinhlelo ezishumekiwe ezinezinsizakusebenza ezinqunyelwe

Okushumekiwe-C-

UKeith Packard ungunjiniyela osebenzayo we-Debian futhi kuyi Umholi wephrojekthi yeX.Org futhi futhi umdali kwezandiso eziningi ze-X, kufaka phakathi i-XRender, i-XComposite, ne-XRandR. IPicoLibc ngomunye wemisebenzi yakhe futhi lo ngumtapo wezincwadi wakwa-C eklanyelwa ukusetshenziswa kumadivayisi ashumekiwe ngezinsizakusebenza ezilinganiselwe (okungukuthi, banesikhala esincane esinqunyelwe sokugcina ne-RAM). Ngesikhathi sithuthukiswa, enye ikhodi ibolekwe kulabhulali ye-newlib ye-Cygwin ne-AVR Libc, eyenzelwe ama-microcontroller e-Atmel AVR.

UKeith Packard uqale ukuthuthuka ngemuva kokuthi engatholanga inguqulo ehloniphekile yeLibc, engasetshenziswa kumadivayisi ashumekiwe ane-RAM ephansi. Iphrojekthi ibilokhu ithuthuka kusukela ngonyaka odlule. Esigabeni sokuqala, iphrojekthi ibiyinto ehlukile ye-newlib, lapho imisebenzi ye-stdio yathathelwa indawo yinguqulo ehlanganisiwe ye-avrlibc (i-stdio ku-newlib ayizange ivumelaniswe nokusetshenziswa okunzima kwemithombo).

Njengoba imisebenzi yamanje yaseChina ihlobene nomsebenzi oqhubekayo wokwakhiwa kwe-RISC-V nokwakhiwa kwamathuluzi wamadivayisi ashumekiwe, muva nje ngibheke isimo sokusetshenziswa kwe-libc y kuphetha eyani, nge-tweak encane, ukuhlanganiswa kwe-newlib ne-avrlibc kungaba yisixazululo esihle sendawo yonke. Ekuqaleni, iphrojekthi yasungulwa ngaphansi kwegama elithi "newlib-nano", kepha ukugwema ukudideka nomtapo wezincwadi waseNewlib, yaqanjwa kabusha kwathiwa iPicoLibc.

Mayelana nePicoLibc

Ngendlela elikuyo manje, I-Picolibc isivele iwenzile umsebenzi wokususa yonke ikhodi enganikezwa ngaphansi kwelayisense le-BSD (Le khodi ayisetshenziswanga emhlanganweni wamadivayisi ashumekiwe), okwenze isimo saba lula kakhulu ngelayisense yephrojekthi.

Ukufakwa kwentambo kwasendaweni kususwe kusuka 'ku-struct _reent' kuya ku-TLS (ngentambo yesitoreji sendawo). Uhlobo oluhlanganisiwe lwe-stdio lunikwa amandla ngokuzenzakalela, lithathwe kwikhodi yelabhulali ye-avrlibc (okufakiwe okuqondene ne-ATmel kubhalwe kabusha ku-C).

Amathuluzi IMeson isetshenziselwa ukuhlanganiswa, ini ikuvumela ukuthi unganamathiseli imibhalo ye-newlib futhi wenze lula ukudlulisa ushintsho kusuka ku-newlib. Kufakwe inguqulo eyenziwe lula yekhodi yokuqalisa (crt0), enamathiselwe kufayela elisebenzisekayo, futhi yenziwa ngaphambi kokudlulisela isilawuli kumsebenzi oyinhloko ().

Ikhodi yomthombo yePicoLibc isatshalaliswa ngaphansi kwelayisense le-BSD futhi Umtapo wezincwadi usekela i-ARM (32-bit), i386, RISC-V, x86_64, kanye nezakhiwo zePowerPC.

Mayelana nenguqulo entsha yePicoLibc 1.1

Ngisanda kwethula ukukhishwa kwenguqulo entsha yePicoLibc 1.1, lapho kuye kwengezwa umtapo wezincwadi wokusiza ukusekela ubuchwepheshe bokusingathwa, A evumela ikhodi esebenza endaweni yokulungisa iphutha noma ye-emulator ukusebenzisa izindlela zokufaka / zokukhipha kusuka ohlelweni lwe-Host.

Okwezinhlelo ezisekela izingcingo zesistimu evulekile, evaliwe, efundwayo, neyokubhala, tinystdio ingeza okwejwayelekile kwe-POSIX I / O interface, kufaka phakathi imisebenzi ye-fopen ne-fdopen, kanye nokubopha kwe-stdin / stdout / stderr kuzincazelo zefayela ezichazwe yi-POSIX.

  • Izinguquko zakamuva zidluliselwe zisuka kusisekelo sekhodi ye-newlib. Kubandakanya ama-libm stubs angeziwe e-fenv.h, angasetshenziswa kumasistimu ngaphandle kokusekelwa kokubala.
  • Kungezwe isibonelo sokuhlanganiswa kwesicelo se-Hello World nge-picolibc yezinhlelo ze-ARM ne-RISC-V, ngokungeziwe ekususeni izinkomba ze-newlib, libm, ne-mathfp eziqukethe ikhodi yokuhlola engasetshenziswanga.

Qala ukusebenzisa i-Picolibc

Ukuze uqalise nge-Picolibc, kufanele wazi ukuthi i-Picolibc isebenzisa uhlelo lokwakha i-meson ukuhlanganisa amapulatifomu e-hardware ahlukahlukene kwi-Linux host esebenzisa i-GCC. Kungakho kumele babe nemesoni njengengxenye yemvelo yentuthuko, ngaphezu kokufakwa kwePython 3 neNinja. Ukuze uthole lokhu ungabheka umhlahlandlela wakho Kulesi sixhumanisi esilandelayo. 

Ekugcineni, ukuze uthole ikhodi yePicolibc, ungakwenza kusuka kusixhumanisi esilandelayo, lapho ungathola khona imibhalo edingekayo. 

Noma ngendlela efanayo bangabonisana umhlahlandlela olandelayo ngiwuthole enetheni futhi inemininingwane eningiliziwe.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.