12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954 |
- diff --git a/config/target-posix b/config/target-posix
- index 2fba066..e87a5a9 100644
- --- a/config/target-posix
- +++ b/config/target-posix
- @@ -1,7 +1,7 @@
- case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
- ;;
- - *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
- + *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* | *-*-hyperbolabsd*)
- ;;
- *-*-solaris2* | *-*-hpux11*)
- ;;
- diff --git a/config/tcl.m4 b/config/tcl.m4
- index 4542a4b..9585b4a 100644
- --- a/config/tcl.m4
- +++ b/config/tcl.m4
- @@ -1489,6 +1489,28 @@ dnl AC_CHECK_TOOL(AR, ar)
-
- # FreeBSD doesn't handle version numbers with dots.
-
- + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
- + TCL_LIB_VERSIONS_OK=nodots
- + ;;
- + HyperbolaBSD-*)
- + # POWER[64] needs -fPIC, -fpic will not do.
- + case `machine` in
- + arm64|power|power64)
- + SHLIB_CFLAGS="-fPIC";;
- + *)
- + SHLIB_CFLAGS="-fpic";;
- + esac
- + SHLIB_LD="ld -Bshareable -x"
- + SHLIB_LD_LIBS='${LIBS}'
- + SHLIB_SUFFIX=".so"
- + DL_OBJS="tclLoadDl.o"
- + DL_LIBS=""
- + LDFLAGS="$LDFLAGS -export-dynamic"
- + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
- +
- + # HyperbolaBSD doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- @@ -2097,7 +2119,7 @@ dnl # preprocessing tests use only CPPFLAGS.
- ;;
- IRIX*)
- ;;
- - NetBSD-*|FreeBSD-*|OpenBSD-*)
- + NetBSD-*|FreeBSD-*|OpenBSD-*|HyperbolaBSD-*)
- ;;
- Darwin-*)
- ;;
- diff --git a/config.guess b/config.guess
- index 588fe82..c50b78f 100755
- --- a/config.guess
- +++ b/config.guess
- @@ -1,6 +1,9 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
- # Copyright 1992-2018 Free Software Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
-
- timestamp='2018-01-01'
-
- @@ -240,6 +243,95 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- + *:HyperbolaBSD:*:*)
- + sysctl_ma="sysctl -n hw.machine"
- + UNAME_MACHINE_ARCH=`(/sbin/$sysctl_ma 2>/dev/null || \
- + /usr/sbin/$sysctl_ma 2>/dev/null || echo unknown)`
- + sysctl_mo="sysctl -n hw.model"
- + UNAME_MODEL_ARCH=`(/sbin/$sysctl_mo 2>/dev/null || \
- + /usr/sbin/$sysctl_mo 2>/dev/null || echo unknown)`
- + format=
- + case "${UNAME_MACHINE_ARCH}" in
- + amd64) machine=x86_64 ;;
- + arm64)
- + eval $set_cc_for_build
- + if echo BIG_ENDIAN | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q BIG_ENDIAN
- + then
- + machine=aarch64_be
- + else
- + machine=aarch64
- + fi
- + ;;
- + armv7)
- + eval $set_cc_for_build
- + if echo BIG_ENDIAN | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q BIG_ENDIAN
- + then
- + machine=armv7b
- + else
- + machine=armv7l
- + fi
- + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q __ARM_EABI__
- + then
- + format=
- + else
- + format=eabihf
- + fi
- + ;;
- + i386|ia32|x86_32)
- + case "${UNAME_MODEL_ARCH}" in
- + *'686'*|*'Pentium Pro'*|*'Pentium ||'*|*'Pentium 2'*| \
- + *'Pentium 3'*|*'Pentium 4'*|*'Pentium M'*| \
- + *'Pentium D'*|*'Core'*|*'Xeon'*|*'Tolapai'*| \
- + *'Celeron'*|*'Atom'*|*'Stealey'*|*'A100'*|*'A110'*| \
- + *'6x86'*|*'K6'*|*'Athlon'*|*'Duron'*| \
- + *'Cyrix M'*|*'MediaGX'*|*'Jedi'*|*'Gobi'*|*'Jalapeno'*| \
- + *'VIA'*|*'C3'*|*'C7'*|*'Eden'*)
- + machine=i686 ;;
- + *'586'*|*'Pentium'*|*'Quark'*| \
- + *'5x86'*|*'K5'*|*'Geode'*|*'SC5'*)
- + machine=i586 ;;
- + *'486'*|*'DX4'*|*'OverDrive'*|*'SC4'*)
- + machine=i486 ;;
- + *) machine=i386 ;;
- + esac
- + ;;
- + power)
- + eval $set_cc_for_build
- + if echo LITTLE_ENDIAN | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q LITTLE_ENDIAN
- + then
- + machine=powerpc
- + else
- + machine=powerpcle
- + fi
- + ;;
- + power64)
- + eval $set_cc_for_build
- + if echo LITTLE_ENDIAN | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q LITTLE_ENDIAN
- + then
- + machine=powerpc64
- + else
- + machine=powerpc64le
- + fi
- + ;;
- + riscv64)
- + eval $set_cc_for_build
- + if echo BIG_ENDIAN | $CC_FOR_BUILD -E - 2>/dev/null \
- + | grep -q BIG_ENDIAN
- + then
- + machine=riscv64be
- + else
- + machine=riscv64
- + fi
- + ;;
- + *) machine=${UNAME_MACHINE_ARCH} ;;
- + esac
- + echo ${machine}-unknown-hyperbolabsd${format}
- + exit ;;
- *:LibertyBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
- diff --git a/config.rpath b/config.rpath
- index 4dea759..8c5684d 100755
- --- a/config.rpath
- +++ b/config.rpath
- @@ -6,6 +6,9 @@
- # Taken from GNU libtool, 2001
- # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
- @@ -159,7 +162,7 @@ if test "$with_gnu_ld" = yes; then
- ld_shlibs=no
- fi
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- @@ -358,6 +361,10 @@ else
- esac
- fi
- ;;
- + hyperbolabsd*)
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + hardcode_direct=yes
- + ;;
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -489,6 +496,8 @@ case "$host_os" in
- ;;
- openbsd*)
- ;;
- + hyperbolabsd*)
- + ;;
- os2*)
- libname_spec='$name'
- shrext=.dll
- diff --git a/config.sub b/config.sub
- index f2632cd..0d91b14 100755
- --- a/config.sub
- +++ b/config.sub
- @@ -1,6 +1,9 @@
- #! /bin/sh
- # Configuration validation subroutine script.
- # Copyright 1992-2018 Free Software Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
-
- timestamp='2018-01-01'
-
- @@ -1399,7 +1402,7 @@ case $os in
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
- + | -bitrig* | -openbsd* | -hyperbolabsd* | -solidbsd* | -libertybsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- diff --git a/configure b/configure
- index 0601395..c0863d4 100755
- --- a/configure
- +++ b/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -2959,7 +2962,7 @@ case "${ENABLE_GOLD}" in
- case "${target}" in
- *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
- | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
- - | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- + | *-*-netbsd* | *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl*)
- case "${target}" in
- *-*-linux*aout* | *-*-linux*oldld*)
- @@ -3154,7 +3157,7 @@ if test x$enable_libgomp = x ; then
- case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
- ;;
- - *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
- + *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* | *-*-hyperbolabsd*)
- ;;
- *-*-solaris2* | *-*-hpux11*)
- ;;
- @@ -3568,6 +3571,9 @@ case "${target}" in
- *-*-netbsd*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
- + *-*-hyperbolabsd*)
- + noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- + ;;
- *-*-netware*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
- diff --git a/configure.ac b/configure.ac
- index c343333..b952544 100644
- --- a/configure.ac
- +++ b/configure.ac
- @@ -2,6 +2,9 @@
- # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- # 2014, 2015, 2016 Free Software Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 3 of the License, or
- @@ -330,7 +333,7 @@ case "${ENABLE_GOLD}" in
- case "${target}" in
- *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
- | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
- - | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- + | *-*-netbsd* | *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl*)
- case "${target}" in
- *-*-linux*aout* | *-*-linux*oldld*)
- @@ -506,7 +509,7 @@ if test x$enable_libgomp = x ; then
- case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
- ;;
- - *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
- + *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* | *-*-hyperbolabsd*)
- ;;
- *-*-solaris2* | *-*-hpux11*)
- ;;
- @@ -899,6 +902,9 @@ case "${target}" in
- *-*-netbsd*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
- + *-*-hyperbolabsd*)
- + noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- + ;;
- *-*-netware*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
- diff --git a/contrib/config-list.mk b/contrib/config-list.mk
- index fee08b0..27ed619 100644
- --- a/contrib/config-list.mk
- +++ b/contrib/config-list.mk
- @@ -30,12 +30,14 @@ GCC_SRC_DIR=../../gcc
- #
-
- # v850e1-elf is rejected by config.sub
- -LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
- +LIST = aarch64-elf aarch64-linux-gnu aarch64-hyperbolabsd aarch64-rtems \
- alpha-linux-gnu alpha-freebsd6 alpha-netbsd alpha-openbsd \
- alpha64-dec-vms alpha-dec-vms \
- arc-elf32OPT-with-cpu=arc600 arc-elf32OPT-with-cpu=arc700 \
- arc-linux-uclibcOPT-with-cpu=arc700 arceb-linux-uclibcOPT-with-cpu=arc700 \
- arm-wrs-vxworks arm-netbsdelf \
- + armv7b-hyperbolabsdeabi armv7b-hyperbolabsdeabihf \
- + armv7l-hyperbolabsdeabi armv7l-hyperbolabsdeabihf \
- arm-linux-androideabi arm-uclinux_eabi arm-eabi arm-rtems \
- arm-symbianelf avr-elf \
- bfin-elf bfin-uclinux bfin-linux-uclibc bfin-rtems bfin-openbsd \
- @@ -48,7 +50,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
- i686-pc-linux-gnu i686-apple-darwin i686-apple-darwin9 i686-apple-darwin10 \
- i486-freebsd4 i686-freebsd6 i686-kfreebsd-gnu \
- i686-netbsdelf9 \
- - i686-openbsd i686-elf i686-kopensolaris-gnu i686-symbolics-gnu \
- + i686-openbsd i686-hyperbolabsd i686-elf i686-kopensolaris-gnu i686-symbolics-gnu \
- i686-pc-msdosdjgpp i686-lynxos i686-nto-qnx \
- i686-rtems i686-solaris2.10 i686-wrs-vxworks \
- i686-wrs-vxworksae \
- @@ -72,6 +74,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
- pdp11-aout \
- powerpc-darwin8 \
- powerpc-darwin7 powerpc64-darwin powerpc-freebsd6 powerpc-netbsd \
- + powerpc-hyperbolabsd powerpc64-hyperbolabsd \
- powerpc-eabispe powerpc-eabisimaltivec powerpc-eabisim ppc-elf \
- powerpc-eabialtivec powerpc-xilinx-eabi powerpc-eabi \
- powerpc-rtems powerpc-linux_spe \
- @@ -79,7 +82,9 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
- powerpc-wrs-vxworks powerpc-wrs-vxworksae powerpc-wrs-vxworksmils \
- powerpc-lynxos powerpcle-elf \
- powerpcle-eabisim powerpcle-eabi \
- + powerpcle-hyperbolabsd powerpc64le-hyperbolabsd \
- riscv32-unknown-linux-gnu riscv64-unknown-linux-gnu \
- + riscv32-hyperbolabsd riscv64-hyperbolabsd \
- rs6000-ibm-aix5.3.0 rs6000-ibm-aix6.1 rs6000-ibm-aix7.1 \
- rl78-elf rx-elf s390-linux-gnu s390x-linux-gnu s390x-ibm-tpf sh-elf \
- shle-linux sh-netbsdelf sh-superh-elf \
- @@ -94,7 +99,7 @@ LIST = aarch64-elf aarch64-linux-gnu aarch64-rtems \
- vax-netbsdelf vax-openbsd visium-elf x86_64-apple-darwin \
- x86_64-pc-linux-gnuOPT-with-fpmath=avx \
- x86_64-elfOPT-with-fpmath=sse x86_64-freebsd6 x86_64-netbsd \
- - x86_64-w64-mingw32 \
- + x86_64-hyperbolabsd x86_64-w64-mingw32 \
- x86_64-mingw32OPT-enable-sjlj-exceptions=yes x86_64-rtems \
- xstormy16-elf xtensa-elf \
- xtensa-linux
- diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
- index 9578c99..d60286b 100644
- --- a/fixincludes/fixincl.x
- +++ b/fixincludes/fixincl.x
- @@ -23,6 +23,9 @@
- * 2006, 2007, 2008
- * The Free Software Foundation, Inc.
- *
- + * Modifications to support HyperbolaBSD:
- + * Copyright (C) 2020-2024 Hyperbola Project
- + *
- * inclhack is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or
- @@ -6744,6 +6747,60 @@ static const char* apzOpenbsd_Null_DefinitionPatch[] = {
- ^#endif",
- (char*)NULL };
-
- +/* * * * * * * * * * * * * * * * * * * * * * * * * *
- + *
- + * Description of Hyperbolabsd_Null_Definition fix
- + */
- +tSCC zHyperbolabsd_Null_DefinitionName[] =
- + "hyperbolabsd_null_definition";
- +
- +/*
- + * File name selection pattern
- + */
- +tSCC zHyperbolabsd_Null_DefinitionList[] =
- + "locale.h\0stddef.h\0stdio.h\0string.h\0time.h\0unistd.h\0wchar.h\0sys/param.h\0";
- +/*
- + * Machine/OS name selection pattern
- + */
- +tSCC* apzHyperbolabsd_Null_DefinitionMachs[] = {
- + "*-*-hyperbolabsd*",
- + (const char*)NULL };
- +
- +/*
- + * content selection pattern - do fix if pattern found
- + */
- +tSCC zHyperbolabsd_Null_DefinitionSelect0[] =
- + "__GNUG__";
- +
- +#define HYPERBOLABSD_NULL_DEFINITION_TEST_CT 1
- +static tTestDesc aHyperbolabsd_Null_DefinitionTests[] = {
- + { TT_EGREP, zHyperbolabsd_Null_DefinitionSelect0, (regex_t*)NULL }, };
- +
- +/*
- + * Fix Command Arguments for Hyperbolabsd_Null_Definition
- + */
- +static const char* apzHyperbolabsd_Null_DefinitionPatch[] = {
- + "format",
- + "#ifndef NULL\n\
- +#ifdef __cplusplus\n\
- +#ifdef __GNUG__\n\
- +#define NULL\t__null\n\
- +#else\t /* ! __GNUG__ */\n\
- +#define NULL\t0L\n\
- +#endif\t /* __GNUG__ */\n\
- +#else\t /* ! __cplusplus */\n\
- +#define NULL\t((void *)0)\n\
- +#endif\t /* __cplusplus */\n\
- +#endif\t /* !NULL */",
- + "^#ifndef[ \t]*NULL\n\
- +^#ifdef[ \t]*__GNUG__\n\
- +^#define[ \t]*NULL[ \t]*__null\n\
- +^#else\n\
- +^#define[ \t]*NULL[ \t]*0L\n\
- +^#endif\n\
- +^#endif",
- + (char*)NULL };
- +
- /* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Obstack_Lvalue_Cast fix
- @@ -6816,6 +6873,43 @@ static const char* apzOpenbsd_Va_StartPatch[] = {
- "__builtin_va_start",
- (char*)NULL };
-
- +/* * * * * * * * * * * * * * * * * * * * * * * * * *
- + *
- + * Description of Hyperbolabsd_Va_Start fix
- + */
- +tSCC zHyperbolabsd_Va_StartName[] =
- + "hyperbolabsd_va_start";
- +
- +/*
- + * File name selection pattern
- + */
- +tSCC zHyperbolabsd_Va_StartList[] =
- + "stdarg.h\0";
- +/*
- + * Machine/OS name selection pattern
- + */
- +tSCC* apzHyperbolabsd_Va_StartMachs[] = {
- + "*-*-hyperbolabsd*",
- + (const char*)NULL };
- +
- +/*
- + * content selection pattern - do fix if pattern found
- + */
- +tSCC zHyperbolabsd_Va_StartSelect0[] =
- + "__builtin_stdarg_start";
- +
- +#define HYPERBOLABSD_VA_START_TEST_CT 1
- +static tTestDesc aHyperbolabsd_Va_StartTests[] = {
- + { TT_EGREP, zHyperbolabsd_Va_StartSelect0, (regex_t*)NULL }, };
- +
- +/*
- + * Fix Command Arguments for Hyperbolabsd_Va_Start
- + */
- +static const char* apzHyperbolabsd_Va_StartPatch[] = {
- + "format",
- + "__builtin_va_start",
- + (char*)NULL };
- +
- /* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Osf_Namespace_A fix
- @@ -10528,8 +10622,10 @@ typedef enum {
- NEXT_WAIT_UNION_FIXIDX,
- NODEENT_SYNTAX_FIXIDX,
- OPENBSD_NULL_DEFINITION_FIXIDX,
- + HYPERBOLABSD_NULL_DEFINITION_FIXIDX,
- OBSTACK_LVALUE_CAST_FIXIDX,
- OPENBSD_VA_START_FIXIDX,
- + HYPERBOLABSD_VA_START_FIXIDX,
- OSF_NAMESPACE_A_FIXIDX,
- OSF_NAMESPACE_C_FIXIDX,
- PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_FIXIDX,
- @@ -11442,6 +11538,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
- OPENBSD_NULL_DEFINITION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aOpenbsd_Null_DefinitionTests, apzOpenbsd_Null_DefinitionPatch, 0 },
-
- + { zHyperbolabsd_Null_DefinitionName, zHyperbolabsd_Null_DefinitionList,
- + apzHyperbolabsd_Null_DefinitionMachs,
- + HYPERBOLABSD_NULL_DEFINITION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- + aHyperbolabsd_Null_DefinitionTests, apzHyperbolabsd_Null_DefinitionPatch, 0 },
- +
- { zObstack_Lvalue_CastName, zObstack_Lvalue_CastList,
- apzObstack_Lvalue_CastMachs,
- OBSTACK_LVALUE_CAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- @@ -11452,6 +11553,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
- OPENBSD_VA_START_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aOpenbsd_Va_StartTests, apzOpenbsd_Va_StartPatch, 0 },
-
- + { zHyperbolabsd_Va_StartName, zHyperbolabsd_Va_StartList,
- + apzHyperbolabsd_Va_StartMachs,
- + HYPERBOLABSD_VA_START_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- + aHyperbolabsd_Va_StartTests, apzHyperbolabsd_Va_StartPatch, 0 },
- +
- { zOsf_Namespace_AName, zOsf_Namespace_AList,
- apzOsf_Namespace_AMachs,
- OSF_NAMESPACE_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
- index 948ea1d..cd4717a 100644
- --- a/fixincludes/inclhack.def
- +++ b/fixincludes/inclhack.def
- @@ -1008,8 +1008,8 @@ fix = {
- };
-
- /*
- - * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
- - * And OpenBSD.
- + * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0,
- + * OpenBSD and HyperbolaBSD.
- */
- fix = {
- hackname = alpha_sbrk;
- @@ -3394,6 +3394,45 @@ fix = {
- "#endif\n";
- };
-
- +/*
- + * Fix HyperbolaBSD's NULL definition.
- + */
- +fix = {
- + hackname = hyperbolabsd_null_definition;
- + mach = "*-*-hyperbolabsd*";
- + files = locale.h, stddef.h, stdio.h, string.h,
- + time.h, unistd.h, wchar.h, sys/param.h;
- + select = "__GNUG__";
- + c_fix = format;
- + c_fix_arg = "#ifndef NULL\n"
- + "#ifdef __cplusplus\n"
- + "#ifdef __GNUG__\n"
- + "#define NULL\t__null\n"
- + "#else\t /* ! __GNUG__ */\n"
- + "#define NULL\t0L\n"
- + "#endif\t /* __GNUG__ */\n"
- + "#else\t /* ! __cplusplus */\n"
- + "#define NULL\t((void *)0)\n"
- + "#endif\t /* __cplusplus */\n"
- + "#endif\t /* !NULL */";
- +
- + c_fix_arg = "^#ifndef[ \t]*NULL\n"
- + "^#ifdef[ \t]*__GNUG__\n"
- + "^#define[ \t]*NULL[ \t]*__null\n"
- + "^#else\n"
- + "^#define[ \t]*NULL[ \t]*0L\n"
- + "^#endif\n"
- + "^#endif";
- + test_text =
- + "#ifndef NULL\n"
- + "#ifdef __GNUG__\n"
- + "#define NULL __null\n"
- + "#else\n"
- + "#define NULL 0L\n"
- + "#endif\n"
- + "#endif\n";
- +};
- +
- /*
- * obstack.h used casts as lvalues.
- *
- @@ -3432,6 +3471,20 @@ fix = {
- test_text = "#define va_start(v,l) __builtin_stdarg_start((v),l)";
- };
-
- +/*
- + * Fix HyperbolaBSD's va_start define.
- + */
- +fix = {
- + hackname = hyperbolabsd_va_start;
- + mach = "*-*-hyperbolabsd*";
- + files = stdarg.h;
- + select = '__builtin_stdarg_start';
- + c_fix = format;
- + c_fix_arg = __builtin_va_start;
- +
- + test_text = "#define va_start(v,l) __builtin_stdarg_start((v),l)";
- +};
- +
- /*
- * sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
- * defining regex.h related types. This causes libg++ build and usage
- @@ -4366,7 +4419,7 @@ fix = {
- * IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
- * in prototype without previous definition.
- *
- - * Don't fix OpenBSD, which uses struct sockaddr_in prototyping the same
- + * Don't fix OpenBSD and HyperbolaBSD, which uses struct sockaddr_in prototyping the same
- * function, and does define it.
- */
- fix = {
- diff --git a/fixincludes/tests/base/locale.h b/fixincludes/tests/base/locale.h
- index 7a7273e..a23224b 100644
- --- a/fixincludes/tests/base/locale.h
- +++ b/fixincludes/tests/base/locale.h
- @@ -9,7 +9,7 @@
-
-
-
- -#if defined( OPENBSD_NULL_DEFINITION_CHECK )
- +#if defined( OPENBSD_NULL_DEFINITION_CHECK ) || defined( HYPERBOLABSD_NULL_DEFINITION_CHECK )
- #ifndef NULL
- #ifdef __cplusplus
- #ifdef __GNUG__
- @@ -22,4 +22,4 @@
- #endif /* __cplusplus */
- #endif /* !NULL */
-
- -#endif /* OPENBSD_NULL_DEFINITION_CHECK */
- +#endif /* OPENBSD_NULL_DEFINITION_CHECK || HYPERBOLABSD_NULL_DEFINITION_CHECK */
- diff --git a/fixincludes/tests/base/stdarg.h b/fixincludes/tests/base/stdarg.h
- index 686d0b3..aabd92e 100644
- --- a/fixincludes/tests/base/stdarg.h
- +++ b/fixincludes/tests/base/stdarg.h
- @@ -9,6 +9,6 @@
-
-
-
- -#if defined( OPENBSD_VA_START_CHECK )
- +#if defined( OPENBSD_VA_START_CHECK ) || defined( HYPERBOLABSD_VA_START_CHECK )
- #define va_start(v,l) __builtin_va_start((v),l)
- -#endif /* OPENBSD_VA_START_CHECK */
- +#endif /* OPENBSD_VA_START_CHECK || HYPERBOLABSD_VA_START_CHECK */
- diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
- index 4143465..21de10a 100644
- --- a/gcc/ada/adaint.c
- +++ b/gcc/ada/adaint.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -1014,7 +1017,8 @@ __gnat_open_new_temp (char *path, int fmode)
-
- strcpy (path, "GNAT-XXXXXX");
-
- -#if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
- +#if (defined (__FreeBSD__) || defined (__NetBSD__) \
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__) \
- || defined (__linux__) || defined (__GLIBC__) || defined (__ANDROID__) \
- || defined (__DragonFly__) || defined (__QNX__)) && !defined (__vxworks)
- return mkstemp (path);
- @@ -1188,7 +1192,8 @@ __gnat_tmp_name (char *tmp_filename)
- }
-
- #elif defined (__linux__) || defined (__FreeBSD__) || defined (__NetBSD__) \
- - || defined (__OpenBSD__) || defined (__GLIBC__) || defined (__ANDROID__) \
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__) \
- + || defined (__GLIBC__) || defined (__ANDROID__) \
- || defined (__DragonFly__) || defined (__QNX__)
- #define MAX_SAFE_PATH 1000
- char *tmpdir = getenv ("TMPDIR");
- @@ -2349,7 +2354,8 @@ __gnat_number_of_cpus (void)
- int cores = 1;
-
- #if defined (__linux__) || defined (__sun__) || defined (_AIX) \
- - || defined (__APPLE__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- + || defined (__APPLE__) || defined (__FreeBSD__) \
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__) \
- || defined (__DragonFly__) || defined (__NetBSD__) || defined (__QNX__)
- cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
-
- diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
- index cdcb531..0ee99b3 100644
- --- a/gcc/ada/cstreams.c
- +++ b/gcc/ada/cstreams.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -190,7 +193,8 @@ __gnat_full_name (char *nam, char *buffer)
- *p = '\\';
- }
-
- -#elif defined (__FreeBSD__) || defined (__DragonFly__) || defined (__OpenBSD__)
- +#elif defined (__FreeBSD__) || defined (__DragonFly__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__)
-
- /* Use realpath function which resolves links and references to . and ..
- on those Unix systems that support it. Note that GNU/Linux provides it but
- diff --git a/gcc/ada/env.c b/gcc/ada/env.c
- index b6ab097..7e9357c 100644
- --- a/gcc/ada/env.c
- +++ b/gcc/ada/env.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2005-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -301,8 +304,8 @@ void __gnat_clearenv (void)
- }
- #elif defined (__MINGW32__) || defined (__FreeBSD__) || defined (__APPLE__) \
- || (defined (__vxworks) && defined (__RTP__)) || defined (__CYGWIN__) \
- - || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__rtems__) \
- - || defined (__DragonFly__) || defined (__DJGPP__)
- + || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__HyperbolaBSD__) \
- + || defined (__rtems__) || defined (__DragonFly__) || defined (__DJGPP__)
- /* On Windows, FreeBSD and MacOS there is no function to clean all the
- environment but there is a "clean" way to unset a variable. So go
- through the environ table and call __gnat_unsetenv on all entries */
- diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h
- index 8b85854..4fcf150 100644
- --- a/gcc/ada/gsocket.h
- +++ b/gcc/ada/gsocket.h
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2004-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -211,7 +214,8 @@
-
- #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \
- defined (_WIN32) || defined (__APPLE__) || defined (__ANDROID__) || \
- - defined (__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__)
- + defined (__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) || \
- + defined (__HyperbolaBSD__)
- # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
-
- #elif defined (__linux__) || defined (__GLIBC__) || \
- @@ -244,7 +248,8 @@
- #endif
-
- #if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__) \
- - || defined (__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__)
- + || defined (__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__)
- # define Has_Sockaddr_Len 1
- #else
- # define Has_Sockaddr_Len 0
- diff --git a/gcc/ada/init.c b/gcc/ada/init.c
- index 5088ecf..7632726 100644
- --- a/gcc/ada/init.c
- +++ b/gcc/ada/init.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -2297,6 +2300,69 @@ __gnat_install_handler (void)
- __gnat_handler_installed = 1;
- }
-
- +/************************/
- +/* HyperbolaBSD Section */
- +/************************/
- +
- +#elif defined(__HyperbolaBSD__)
- +
- +#include <signal.h>
- +#include <unistd.h>
- +
- +static void
- +__gnat_error_handler (int sig)
- +{
- + struct Exception_Data *exception;
- + const char *msg;
- +
- + switch(sig)
- + {
- + case SIGFPE:
- + exception = &constraint_error;
- + msg = "SIGFPE";
- + break;
- + case SIGILL:
- + exception = &constraint_error;
- + msg = "SIGILL";
- + break;
- + case SIGSEGV:
- + exception = &storage_error;
- + msg = "stack overflow or erroneous memory access";
- + break;
- + case SIGBUS:
- + exception = &constraint_error;
- + msg = "SIGBUS";
- + break;
- + default:
- + exception = &program_error;
- + msg = "unhandled signal";
- + }
- +
- + Raise_From_Signal_Handler (exception, msg);
- +}
- +
- +void
- +__gnat_install_handler (void)
- +{
- + struct sigaction act;
- +
- + act.sa_handler = __gnat_error_handler;
- + act.sa_flags = SA_NODEFER | SA_RESTART;
- + sigemptyset (&act.sa_mask);
- +
- + /* Do not install handlers if interrupt state is "System" */
- + if (__gnat_get_interrupt_state (SIGFPE) != 's')
- + sigaction (SIGFPE, &act, NULL);
- + if (__gnat_get_interrupt_state (SIGILL) != 's')
- + sigaction (SIGILL, &act, NULL);
- + if (__gnat_get_interrupt_state (SIGSEGV) != 's')
- + sigaction (SIGSEGV, &act, NULL);
- + if (__gnat_get_interrupt_state (SIGBUS) != 's')
- + sigaction (SIGBUS, &act, NULL);
- +
- + __gnat_handler_installed = 1;
- +}
- +
- /******************/
- /* Darwin Section */
- /******************/
- @@ -2750,7 +2816,8 @@ __gnat_install_handler (void)
-
- #if defined (_WIN32) || defined (__INTERIX) \
- || defined (__Lynx__) || defined(__NetBSD__) || defined(__FreeBSD__) \
- - || defined (__OpenBSD__) || defined (__DragonFly__) || defined(__QNX__)
- + || defined (__OpenBSD__) || defined(__HyperbolaBSD__) \
- + || defined (__DragonFly__) || defined(__QNX__)
-
- #define HAVE_GNAT_INIT_FLOAT
-
- diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c
- index d3f495c..a8bc662 100644
- --- a/gcc/ada/initialize.c
- +++ b/gcc/ada/initialize.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -86,7 +89,7 @@ __gnat_initialize (void *eh ATTRIBUTE_UNUSED)
- /******************************************/
-
- #elif defined (__Lynx__) || defined (__FreeBSD__) || defined(__NetBSD__) \
- - || defined (__OpenBSD__) || defined (__DragonFly__)
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__) || defined (__DragonFly__)
-
- void
- __gnat_initialize (void *eh ATTRIBUTE_UNUSED)
- diff --git a/gcc/ada/link.c b/gcc/ada/link.c
- index 84dff73..357d9cf 100644
- --- a/gcc/ada/link.c
- +++ b/gcc/ada/link.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -105,7 +108,7 @@ const char *__gnat_default_libgcc_subdir = "lib";
-
- #elif defined (__FreeBSD__) || defined (__DragonFly__) \
- || defined (__NetBSD__) || defined (__OpenBSD__) \
- - || defined (__QNX__)
- + || defined (__HyperbolaBSD__) || defined (__QNX__)
- const char *__gnat_object_file_option = "-Wl,@";
- const char *__gnat_run_path_option = "-Wl,-rpath,";
- char __gnat_shared_libgnat_default = STATIC;
- diff --git a/gcc/ada/rtinit.c b/gcc/ada/rtinit.c
- index 1aa1dc9..bef1798 100644
- --- a/gcc/ada/rtinit.c
- +++ b/gcc/ada/rtinit.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2014-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -314,7 +317,7 @@ __gnat_runtime_initialize(int install_handler)
- /**************************************************/
-
- #elif defined (__Lynx__) || defined (__FreeBSD__) || defined(__NetBSD__) \
- - || defined (__OpenBSD__)
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__)
-
- extern void __gnat_init_float (void);
-
- diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
- index 2de38a9..7066dca 100644
- --- a/gcc/ada/socket.c
- +++ b/gcc/ada/socket.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2003-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -38,7 +41,7 @@
- #include "gsocket.h"
-
- #if defined (__FreeBSD__) || defined (__DragonFly__) \
- - || defined (__NetBSD__) || defined (__OpenBSD__)
- + || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__HyperbolaBSD__)
- typedef unsigned int IOCTL_Req_T;
- #else
- typedef int IOCTL_Req_T;
- diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
- index 98b3901..ab4c90c 100644
- --- a/gcc/ada/sysdep.c
- +++ b/gcc/ada/sysdep.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -317,6 +320,7 @@ __gnat_ttyname (int filedes)
- || defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
- || (defined (__svr4__) && defined (__i386__)) || defined (__Lynx__) \
- || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
- || defined (__QNX__)
-
- @@ -370,6 +374,7 @@ getc_immediate_common (FILE *stream,
- || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
- || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
- || defined (__QNX__)
- char c;
- @@ -391,6 +396,7 @@ getc_immediate_common (FILE *stream,
- || defined (__MACHTEN__) || defined (__hpux__) \
- || defined (_AIX) || (defined (__svr4__) && defined (__i386__)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__) \
- || defined (__GLIBC__) || defined (__APPLE__) || defined (__DragonFly__) \
- || defined (__QNX__)
- eof_ch = termios_rec.c_cc[VEOF];
- @@ -829,6 +835,7 @@ __gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED,
-
- #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \
- || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \
- + || defined (__HyperbolaBSD__) \
- || defined (__DJGPP__) || defined (__QNX__)
- {
- localtime_r (timer, &tp);
- diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
- index 7025f57..7ae2fed 100644
- --- a/gcc/ada/terminals.c
- +++ b/gcc/ada/terminals.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2008-2018, AdaCore *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -1096,6 +1099,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
-
- /* First defined some macro to identify easily some systems */
- #if defined (__FreeBSD__) \
- + || defined (__HyperbolaBSD__) \
- || defined (__OpenBSD__) \
- || defined (__NetBSD__) \
- || defined (__DragonFly__)
- diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
- index fe63bc3..57ac493 100644
- --- a/gcc/ada/tracebak.c
- +++ b/gcc/ada/tracebak.c
- @@ -8,6 +8,9 @@
- * *
- * Copyright (C) 2000-2018, Free Software Foundation, Inc. *
- * *
- + * Modifications to support HyperbolaBSD: *
- + * Copyright (C) 2020-2024 Hyperbola Project *
- + * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 3, or (at your option) any later ver- *
- @@ -289,7 +292,8 @@ __gnat_backtrace (void **array,
- /*---------------------------- x86 *BSD --------------------------------*/
-
- #elif defined (__i386__) && \
- - ( defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__) )
- + ( defined (__NetBSD__) || defined (__FreeBSD__) \
- + || defined (__OpenBSD__) || defined (__HyperbolaBSD__) )
-
- #define USE_GCC_UNWINDER
- /* The generic unwinder is not used for this target because the default
- diff --git b/gcc/config/arm/hyperbolabsd.h b/gcc/config/arm/hyperbolabsd.h
- new file mode 100644
- index 0000000..f7b9059
- --- /dev/null
- +++ b/gcc/config/arm/hyperbolabsd.h
- @@ -0,0 +1,214 @@
- +/* Definitions of target machine for GNU compiler, HyperbolaBSD ARM ELF version.
- + Copyright (C) 2002 Free Software Foundation, Inc.
- + Contributed by Wasabi Systems, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- +This file is part of GNU CC.
- +
- +GNU CC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2, or (at your option)
- +any later version.
- +
- +GNU CC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with GNU CC; see the file COPYING. If not, write to
- +the Free Software Foundation, 59 Temple Place - Suite 330,
- +Boston, MA 02111-1307, USA. */
- +
- +/* This is used in ASM_FILE_START. */
- +#undef ARM_OS_NAME
- +#define ARM_OS_NAME "HyperbolaBSD"
- +
- +/* Unsigned chars produces much better code than signed. */
- +#define DEFAULT_SIGNED_CHAR 0
- +
- +
- +/* This defaults us to little-endian. */
- +#ifndef TARGET_ENDIAN_DEFAULT
- +#define TARGET_ENDIAN_DEFAULT 0
- +#endif
- +
- +#undef MULTILIB_DEFAULTS
- +
- +/* armv6k default cpu. */
- +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_mpcore
- +
- +/* We default to a soft-float ABI so that binaries can run on all
- + target hardware. */
- +#undef TARGET_DEFAULT_FLOAT_ABI
- +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
- +
- +/* We default to the "aapcs-linux" ABI so that enums are int-sized by
- + default. */
- +#undef ARM_DEFAULT_ABI
- +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
- +
- +#define TARGET_OS_CPP_BUILTINS() \
- + do \
- + { \
- + builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
- + HYPERBOLABSD_OS_CPP_BUILTINS_ELF(); \
- + } \
- + while (0)
- +
- +#undef SUBTARGET_CPP_SPEC
- +#define SUBTARGET_CPP_SPEC HBBSD_CPP_SPEC
- +
- +/* HBBSD_LINK_SPEC appropriate for HyperbolaBSD. Support for GCC options
- + -static, -assert, and -nostdlib. */
- +#undef HBBSD_LINK_SPEC
- +#ifdef HBBSD_NO_DYNAMIC_LIBRARIES
- +#define HBBSD_LINK_SPEC \
- + "%{!nostdlib:%{!r*:%{!e*:-e __start}}} %{assert*}"
- +#else
- +#define HBBSD_LINK_SPEC \
- + "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
- + %{shared:-shared} %{R*} \
- + %{static:-Bstatic} \
- + %{!static:-Bdynamic} \
- + %{rdynamic:-export-dynamic} \
- + %{assert*} \
- + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
- + %{!nostdlib:-L/lib -L/usr/lib}"
- +#endif
- +
- +#undef SUBTARGET_EXTRA_ASM_SPEC
- +#define SUBTARGET_EXTRA_ASM_SPEC \
- + "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fPIC|fpie|fPIE:-k}"
- +
- +/* Default floating point model is soft-VFP.
- + FIXME: -mhard-float currently implies FPA. */
- +#undef SUBTARGET_ASM_FLOAT_SPEC
- +#define SUBTARGET_ASM_FLOAT_SPEC \
- + "%{mhard-float:-mfpu=fpa} \
- + %{msoft-float:-mfpu=softvfp} \
- + %{!mhard-float: \
- + %{!msoft-float:-mfpu=softvfp}}"
- +
- +#undef SUBTARGET_EXTRA_SPECS
- +#define SUBTARGET_EXTRA_SPECS \
- + { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \
- + { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \
- + { "hyperbolabsd_link_spec", HBBSD_LINK_SPEC }, \
- + { "hyperbolabsd_entry_point", HYPERBOLABSD_ENTRY_POINT },
- +
- +#define HYPERBOLABSD_ENTRY_POINT "__start"
- +
- +/* Pass -X to the linker so that it will strip symbols starting with 'L' */
- +#undef LINK_SPEC
- +#define LINK_SPEC \
- + "-X %{mbig-endian:-EB} %{mlittle-endian:-EL} \
- + %(hyperbolabsd_link_spec)"
- +
- +/* Make GCC agree with <machine/_types.h>. */
- +
- +#undef SIZE_TYPE
- +#define SIZE_TYPE "long unsigned int"
- +
- +#undef PTRDIFF_TYPE
- +#define PTRDIFF_TYPE "long int"
- +
- +#undef INTMAX_TYPE
- +#define INTMAX_TYPE "long long int"
- +
- +#undef UINTMAX_TYPE
- +#define UINTMAX_TYPE "long long unsigned int"
- +
- +#undef WCHAR_TYPE
- +#define WCHAR_TYPE "int"
- +
- +#undef WCHAR_TYPE_SIZE
- +#define WCHAR_TYPE_SIZE 32
- +
- +/* We don't have any limit on the length as out debugger is GDB. */
- +#undef DBX_CONTIN_LENGTH
- +
- +/* HyperbolaBSD and NetBSD do their profiling differently to the Acorn compiler. We
- + don't need a word following the mcount call; and to skip it
- + requires either an assembly stub or use of fomit-frame-pointer when
- + compiling the profiling functions. Since we break Acorn CC
- + compatibility below a little more won't hurt. */
- +
- +#undef ARM_FUNCTION_PROFILER
- +#define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \
- +{ \
- + asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \
- + asm_fprintf (STREAM, "\tbl\t__mcount%s\n", \
- + NEED_PLT_RELOC ? "(PLT)" : ""); \
- +}
- +
- +/* On the ARM `@' introduces a comment, so we must use something else
- + for .type directives. */
- +#undef TYPE_OPERAND_FMT
- +#define TYPE_OPERAND_FMT "%%%s"
- +
- +#undef FPUTYPE_DEFAULT
- +#define FPUTYPE_DEFAULT FPUTYPE_VFP
- +
- +/* VERY BIG NOTE: Change of structure alignment for HyperbolaBSD|NetBSD ARM.
- + There are consequences you should be aware of...
- +
- + Normally GCC/arm uses a structure alignment of 32 for compatibility
- + with armcc. This means that structures are padded to a word
- + boundary. However this causes problems with bugged HyperbolaBSD|NetBSD kernel
- + code (possibly userland code as well - I have not checked every
- + binary). The nature of this bugged code is to rely on sizeof()
- + returning the correct size of various structures rounded to the
- + nearest byte (SCSI and ether code are two examples, the vm system
- + is another). This code breaks when the structure alignment is 32
- + as sizeof() will report a word=rounded size. By changing the
- + structure alignment to 8. GCC will conform to what is expected by
- + HyperbolaBSD|NetBSD.
- +
- + This has several side effects that should be considered.
- + 1. Structures will only be aligned to the size of the largest member.
- + i.e. structures containing only bytes will be byte aligned.
- + structures containing shorts will be half word alinged.
- + structures containing ints will be word aligned.
- +
- + This means structures should be padded to a word boundary if
- + alignment of 32 is required for byte structures etc.
- +
- + 2. A potential performance penalty may exist if strings are no longer
- + word aligned. GCC will not be able to use word load/stores to copy
- + short strings.
- +
- + This modification is not encouraged but with the present state of the
- + HyperbolaBSD|NetBSD source tree it is currently the only solution that meets the
- + requirements. */
- +
- +#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
- +#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
- +
- +/* Clear the instruction cache from `BEG' to `END'. This makes a
- + call to the ARM_SYNC_ICACHE architecture specific syscall. */
- +#define CLEAR_INSN_CACHE(BEG, END) \
- +do \
- + { \
- + extern int sysarch(int number, void *args); \
- + struct { \
- + unsigned int addr; \
- + int len; \
- + } s; \
- + s.addr = (unsigned int)(BEG); \
- + s.len = (END) - (BEG); \
- + (void) sysarch (0, &s); \
- + } \
- +while (0)
- +
- +/* As an elf system, we need crtbegin/crtend stuff. */
- +#undef STARTFILE_SPEC
- +#define STARTFILE_SPEC "\
- + %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
- + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
- + %{!nopie:rcrt0%O%s}}}} \
- + crtbegin%O%s} %{shared:crtbeginS%O%s}"
- +#undef ENDFILE_SPEC
- +#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
- diff --git b/gcc/config/arm/hyperbolabsd_bpabi.h b/gcc/config/arm/hyperbolabsd_bpabi.h
- new file mode 100644
- index 0000000..3e85fa1
- --- /dev/null
- +++ b/gcc/config/arm/hyperbolabsd_bpabi.h
- @@ -0,0 +1,64 @@
- +/* Definitions of target machine for GNU compiler, HyperbolaBSD ARM ELF version.
- + Copyright (C) 2002 Free Software Foundation, Inc.
- + Contributed by Wasabi Systems, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2024 Hyperbola Project
- +
- +This file is part of GNU CC.
- +
- +GNU CC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 2, or (at your option)
- +any later version.
- +
- +GNU CC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with GNU CC; see the file COPYING. If not, write to
- +the Free Software Foundation, 59 Temple Place - Suite 330,
- +Boston, MA 02111-1307, USA. */
- +
- +#define HBBSD_HAS_DECLARE_FUNCTION_NAME
- +#define HBBSD_HAS_DECLARE_FUNCTION_SIZE
- +
- +/* use EABI frame unwinding tables. */
- +#define TARGET_UNWIND_INFO 1
- +
- +#if defined (__thumb__)
- +#define RENAME_LIBRARY_SET ".thumb_set"
- +#else
- +#define RENAME_LIBRARY_SET ".set"
- +#endif
- +
- +/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME. */
- +#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
- + __asm__ (".globl\t__aeabi_" #AEABI_NAME "\n" \
- + RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME \
- + ", __" #GCC_NAME "\n");
- +
- +/* Give some libgcc functions an additional __aeabi name. */
- +#ifdef L_muldi3
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
- +#endif
- +#ifdef L_fixdfdi
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz)
- +#endif
- +#ifdef L_fixunsdfdi
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz)
- +#endif
- +#ifdef L_fixsfdi
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz)
- +#endif
- +#ifdef L_fixunssfdi
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz)
- +#endif
- +#ifdef L_floatdidf
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
- +#endif
- +#ifdef L_floatdisf
- +#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
- +#endif
- diff --git b/gcc/config/host-hyperbolabsd.c b/gcc/config/host-hyperbolabsd.c
- new file mode 100644
- index 0000000..54844a6
- --- /dev/null
- +++ b/gcc/config/host-hyperbolabsd.c
- @@ -0,0 +1,86 @@
- +/* HyperbolaBSD host-specific hook definitions.
- + Copyright (C) 2004-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- + This file is part of GCC.
- +
- + GCC is free software; you can redistribute it and/or modify it
- + under the terms of the GNU General Public License as published
- + by the Free Software Foundation; either version 3, or (at your
- + option) any later version.
- +
- + GCC is distributed in the hope that it will be useful, but WITHOUT
- + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- + License for more details.
- +
- + You should have received a copy of the GNU General Public License
- + along with GCC; see the file COPYING3. If not see
- + <http://www.gnu.org/licenses/>. */
- +
- +#include "config.h"
- +#include "system.h"
- +#include "coretypes.h"
- +#include "hosthooks.h"
- +#include "hosthooks-def.h"
- +
- +
- +#undef HOST_HOOKS_GT_PCH_GET_ADDRESS
- +#define HOST_HOOKS_GT_PCH_GET_ADDRESS hyperbolabsd_gt_pch_get_address
- +#undef HOST_HOOKS_GT_PCH_USE_ADDRESS
- +#define HOST_HOOKS_GT_PCH_USE_ADDRESS hyperbolabsd_gt_pch_use_address
- +
- +/* For various ports, try to guess a fixed spot in the vm space
- + that's probably free. */
- +#if defined(__amd64__)
- +# define TRY_EMPTY_VM_SPACE 0x400000000000
- +#elif defined(__i386__)
- +# define TRY_EMPTY_VM_SPACE 0xb0000000
- +#else
- +# define TRY_EMPTY_VM_SPACE 0
- +#endif
- +
- +/* Determine a location where we might be able to reliably allocate
- + SIZE bytes. FD is the PCH file, though we should return with the
- + file unmapped. */
- +
- +static void *
- +hyperbolabsd_gt_pch_get_address (size_t size, int fd)
- +{
- + void *addr;
- +
- + addr = mmap ((void *) TRY_EMPTY_VM_SPACE, size, PROT_READ | PROT_WRITE,
- + MAP_PRIVATE, fd, 0);
- +
- + /* If we failed the map, that means there's *no* free space. */
- + if (addr == (void *) MAP_FAILED)
- + return NULL;
- + /* Unmap the area before returning. */
- + munmap (addr, size);
- +
- + return addr;
- +}
- +
- +/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
- + mapping the data at BASE, -1 if we couldn't. */
- +
- +static int
- +hyperbolabsd_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
- +{
- + void *addr;
- +
- + /* We're called with size == 0 if we're not planning to load a PCH
- + file at all. This allows the hook to free any static space that
- + we might have allocated at link time. */
- + if (size == 0)
- + return -1;
- +
- + addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset);
- +
- + return addr == base ? 1 : -1;
- +}
- +
- +
- +const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
- diff --git b/gcc/config/hyperbolabsd-libpthread.h b/gcc/config/hyperbolabsd-libpthread.h
- new file mode 100644
- index 0000000..3e7a072
- --- /dev/null
- +++ b/gcc/config/hyperbolabsd-libpthread.h
- @@ -0,0 +1,25 @@
- +/* LIB_SPEC appropriate for OpenBSD. Include -lpthread if -pthread is
- + specified on the command line. */
- +/* Copyright (C) 2004-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2024 Hyperbola Project
- +
- + This file is part of GCC.
- +
- + GCC is free software; you can redistribute it and/or modify it
- + under the terms of the GNU General Public License as published
- + by the Free Software Foundation; either version 3, or (at your
- + option) any later version.
- +
- + GCC is distributed in the hope that it will be useful, but WITHOUT
- + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- + License for more details.
- +
- + You should have received a copy of the GNU General Public License
- + along with GCC; see the file COPYING3. If not see
- + <http://www.gnu.org/licenses/>. */
- +
- +#define HBBSD_LIB_SPEC "%{pthread:-lpthread%{!shared:%{p|pg:_p}}} %{!shared:-lc%{p|pg:_p}}"
- +
- diff --git b/gcc/config/hyperbolabsd-stdint.h b/gcc/config/hyperbolabsd-stdint.h
- new file mode 100644
- index 0000000..2ee5dba
- --- /dev/null
- +++ b/gcc/config/hyperbolabsd-stdint.h
- @@ -0,0 +1,61 @@
- +/* Definitions for <stdint.h> types for HyperbolaBSD systems.
- + Copyright (C) 2016-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- +This file is part of GCC.
- +
- +GCC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 3, or (at your option)
- +any later version.
- +
- +GCC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +Under Section 7 of GPL version 3, you are granted additional
- +permissions described in the GCC Runtime Library Exception, version
- +3.1, as published by the Free Software Foundation.
- +
- +You should have received a copy of the GNU General Public License and
- +a copy of the GCC Runtime Library Exception along with this program;
- +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- +<http://www.gnu.org/licenses/>. */
- +
- +#define SIG_ATOMIC_TYPE "int"
- +
- +#define INT8_TYPE "signed char"
- +#define INT16_TYPE "short int"
- +#define INT32_TYPE "int"
- +#define INT64_TYPE "long long int"
- +#define UINT8_TYPE "unsigned char"
- +#define UINT16_TYPE "short unsigned int"
- +#define UINT32_TYPE "unsigned int"
- +#define UINT64_TYPE "long long unsigned int"
- +
- +#define INT_LEAST8_TYPE "signed char"
- +#define INT_LEAST16_TYPE "short int"
- +#define INT_LEAST32_TYPE "int"
- +#define INT_LEAST64_TYPE "long long int"
- +#define UINT_LEAST8_TYPE "unsigned char"
- +#define UINT_LEAST16_TYPE "short unsigned int"
- +#define UINT_LEAST32_TYPE "unsigned int"
- +#define UINT_LEAST64_TYPE "long long unsigned int"
- +
- +#define INT_FAST8_TYPE "int"
- +#define INT_FAST16_TYPE "int"
- +#define INT_FAST32_TYPE "int"
- +#define INT_FAST64_TYPE "long long int"
- +#define UINT_FAST8_TYPE "unsigned int"
- +#define UINT_FAST16_TYPE "unsigned int"
- +#define UINT_FAST32_TYPE "unsigned int"
- +#define UINT_FAST64_TYPE "long long unsigned int"
- +
- +#define INTMAX_TYPE "long long int"
- +#define UINTMAX_TYPE "long long unsigned int"
- +
- +#define INTPTR_TYPE "long int"
- +#define UINTPTR_TYPE "long unsigned int"
- diff --git b/gcc/config/hyperbolabsd.h b/gcc/config/hyperbolabsd.h
- new file mode 100644
- index 0000000..861dff2
- --- /dev/null
- +++ b/gcc/config/hyperbolabsd.h
- @@ -0,0 +1,254 @@
- +/* Base configuration file for all HyperbolaBSD targets.
- + Copyright (C) 1999-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- +This file is part of GCC.
- +
- +GCC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 3, or (at your option)
- +any later version.
- +
- +GCC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with GCC; see the file COPYING3. If not see
- +<http://www.gnu.org/licenses/>. */
- +
- +/* Common HyperbolaBSD configuration.
- + All HyperbolaBSD architectures include this file, which is intended as
- + a repository for common defines.
- +
- + Some defines are common to all architectures, a few of them are
- + triggered by HBBSD_* guards, so that we won't override architecture
- + defaults by mistakes.
- +
- + HBBSD_HAS_CORRECT_SPECS:
- + another mechanism provides correct specs already.
- + HBBSD_NO_DYNAMIC_LIBRARIES:
- + no implementation of dynamic libraries.
- + HBBSD_HAS_DECLARE_FUNCTION_NAME, HBBSD_HAS_DECLARE_FUNCTION_SIZE,
- + HBBSD_HAS_DECLARE_OBJECT:
- + PIC support, FUNCTION_NAME/FUNCTION_SIZE are independent, whereas
- + the corresponding logic for OBJECTS is necessarily coupled.
- +
- + There are also a few `default' defines such as ASM_WEAKEN_LABEL,
- + intended as common ground for arch that don't provide
- + anything suitable. */
- +
- +/* Controlling the compilation driver. */
- +/* TARGET_OS_CPP_BUILTINS() common to all HyperbolaBSD targets. */
- +#define HYPERBOLABSD_OS_CPP_BUILTINS() \
- + do \
- + { \
- + builtin_define ("__HyperbolaBSD__"); \
- + builtin_define ("__unix__"); \
- + builtin_define ("__ANSI_COMPAT"); \
- + builtin_assert ("system=unix"); \
- + builtin_assert ("system=bsd"); \
- + builtin_assert ("system=HyperbolaBSD"); \
- + } \
- + while (0)
- +
- +/* TARGET_OS_CPP_BUILTINS() common to all HyperbolaBSD ELF targets. */
- +#define HYPERBOLABSD_OS_CPP_BUILTINS_ELF() \
- + do \
- + { \
- + HYPERBOLABSD_OS_CPP_BUILTINS(); \
- + builtin_define ("__ELF__"); \
- + } \
- +while (0)
- +
- +/* TARGET_OS_CPP_BUILTINS() common to all LP64 HyperbolaBSD targets. */
- +#define HYPERBOLABSD_OS_CPP_BUILTINS_LP64() \
- + do \
- + { \
- + builtin_define ("_LP64"); \
- + builtin_define ("__LP64__"); \
- + } \
- + while (0)
- +
- +/* CPP_SPEC appropriate for HyperbolaBSD. We deal with -posix and -pthread.
- + XXX the way threads are handled currently is not very satisfying,
- + since all code must be compiled with -pthread to work.
- + This two-stage defines makes it easy to pick that for targets that
- + have subspecs. */
- +#ifdef CPP_CPU_SPEC
- +#define HBBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
- +#else
- +#define HBBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
- +#endif
- +
- +#undef LIB_SPEC
- +#define LIB_SPEC HBBSD_LIB_SPEC
- +
- +#ifndef HBBSD_HAS_CORRECT_SPECS
- +
- +#undef CPP_SPEC
- +#define CPP_SPEC HBBSD_CPP_SPEC
- +
- +/* Since we use gas, stdin -> - is a good idea. */
- +#define AS_NEEDS_DASH_FOR_PIPED_INPUT
- +
- +#undef LIB_SPEC
- +#define LIB_SPEC HBBSD_LIB_SPEC
- +
- +#if defined(HAVE_LD_EH_FRAME_HDR)
- +#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
- +#endif
- +
- +#undef LIB_SPEC
- +#define LIB_SPEC HBBSD_LIB_SPEC
- +#endif
- +
- +#define TARGET_POSIX_IO
- +
- +
- +/* Runtime target specification. */
- +
- +/* Miscellaneous parameters. */
- +
- +/* Controlling debugging info: dbx options. */
- +
- +/* Don't use the `xsTAG;' construct in DBX output; HyperbolaBSD systems that
- + use DBX don't support it. */
- +#define DBX_NO_XREFS
- +
- +
- +/* - we use . - _func instead of a local label,
- + - we put extra spaces in expressions such as
- + .type _func , @function
- + This is more readable for a human being and confuses c++filt less. */
- +
- +/* Assembler format: output and generation of labels. */
- +
- +/* Define the strings used for the .type and .size directives.
- + These strings generally do not vary from one system running HyperbolaBSD
- + to another, but if a given system needs to use different pseudo-op
- + names for these, they may be overridden in the arch specific file. */
- +
- +/* HyperbolaBSD assembler is hacked to have .type & .size support even in a.out
- + format object files. Functions size are supported but not activated
- + yet (look for GRACE_PERIOD_EXPIRED in gas/config/obj-aout.c).
- + SET_ASM_OP is needed for attribute alias to work. */
- +
- +#undef TYPE_ASM_OP
- +#undef SIZE_ASM_OP
- +#undef SET_ASM_OP
- +#undef GLOBAL_ASM_OP
- +
- +#define TYPE_ASM_OP "\t.type\t"
- +#define SIZE_ASM_OP "\t.size\t"
- +#define SET_ASM_OP "\t.set\t"
- +#define GLOBAL_ASM_OP "\t.globl\t"
- +
- +/* The following macro defines the format used to output the second
- + operand of the .type assembler directive. */
- +#undef TYPE_OPERAND_FMT
- +#define TYPE_OPERAND_FMT "@%s"
- +
- +/* Provision if extra assembler code is needed to declare a function's result
- + (taken from svr4, not needed yet actually). */
- +#ifndef ASM_DECLARE_RESULT
- +#define ASM_DECLARE_RESULT(FILE, RESULT)
- +#endif
- +
- +/* These macros generate the special .type and .size directives which
- + are used to set the corresponding fields of the linker symbol table
- + entries under HyperbolaBSD. These macros also have to output the starting
- + labels for the relevant functions/objects. */
- +
- +#ifndef HBBSD_HAS_DECLARE_FUNCTION_NAME
- +/* Extra assembler code needed to declare a function properly.
- + Some assemblers may also need to also have something extra said
- + about the function's return value. We allow for that here. */
- +#undef ASM_DECLARE_FUNCTION_NAME
- +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
- + do { \
- + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
- + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
- + ASM_OUTPUT_FUNCTION_LABEL (FILE, NAME, DECL); \
- + } while (0)
- +#endif
- +
- +#ifndef HBBSD_HAS_DECLARE_FUNCTION_SIZE
- +/* Declare the size of a function. */
- +#undef ASM_DECLARE_FUNCTION_SIZE
- +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
- + do { \
- + if (!flag_inhibit_size_directive) \
- + ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
- + } while (0)
- +#endif
- +
- +#ifndef HBBSD_HAS_DECLARE_OBJECT
- +/* Extra assembler code needed to declare an object properly. */
- +#undef ASM_DECLARE_OBJECT_NAME
- +#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
- + do { \
- + HOST_WIDE_INT size; \
- + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
- + size_directive_output = 0; \
- + if (!flag_inhibit_size_directive \
- + && (DECL) && DECL_SIZE (DECL)) \
- + { \
- + size_directive_output = 1; \
- + size = int_size_in_bytes (TREE_TYPE (DECL)); \
- + ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
- + } \
- + ASM_OUTPUT_LABEL (FILE, NAME); \
- + } while (0)
- +
- +/* Output the size directive for a decl in rest_of_decl_compilation
- + in the case where we did not do so before the initializer.
- + Once we find the error_mark_node, we know that the value of
- + size_directive_output was set by ASM_DECLARE_OBJECT_NAME
- + when it was run for the same decl. */
- +#undef ASM_FINISH_DECLARE_OBJECT
- +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
- +do { \
- + const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
- + HOST_WIDE_INT size; \
- + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
- + && ! AT_END && TOP_LEVEL \
- + && DECL_INITIAL (DECL) == error_mark_node \
- + && !size_directive_output) \
- + { \
- + size_directive_output = 1; \
- + size = int_size_in_bytes (TREE_TYPE (DECL)); \
- + ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
- + } \
- + } while (0)
- +#endif
- +
- +
- +/* Those are `generic' ways to weaken/globalize a label. We shouldn't need
- + to override a processor specific definition. Hence, #ifndef ASM_*
- + In case overriding turns out to be needed, one can always #undef ASM_*
- + before including this file. */
- +
- +/* Tell the assembler that a symbol is weak. */
- +/* Note: netbsd arm32 assembler needs a .globl here. An override may
- + be needed when/if we go for arm32 support. */
- +#ifndef ASM_WEAKEN_LABEL
- +#define ASM_WEAKEN_LABEL(FILE,NAME) \
- + do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
- + fputc ('\n', FILE); } while (0)
- +#endif
- +
- +/* Storage layout. */
- +
- +
- +#define HAVE_ENABLE_EXECUTE_STACK
- +
- +/* Don't assume anything about the header files. */
- +#undef NO_IMPLICIT_EXTERN_C
- +#define NO_IMPLICIT_EXTERN_C 1
- +
- +#include <sys/types.h>
- +#include <sys/mman.h>
- diff --git b/gcc/config/hyperbolabsd.opt b/gcc/config/hyperbolabsd.opt
- new file mode 100644
- index 0000000..29f5eb1
- --- /dev/null
- +++ b/gcc/config/hyperbolabsd.opt
- @@ -0,0 +1,38 @@
- +; HyperbolaBSD options.
- +
- +; Copyright (C) 2010-2018 Free Software Foundation, Inc.
- +;
- +; Modifications to support HyperbolaBSD:
- +; Copyright (C) 2020-2024 Hyperbola Project
- +;
- +; This file is part of GCC.
- +;
- +; GCC is free software; you can redistribute it and/or modify it under
- +; the terms of the GNU General Public License as published by the Free
- +; Software Foundation; either version 3, or (at your option) any later
- +; version.
- +;
- +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
- +; WARRANTY; without even the implied warranty of MERCHANTABILITY or
- +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- +; for more details.
- +;
- +; You should have received a copy of the GNU General Public License
- +; along with GCC; see the file COPYING3. If not see
- +; <http://www.gnu.org/licenses/>.
- +
- +; See the GCC internals manual (options.texi) for a description of
- +; this file's format.
- +
- +; Please try to keep this file in ASCII collating order.
- +
- +assert=
- +Driver JoinedOrMissing
- +
- +posix
- +Driver
- +
- +pthread
- +Driver
- +
- +; This comment is to ensure we retain the blank line above.
- diff --git b/gcc/config/i386/hyperbolabsd.h b/gcc/config/i386/hyperbolabsd.h
- new file mode 100644
- index 0000000..47920a5
- --- /dev/null
- +++ b/gcc/config/i386/hyperbolabsd.h
- @@ -0,0 +1,119 @@
- +/* Configuration for an HyperbolaBSD i386 target.
- +
- + Copyright (C) 2005-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- +This file is part of GCC.
- +
- +GCC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 3, or (at your option)
- +any later version.
- +
- +GCC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with GCC; see the file COPYING3. If not see
- +<http://www.gnu.org/licenses/>. */
- +
- +#define TARGET_OS_CPP_BUILTINS() \
- + do \
- + { \
- + HYPERBOLABSD_OS_CPP_BUILTINS(); \
- + } \
- + while (0)
- +
- +#undef DBX_REGISTER_NUMBER
- +#define DBX_REGISTER_NUMBER(n) \
- + (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
- +
- +/* This must agree with <machine/ansi.h>. */
- +#undef SIZE_TYPE
- +#define SIZE_TYPE "long unsigned int"
- +
- +#undef PTRDIFF_TYPE
- +#define PTRDIFF_TYPE "long int"
- +
- +#undef WCHAR_TYPE
- +#define WCHAR_TYPE "int"
- +
- +#undef WCHAR_TYPE_SIZE
- +#define WCHAR_TYPE_SIZE 32
- +
- +#undef WINT_TYPE
- +#define WINT_TYPE "int"
- +
- +/* Don't default to pcc-struct-return, because gcc is the only compiler, and
- + we want to retain compatibility with older gcc versions. */
- +
- +#undef DEFAULT_PCC_STRUCT_RETURN
- +#define DEFAULT_PCC_STRUCT_RETURN 0
- +
- +/* Override the default comment-starter of "/". */
- +#undef ASM_COMMENT_START
- +#define ASM_COMMENT_START "#"
- +
- +#undef ASM_APP_ON
- +#define ASM_APP_ON "#APP\n"
- +
- +#undef ASM_APP_OFF
- +#define ASM_APP_OFF "#NO_APP\n"
- +
- +/* A C statement to output to the stdio stream FILE an assembler
- + command to advance the location counter to a multiple of 1<<LOG
- + bytes if it is within MAX_SKIP bytes.
- +
- + This is used to align code labels according to Intel recommendations. */
- +
- +#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
- +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
- + do { \
- + if ((LOG) != 0) { \
- + if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
- + else { \
- + fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
- + /* Make sure that we have at least 8 byte alignment if > 8 byte \
- + alignment is preferred. */ \
- + if ((LOG) > 3 \
- + && (1 << (LOG)) > ((MAX_SKIP) + 1) \
- + && (MAX_SKIP) >= 7) \
- + fputs ("\t.p2align 3\n", (FILE)); \
- + } \
- + } \
- + } while (0)
- +#endif
- +
- +/* HyperbolaBSD's profiler recovers all information from the stack pointer.
- + The icky part is not here, but in <machine/profile.h>. */
- +#undef FUNCTION_PROFILER
- +#define FUNCTION_PROFILER(FILE, LABELNO) \
- + fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
- +
- +#undef LINK_SPEC
- +#define LINK_SPEC \
- + "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
- + %{shared:-shared} %{R*} \
- + %{static:-Bstatic} \
- + %{!static:-Bdynamic} \
- + %{rdynamic:-export-dynamic} \
- + %{assert*} \
- + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
- + %{!nostdlib:-L/lib -L/usr/lib}"
- +
- +#undef STARTFILE_SPEC
- +#define STARTFILE_SPEC "\
- + %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
- + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
- + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
- +
- +#undef ENDFILE_SPEC
- +#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
- +
- +#define HBBSD_HAS_CORRECT_SPECS
- +
- +#define HAVE_ENABLE_EXECUTE_STACK
- diff --git b/gcc/config/i386/hyperbolabsd64.h b/gcc/config/i386/hyperbolabsd64.h
- new file mode 100644
- index 0000000..d93aa51
- --- /dev/null
- +++ b/gcc/config/i386/hyperbolabsd64.h
- @@ -0,0 +1,102 @@
- +/* Configuration for an HyperbolaBSD x86_64 target.
- +
- + Copyright (C) 2003-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- +This file is part of GCC.
- +
- +GCC is free software; you can redistribute it and/or modify
- +it under the terms of the GNU General Public License as published by
- +the Free Software Foundation; either version 3, or (at your option)
- +any later version.
- +
- +GCC is distributed in the hope that it will be useful,
- +but WITHOUT ANY WARRANTY; without even the implied warranty of
- +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +GNU General Public License for more details.
- +
- +You should have received a copy of the GNU General Public License
- +along with GCC; see the file COPYING3. If not see
- +<http://www.gnu.org/licenses/>. */
- +
- +#define TARGET_OS_CPP_BUILTINS() \
- + do \
- + { \
- + HYPERBOLABSD_OS_CPP_BUILTINS_ELF(); \
- + if (TARGET_64BIT) \
- + HYPERBOLABSD_OS_CPP_BUILTINS_LP64(); \
- + } \
- + while (0)
- +
- +/* This must agree with <machine/_types.h>. */
- +#undef SIZE_TYPE
- +#define SIZE_TYPE "long unsigned int"
- +
- +#undef PTRDIFF_TYPE
- +#define PTRDIFF_TYPE "long int"
- +
- +#undef WCHAR_TYPE
- +#define WCHAR_TYPE "int"
- +
- +#undef WCHAR_TYPE_SIZE
- +#define WCHAR_TYPE_SIZE 32
- +
- +#undef WINT_TYPE
- +#define WINT_TYPE "int"
- +
- +#undef INTMAX_TYPE
- +#define INTMAX_TYPE "long long int"
- +
- +#undef UINTMAX_TYPE
- +#define UINTMAX_TYPE "long long unsigned int"
- +
- +/* Don't default to pcc-struct-return, because gcc is the only compiler, and
- + we want to retain compatibility with older gcc versions. */
- +
- +#undef DEFAULT_PCC_STRUCT_RETURN
- +#define DEFAULT_PCC_STRUCT_RETURN 0
- +
- +/* Override the default comment-starter of "/". */
- +#undef ASM_COMMENT_START
- +#define ASM_COMMENT_START "#"
- +
- +#undef ASM_APP_ON
- +#define ASM_APP_ON "#APP\n"
- +
- +#undef ASM_APP_OFF
- +#define ASM_APP_OFF "#NO_APP\n"
- +
- +/* HyperbolaBSD's profiler recovers all information from the stack pointer.
- + The icky part is not here, but in <machine/profile.h>. */
- +#undef FUNCTION_PROFILER
- +#define FUNCTION_PROFILER(FILE, LABELNO) \
- + fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
- +
- +#undef LINK_SPEC
- +#define LINK_SPEC \
- + "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
- + %{shared:-shared} %{R*} \
- + %{static:-Bstatic} \
- + %{!static:-Bdynamic} \
- + %{rdynamic:-export-dynamic} \
- + %{assert*} \
- + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
- + %{!nostdlib:-L/lib -L/usr/lib}"
- +
- +#undef STARTFILE_SPEC
- +#define STARTFILE_SPEC "\
- + %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
- + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
- + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
- +
- +#undef ENDFILE_SPEC
- +#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
- +
- +#define HBBSD_HAS_CORRECT_SPECS
- +
- +#define HAVE_ENABLE_EXECUTE_STACK
- +
- +#undef JUMP_TABLES_IN_TEXT_SECTION
- +#define JUMP_TABLES_IN_TEXT_SECTION 0
- diff --git b/gcc/config/rs6000/hyperbolabsd.h b/gcc/config/rs6000/hyperbolabsd.h
- new file mode 100644
- index 0000000..b32f84e
- --- /dev/null
- +++ b/gcc/config/rs6000/hyperbolabsd.h
- @@ -0,0 +1,132 @@
- +/* Definitions for PowerPC running HyperbolaBSD using the ELF format
- + Copyright (C) 1999, 2001-2018 Free Software Foundation, Inc.
- + Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2024 Hyperbola Project
- +
- + This file is part of GCC.
- +
- + GCC is free software; you can redistribute it and/or modify it
- + under the terms of the GNU General Public License as published
- + by the Free Software Foundation; either version 3, or (at your
- + option) any later version.
- +
- + GCC is distributed in the hope that it will be useful, but WITHOUT
- + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- + License for more details.
- +
- + You should have received a copy of the GNU General Public License
- + along with GCC; see the file COPYING3. If not see
- + <http://www.gnu.org/licenses/>. */
- +
- +/* Override the defaults, which exist to force the proper definition. */
- +
- +/* XXX need to check ASM_WEAKEN_LABEL/ASM_GLOBALIZE_LABEL. */
- +
- +/* Run-time target specifications. */
- +#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
- +#define TARGET_OS_CPP_BUILTINS() \
- + do \
- + { \
- + HYPERBOLABSD_OS_CPP_BUILTINS_ELF(); \
- + builtin_define ("__PPC"); \
- + builtin_define ("__PPC__"); \
- + builtin_define ("__powerpc"); \
- + builtin_define ("__powerpc__"); \
- + builtin_assert ("cpu=powerpc"); \
- + builtin_assert ("machine=powerpc"); \
- + } \
- + while (0)
- +
- +/* Override the default from rs6000.h to avoid conflicts with macros
- + defined in HyperbolaBSD header files. */
- +
- +#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
- +#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
- + do \
- + { \
- + if (BYTES_BIG_ENDIAN) \
- + { \
- + builtin_define ("__BIG_ENDIAN__"); \
- + builtin_assert ("machine=bigendian"); \
- + } \
- + else \
- + { \
- + builtin_define ("__LITTLE_ENDIAN__"); \
- + builtin_assert ("machine=littleendian"); \
- + } \
- + } \
- + while (0)
- +
- +#undef LINK_SPEC
- +#define LINK_SPEC "%{shared:-shared} \
- + %{!shared: \
- + %{!static: \
- + %{rdynamic:-export-dynamic} \
- + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}} \
- + %{static:-static}}"
- +
- +#undef CPP_OS_DEFAULT_SPEC
- +#define CPP_OS_DEFAULT_SPEC "%(cpp_os_hyperbolabsd)"
- +
- +#undef STARTFILE_DEFAULT_SPEC
- +#define STARTFILE_DEFAULT_SPEC "%(startfile_hyperbolabsd)"
- +
- +#undef ENDFILE_DEFAULT_SPEC
- +#define ENDFILE_DEFAULT_SPEC "%(endfile_hyperbolabsd)"
- +
- +#undef LIB_DEFAULT_SPEC
- +#define LIB_DEFAULT_SPEC "%(lib_hyperbolabsd)"
- +
- +#undef LINK_START_DEFAULT_SPEC
- +#define LINK_START_DEFAULT_SPEC "%(link_start_hyperbolabsd)"
- +
- +#undef LINK_OS_DEFAULT_SPEC
- +#define LINK_OS_DEFAULT_SPEC "%(link_os_hyperbolabsd)"
- +
- +#undef CRTSAVRES_DEFAULT_SPEC
- +#define CRTSAVRES_DEFAULT_SPEC ""
- +
- +/* Default ABI to use */
- +#undef RS6000_ABI_NAME
- +#define RS6000_ABI_NAME "hyperbolabsd"
- +
- +/************************[ Target stuff ]***********************************/
- +
- +/* Define this macro as a C expression for the initializer of an
- + array of string to tell the driver program which options are
- + defaults for this target and thus do not need to be handled
- + specially when using `MULTILIB_OPTIONS'.
- +
- + Do not define this macro if `MULTILIB_OPTIONS' is not defined in
- + the target makefile fragment or if none of the options listed in
- + `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
- +
- +#undef MULTILIB_DEFAULTS
- +#define MULTILIB_DEFAULTS { "mbig", "mcall-hyperbolabsd" }
- +
- +/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
- + library with the proper functions to handle this -> collect2 will
- + default to using nm. */
- +#undef OBJECT_FORMAT_COFF
- +
- +/* Define the actual types of some ANSI-mandated types.
- + Needs to agree with <machine/_types.h>. GCC defaults come from c-decl.c,
- + c-common.c, and config/<arch>/<arch>.h. */
- +
- +#undef SIZE_TYPE
- +#define SIZE_TYPE "long unsigned int"
- +
- +#undef WCHAR_TYPE
- +#define WCHAR_TYPE "int"
- +
- +#undef WCHAR_TYPE_SIZE
- +#define WCHAR_TYPE_SIZE 32
- +
- +#undef PTRDIFF_TYPE
- +#define PTRDIFF_TYPE "long int"
- +
- +#undef TRAMPOLINE_SIZE
- +#define TRAMPOLINE_SIZE 40
- diff --git b/gcc/config/t-hyperbolabsd b/gcc/config/t-hyperbolabsd
- new file mode 100644
- index 0000000..7637da0
- --- /dev/null
- +++ b/gcc/config/t-hyperbolabsd
- @@ -0,0 +1,2 @@
- +# We don't need GCC's own include files.
- +USER_H = $(EXTRA_HEADERS)
- diff --git b/gcc/config/x-hyperbolabsd b/gcc/config/x-hyperbolabsd
- new file mode 100644
- index 0000000..a0c7a48
- --- /dev/null
- +++ b/gcc/config/x-hyperbolabsd
- @@ -0,0 +1,4 @@
- +host-hyperbolabsd.o : $(srcdir)/config/host-hyperbolabsd.c $(CONFIG_H) $(SYSTEM_H) \
- + coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H)
- + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- + $(srcdir)/config/host-hyperbolabsd.c
- diff --git a/gcc/config.gcc b/gcc/config.gcc
- index af9d122..856f2ff 100644
- --- a/gcc/config.gcc
- +++ b/gcc/config.gcc
- @@ -1,6 +1,9 @@
- # GCC target-specific configuration file.
- # Copyright (C) 1997-2018 Free Software Foundation, Inc.
-
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +
- #This file is part of GCC.
-
- #GCC is free software; you can redistribute it and/or modify it under
- @@ -831,6 +834,19 @@ case ${target} in
- ;;
- esac
- ;;
- +*-*-hyperbolabsd*)
- + tmake_file="t-hyperbolabsd"
- + extra_options="${extra_options} hyperbolabsd.opt"
- + gas=yes
- + gnu_ld=yes
- + case ${enable_threads} in
- + yes)
- + thread_file='posix'
- + ;;
- + esac
- + hbbsd_tm_file="hyperbolabsd.h hyperbolabsd-stdint.h hyperbolabsd-libpthread.h"
- + default_use_cxa_atexit=yes
- + ;;
- *-*-phoenix*)
- gas=yes
- gnu_ld=yes
- @@ -1131,6 +1147,11 @@ arm*-*-netbsdelf*)
- tmake_file="${tmake_file} arm/t-arm"
- target_cpu_cname="arm6"
- ;;
- +arm*-*-hyperbolabsd*)
- + tm_file="dbxelf.h elfos.h arm/hyperbolabsd_bpabi.h arm/elf.h ${tm_file}"
- + tm_file="${tm_file} ${hbbsd_tm_file} arm/hyperbolabsd.h"
- + target_cpu_cname="generic-armv7-a"
- + ;;
- arm*-*-linux-*) # ARM GNU/Linux with ELF
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
- extra_options="${extra_options} linux-android.opt"
- @@ -1554,6 +1575,14 @@ x86_64-*-openbsd*)
- gas=yes
- gnu_ld=yes
- ;;
- +i[34567]86-*-hyperbolabsd*)
- + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
- + tm_file="${tm_file} ${hbbsd_tm_file} i386/hyperbolabsd.h"
- + ;;
- +x86_64-*-hyperbolabsd*)
- + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
- + tm_file="${tm_file} ${hbbsd_tm_file} i386/x86-64.h i386/hyperbolabsd64.h"
- + ;;
- i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
- # Intel 80386's running GNU/*
- # with ELF format using glibc 2
- @@ -2444,6 +2473,11 @@ powerpc-*-netbsd*)
- tmake_file="${tmake_file} rs6000/t-netbsd"
- extra_options="${extra_options} rs6000/sysv4.opt"
- ;;
- +powerpc-*-hyperbolabsd*)
- + tm_file="rs6000/rs6000.h rs6000/hyperbolabsd.h dbxelf.h elfos.h ${tm_file}"
- + tm_file="${tm_file} ${hbbsd_tm_file} exec-stack.h"
- + tmake_file="${tmake_file} rs6000/t-ppcos"
- + ;;
- powerpc-*-eabispe*)
- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h ${cpu_type}/sysv4.h ${cpu_type}/eabi.h ${cpu_type}/e500.h ${cpu_type}/eabispe.h"
- extra_options="${extra_options} ${cpu_type}/sysv4.opt"
- diff --git a/gcc/config.host b/gcc/config.host
- index c65569d..ba235d6 100644
- --- a/gcc/config.host
- +++ b/gcc/config.host
- @@ -1,6 +1,9 @@
- # GCC host-specific configuration file.
- # Copyright (C) 1997-2018 Free Software Foundation, Inc.
-
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +
- #This file is part of GCC.
-
- #GCC is free software; you can redistribute it and/or modify it under
- @@ -282,6 +285,10 @@ case ${host} in
- out_host_hook_obj=host-openbsd.o
- host_xmake_file="${host_xmake_file} x-openbsd"
- ;;
- + *-*-hyperbolabsd*)
- + out_host_hook_obj=host-hyperbolabsd.o
- + host_xmake_file="${host_xmake_file} x-hyperbolabsd"
- + ;;
- ia64-*-hpux*)
- use_long_long_for_widest_fast_int=yes
- out_host_hook_obj=host-hpux.o
- diff --git a/gcc/configure b/gcc/configure
- index aa37763..95655d6 100755
- --- a/gcc/configure
- +++ b/gcc/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -13010,7 +13013,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -13448,6 +13451,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -16314,6 +16321,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -16900,6 +16912,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -17887,6 +17911,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -19865,6 +19899,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -20563,7 +20609,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -21547,6 +21593,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/gcc/doc/g++.1 b/gcc/doc/g++.1
- index 14efb7e..7f2c7a7 100644
- --- a/gcc/doc/g++.1
- +++ b/gcc/doc/g++.1
- @@ -1089,7 +1089,7 @@ See \s-1RS/6000\s0 and PowerPC Options.
- \&\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR
- \&\fB\-minsert\-sched\-nops=\fR\fIscheme\fR
- \&\fB\-mcall\-aixdesc \-mcall\-eabi \-mcall\-freebsd
- -\&\-mcall\-linux \-mcall\-netbsd \-mcall\-openbsd
- +\&\-mcall\-linux \-mcall\-netbsd \-mcall\-openbsd \-mcall\-hyperbolabsd
- \&\-mcall\-sysv \-mcall\-sysv\-eabi \-mcall\-sysv\-noeabi
- \&\-mtraceback=\fR\fItraceback_type\fR
- \&\fB\-maix\-struct\-return \-msvr4\-struct\-return
- @@ -21871,6 +21871,10 @@ NetBSD operating system.
- .IX Item "-mcall-openbsd"
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
- +.IP "\fB\-mcall\-hyperbolabsd\fR" 4
- +.IX Item "-mcall-hyperbolabsd"
- +On System V.4 and embedded PowerPC systems compile code for the
- +HyperbolaBSD operating system.
- .IP "\fB\-maix\-struct\-return\fR" 4
- .IX Item "-maix-struct-return"
- Return all structures in memory (as specified by the \s-1AIX ABI\s0).
- @@ -23192,6 +23196,10 @@ NetBSD operating system.
- .IX Item "-mcall-openbsd"
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
- +.IP "\fB\-mcall\-hyperbolabsd\fR" 4
- +.IX Item "-mcall-hyperbolabsd"
- +On System V.4 and embedded PowerPC systems compile code for the
- +HyperbolaBSD operating system.
- .IP "\fB\-mtraceback=\fR\fItraceback_type\fR" 4
- .IX Item "-mtraceback=traceback_type"
- Select the type of traceback table. Valid values for \fItraceback_type\fR
- @@ -26068,9 +26076,9 @@ in ordinary \s-1CPU\s0 registers instead.
- Some 387 emulators do not support the \f(CW\*(C`sin\*(C'\fR, \f(CW\*(C`cos\*(C'\fR and
- \&\f(CW\*(C`sqrt\*(C'\fR instructions for the 387. Specify this option to avoid
- generating those instructions. This option is the default on
- -OpenBSD and NetBSD. This option is overridden when \fB\-march\fR
- -indicates that the target \s-1CPU\s0 always has an \s-1FPU\s0 and so the
- -instruction does not need emulation. These
- +HyperbolaBSD, OpenBSD and NetBSD. This option is overridden when
- +\fB\-march\fR indicates that the target \s-1CPU\s0 always has an \s-1FPU\s0 and
- +so the instruction does not need emulation. These
- instructions are not generated unless you also use the
- \&\fB\-funsafe\-math\-optimizations\fR switch.
- .IP "\fB\-malign\-double\fR" 4
- @@ -27533,6 +27541,9 @@ for contributors to \s-1GCC.\s0
- .IX Header "COPYRIGHT"
- Copyright (c) 1988\-2018 Free Software Foundation, Inc.
- .PP
- +Modifications to support HyperbolaBSD:
- +Copyright (C) 2020\-2024 Hyperbola Project
- +.PP
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- diff --git a/gcc/doc/gcc.1 b/gcc/doc/gcc.1
- index 14efb7e..0de6e70 100644
- --- a/gcc/doc/gcc.1
- +++ b/gcc/doc/gcc.1
- @@ -27533,6 +27533,9 @@ for contributors to \s-1GCC.\s0
- .IX Header "COPYRIGHT"
- Copyright (c) 1988\-2018 Free Software Foundation, Inc.
- .PP
- +Modifications to support HyperbolaBSD:
- +Copyright (C) 2020\-2024 Hyperbola Project
- +.PP
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- diff --git a/gcc/doc/gcc.info b/gcc/doc/gcc.info
- index ccf781f..cff5b93 100644
- --- a/gcc/doc/gcc.info
- +++ b/gcc/doc/gcc.info
- @@ -2,6 +2,9 @@ This is gcc.info, produced by makeinfo version 6.7 from gcc.texi.
-
- Copyright (C) 1988-2018 Free Software Foundation, Inc.
-
- +Modifications to support HyperbolaBSD:
- +Copyright (C) 2020-2024 Hyperbola Project
- +
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- @@ -1391,7 +1394,7 @@ _Machine-Dependent Options_
- -msched-costly-dep=DEPENDENCE_TYPE
- -minsert-sched-nops=SCHEME
- -mcall-aixdesc -mcall-eabi -mcall-freebsd
- - -mcall-linux -mcall-netbsd -mcall-openbsd
- + -mcall-linux -mcall-netbsd -mcall-openbsd -mcall-hyperbolabsd
- -mcall-sysv -mcall-sysv-eabi -mcall-sysv-noeabi
- -mtraceback=TRACEBACK_TYPE
- -maix-struct-return -msvr4-struct-return
- @@ -20965,6 +20968,10 @@ These '-m' options are defined for PowerPC SPE:
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
-
- +'-mcall-hyperbolabsd'
- + On System V.4 and embedded PowerPC systems compile code for the
- + HyperbolaBSD operating system.
- +
- '-maix-struct-return'
- Return all structures in memory (as specified by the AIX ABI).
-
- @@ -22073,6 +22080,10 @@ These '-m' options are defined for the IBM RS/6000 and PowerPC:
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
-
- +'-mcall-hyperbolabsd'
- + On System V.4 and embedded PowerPC systems compile code for the
- + HyperbolaBSD operating system.
- +
- '-mtraceback=TRACEBACK_TYPE'
- Select the type of traceback table. Valid values for
- TRACEBACK_TYPE are 'full', 'part', and 'no'.
- @@ -24702,11 +24713,12 @@ These '-m' options are defined for the x86 family of computers.
- '-mno-fancy-math-387'
- Some 387 emulators do not support the 'sin', 'cos' and 'sqrt'
- instructions for the 387. Specify this option to avoid generating
- - those instructions. This option is the default on OpenBSD and
- - NetBSD. This option is overridden when '-march' indicates that the
- - target CPU always has an FPU and so the instruction does not need
- - emulation. These instructions are not generated unless you also
- - use the '-funsafe-math-optimizations' switch.
- + those instructions. This option is the default on HyperbolaBSD,
- + OpenBSD and NetBSD. This option is overridden when '-march'
- + indicates that the target CPU always has an FPU and so the
- + instruction does not need emulation. These instructions are not
- + generated unless you also use the '-funsafe-math-optimizations'
- + switch.
-
- '-malign-double'
- '-mno-align-double'
- diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
- index 78ca773..47d02b4 100644
- --- a/gcc/doc/invoke.texi
- +++ b/gcc/doc/invoke.texi
- @@ -1,4 +1,8 @@
- @c Copyright (C) 1988-2018 Free Software Foundation, Inc.
- +
- +@c Modifications to support HyperbolaBSD:
- +@c Copyright (C) 2020-2024 Hyperbola Project
- +
- @c This is part of the GCC manual.
- @c For copying conditions, see the file gcc.texi.
-
- @@ -10,6 +14,9 @@
- @c man begin COPYRIGHT
- Copyright @copyright{} 1988-2018 Free Software Foundation, Inc.
-
- +Modifications to support HyperbolaBSD:
- +Copyright @copyright{} 2020-2024 Hyperbola Project
- +
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- @@ -1077,7 +1084,7 @@ See RS/6000 and PowerPC Options.
- -msched-costly-dep=@var{dependence_type} @gol
- -minsert-sched-nops=@var{scheme} @gol
- -mcall-aixdesc -mcall-eabi -mcall-freebsd @gol
- --mcall-linux -mcall-netbsd -mcall-openbsd @gol
- +-mcall-linux -mcall-netbsd -mcall-openbsd -mcall-hyperbolabsd @gol
- -mcall-sysv -mcall-sysv-eabi -mcall-sysv-noeabi @gol
- -mtraceback=@var{traceback_type} @gol
- -maix-struct-return -msvr4-struct-return @gol
- @@ -22707,10 +22714,15 @@ On System V.4 and embedded PowerPC systems compile code for the
- NetBSD operating system.
-
- @item -mcall-openbsd
- -@opindex mcall-netbsd
- +@opindex mcall-openbsd
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
-
- +@item -mcall-hyperbolabsd
- +@opindex mcall-hyperbolabsd
- +On System V.4 and embedded PowerPC systems compile code for the
- +HyperbolaBSD operating system.
- +
- @item -maix-struct-return
- @opindex maix-struct-return
- Return all structures in memory (as specified by the AIX ABI)@.
- @@ -24015,10 +24027,15 @@ On System V.4 and embedded PowerPC systems compile code for the
- NetBSD operating system.
-
- @item -mcall-openbsd
- -@opindex mcall-netbsd
- +@opindex mcall-openbsd
- On System V.4 and embedded PowerPC systems compile code for the
- OpenBSD operating system.
-
- +@item -mcall-hyperbolabsd
- +@opindex mcall-hyperbolabsd
- +On System V.4 and embedded PowerPC systems compile code for the
- +HyperbolaBSD operating system.
- +
- @item -mtraceback=@var{traceback_type}
- @opindex mtraceback
- Select the type of traceback table. Valid values for @var{traceback_type}
- @@ -26985,9 +27002,9 @@ in ordinary CPU registers instead.
- Some 387 emulators do not support the @code{sin}, @code{cos} and
- @code{sqrt} instructions for the 387. Specify this option to avoid
- generating those instructions. This option is the default on
- -OpenBSD and NetBSD@. This option is overridden when @option{-march}
- -indicates that the target CPU always has an FPU and so the
- -instruction does not need emulation. These
- +HyperbolaBSD, OpenBSD and NetBSD@. This option is overridden when
- +@option{-march} indicates that the target CPU always has an FPU and
- +so the instruction does not need emulation. These
- instructions are not generated unless you also use the
- @option{-funsafe-math-optimizations} switch.
-
- diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
- index 31b96a7..2d004de 100644
- --- a/gcc/ginclude/stddef.h
- +++ b/gcc/ginclude/stddef.h
- @@ -1,5 +1,8 @@
- /* Copyright (C) 1989-2018 Free Software Foundation, Inc.
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify
- @@ -52,7 +55,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #include <machine/ansi.h>
- #endif
- /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
- -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
- +#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined (__HyperbolaBSD__)
- #include <sys/_types.h>
- #endif
-
- @@ -201,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define _GCC_SIZE_T
- #define _SIZET_
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- + || defined(__HyperbolaBSD__) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
- diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c
- index 92e3dba..51ca15b 100644
- --- a/gcc/testsuite/gcc.dg/cpp/assert4.c
- +++ b/gcc/testsuite/gcc.dg/cpp/assert4.c
- @@ -1,6 +1,9 @@
- /* Copyright (C) 2003, 2006, 2008, 2009, 2011, 2012
- Free Software Foundation, Inc.
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- Test builtin preprocessor assertions.
- By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
-
- @@ -49,6 +52,14 @@
- # error
- #endif
-
- +#if defined __HyperbolaBSD__
- +# if !#system(HyperbolaBSD) || !#system(unix) || !#system(bsd)
- +# error
- +# endif
- +#elif #system(HyperbolaBSD)
- +# error
- +#endif
- +
- #if defined __svr4__ || defined __SYSTYPE_SVR4__
- # if !#system(svr4) || !#system(unix)
- # error
- diff --git a/include/libiberty.h b/include/libiberty.h
- index dc09e79..7049083 100644
- --- a/include/libiberty.h
- +++ b/include/libiberty.h
- @@ -1,6 +1,9 @@
- /* Function declarations for libiberty.
-
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
- +
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
-
- Note - certain prototypes declared in this header file are for
- functions whoes implementation copyright does not belong to the
- @@ -106,7 +109,8 @@ extern int countargv (char * const *);
- is 1, we found it so don't provide any declaration at all. */
- #if !HAVE_DECL_BASENAME
- #if defined (__GNU_LIBRARY__ ) || defined (__linux__) \
- - || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \
- + || defined (__FreeBSD__) || defined (__HyperbolaBSD__) \
- + || defined (__OpenBSD__) || defined (__NetBSD__) \
- || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \
- || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME)
- extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
- diff --git a/libatomic/configure b/libatomic/configure
- index b902e2c..9749f76 100755
- --- a/libatomic/configure
- +++ b/libatomic/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5411,7 +5414,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5849,6 +5852,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8985,6 +8992,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9571,6 +9583,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10558,6 +10582,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
- index ea8c34f..2890cf0 100644
- --- a/libatomic/configure.tgt
- +++ b/libatomic/configure.tgt
- @@ -2,6 +2,9 @@
- # Copyright (C) 2012-2018 Free Software Foundation, Inc.
- # Contributed by Richard Henderson <rth@redhat.com>.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is part of the GNU Atomic Library (libatomic).
- #
- # Libatomic is free software; you can redistribute it and/or modify it
- @@ -135,7 +138,7 @@ case "${target}" in
- ;;
-
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
- - | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
- + | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* | *-*-hyperbolabsd \
- | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
- | *-*-darwin* | *-*-aix* | *-*-cygwin*)
- # POSIX system. The OS is supported.
- diff --git a/libbacktrace/configure b/libbacktrace/configure
- index 87cadda..91af34e 100755
- --- a/libbacktrace/configure
- +++ b/libbacktrace/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5708,7 +5711,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6146,6 +6149,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9013,6 +9020,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9599,6 +9611,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10586,6 +10610,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libcc1/configure b/libcc1/configure
- index f53a121..cd29d82 100755
- --- a/libcc1/configure
- +++ b/libcc1/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5105,7 +5108,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5543,6 +5546,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8409,6 +8416,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -8995,6 +9007,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -9982,6 +10006,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12366,6 +12400,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13064,7 +13110,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14048,6 +14094,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libffi/README b/libffi/README
- index c072101..7282589 100644
- --- a/libffi/README
- +++ b/libffi/README
- @@ -101,6 +101,7 @@ tested:
- | X86 | Linux | GCC |
- | X86 | Mac OSX | GCC |
- | X86 | OpenBSD | GCC |
- +| X86 | HyperbolaBSD | GCC |
- | X86 | OS/2 | GCC |
- | X86 | Solaris | GCC |
- | X86 | Solaris | Oracle Solaris Studio C |
- @@ -110,6 +111,7 @@ tested:
- | X86-64 | Linux | GCC |
- | X86-64 | Linux/x32 | GCC |
- | X86-64 | OpenBSD | GCC |
- +| X86-64 | HyperbolaBSD | GCC |
- | X86-64 | Solaris | Oracle Solaris Studio C |
- | X86-64 | Windows/Cygwin | GCC |
- | X86-64 | Windows/MingW | GCC |
- diff --git a/libffi/configure b/libffi/configure
- index 790a291..1691544 100755
- --- a/libffi/configure
- +++ b/libffi/configure
- @@ -8,6 +8,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5680,7 +5683,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6118,6 +6121,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9255,6 +9262,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9841,6 +9853,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10828,6 +10852,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12806,6 +12840,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13504,7 +13550,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14488,6 +14534,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -15808,7 +15864,7 @@ case "$target" in
- $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
-
- ;;
- - *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
- + *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-*-hyperbolabsd*)
-
- $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
-
- diff --git a/libffi/configure.ac b/libffi/configure.ac
- index a01d8ac..c8bc716 100644
- --- a/libffi/configure.ac
- +++ b/libffi/configure.ac
- @@ -193,7 +193,7 @@ case "$target" in
- [Cannot use PROT_EXEC on this target, so, we revert to
- alternative means])
- ;;
- - *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
- + *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-*-hyperbolabsd*)
- AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
- [Cannot use malloc on this target, so, we revert to
- alternative means])
- diff --git a/libffi/configure.host b/libffi/configure.host
- index 24fbfc4..6e87357 100644
- --- a/libffi/configure.host
- +++ b/libffi/configure.host
- @@ -64,6 +64,10 @@ case "${host}" in
- TARGET=X86_FREEBSD; TARGETDIR=x86
- ;;
-
- + i?86-*-hyperbolabsd*)
- + TARGET=X86_HYPERBOLABSD; TARGETDIR=x86
- + ;;
- +
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix* \
- | x86_64-*-cygwin* | x86_64-*-mingw*)
- TARGETDIR=x86
- @@ -188,6 +192,10 @@ case "${host}" in
- TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
- HAVE_LONG_DOUBLE_VARIANT=1
- ;;
- + powerpc-*-hyperbolabsd*)
- + TARGET=POWER_HYPERBOLABSD; TARGETDIR=powerpc
- + HAVE_LONG_DOUBLE_VARIANT=1
- + ;;
- powerpc64-*-freebsd*)
- TARGET=POWERPC; TARGETDIR=powerpc
- ;;
- diff --git a/libffi/src/dlmalloc.c b/libffi/src/dlmalloc.c
- index 7e4ea83..886dd6b 100644
- --- a/libffi/src/dlmalloc.c
- +++ b/libffi/src/dlmalloc.c
- @@ -1195,7 +1195,8 @@ int mspace_mallopt(int, int);
- #ifndef LACKS_UNISTD_H
- #include <unistd.h> /* for sbrk */
- #else /* LACKS_UNISTD_H */
- -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
- +#if !defined(__FreeBSD__) && !defined(__HyperbolaBSD__) \
- + && !defined(__OpenBSD__) && !defined(__NetBSD__)
- extern void* sbrk(ptrdiff_t);
- #endif /* FreeBSD etc */
- #endif /* LACKS_UNISTD_H */
- diff --git a/libffi/src/powerpc/ffitarget.h b/libffi/src/powerpc/ffitarget.h
- index 90aa36b..7201411 100644
- --- a/libffi/src/powerpc/ffitarget.h
- +++ b/libffi/src/powerpc/ffitarget.h
- @@ -3,6 +3,9 @@
- Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc
- Copyright (c) 1996-2003 Red Hat, Inc.
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2024 Hyperbola Project
- +
- Target configuration macros for PowerPC.
-
- Permission is hereby granted, free of charge, to any person obtaining
- @@ -116,7 +119,7 @@ typedef enum ffi_abi {
- | FFI_SYSV_SOFT_FLOAT
- # endif
- # if (defined (__SVR4_STRUCT_RETURN) \
- - || defined (POWERPC_FREEBSD) && !defined (__AIX_STRUCT_RETURN))
- + || (defined (POWERPC_FREEBSD) || defined (POWER_HYPERBOLABSD)) && !defined (__AIX_STRUCT_RETURN))
- | FFI_SYSV_STRUCT_RET
- # endif
- # if __LDBL_MANT_DIG__ == 106
- @@ -137,7 +140,7 @@ typedef enum ffi_abi {
-
- #define FFI_CLOSURES 1
- #define FFI_NATIVE_RAW_API 0
- -#if defined (POWERPC) || defined (POWERPC_FREEBSD)
- +#if defined (POWERPC) || defined (POWERPC_FREEBSD) || defined (POWER_HYPERBOLABSD)
- # define FFI_GO_CLOSURES 1
- # define FFI_TARGET_SPECIFIC_VARIADIC 1
- # define FFI_EXTRA_CIF_FIELDS unsigned nfixedargs
- diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp
- index a0f6ab3..5163273 100644
- --- a/libffi/testsuite/lib/libffi.exp
- +++ b/libffi/testsuite/lib/libffi.exp
- @@ -1,5 +1,8 @@
- # Copyright (C) 2003, 2005, 2008, 2009, 2010, 2011, 2014 Free Software Foundation, Inc.
-
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2024 Hyperbola Project
- +
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 3 of the License, or
- @@ -215,6 +218,10 @@ proc libffi_target_compile { source dest type options } {
- lappend options "libs= -lpthread"
- }
-
- + if { [string match "*-*-hyperbolabsd*" $target_triplet] } {
- + lappend options "libs= -lpthread"
- + }
- +
- lappend options "libs= -lffi"
-
- if { [string match "aarch64*-*-linux*" $target_triplet] } {
- diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h
- index 9f7d3f2..eed7c06 100644
- --- a/libgcc/config/arm/unwind-arm.h
- +++ b/libgcc/config/arm/unwind-arm.h
- @@ -2,6 +2,9 @@
- Copyright (C) 2003-2018 Free Software Foundation, Inc.
- Contributed by Paul Brook
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- This file is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- @@ -49,7 +52,7 @@ extern "C" {
- return 0;
-
- #if (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \
- - || defined(__FreeBSD__) || defined(__fuchsia__)
- + || defined(__FreeBSD__) || defined(__fuchsia__) || defined(__HyperbolaBSD__)
- /* Pc-relative indirect. */
- #define _GLIBCXX_OVERRIDE_TTYPE_ENCODING (DW_EH_PE_pcrel | DW_EH_PE_indirect)
- tmp += ptr;
- diff --git b/libgcc/config/t-hyperbolabsd-thread b/libgcc/config/t-hyperbolabsd-thread
- new file mode 100644
- index 0000000..50b61e5
- --- /dev/null
- +++ b/libgcc/config/t-hyperbolabsd-thread
- @@ -0,0 +1,3 @@
- +# This is currently needed to compile libgcc2 for threads support
- +HOST_LIBGCC2_CFLAGS += -pthread
- +
- diff --git a/libgcc/config.host b/libgcc/config.host
- index 677173e..6bf48cc 100644
- --- a/libgcc/config.host
- +++ b/libgcc/config.host
- @@ -1,6 +1,9 @@
- # libgcc host-specific configuration file.
- # Copyright (C) 1997-2018 Free Software Foundation, Inc.
-
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +
- #This file is part of GCC.
-
- #GCC is free software; you can redistribute it and/or modify it under
- @@ -260,6 +263,14 @@ case ${host} in
- ;;
- esac
- ;;
- +*-*-hyperbolabsd*)
- + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
- + case ${target_thread_file} in
- + posix)
- + tmake_file="$tmake_file t-hyperbolabsd-thread"
- + ;;
- + esac
- + ;;
- *-*-rtems*)
- tmake_file="$tmake_file t-rtems"
- extra_parts="crtbegin.o crtend.o"
- @@ -317,7 +328,8 @@ case ${host} in
- esac
-
- case ${host} in
- -*-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \
- +*-*-darwin* | *-*-dragonfly* | *-*-freebsd* | \
- + *-*-netbsd* | *-*-openbsd* | *-*-hyperbolabsd* | \
- *-*-solaris2*)
- enable_execute_stack=enable-execute-stack-mprotect.c
- ;;
- diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
- index ce6a46c..3aba7f9 100644
- --- a/libgcc/unwind-dw2-fde-dip.c
- +++ b/libgcc/unwind-dw2-fde-dip.c
- @@ -1,6 +1,9 @@
- /* Copyright (C) 2001-2018 Free Software Foundation, Inc.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2020-2024 Hyperbola Project
- +
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify
- @@ -32,7 +35,7 @@
-
- #include "tconfig.h"
- #include "tsystem.h"
- -#if !defined(inhibit_libc) && !defined(__OpenBSD__)
- +#if !defined(inhibit_libc) && !defined(__OpenBSD__) && !defined(__HyperbolaBSD__)
- #include <elf.h> /* Get DT_CONFIG. */
- #endif
- #include "coretypes.h"
- @@ -71,7 +74,7 @@
- #endif
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- - && (defined(__OpenBSD__) || defined(__NetBSD__))
- + && (defined(__HyperbolaBSD__) || defined(__OpenBSD__) || defined(__NetBSD__))
- # define ElfW(type) Elf_##type
- # define USE_PT_GNU_EH_FRAME
- #endif
- diff --git a/libgfortran/configure b/libgfortran/configure
- index 91fce8f..1a9710b 100755
- --- a/libgfortran/configure
- +++ b/libgfortran/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -7041,7 +7044,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -7479,6 +7482,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -10350,6 +10357,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -10945,6 +10957,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -11935,6 +11959,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -14199,6 +14233,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs_FC=no
- @@ -14742,6 +14781,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_FC=yes
- + hardcode_shlibpath_var_FC=no
- + hardcode_direct_absolute_FC=yes
- + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_FC=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec_FC='-L$libdir'
- hardcode_minus_L_FC=yes
- @@ -15558,6 +15609,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c
- index 4a40ce4..808cbaa 100644
- --- a/libgfortran/intrinsics/random.c
- +++ b/libgfortran/intrinsics/random.c
- @@ -3,6 +3,9 @@
- Contributed by Lars Segerlund <seger@linuxmail.org>,
- Steve Kargl and Janne Blomqvist.
-
- + Modifications to support HyperbolaBSD:
- + Copyright (C) 2024 Hyperbola Project
- +
- This file is part of the GNU Fortran runtime library (libgfortran).
-
- Libgfortran is free software; you can redistribute it and/or
- @@ -303,7 +306,7 @@ getosrandom (void *buf, size_t buflen)
- TODO: When glibc adds a wrapper for the getrandom() system call
- on Linux, one could use that.
-
- - TODO: One could use getentropy() on OpenBSD. */
- + TODO: One could use getentropy() on OpenBSD (and HyperbolaBSD). */
- int flags = O_RDONLY;
- #ifdef O_CLOEXEC
- flags |= O_CLOEXEC;
- diff --git a/libgo/Makefile.am b/libgo/Makefile.am
- index 1a9e498..b0fa65a 100644
- --- a/libgo/Makefile.am
- +++ b/libgo/Makefile.am
- @@ -1,6 +1,10 @@
- # Makefile.am -- Go library Makefile.
-
- # Copyright 2009 The Go Authors. All rights reserved.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # Use of this source code is governed by a BSD-style
- # license that can be found in the LICENSE file.
-
- @@ -426,6 +430,9 @@ else
- if LIBGO_IS_NETBSD
- runtime_getncpu_file = runtime/getncpu-bsd.c
- else
- +if LIBGO_IS_HYPERBOLABSD
- +runtime_getncpu_file = runtime/getncpu-bsd.c
- +else
- if LIBGO_IS_AIX
- runtime_getncpu_file = runtime/getncpu-aix.c
- else
- @@ -437,6 +444,7 @@ endif
- endif
- endif
- endif
- +endif
-
- runtime_files = \
- runtime/aeshash.c \
- diff --git a/libgo/Makefile.in b/libgo/Makefile.in
- index b9f2700..13abb62 100644
- --- a/libgo/Makefile.in
- +++ b/libgo/Makefile.in
- @@ -4,6 +4,10 @@
- # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
- # Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2024 Hyperbola Project
- +#
- # This Makefile.in is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
- # with or without modifications, as long as this notice is preserved.
- @@ -186,9 +190,10 @@ am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3)
- libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
- @LIBGO_IS_RTEMS_TRUE@am__objects_1 = rtems-task-variable-add.lo
- -@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
- -@LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-aix.lo
- -@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
- +@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-none.lo
- +@LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-aix.lo
- +@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
- +@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_HYPERBOLABSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@am__objects_2 = getncpu-bsd.lo
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@am__objects_2 = getncpu-solaris.lo
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@am__objects_2 = getncpu-irix.lo
- @@ -762,9 +767,10 @@ noinst_DATA = golang_org/x/net/internal/nettest.gox \
- zdefaultcc.go
- @LIBGO_IS_RTEMS_FALSE@rtems_task_variable_add_file =
- @LIBGO_IS_RTEMS_TRUE@rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
- -@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
- -@LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-aix.c
- -@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
- +@LIBGO_IS_AIX_FALSE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-none.c
- +@LIBGO_IS_AIX_TRUE@@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_FALSE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-aix.c
- +@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_NETBSD_TRUE@@LIBGO_IS_HYPERBOLABSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
- +@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_HYPERBOLABSD_TRUE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_FREEBSD_TRUE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_FALSE@runtime_getncpu_file = runtime/getncpu-bsd.c
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_FALSE@@LIBGO_IS_LINUX_FALSE@@LIBGO_IS_SOLARIS_TRUE@runtime_getncpu_file = runtime/getncpu-solaris.c
- @LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_IRIX_TRUE@@LIBGO_IS_LINUX_FALSE@runtime_getncpu_file = runtime/getncpu-irix.c
- diff --git a/libgo/config/libtool.m4 b/libgo/config/libtool.m4
- index f700594..a1cb1b5 100644
- --- a/libgo/config/libtool.m4
- +++ b/libgo/config/libtool.m4
- @@ -4,6 +4,9 @@
- # 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- # Written by Gordon Matzigkeit, 1996
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is free software; the Free Software Foundation gives
- # unlimited permission to copy and/or distribute it, with or without
- # modifications, as long as this notice is preserved.
- @@ -13,6 +16,9 @@ m4_define([_LT_COPYING], [dnl
- # 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- # Written by Gordon Matzigkeit, 1996
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is part of GNU Libtool.
- #
- # GNU Libtool is free software; you can redistribute it and/or
- @@ -1518,7 +1524,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -2562,6 +2568,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -3124,6 +3140,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -3803,7 +3823,7 @@ m4_if([$1], [CXX], [
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -4539,6 +4559,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- @@ -5001,6 +5026,18 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + _LT_TAGVAR(hardcode_direct, $1)=yes
- + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- + else
- + _LT_TAGVAR(ld_shlibs, $1)=no
- + fi
- + ;;
- +
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- @@ -6155,6 +6192,18 @@ if test "$_lt_caught_CXX_error" != yes; then
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + _LT_TAGVAR(hardcode_direct, $1)=yes
- + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- + else
- + _LT_TAGVAR(ld_shlibs, $1)=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- diff --git a/libgo/config/ltmain.sh b/libgo/config/ltmain.sh
- index ce66b44..ca77049 100644
- --- a/libgo/config/ltmain.sh
- +++ b/libgo/config/ltmain.sh
- @@ -5,6 +5,10 @@
-
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
- # 2007, 2008, 2009 Free Software Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This is free software; see the source for copying conditions. There is NO
- # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- @@ -4741,7 +4745,7 @@ func_mode_link ()
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- @@ -4764,7 +4768,7 @@ func_mode_link ()
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- @@ -6703,7 +6707,7 @@ func_mode_link ()
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- diff --git a/libgo/configure b/libgo/configure
- index 7138eda..f548a2a 100755
- --- a/libgo/configure
- +++ b/libgo/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -646,6 +649,8 @@ LIBGO_IS_RTEMS_FALSE
- LIBGO_IS_RTEMS_TRUE
- LIBGO_IS_DRAGONFLY_FALSE
- LIBGO_IS_DRAGONFLY_TRUE
- +LIBGO_IS_HYPERBOLABSD_FALSE
- +LIBGO_IS_HYPERBOLABSD_TRUE
- LIBGO_IS_OPENBSD_FALSE
- LIBGO_IS_OPENBSD_TRUE
- LIBGO_IS_NETBSD_FALSE
- @@ -5306,7 +5311,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5744,6 +5749,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8971,6 +8980,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9557,6 +9571,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10544,6 +10570,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12388,6 +12424,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds_GO='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs_GO=no
- @@ -12935,6 +12976,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_GO=yes
- + hardcode_shlibpath_var_GO=no
- + hardcode_direct_absolute_GO=yes
- + archive_cmds_GO='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_GO='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_GO=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec_GO='-L$libdir'
- hardcode_minus_L_GO=yes
- @@ -13509,7 +13562,7 @@ go_include="-include"
- # All known GOOS values. This is the union of all operating systems
- # supported by the gofrontend and all operating systems supported by
- # the gc toolchain.
- -ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
- +ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd hyperbolabsd plan9 rtems solaris windows"
-
- is_darwin=no
- is_freebsd=no
- @@ -13518,6 +13571,7 @@ is_linux=no
- is_netbsd=no
- is_openbsd=no
- is_dragonfly=no
- +is_hyperbolabsd=no
- is_rtems=no
- is_solaris=no
- is_aix=no
- @@ -13530,6 +13584,7 @@ case ${host} in
- *-*-netbsd*) is_netbsd=yes; GOOS=netbsd ;;
- *-*-openbsd*) is_openbsd=yes; GOOS=openbsd ;;
- *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
- + *-*-hyperbolabsd*) is_hyperbolabsd=yes; GOOS=hyperbolabsd ;;
- *-*-rtems*) is_rtems=yes; GOOS=rtems ;;
- *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
- *-*-aix*) is_aix=yes; GOOS=aix ;;
- @@ -13590,6 +13645,14 @@ else
- LIBGO_IS_DRAGONFLY_FALSE=
- fi
-
- + if test $is_hyperbolabsd = yes; then
- + LIBGO_IS_HYPERBOLABSD_TRUE=
- + LIBGO_IS_HYPERBOLABSD_FALSE='#'
- +else
- + LIBGO_IS_HYPERBOLABSD_TRUE='#'
- + LIBGO_IS_HYPERBOLABSD_FALSE=
- +fi
- +
- if test $is_rtems = yes; then
- LIBGO_IS_RTEMS_TRUE=
- LIBGO_IS_RTEMS_FALSE='#'
- @@ -13614,7 +13677,7 @@ else
- LIBGO_IS_AIX_FALSE=
- fi
-
- - if test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes; then
- + if test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes -o $is_hyperbolabsd = yes; then
- LIBGO_IS_BSD_TRUE=
- LIBGO_IS_BSD_FALSE='#'
- else
- @@ -15672,6 +15735,10 @@ if test -z "${LIBGO_IS_DRAGONFLY_TRUE}" && test -z "${LIBGO_IS_DRAGONFLY_FALSE}"
- as_fn_error "conditional \"LIBGO_IS_DRAGONFLY\" was never defined.
- Usually this means the macro was only invoked conditionally." "$LINENO" 5
- fi
- +if test -z "${LIBGO_IS_HYPERBOLABSD_TRUE}" && test -z "${LIBGO_IS_HYPERBOLABSD_FALSE}"; then
- + as_fn_error "conditional \"LIBGO_IS_HYPERBOLABSD\" was never defined.
- +Usually this means the macro was only invoked conditionally." "$LINENO" 5
- +fi
- if test -z "${LIBGO_IS_RTEMS_TRUE}" && test -z "${LIBGO_IS_RTEMS_FALSE}"; then
- as_fn_error "conditional \"LIBGO_IS_RTEMS\" was never defined.
- Usually this means the macro was only invoked conditionally." "$LINENO" 5
- diff --git a/libgo/configure.ac b/libgo/configure.ac
- index 2c6b08f..33a5eda 100644
- --- a/libgo/configure.ac
- +++ b/libgo/configure.ac
- @@ -1,6 +1,10 @@
- # configure.ac -- Go library configure script.
-
- # Copyright 2009 The Go Authors. All rights reserved.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # Use of this source code is governed by a BSD-style
- # license that can be found in the LICENSE file.
-
- @@ -154,7 +158,7 @@ AC_SUBST(go_include)
- # All known GOOS values. This is the union of all operating systems
- # supported by the gofrontend and all operating systems supported by
- # the gc toolchain.
- -ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows"
- +ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd hyperbolabsd plan9 rtems solaris windows"
-
- is_darwin=no
- is_freebsd=no
- @@ -163,6 +167,7 @@ is_linux=no
- is_netbsd=no
- is_openbsd=no
- is_dragonfly=no
- +is_hyperbolabsd=no
- is_rtems=no
- is_solaris=no
- is_aix=no
- @@ -175,6 +180,7 @@ case ${host} in
- *-*-netbsd*) is_netbsd=yes; GOOS=netbsd ;;
- *-*-openbsd*) is_openbsd=yes; GOOS=openbsd ;;
- *-*-dragonfly*) is_dragonfly=yes; GOOS=dragonfly ;;
- + *-*-hyperbolabsd*) is_hyperbolabsd=yes; GOOS=hyperbolabsd ;;
- *-*-rtems*) is_rtems=yes; GOOS=rtems ;;
- *-*-solaris2*) is_solaris=yes; GOOS=solaris ;;
- *-*-aix*) is_aix=yes; GOOS=aix ;;
- @@ -186,10 +192,11 @@ AM_CONDITIONAL(LIBGO_IS_LINUX, test $is_linux = yes)
- AM_CONDITIONAL(LIBGO_IS_NETBSD, test $is_netbsd = yes)
- AM_CONDITIONAL(LIBGO_IS_OPENBSD, test $is_openbsd = yes)
- AM_CONDITIONAL(LIBGO_IS_DRAGONFLY, test $is_dragonfly = yes)
- +AM_CONDITIONAL(LIBGO_IS_HYPERBOLABSD, test $is_hyperbolabsd = yes)
- AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
- AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
- AM_CONDITIONAL(LIBGO_IS_AIX, test $is_aix = yes)
- -AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes)
- +AM_CONDITIONAL(LIBGO_IS_BSD, test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes -o $is_hyperbolabsd = yes)
- AC_SUBST(GOOS)
- AC_SUBST(ALLGOOS)
-
- diff --git a/libgo/go/archive/tar/stat_actime1.go b/libgo/go/archive/tar/stat_actime1.go
- index 1bdd1c9..7979ca8 100644
- --- a/libgo/go/archive/tar/stat_actime1.go
- +++ b/libgo/go/archive/tar/stat_actime1.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix linux dragonfly openbsd solaris
- +// +build aix linux dragonfly openbsd hyperbolabsd solaris
-
- package tar
-
- diff --git a/libgo/go/archive/tar/stat_unix.go b/libgo/go/archive/tar/stat_unix.go
- index c37a57a..bf7e6ec 100644
- --- a/libgo/go/archive/tar/stat_unix.go
- +++ b/libgo/go/archive/tar/stat_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris
- +// +build aix linux darwin dragonfly freebsd hyperbolabsd openbsd netbsd solaris
-
- package tar
-
- @@ -98,6 +102,12 @@ func statUnix(fi os.FileInfo, h *Header) error {
- minor := uint32((dev & 0x000000ff) >> 0)
- minor |= uint32((dev & 0xffff0000) >> 8)
- h.Devmajor, h.Devminor = int64(major), int64(minor)
- + case "hyperbolabsd":
- + // Copied from golang.org/x/sys/unix/dev_openbsd.go.
- + major := uint32((dev & 0x0000ff00) >> 8)
- + minor := uint32((dev & 0x000000ff) >> 0)
- + minor |= uint32((dev & 0xffff0000) >> 8)
- + h.Devmajor, h.Devminor = int64(major), int64(minor)
- default:
- // TODO: Implement solaris (see https://golang.org/issue/8106)
- }
- diff --git a/libgo/go/cmd/go/go_test.go b/libgo/go/cmd/go/go_test.go
- index 959fcb5..57fc207 100644
- --- a/libgo/go/cmd/go/go_test.go
- +++ b/libgo/go/cmd/go/go_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -2845,10 +2849,11 @@ func TestCgoPkgConfig(t *testing.T) {
- t.Skipf("%s --atleast-pkgconfig-version 0.24: %v\n%s", pkgConfig, err, out)
- }
-
- - // OpenBSD's pkg-config is strict about whitespace and only
- - // supports backslash-escaped whitespace. It does not support
- - // quotes, which the normal freedesktop.org pkg-config does
- - // support. See http://man.openbsd.org/pkg-config.1
- + // HyperbolaBSD and OpenBSD's pkg-config is strict about
- + // whitespace and only supports backslash-escaped whitespace.
- + // It does not support quotes, which the normal freedesktop.org
- + // pkg-config does support.
- + // See http://man.openbsd.org/pkg-config.1
- tg.tempFile("foo.pc", `
- Name: foo
- Description: The foo library
- @@ -4555,6 +4560,8 @@ func TestExecutableGOROOT(t *testing.T) {
- skipIfGccgo(t, "gccgo has no GOROOT")
- if runtime.GOOS == "openbsd" {
- t.Skipf("test case does not work on %s, missing os.Executable", runtime.GOOS)
- + } else if runtime.GOOS == "hyperbolabsd" {
- + t.Skipf("test case does not work on %s, missing os.Executable", runtime.GOOS)
- }
-
- // Env with no GOROOT.
- diff --git a/libgo/go/cmd/go/go_unix_test.go b/libgo/go/cmd/go/go_unix_test.go
- index f6e10ca..1a8d5ee 100644
- --- a/libgo/go/cmd/go/go_unix_test.go
- +++ b/libgo/go/cmd/go/go_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package main_test
-
- diff --git a/libgo/go/cmd/go/internal/base/signal_unix.go b/libgo/go/cmd/go/internal/base/signal_unix.go
- index b90f3a2..e7384f5 100644
- --- a/libgo/go/cmd/go/internal/base/signal_unix.go
- +++ b/libgo/go/cmd/go/internal/base/signal_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package base
-
- diff --git a/libgo/go/cmd/go/internal/bug/bug.go b/libgo/go/cmd/go/internal/bug/bug.go
- index 963da94..1cad669 100644
- --- a/libgo/go/cmd/go/internal/bug/bug.go
- +++ b/libgo/go/cmd/go/internal/bug/bug.go
- @@ -1,4 +1,8 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -96,7 +100,7 @@ func printOSDetails(w io.Writer) {
- printCmdOut(w, "uname -sr: ", "uname", "-sr")
- printCmdOut(w, "", "lsb_release", "-a")
- printGlibcVersion(w)
- - case "openbsd", "netbsd", "freebsd", "dragonfly":
- + case "hyperbolabsd", "openbsd", "netbsd", "freebsd", "dragonfly":
- printCmdOut(w, "uname -v: ", "uname", "-v")
- case "solaris":
- out, err := ioutil.ReadFile("/etc/release")
- diff --git a/libgo/go/cmd/go/internal/work/exec.go b/libgo/go/cmd/go/internal/work/exec.go
- index 5994dbc..8bd93a4 100644
- --- a/libgo/go/cmd/go/internal/work/exec.go
- +++ b/libgo/go/cmd/go/internal/work/exec.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -642,7 +646,7 @@ func (b *Builder) build(a *Action) (err error) {
- // This is read by readGccgoArchive in cmd/internal/buildid/buildid.go.
- if a.buildID != "" && cfg.BuildToolchainName == "gccgo" {
- switch cfg.Goos {
- - case "android", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "android", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- asmfile, err := b.gccgoBuildIDELFFile(a)
- if err != nil {
- return err
- diff --git a/libgo/go/cmd/go/internal/work/init.go b/libgo/go/cmd/go/internal/work/init.go
- index c2beb3b..2cee120 100644
- --- a/libgo/go/cmd/go/internal/work/init.go
- +++ b/libgo/go/cmd/go/internal/work/init.go
- @@ -1,4 +1,8 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -82,7 +86,7 @@ func buildModeInit() {
- codegenArg = "-shared"
- default:
- switch cfg.Goos {
- - case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- // Use -shared so that the result is
- // suitable for inclusion in a PIE or
- // shared library.
- diff --git a/libgo/go/cmd/go/note_test.go b/libgo/go/cmd/go/note_test.go
- index 7ef4c64..2fe3c3b 100644
- --- a/libgo/go/cmd/go/note_test.go
- +++ b/libgo/go/cmd/go/note_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -36,6 +40,8 @@ func TestNoteReading(t *testing.T) {
- t.Skipf("skipping - no cgo, so assuming external linking not available")
- case runtime.GOOS == "openbsd" && runtime.GOARCH == "arm":
- t.Skipf("skipping - external linking not supported, golang.org/issue/10619")
- + case runtime.GOOS == "hyperbolabsd" && runtime.GOARCH == "arm":
- + t.Skipf("skipping - external linking not supported, golang.org/issue/10619")
- case runtime.GOOS == "plan9":
- t.Skipf("skipping - external linking not supported")
- }
- @@ -50,7 +56,7 @@ func TestNoteReading(t *testing.T) {
- }
-
- switch runtime.GOOS {
- - case "dragonfly", "freebsd", "linux", "netbsd", "openbsd":
- + case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd":
- // Test while forcing use of the gold linker, since in the past
- // we've had trouble reading the notes generated by gold.
- err := tg.doRun([]string{"build", "-ldflags", "-buildid=" + buildID + " -linkmode=external -extldflags=-fuse-ld=gold", "-o", tg.path("hello3.exe"), tg.path("hello.go")})
- diff --git a/libgo/go/cmd/internal/objabi/head.go b/libgo/go/cmd/internal/objabi/head.go
- index ff19606..9d9f1b5 100644
- --- a/libgo/go/cmd/internal/objabi/head.go
- +++ b/libgo/go/cmd/internal/objabi/head.go
- @@ -10,6 +10,9 @@
- // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
- // Portions Copyright © 2009 The Go Authors. All rights reserved.
- //
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to deal
- // in the Software without restriction, including without limitation the rights
- @@ -44,6 +47,7 @@ const (
- Hnacl
- Hnetbsd
- Hopenbsd
- + Hhyperbolabsd
- Hplan9
- Hsolaris
- Hwindows
- @@ -65,6 +69,8 @@ func (h *HeadType) Set(s string) error {
- *h = Hnetbsd
- case "openbsd":
- *h = Hopenbsd
- + case "hyperbolabsd":
- + *h = Hhyperbolabsd
- case "plan9":
- *h = Hplan9
- case "solaris":
- @@ -93,6 +99,8 @@ func (h *HeadType) String() string {
- return "netbsd"
- case Hopenbsd:
- return "openbsd"
- + case Hhyperbolabsd:
- + return "hyperbolabsd"
- case Hplan9:
- return "plan9"
- case Hsolaris:
- diff --git b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_386.txt b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_386.txt
- new file mode 100644
- index 0000000..93f6404
- --- /dev/null
- +++ b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_386.txt
- @@ -0,0 +1,17 @@
- +// hyperbolabsd-386-specific vet whitelist. See readme.txt for details.
- +
- +runtime/sys_hyperbolabsd_386.s: [386] sigtramp: unknown variable signo
- +runtime/sys_hyperbolabsd_386.s: [386] sigtramp: unknown variable info
- +runtime/sys_hyperbolabsd_386.s: [386] sigtramp: unknown variable context
- +runtime/sys_hyperbolabsd_386.s: [386] setldt: function setldt missing Go declaration
- +runtime/sys_hyperbolabsd_386.s: [386] settls: function settls missing Go declaration
- +syscall/asm_unix_386.s: [386] Syscall: 8(SP) should be a1+4(FP)
- +syscall/asm_unix_386.s: [386] Syscall: 4(SP) should be trap+0(FP)
- +syscall/asm_unix_386.s: [386] Syscall6: 8(SP) should be a1+4(FP)
- +syscall/asm_unix_386.s: [386] Syscall6: 4(SP) should be trap+0(FP)
- +syscall/asm_unix_386.s: [386] Syscall9: 8(SP) should be a1+4(FP)
- +syscall/asm_unix_386.s: [386] Syscall9: 4(SP) should be num+0(FP)
- +syscall/asm_unix_386.s: [386] RawSyscall: 8(SP) should be a1+4(FP)
- +syscall/asm_unix_386.s: [386] RawSyscall: 4(SP) should be trap+0(FP)
- +syscall/asm_unix_386.s: [386] RawSyscall6: 8(SP) should be a1+4(FP)
- +syscall/asm_unix_386.s: [386] RawSyscall6: 4(SP) should be trap+0(FP)
- diff --git b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_amd64.txt b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_amd64.txt
- new file mode 100644
- index 0000000..c58a57a
- --- /dev/null
- +++ b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_amd64.txt
- @@ -0,0 +1,3 @@
- +// hyperbolabsd-amd64-specific vet whitelist. See readme.txt for details.
- +
- +runtime/sys_hyperbolabsd_amd64.s: [amd64] settls: function settls missing Go declaration
- diff --git b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_arm.txt b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_arm.txt
- new file mode 100644
- index 0000000..ea8dcd2
- --- /dev/null
- +++ b/libgo/go/cmd/vet/all/whitelist/hyperbolabsd_arm.txt
- @@ -0,0 +1,4 @@
- +// hyperbolabsd-arm-specific vet whitelist. See readme.txt for details.
- +
- +runtime/asm_arm.s: [arm] sigreturn: function sigreturn missing Go declaration
- +runtime/sys_hyperbolabsd_arm.s: [arm] read_tls_fallback: function read_tls_fallback missing Go declaration
- diff --git a/libgo/go/crypto/rand/eagain.go b/libgo/go/crypto/rand/eagain.go
- index 045d037..7956518 100644
- --- a/libgo/go/crypto/rand/eagain.go
- +++ b/libgo/go/crypto/rand/eagain.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package rand
-
- diff --git a/libgo/go/crypto/rand/rand.go b/libgo/go/crypto/rand/rand.go
- index 6f7523d..5b1ff0b 100644
- --- a/libgo/go/crypto/rand/rand.go
- +++ b/libgo/go/crypto/rand/rand.go
- @@ -1,4 +1,8 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -12,7 +16,7 @@ import "io"
- // strong pseudo-random generator.
- //
- // On Linux, Reader uses getrandom(2) if available, /dev/urandom otherwise.
- -// On OpenBSD, Reader uses getentropy(2).
- +// On OpenBSD (and HyperbolaBSD), Reader uses getentropy(2).
- // On other Unix-like systems, Reader reads from /dev/urandom.
- // On Windows systems, Reader uses the CryptGenRandom API.
- var Reader io.Reader
- diff --git b/libgo/go/crypto/rand/rand_hyperbolabsd.go b/libgo/go/crypto/rand/rand_hyperbolabsd.go
- new file mode 100644
- index 0000000..ca4f9bd
- --- /dev/null
- +++ b/libgo/go/crypto/rand/rand_hyperbolabsd.go
- @@ -0,0 +1,32 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package rand
- +
- +import (
- + "internal/syscall/unix"
- +)
- +
- +func init() {
- + altGetRandom = getRandomHyperbolaBSD
- +}
- +
- +func getRandomHyperbolaBSD(p []byte) (ok bool) {
- + // getentropy(2) returns a maximum of 256 bytes per call
- + for i := 0; i < len(p); i += 256 {
- + end := i + 256
- + if len(p) < end {
- + end = len(p)
- + }
- + err := unix.GetEntropy(p[i:end])
- + if err != nil {
- + return false
- + }
- + }
- + return true
- +}
- diff --git a/libgo/go/crypto/rand/rand_unix.go b/libgo/go/crypto/rand/rand_unix.go
- index ec474d3..f7aa49a 100644
- --- a/libgo/go/crypto/rand/rand_unix.go
- +++ b/libgo/go/crypto/rand/rand_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd plan9 solaris
-
- // Unix cryptographically secure pseudorandom number
- // generator.
- diff --git a/libgo/go/crypto/x509/root_bsd.go b/libgo/go/crypto/x509/root_bsd.go
- index 1371933..abaeaf7 100644
- --- a/libgo/go/crypto/x509/root_bsd.go
- +++ b/libgo/go/crypto/x509/root_bsd.go
- @@ -1,15 +1,19 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build dragonfly freebsd netbsd openbsd
- +// +build dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package x509
-
- // Possible certificate files; stop after finding one.
- var certFiles = []string{
- "/usr/local/etc/ssl/cert.pem", // FreeBSD
- - "/etc/ssl/cert.pem", // OpenBSD
- + "/etc/ssl/cert.pem", // OpenBSD and HyperbolaBSD
- "/usr/local/share/certs/ca-root-nss.crt", // DragonFly
- "/etc/openssl/certs/ca-certificates.crt", // NetBSD
- }
- diff --git a/libgo/go/crypto/x509/root_unix.go b/libgo/go/crypto/x509/root_unix.go
- index 0547460..9f7cfe2 100644
- --- a/libgo/go/crypto/x509/root_unix.go
- +++ b/libgo/go/crypto/x509/root_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package x509
-
- diff --git a/libgo/go/crypto/x509/root_unix_test.go b/libgo/go/crypto/x509/root_unix_test.go
- index 03f935d..31913ca 100644
- --- a/libgo/go/crypto/x509/root_unix_test.go
- +++ b/libgo/go/crypto/x509/root_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build dragonfly freebsd linux netbsd openbsd solaris
- +// +build dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package x509
-
- diff --git a/libgo/go/debug/elf/elf.go b/libgo/go/debug/elf/elf.go
- index c8a4fe6..e74597e 100644
- --- a/libgo/go/debug/elf/elf.go
- +++ b/libgo/go/debug/elf/elf.go
- @@ -17,6 +17,9 @@
- * Copyright (c) 2001 David E. O'Brien
- * Portions Copyright 2009 The Go Authors. All rights reserved.
- *
- + * Modifications to support HyperbolaBSD:
- + * Copyright (C) 2020-2024 Hyperbola Project
- + *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- @@ -132,6 +135,7 @@ const (
- ELFOSABI_OPENBSD OSABI = 12 /* OpenBSD */
- ELFOSABI_OPENVMS OSABI = 13 /* Open VMS */
- ELFOSABI_NSK OSABI = 14 /* HP Non-Stop Kernel */
- + ELFOSABI_HYPERBOLABSD OSABI = 19 /* HyperbolaBSD */
- ELFOSABI_ARM OSABI = 97 /* ARM */
- ELFOSABI_STANDALONE OSABI = 255 /* Standalone (embedded) application */
- )
- @@ -152,6 +156,7 @@ var osabiStrings = []intName{
- {12, "ELFOSABI_OPENBSD"},
- {13, "ELFOSABI_OPENVMS"},
- {14, "ELFOSABI_NSK"},
- + {19, "ELFOSABI_HYPERBOLABSD"},
- {97, "ELFOSABI_ARM"},
- {255, "ELFOSABI_STANDALONE"},
- }
- diff --git a/libgo/go/debug/elf/file_test.go b/libgo/go/debug/elf/file_test.go
- index 58bdf27..978f05e 100644
- --- a/libgo/go/debug/elf/file_test.go
- +++ b/libgo/go/debug/elf/file_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -613,6 +617,35 @@ var relocationTests = []relocationTest{
- }},
- },
- },
- + {
- + "testdata/gcc-amd64-hyperbolabsd-debug-with-rela.obj",
- + []relocationTestEntry{
- + {203, &dwarf.Entry{
- + Offset: 0xc62,
- + Tag: dwarf.TagMember,
- + Children: false,
- + Field: []dwarf.Field{
- + {Attr: dwarf.AttrName, Val: "it_interval", Class: dwarf.ClassString},
- + {Attr: dwarf.AttrDeclFile, Val: int64(7), Class: dwarf.ClassConstant},
- + {Attr: dwarf.AttrDeclLine, Val: int64(236), Class: dwarf.ClassConstant},
- + {Attr: dwarf.AttrType, Val: dwarf.Offset(0xb7f), Class: dwarf.ClassReference},
- + {Attr: dwarf.AttrDataMemberLoc, Val: []byte{0x23, 0x0}, Class: dwarf.ClassExprLoc},
- + },
- + }},
- + {204, &dwarf.Entry{
- + Offset: 0xc70,
- + Tag: dwarf.TagMember,
- + Children: false,
- + Field: []dwarf.Field{
- + {Attr: dwarf.AttrName, Val: "it_value", Class: dwarf.ClassString},
- + {Attr: dwarf.AttrDeclFile, Val: int64(7), Class: dwarf.ClassConstant},
- + {Attr: dwarf.AttrDeclLine, Val: int64(237), Class: dwarf.ClassConstant},
- + {Attr: dwarf.AttrType, Val: dwarf.Offset(0xb7f), Class: dwarf.ClassReference},
- + {Attr: dwarf.AttrDataMemberLoc, Val: []byte{0x23, 0x10}, Class: dwarf.ClassExprLoc},
- + },
- + }},
- + },
- + },
- }
-
- func TestDWARFRelocations(t *testing.T) {
- diff --git b/libgo/go/debug/elf/testdata/gcc-amd64-hyperbolabsd-debug-with-rela.obj b/libgo/go/debug/elf/testdata/gcc-amd64-hyperbolabsd-debug-with-rela.obj
- new file mode 100644
- index 0000000..f62b1ea
- Binary files /dev/null and b/libgo/go/debug/elf/testdata/gcc-amd64-hyperbolabsd-debug-with-rela.obj differ
- diff --git a/libgo/go/debug/gosym/pclntab_test.go b/libgo/go/debug/gosym/pclntab_test.go
- index 7e7cee6..89d157e 100644
- --- a/libgo/go/debug/gosym/pclntab_test.go
- +++ b/libgo/go/debug/gosym/pclntab_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -79,7 +83,7 @@ func endtest() {
- // These tests open and examine the test binary, and use elf.Open to do so.
- func skipIfNotELF(t *testing.T) {
- switch runtime.GOOS {
- - case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- // OK.
- default:
- t.Skipf("skipping on non-ELF system %s", runtime.GOOS)
- diff --git a/libgo/go/go/build/syslist.go b/libgo/go/go/build/syslist.go
- index 679d195..1ab5ee5 100644
- --- a/libgo/go/go/build/syslist.go
- +++ b/libgo/go/go/build/syslist.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- package build
-
- -const goosList = "aix android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows zos "
- +const goosList = "aix android darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd plan9 solaris windows zos "
- const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be alpha m68k ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv64 s390 s390x sh shbe sparc sparc64"
- diff --git a/libgo/go/golang_org/x/net/internal/nettest/helper_bsd.go b/libgo/go/golang_org/x/net/internal/nettest/helper_bsd.go
- index a6e433b..9e9b5b2 100644
- --- a/libgo/go/golang_org/x/net/internal/nettest/helper_bsd.go
- +++ b/libgo/go/golang_org/x/net/internal/nettest/helper_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package nettest
-
- diff --git a/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go b/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
- index efc67a8..1f1dbcd 100644
- --- a/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
- +++ b/libgo/go/golang_org/x/net/internal/nettest/helper_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package nettest
-
- diff --git a/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go b/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
- index b6839dc..8df875b 100644
- --- a/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
- +++ b/libgo/go/golang_org/x/net/internal/nettest/helper_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package nettest
-
- diff --git a/libgo/go/golang_org/x/net/route/address.go b/libgo/go/golang_org/x/net/route/address.go
- index e6bfa39..874fb3b 100644
- --- a/libgo/go/golang_org/x/net/route/address.go
- +++ b/libgo/go/golang_org/x/net/route/address.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git a/libgo/go/golang_org/x/net/route/address_test.go b/libgo/go/golang_org/x/net/route/address_test.go
- index 2005ef7..a891882 100644
- --- a/libgo/go/golang_org/x/net/route/address_test.go
- +++ b/libgo/go/golang_org/x/net/route/address_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git a/libgo/go/golang_org/x/net/route/binary.go b/libgo/go/golang_org/x/net/route/binary.go
- index 6910520..0f2cf50 100644
- --- a/libgo/go/golang_org/x/net/route/binary.go
- +++ b/libgo/go/golang_org/x/net/route/binary.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git b/libgo/go/golang_org/x/net/route/defs_hyperbolabsd.go b/libgo/go/golang_org/x/net/route/defs_hyperbolabsd.go
- new file mode 100644
- index 0000000..47d089b
- --- /dev/null
- +++ b/libgo/go/golang_org/x/net/route/defs_hyperbolabsd.go
- @@ -0,0 +1,120 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +// +build ignore
- +
- +package route
- +
- +/*
- +#include <sys/socket.h>
- +#include <sys/sysctl.h>
- +
- +#include <net/if.h>
- +#include <net/if_dl.h>
- +#include <net/route.h>
- +
- +#include <netinet/in.h>
- +*/
- +import "C"
- +
- +const (
- + sysAF_UNSPEC = C.AF_UNSPEC
- + sysAF_INET = C.AF_INET
- + sysAF_ROUTE = C.AF_ROUTE
- + sysAF_LINK = C.AF_LINK
- + sysAF_INET6 = C.AF_INET6
- +
- + sysSOCK_RAW = C.SOCK_RAW
- +
- + sysNET_RT_DUMP = C.NET_RT_DUMP
- + sysNET_RT_FLAGS = C.NET_RT_FLAGS
- + sysNET_RT_IFLIST = C.NET_RT_IFLIST
- + sysNET_RT_STATS = C.NET_RT_STATS
- + sysNET_RT_TABLE = C.NET_RT_TABLE
- + sysNET_RT_IFNAMES = C.NET_RT_IFNAMES
- + sysNET_RT_MAXID = C.NET_RT_MAXID
- +)
- +
- +const (
- + sysCTL_MAXNAME = C.CTL_MAXNAME
- +
- + sysCTL_UNSPEC = C.CTL_UNSPEC
- + sysCTL_KERN = C.CTL_KERN
- + sysCTL_VM = C.CTL_VM
- + sysCTL_FS = C.CTL_FS
- + sysCTL_NET = C.CTL_NET
- + sysCTL_DEBUG = C.CTL_DEBUG
- + sysCTL_HW = C.CTL_HW
- + sysCTL_MACHDEP = C.CTL_MACHDEP
- + sysCTL_DDB = C.CTL_DDB
- + sysCTL_VFS = C.CTL_VFS
- + sysCTL_MAXID = C.CTL_MAXID
- +)
- +
- +const (
- + sysRTM_VERSION = C.RTM_VERSION
- +
- + sysRTM_ADD = C.RTM_ADD
- + sysRTM_DELETE = C.RTM_DELETE
- + sysRTM_CHANGE = C.RTM_CHANGE
- + sysRTM_GET = C.RTM_GET
- + sysRTM_LOSING = C.RTM_LOSING
- + sysRTM_REDIRECT = C.RTM_REDIRECT
- + sysRTM_MISS = C.RTM_MISS
- + sysRTM_LOCK = C.RTM_LOCK
- + sysRTM_RESOLVE = C.RTM_RESOLVE
- + sysRTM_NEWADDR = C.RTM_NEWADDR
- + sysRTM_DELADDR = C.RTM_DELADDR
- + sysRTM_IFINFO = C.RTM_IFINFO
- + sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
- + sysRTM_DESYNC = C.RTM_DESYNC
- + sysRTM_INVALIDATE = C.RTM_INVALIDATE
- + sysRTM_BFD = C.RTM_BFD
- + sysRTM_PROPOSAL = C.RTM_PROPOSAL
- +
- + sysRTA_DST = C.RTA_DST
- + sysRTA_GATEWAY = C.RTA_GATEWAY
- + sysRTA_NETMASK = C.RTA_NETMASK
- + sysRTA_GENMASK = C.RTA_GENMASK
- + sysRTA_IFP = C.RTA_IFP
- + sysRTA_IFA = C.RTA_IFA
- + sysRTA_AUTHOR = C.RTA_AUTHOR
- + sysRTA_BRD = C.RTA_BRD
- + sysRTA_SRC = C.RTA_SRC
- + sysRTA_SRCMASK = C.RTA_SRCMASK
- + sysRTA_LABEL = C.RTA_LABEL
- + sysRTA_BFD = C.RTA_BFD
- + sysRTA_DNS = C.RTA_DNS
- + sysRTA_STATIC = C.RTA_STATIC
- + sysRTA_SEARCH = C.RTA_SEARCH
- +
- + sysRTAX_DST = C.RTAX_DST
- + sysRTAX_GATEWAY = C.RTAX_GATEWAY
- + sysRTAX_NETMASK = C.RTAX_NETMASK
- + sysRTAX_GENMASK = C.RTAX_GENMASK
- + sysRTAX_IFP = C.RTAX_IFP
- + sysRTAX_IFA = C.RTAX_IFA
- + sysRTAX_AUTHOR = C.RTAX_AUTHOR
- + sysRTAX_BRD = C.RTAX_BRD
- + sysRTAX_SRC = C.RTAX_SRC
- + sysRTAX_SRCMASK = C.RTAX_SRCMASK
- + sysRTAX_LABEL = C.RTAX_LABEL
- + sysRTAX_BFD = C.RTAX_BFD
- + sysRTAX_DNS = C.RTAX_DNS
- + sysRTAX_STATIC = C.RTAX_STATIC
- + sysRTAX_SEARCH = C.RTAX_SEARCH
- + sysRTAX_MAX = C.RTAX_MAX
- +)
- +
- +const (
- + sizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- +
- + sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage
- + sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
- + sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- +)
- diff --git a/libgo/go/golang_org/x/net/route/interface.go b/libgo/go/golang_org/x/net/route/interface.go
- index 854906d..3213e64 100644
- --- a/libgo/go/golang_org/x/net/route/interface.go
- +++ b/libgo/go/golang_org/x/net/route/interface.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git b/libgo/go/golang_org/x/net/route/interface_hyperbolabsd.go b/libgo/go/golang_org/x/net/route/interface_hyperbolabsd.go
- new file mode 100644
- index 0000000..11dd5c8
- --- /dev/null
- +++ b/libgo/go/golang_org/x/net/route/interface_hyperbolabsd.go
- @@ -0,0 +1,94 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package route
- +
- +func (*wireFormat) parseInterfaceMessage(_ RIBType, b []byte) (Message, error) {
- + if len(b) < 32 {
- + return nil, errMessageTooShort
- + }
- + l := int(nativeEndian.Uint16(b[:2]))
- + if len(b) < l {
- + return nil, errInvalidMessage
- + }
- + attrs := uint(nativeEndian.Uint32(b[12:16]))
- + if attrs&sysRTA_IFP == 0 {
- + return nil, nil
- + }
- + m := &InterfaceMessage{
- + Version: int(b[2]),
- + Type: int(b[3]),
- + Flags: int(nativeEndian.Uint32(b[16:20])),
- + Index: int(nativeEndian.Uint16(b[6:8])),
- + Addrs: make([]Addr, sysRTAX_MAX),
- + raw: b[:l],
- + }
- + ll := int(nativeEndian.Uint16(b[4:6]))
- + if len(b) < ll {
- + return nil, errInvalidMessage
- + }
- + a, err := parseLinkAddr(b[ll:])
- + if err != nil {
- + return nil, err
- + }
- + m.Addrs[sysRTAX_IFP] = a
- + m.Name = a.(*LinkAddr).Name
- + return m, nil
- +}
- +
- +func (*wireFormat) parseInterfaceAddrMessage(_ RIBType, b []byte) (Message, error) {
- + if len(b) < 24 {
- + return nil, errMessageTooShort
- + }
- + l := int(nativeEndian.Uint16(b[:2]))
- + if len(b) < l {
- + return nil, errInvalidMessage
- + }
- + bodyOff := int(nativeEndian.Uint16(b[4:6]))
- + if len(b) < bodyOff {
- + return nil, errInvalidMessage
- + }
- + m := &InterfaceAddrMessage{
- + Version: int(b[2]),
- + Type: int(b[3]),
- + Flags: int(nativeEndian.Uint32(b[12:16])),
- + Index: int(nativeEndian.Uint16(b[6:8])),
- + raw: b[:l],
- + }
- + var err error
- + m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[bodyOff:])
- + if err != nil {
- + return nil, err
- + }
- + return m, nil
- +}
- +
- +func (*wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) {
- + if len(b) < 26 {
- + return nil, errMessageTooShort
- + }
- + l := int(nativeEndian.Uint16(b[:2]))
- + if len(b) < l {
- + return nil, errInvalidMessage
- + }
- + m := &InterfaceAnnounceMessage{
- + Version: int(b[2]),
- + Type: int(b[3]),
- + Index: int(nativeEndian.Uint16(b[6:8])),
- + What: int(nativeEndian.Uint16(b[8:10])),
- + raw: b[:l],
- + }
- + for i := 0; i < 16; i++ {
- + if b[10+i] != 0 {
- + continue
- + }
- + m.Name = string(b[10 : 10+i])
- + break
- + }
- + return m, nil
- +}
- diff --git a/libgo/go/golang_org/x/net/route/message.go b/libgo/go/golang_org/x/net/route/message.go
- index 0fa7e09..e35a27f 100644
- --- a/libgo/go/golang_org/x/net/route/message.go
- +++ b/libgo/go/golang_org/x/net/route/message.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git a/libgo/go/golang_org/x/net/route/message_test.go b/libgo/go/golang_org/x/net/route/message_test.go
- index e848dab..d40796a 100644
- --- a/libgo/go/golang_org/x/net/route/message_test.go
- +++ b/libgo/go/golang_org/x/net/route/message_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git a/libgo/go/golang_org/x/net/route/route.go b/libgo/go/golang_org/x/net/route/route.go
- index 081da0d..659051c 100644
- --- a/libgo/go/golang_org/x/net/route/route.go
- +++ b/libgo/go/golang_org/x/net/route/route.go
- @@ -1,15 +1,19 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- // Package route provides basic functions for the manipulation of
- // packet routing facilities on BSD variants.
- //
- // The package supports any version of Darwin, any version of
- -// DragonFly BSD, FreeBSD 7 through 11, NetBSD 6 and above, and
- -// OpenBSD 5.6 and above.
- +// DragonFly BSD, FreeBSD 7 through 11, NetBSD 6 and above,
- +// OpenBSD 5.6 and above, and HyperbolaBSD.
- package route
-
- import (
- diff --git b/libgo/go/golang_org/x/net/route/route_hyperbolabsd.go b/libgo/go/golang_org/x/net/route/route_hyperbolabsd.go
- new file mode 100644
- index 0000000..7c33b20
- --- /dev/null
- +++ b/libgo/go/golang_org/x/net/route/route_hyperbolabsd.go
- @@ -0,0 +1,69 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package route
- +
- +import "syscall"
- +
- +func (m *RouteMessage) marshal() ([]byte, error) {
- + l := sizeofRtMsghdr + addrsSpace(m.Addrs)
- + b := make([]byte, l)
- + nativeEndian.PutUint16(b[:2], uint16(l))
- + if m.Version == 0 {
- + b[2] = sysRTM_VERSION
- + } else {
- + b[2] = byte(m.Version)
- + }
- + b[3] = byte(m.Type)
- + nativeEndian.PutUint16(b[4:6], uint16(sizeofRtMsghdr))
- + nativeEndian.PutUint32(b[16:20], uint32(m.Flags))
- + nativeEndian.PutUint16(b[6:8], uint16(m.Index))
- + nativeEndian.PutUint32(b[24:28], uint32(m.ID))
- + nativeEndian.PutUint32(b[28:32], uint32(m.Seq))
- + attrs, err := marshalAddrs(b[sizeofRtMsghdr:], m.Addrs)
- + if err != nil {
- + return nil, err
- + }
- + if attrs > 0 {
- + nativeEndian.PutUint32(b[12:16], uint32(attrs))
- + }
- + return b, nil
- +}
- +
- +func (*wireFormat) parseRouteMessage(_ RIBType, b []byte) (Message, error) {
- + if len(b) < sizeofRtMsghdr {
- + return nil, errMessageTooShort
- + }
- + l := int(nativeEndian.Uint16(b[:2]))
- + if len(b) < l {
- + return nil, errInvalidMessage
- + }
- + m := &RouteMessage{
- + Version: int(b[2]),
- + Type: int(b[3]),
- + Flags: int(nativeEndian.Uint32(b[16:20])),
- + Index: int(nativeEndian.Uint16(b[6:8])),
- + ID: uintptr(nativeEndian.Uint32(b[24:28])),
- + Seq: int(nativeEndian.Uint32(b[28:32])),
- + raw: b[:l],
- + }
- + ll := int(nativeEndian.Uint16(b[4:6]))
- + if len(b) < ll {
- + return nil, errInvalidMessage
- + }
- + errno := syscall.Errno(nativeEndian.Uint32(b[32:36]))
- + if errno != 0 {
- + m.Err = errno
- + }
- + as, err := parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[ll:])
- + if err != nil {
- + return nil, err
- + }
- + m.Addrs = as
- + return m, nil
- +}
- diff --git a/libgo/go/golang_org/x/net/route/route_test.go b/libgo/go/golang_org/x/net/route/route_test.go
- index 61bd174..09b3219 100644
- --- a/libgo/go/golang_org/x/net/route/route_test.go
- +++ b/libgo/go/golang_org/x/net/route/route_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- @@ -21,6 +25,8 @@ func (m *InterfaceMessage) String() string {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- + } else if runtime.GOOS == "hyperbolabsd" {
- + attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- @@ -31,6 +37,8 @@ func (m *InterfaceAddrMessage) String() string {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- + } else if runtime.GOOS == "hyperbolabsd" {
- + attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- @@ -71,13 +79,13 @@ var addrAttrNames = [...]string{
- "ifa",
- "author",
- "brd",
- - "df:mpls1-n:tag-o:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd
- - "df:mpls2-o:srcmask", // mpls2 for dragonfly, srcmask for openbsd
- - "df:mpls3-o:label", // mpls3 for dragonfly, label for openbsd
- - "o:bfd", // bfd for openbsd
- - "o:dns", // dns for openbsd
- - "o:static", // static for openbsd
- - "o:search", // search for openbsd
- + "df:mpls1-n:tag-o:src-hb:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd (and hyperbolabsd)
- + "df:mpls2-o:srcmask-hb:srcmask", // mpls2 for dragonfly, srcmask for openbsd (and hyperbolabsd)
- + "df:mpls3-o:label-hb:label;", // mpls3 for dragonfly, label for openbsd (and hyperbolabsd)
- + "o:bfd-hb:bfd", // bfd for openbsd (and hyperbolabsd)
- + "o:dns-hb:dns", // dns for openbsd (and hyperbolabsd)
- + "o:static-hb:static", // static for openbsd (and hyperbolabsd)
- + "o:search-hb:search", // search for openbsd (and hyperbolabsd)
- }
-
- func (attrs addrAttrs) String() string {
- @@ -115,6 +123,8 @@ func (ms msgs) validate() ([]string, error) {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- + } else if runtime.GOOS == "hyperbolabsd" {
- + attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- @@ -130,6 +140,8 @@ func (ms msgs) validate() ([]string, error) {
- var attrs addrAttrs
- if runtime.GOOS == "openbsd" {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- + } else if runtime.GOOS == "hyperbolabsd" {
- + attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16]))
- } else {
- attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8]))
- }
- @@ -359,6 +371,8 @@ func (pv *propVirtual) teardown() error {
- func (pv *propVirtual) configure(suffix int) error {
- if runtime.GOOS == "openbsd" {
- pv.name = fmt.Sprintf("vether%d", suffix)
- + } else if runtime.GOOS == "hyperbolabsd" {
- + pv.name = fmt.Sprintf("vether%d", suffix)
- } else {
- pv.name = fmt.Sprintf("vlan%d", suffix)
- }
- diff --git a/libgo/go/golang_org/x/net/route/sys.go b/libgo/go/golang_org/x/net/route/sys.go
- index 3d0ee9b..94a85e9 100644
- --- a/libgo/go/golang_org/x/net/route/sys.go
- +++ b/libgo/go/golang_org/x/net/route/sys.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git b/libgo/go/golang_org/x/net/route/sys_hyperbolabsd.go b/libgo/go/golang_org/x/net/route/sys_hyperbolabsd.go
- new file mode 100644
- index 0000000..e6cb3ca
- --- /dev/null
- +++ b/libgo/go/golang_org/x/net/route/sys_hyperbolabsd.go
- @@ -0,0 +1,84 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package route
- +
- +import "unsafe"
- +
- +func (typ RIBType) parseable() bool {
- + switch typ {
- + case sysNET_RT_STATS, sysNET_RT_TABLE:
- + return false
- + default:
- + return true
- + }
- +}
- +
- +// RouteMetrics represents route metrics.
- +type RouteMetrics struct {
- + PathMTU int // path maximum transmission unit
- +}
- +
- +// SysType implements the SysType method of Sys interface.
- +func (rmx *RouteMetrics) SysType() SysType { return SysMetrics }
- +
- +// Sys implements the Sys method of Message interface.
- +func (m *RouteMessage) Sys() []Sys {
- + return []Sys{
- + &RouteMetrics{
- + PathMTU: int(nativeEndian.Uint32(m.raw[60:64])),
- + },
- + }
- +}
- +
- +// InterfaceMetrics represents interface metrics.
- +type InterfaceMetrics struct {
- + Type int // interface type
- + MTU int // maximum transmission unit
- +}
- +
- +// SysType implements the SysType method of Sys interface.
- +func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics }
- +
- +// Sys implements the Sys method of Message interface.
- +func (m *InterfaceMessage) Sys() []Sys {
- + return []Sys{
- + &InterfaceMetrics{
- + Type: int(m.raw[24]),
- + MTU: int(nativeEndian.Uint32(m.raw[28:32])),
- + },
- + }
- +}
- +
- +func probeRoutingStack() (int, map[int]*wireFormat) {
- + var p uintptr
- + rtm := &wireFormat{extOff: -1, bodyOff: -1}
- + rtm.parse = rtm.parseRouteMessage
- + ifm := &wireFormat{extOff: -1, bodyOff: -1}
- + ifm.parse = ifm.parseInterfaceMessage
- + ifam := &wireFormat{extOff: -1, bodyOff: -1}
- + ifam.parse = ifam.parseInterfaceAddrMessage
- + ifanm := &wireFormat{extOff: -1, bodyOff: -1}
- + ifanm.parse = ifanm.parseInterfaceAnnounceMessage
- + return int(unsafe.Sizeof(p)), map[int]*wireFormat{
- + sysRTM_ADD: rtm,
- + sysRTM_DELETE: rtm,
- + sysRTM_CHANGE: rtm,
- + sysRTM_GET: rtm,
- + sysRTM_LOSING: rtm,
- + sysRTM_REDIRECT: rtm,
- + sysRTM_MISS: rtm,
- + sysRTM_LOCK: rtm,
- + sysRTM_RESOLVE: rtm,
- + sysRTM_NEWADDR: ifam,
- + sysRTM_DELADDR: ifam,
- + sysRTM_IFINFO: ifm,
- + sysRTM_IFANNOUNCE: ifanm,
- + sysRTM_DESYNC: rtm,
- + }
- +}
- diff --git a/libgo/go/golang_org/x/net/route/syscall.go b/libgo/go/golang_org/x/net/route/syscall.go
- index c211188..6a16d7f 100644
- --- a/libgo/go/golang_org/x/net/route/syscall.go
- +++ b/libgo/go/golang_org/x/net/route/syscall.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package route
-
- diff --git b/libgo/go/golang_org/x/net/route/zsys_hyperbolabsd.go b/libgo/go/golang_org/x/net/route/zsys_hyperbolabsd.go
- new file mode 100644
- index 0000000..d63ec70
- --- /dev/null
- +++ b/libgo/go/golang_org/x/net/route/zsys_hyperbolabsd.go
- @@ -0,0 +1,101 @@
- +// Created by cgo -godefs - DO NOT EDIT
- +// cgo -godefs defs_hyperbolabsd.go
- +
- +package route
- +
- +const (
- + sysAF_UNSPEC = 0x0
- + sysAF_INET = 0x2
- + sysAF_ROUTE = 0x11
- + sysAF_LINK = 0x12
- + sysAF_INET6 = 0x18
- +
- + sysSOCK_RAW = 0x3
- +
- + sysNET_RT_DUMP = 0x1
- + sysNET_RT_FLAGS = 0x2
- + sysNET_RT_IFLIST = 0x3
- + sysNET_RT_STATS = 0x4
- + sysNET_RT_TABLE = 0x5
- + sysNET_RT_IFNAMES = 0x6
- + sysNET_RT_MAXID = 0x7
- +)
- +
- +const (
- + sysCTL_MAXNAME = 0xc
- +
- + sysCTL_UNSPEC = 0x0
- + sysCTL_KERN = 0x1
- + sysCTL_VM = 0x2
- + sysCTL_FS = 0x3
- + sysCTL_NET = 0x4
- + sysCTL_DEBUG = 0x5
- + sysCTL_HW = 0x6
- + sysCTL_MACHDEP = 0x7
- + sysCTL_DDB = 0x9
- + sysCTL_VFS = 0xa
- + sysCTL_MAXID = 0xb
- +)
- +
- +const (
- + sysRTM_VERSION = 0x5
- +
- + sysRTM_ADD = 0x1
- + sysRTM_DELETE = 0x2
- + sysRTM_CHANGE = 0x3
- + sysRTM_GET = 0x4
- + sysRTM_LOSING = 0x5
- + sysRTM_REDIRECT = 0x6
- + sysRTM_MISS = 0x7
- + sysRTM_LOCK = 0x8
- + sysRTM_RESOLVE = 0xb
- + sysRTM_NEWADDR = 0xc
- + sysRTM_DELADDR = 0xd
- + sysRTM_IFINFO = 0xe
- + sysRTM_IFANNOUNCE = 0xf
- + sysRTM_DESYNC = 0x10
- + sysRTM_INVALIDATE = 0x11
- + sysRTM_BFD = 0x12
- + sysRTM_PROPOSAL = 0x13
- +
- + sysRTA_DST = 0x1
- + sysRTA_GATEWAY = 0x2
- + sysRTA_NETMASK = 0x4
- + sysRTA_GENMASK = 0x8
- + sysRTA_IFP = 0x10
- + sysRTA_IFA = 0x20
- + sysRTA_AUTHOR = 0x40
- + sysRTA_BRD = 0x80
- + sysRTA_SRC = 0x100
- + sysRTA_SRCMASK = 0x200
- + sysRTA_LABEL = 0x400
- + sysRTA_BFD = 0x800
- + sysRTA_DNS = 0x1000
- + sysRTA_STATIC = 0x2000
- + sysRTA_SEARCH = 0x4000
- +
- + sysRTAX_DST = 0x0
- + sysRTAX_GATEWAY = 0x1
- + sysRTAX_NETMASK = 0x2
- + sysRTAX_GENMASK = 0x3
- + sysRTAX_IFP = 0x4
- + sysRTAX_IFA = 0x5
- + sysRTAX_AUTHOR = 0x6
- + sysRTAX_BRD = 0x7
- + sysRTAX_SRC = 0x8
- + sysRTAX_SRCMASK = 0x9
- + sysRTAX_LABEL = 0xa
- + sysRTAX_BFD = 0xb
- + sysRTAX_DNS = 0xc
- + sysRTAX_STATIC = 0xd
- + sysRTAX_SEARCH = 0xe
- + sysRTAX_MAX = 0xf
- +)
- +
- +const (
- + sizeofRtMsghdr = 0x60
- +
- + sizeofSockaddrStorage = 0x100
- + sizeofSockaddrInet = 0x10
- + sizeofSockaddrInet6 = 0x1c
- +)
- diff --git a/libgo/go/internal/poll/export_posix_test.go b/libgo/go/internal/poll/export_posix_test.go
- index 6b9bb8b..71b4b17 100644
- --- a/libgo/go/internal/poll/export_posix_test.go
- +++ b/libgo/go/internal/poll/export_posix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- // Export guts for testing on posix.
- // Since testing imports os and os imports internal/poll,
- diff --git a/libgo/go/internal/poll/fd_poll_runtime.go b/libgo/go/internal/poll/fd_poll_runtime.go
- index b91cbe4..9453e61 100644
- --- a/libgo/go/internal/poll/fd_poll_runtime.go
- +++ b/libgo/go/internal/poll/fd_poll_runtime.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd windows solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd windows solaris
-
- package poll
-
- diff --git a/libgo/go/internal/poll/fd_posix.go b/libgo/go/internal/poll/fd_posix.go
- index 4e6e355..f3a52cb 100644
- --- a/libgo/go/internal/poll/fd_posix.go
- +++ b/libgo/go/internal/poll/fd_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package poll
-
- diff --git a/libgo/go/internal/poll/fd_posix_test.go b/libgo/go/internal/poll/fd_posix_test.go
- index 246d498..fc0efff 100644
- --- a/libgo/go/internal/poll/fd_posix_test.go
- +++ b/libgo/go/internal/poll/fd_posix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package poll_test
-
- diff --git a/libgo/go/internal/poll/fd_unix.go b/libgo/go/internal/poll/fd_unix.go
- index cfd441e..ba4d0e8 100644
- --- a/libgo/go/internal/poll/fd_unix.go
- +++ b/libgo/go/internal/poll/fd_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package poll
-
- diff --git a/libgo/go/internal/poll/hook_unix.go b/libgo/go/internal/poll/hook_unix.go
- index 4cf36cc..cb3c59f 100644
- --- a/libgo/go/internal/poll/hook_unix.go
- +++ b/libgo/go/internal/poll/hook_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package poll
-
- diff --git a/libgo/go/internal/poll/sockopt.go b/libgo/go/internal/poll/sockopt.go
- index bb5ea02..0eb50f8 100644
- --- a/libgo/go/internal/poll/sockopt.go
- +++ b/libgo/go/internal/poll/sockopt.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package poll
-
- diff --git a/libgo/go/internal/poll/sockopt_unix.go b/libgo/go/internal/poll/sockopt_unix.go
- index b33644d..6da6011 100644
- --- a/libgo/go/internal/poll/sockopt_unix.go
- +++ b/libgo/go/internal/poll/sockopt_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package poll
-
- diff --git a/libgo/go/internal/poll/sockoptip.go b/libgo/go/internal/poll/sockoptip.go
- index c55a1e3..6599a1a 100644
- --- a/libgo/go/internal/poll/sockoptip.go
- +++ b/libgo/go/internal/poll/sockoptip.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package poll
-
- diff --git a/libgo/go/internal/poll/sys_cloexec.go b/libgo/go/internal/poll/sys_cloexec.go
- index fb5f2bc..5a8a9ad 100644
- --- a/libgo/go/internal/poll/sys_cloexec.go
- +++ b/libgo/go/internal/poll/sys_cloexec.go
- @@ -1,11 +1,15 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // This file implements sysSocket and accept for platforms that do not
- // provide a fast path for setting SetNonblock and CloseOnExec.
-
- -// +build aix darwin nacl netbsd openbsd solaris
- +// +build aix darwin nacl netbsd openbsd hyperbolabsd solaris
-
- package poll
-
- diff --git a/libgo/go/internal/poll/writev.go b/libgo/go/internal/poll/writev.go
- index 4bf8804..ef593d3 100644
- --- a/libgo/go/internal/poll/writev.go
- +++ b/libgo/go/internal/poll/writev.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd
-
- package poll
-
- diff --git b/libgo/go/internal/syscall/unix/getentropy_hyperbolabsd.go b/libgo/go/internal/syscall/unix/getentropy_hyperbolabsd.go
- new file mode 100644
- index 0000000..d6cb275
- --- /dev/null
- +++ b/libgo/go/internal/syscall/unix/getentropy_hyperbolabsd.go
- @@ -0,0 +1,29 @@
- +// Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package unix
- +
- +import (
- + "syscall"
- + "unsafe"
- +)
- +
- +// getentropy(2)'s syscall number, from /usr/src/sys/kern/syscalls.master
- +const entropyTrap uintptr = 7
- +
- +// GetEntropy calls the HyperbolaBSD getentropy system call.
- +func GetEntropy(p []byte) error {
- + _, _, errno := syscall.Syscall(entropyTrap,
- + uintptr(unsafe.Pointer(&p[0])),
- + uintptr(len(p)),
- + 0)
- + if errno != 0 {
- + return errno
- + }
- + return nil
- +}
- diff --git b/libgo/go/mime/type_hyperbolabsd.go b/libgo/go/mime/type_hyperbolabsd.go
- new file mode 100644
- index 0000000..ee5fc43
- --- /dev/null
- +++ b/libgo/go/mime/type_hyperbolabsd.go
- @@ -0,0 +1,13 @@
- +// Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package mime
- +
- +func init() {
- + typeFiles = append(typeFiles, "/usr/share/misc/mime.types")
- +}
- diff --git a/libgo/go/mime/type_unix.go b/libgo/go/mime/type_unix.go
- index 8e177ca..93a9d59 100644
- --- a/libgo/go/mime/type_unix.go
- +++ b/libgo/go/mime/type_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package mime
-
- diff --git a/libgo/go/net/addrselect.go b/libgo/go/net/addrselect.go
- index 7c0dfe2..dab82d8 100644
- --- a/libgo/go/net/addrselect.go
- +++ b/libgo/go/net/addrselect.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- // Minimal RFC 6724 address selection.
-
- diff --git a/libgo/go/net/addrselect_test.go b/libgo/go/net/addrselect_test.go
- index d6e0e63..00dda3b 100644
- --- a/libgo/go/net/addrselect_test.go
- +++ b/libgo/go/net/addrselect_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git b/libgo/go/net/cgo_hyperbolabsd.go b/libgo/go/net/cgo_hyperbolabsd.go
- new file mode 100644
- index 0000000..dc37c72
- --- /dev/null
- +++ b/libgo/go/net/cgo_hyperbolabsd.go
- @@ -0,0 +1,18 @@
- +// Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +// +build cgo,!netgo
- +
- +package net
- +
- +/*
- +#include <netdb.h>
- +*/
- +import "C"
- +
- +const cgoAddrInfoFlags = C.AI_CANONNAME
- diff --git a/libgo/go/net/cgo_resold.go b/libgo/go/net/cgo_resold.go
- index 8e13e41..142ce84 100644
- --- a/libgo/go/net/cgo_resold.go
- +++ b/libgo/go/net/cgo_resold.go
- @@ -1,9 +1,13 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // +build cgo,!netgo
- -// +build android freebsd dragonfly openbsd
- +// +build android freebsd dragonfly openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/cgo_sockold.go b/libgo/go/net/cgo_sockold.go
- index 25d4f67..01e616f 100644
- --- a/libgo/go/net/cgo_sockold.go
- +++ b/libgo/go/net/cgo_sockold.go
- @@ -1,9 +1,13 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // +build cgo,!netgo
- -// +build aix darwin dragonfly freebsd netbsd openbsd
- +// +build aix darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/cgo_unix.go b/libgo/go/net/cgo_unix.go
- index 5ea13bc..d057073 100644
- --- a/libgo/go/net/cgo_unix.go
- +++ b/libgo/go/net/cgo_unix.go
- @@ -1,9 +1,13 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // +build cgo,!netgo
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/cgo_unix_test.go b/libgo/go/net/cgo_unix_test.go
- index 49da993..aaf7297 100644
- --- a/libgo/go/net/cgo_unix_test.go
- +++ b/libgo/go/net/cgo_unix_test.go
- @@ -1,9 +1,13 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // +build cgo,!netgo
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/conf.go b/libgo/go/net/conf.go
- index a798699..230ccd7 100644
- --- a/libgo/go/net/conf.go
- +++ b/libgo/go/net/conf.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- @@ -85,14 +89,18 @@ func initConfVal() {
- return
- }
-
- - // OpenBSD apparently lets you override the location of resolv.conf
- - // with ASR_CONFIG. If we notice that, defer to libc.
- + // OpenBSD (and HyperbolaBSD) apparently lets you override the
- + // location of resolv.conf with ASR_CONFIG.
- + // If we notice that, defer to libc.
- if runtime.GOOS == "openbsd" && os.Getenv("ASR_CONFIG") != "" {
- confVal.forceCgoLookupHost = true
- return
- + } else if runtime.GOOS == "hyperbolabsd" && os.Getenv("ASR_CONFIG") != "" {
- + confVal.forceCgoLookupHost = true
- + return
- }
-
- - if runtime.GOOS != "openbsd" {
- + if (runtime.GOOS != "openbsd" && runtime.GOOS != "hyperbolabsd") {
- confVal.nss = parseNSSConfFile("/etc/nsswitch.conf")
- }
-
- @@ -137,10 +145,10 @@ func (c *conf) hostLookupOrder(hostname string) (ret hostLookupOrder) {
- return fallbackOrder
- }
-
- - // OpenBSD is unique and doesn't use nsswitch.conf.
- + // OpenBSD (and HyperbolaBSD) is unique and doesn't use nsswitch.conf.
- // It also doesn't support mDNS.
- - if c.goos == "openbsd" {
- - // OpenBSD's resolv.conf manpage says that a non-existent
- + if (c.goos == "openbsd" || c.goos == "hyperbolabsd") {
- + // HyperbolaBSD and OpenBSD's resolv.conf manpage says that a non-existent
- // resolv.conf means "lookup" defaults to only "files",
- // without DNS lookups.
- if os.IsNotExist(c.resolv.err) {
- diff --git a/libgo/go/net/conf_test.go b/libgo/go/net/conf_test.go
- index 17d03f4..b89f5c7 100644
- --- a/libgo/go/net/conf_test.go
- +++ b/libgo/go/net/conf_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- @@ -101,6 +105,15 @@ func TestConfHostLookupOrder(t *testing.T) {
- },
- hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFiles}},
- },
- + // On HyperbolaBSD, no resolv.conf means no DNS.
- + {
- + name: "hyperbolabsd_no_resolv_conf",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: defaultResolvConf,
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFiles}},
- + },
- {
- name: "solaris_no_nsswitch",
- c: &conf{
- @@ -110,6 +123,7 @@ func TestConfHostLookupOrder(t *testing.T) {
- },
- hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupCgo}},
- },
- + // OpenBSD lookup
- {
- name: "openbsd_lookup_bind_file",
- c: &conf{
- @@ -169,6 +183,66 @@ func TestConfHostLookupOrder(t *testing.T) {
- },
- hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupDNSFiles}},
- },
- + // HyperbolaBSD lookup
- + {
- + name: "hyperbolabsd_lookup_bind_file",
- + c: &conf{
- + goos: "hypeerbolabsd",
- + resolv: &dnsConfig{lookup: []string{"bind", "file"}},
- + },
- + hostTests: []nssHostTest{
- + {"google.com", "myhostname", hostLookupDNSFiles},
- + {"foo.local", "myhostname", hostLookupDNSFiles},
- + },
- + },
- + {
- + name: "hyperbolabsd_lookup_file_bind",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: []string{"file", "bind"}},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFilesDNS}},
- + },
- + {
- + name: "hyperbolabsd_lookup_bind",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: []string{"bind"}},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupDNS}},
- + },
- + {
- + name: "hyperbolabsd_lookup_file",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: []string{"file"}},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFiles}},
- + },
- + {
- + name: "hyperbolabsd_lookup_yp",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: []string{"file", "bind", "yp"}},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupCgo}},
- + },
- + {
- + name: "hyperbolabsd_lookup_two",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: []string{"file", "foo"}},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupCgo}},
- + },
- + {
- + name: "hyperbolabsd_lookup_empty",
- + c: &conf{
- + goos: "hyperbolabsd",
- + resolv: &dnsConfig{lookup: nil},
- + },
- + hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupDNSFiles}},
- + },
- // glibc lacking an nsswitch.conf, per
- // http://www.gnu.org/software/libc/manual/html_node/Notes-on-NSS-Configuration-File.html
- {
- diff --git a/libgo/go/net/dial_test.go b/libgo/go/net/dial_test.go
- index b5f1dc9..a42e7c6 100644
- --- a/libgo/go/net/dial_test.go
- +++ b/libgo/go/net/dial_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -81,6 +85,8 @@ func TestDialerDualStackFDLeak(t *testing.T) {
- t.Skipf("not implemented a way to cancel dial racers in TCP SYN-SENT state on %s", runtime.GOOS)
- case "openbsd":
- testenv.SkipFlaky(t, 15157)
- + case "hyperbolabsd":
- + testenv.SkipFlaky(t, 15157)
- }
- if !supportsIPv4() || !supportsIPv6() {
- t.Skip("both IPv4 and IPv6 are required")
- @@ -169,9 +175,9 @@ func dialClosedPort() (actual, expected time.Duration) {
- }
- addr := l.Addr().String()
- l.Close()
- - // On OpenBSD, interference from TestSelfConnect is mysteriously
- - // causing the first attempt to hang for a few seconds, so we throw
- - // away the first result and keep the second.
- + // On OpenBSD (and HyperbolaBSD), interference from TestSelfConnect
- + // is mysteriously causing the first attempt to hang for a few
- + // seconds, so we throw away the first result and keep the second.
- for i := 1; ; i++ {
- startTime := time.Now()
- c, err := Dial("tcp", addr)
- diff --git a/libgo/go/net/dial_unix_test.go b/libgo/go/net/dial_unix_test.go
- index d5c6dde..39806a6 100644
- --- a/libgo/go/net/dial_unix_test.go
- +++ b/libgo/go/net/dial_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/dnsclient_unix.go b/libgo/go/net/dnsclient_unix.go
- index 73a507e..a4d3ff4 100644
- --- a/libgo/go/net/dnsclient_unix.go
- +++ b/libgo/go/net/dnsclient_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- // DNS client: see RFC 1035.
- // Has to be linked into package net for Dial.
- diff --git a/libgo/go/net/dnsclient_unix_test.go b/libgo/go/net/dnsclient_unix_test.go
- index 9e4015f..9218d1e 100644
- --- a/libgo/go/net/dnsclient_unix_test.go
- +++ b/libgo/go/net/dnsclient_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/dnsconfig_unix.go b/libgo/go/net/dnsconfig_unix.go
- index 24487af..ea4f84f 100644
- --- a/libgo/go/net/dnsconfig_unix.go
- +++ b/libgo/go/net/dnsconfig_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- // Read system DNS config from /etc/resolv.conf
-
- @@ -27,7 +31,7 @@ type dnsConfig struct {
- attempts int // lost packets before giving up on server
- rotate bool // round robin among servers
- unknownOpt bool // anything unknown was encountered
- - lookup []string // OpenBSD top-level database "lookup" order
- + lookup []string // OpenBSD (and HyperbolaBSD) top-level database "lookup" order
- err error // any error that occurs during open of resolv.conf
- mtime time.Time // time of resolv.conf modification
- soffset uint32 // used by serverOffset
- @@ -120,7 +124,7 @@ func dnsReadConfig(filename string) *dnsConfig {
- }
-
- case "lookup":
- - // OpenBSD option:
- + // OpenBSD (and HyperbolaBSD) option:
- // http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/resolv.conf.5
- // "the legal space-separated values are: bind, file, yp"
- conf.lookup = f[1:]
- diff --git a/libgo/go/net/dnsconfig_unix_test.go b/libgo/go/net/dnsconfig_unix_test.go
- index 0797559..aa7daac 100644
- --- a/libgo/go/net/dnsconfig_unix_test.go
- +++ b/libgo/go/net/dnsconfig_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- @@ -102,6 +106,17 @@ var dnsReadConfigTests = []struct {
- search: []string{"c.symbolic-datum-552.internal."},
- },
- },
- + {
- + name: "testdata/hyperbolabsd-resolv.conf",
- + want: &dnsConfig{
- + ndots: 1,
- + timeout: 5 * time.Second,
- + attempts: 2,
- + lookup: []string{"file", "bind"},
- + servers: []string{"169.254.169.254:53", "10.240.0.1:53"},
- + search: []string{"c.symbolic-datum-552.internal."},
- + },
- + },
- }
-
- func TestDNSReadConfig(t *testing.T) {
- diff --git a/libgo/go/net/error_posix.go b/libgo/go/net/error_posix.go
- index d0ffaae..84e087f 100644
- --- a/libgo/go/net/error_posix.go
- +++ b/libgo/go/net/error_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/fd_unix.go b/libgo/go/net/fd_unix.go
- index 95d5e4f..57f511d 100644
- --- a/libgo/go/net/fd_unix.go
- +++ b/libgo/go/net/fd_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/file_unix.go b/libgo/go/net/file_unix.go
- index 3655a89..8f94677 100644
- --- a/libgo/go/net/file_unix.go
- +++ b/libgo/go/net/file_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/hook_unix.go b/libgo/go/net/hook_unix.go
- index 7d58d0f..e5a9f14 100644
- --- a/libgo/go/net/hook_unix.go
- +++ b/libgo/go/net/hook_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/http/cgi/host.go b/libgo/go/net/http/cgi/host.go
- index 58e9f71..9f9a8a8 100644
- --- a/libgo/go/net/http/cgi/host.go
- +++ b/libgo/go/net/http/cgi/host.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -39,6 +43,7 @@ var osDefaultInheritEnv = map[string][]string{
- "irix": {"LD_LIBRARY_PATH", "LD_LIBRARYN32_PATH", "LD_LIBRARY64_PATH"},
- "linux": {"LD_LIBRARY_PATH"},
- "openbsd": {"LD_LIBRARY_PATH"},
- + "hyperbolabsd": {"LD_LIBRARY_PATH"},
- "solaris": {"LD_LIBRARY_PATH", "LD_LIBRARY_PATH_32", "LD_LIBRARY_PATH_64"},
- "windows": {"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"},
- }
- diff --git a/libgo/go/net/interface.go b/libgo/go/net/interface.go
- index 4036a7f..6a7d6dc 100644
- --- a/libgo/go/net/interface.go
- +++ b/libgo/go/net/interface.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -13,7 +17,7 @@ import (
- // BUG(mikio): On NaCl, methods and functions related to
- // Interface are not implemented.
-
- -// BUG(mikio): On DragonFly BSD, NetBSD, OpenBSD, Plan 9 and Solaris,
- +// BUG(mikio): On DragonFly BSD, NetBSD, OpenBSD, HyperbolaBSD, Plan 9 and Solaris,
- // the MulticastAddrs method of Interface is not implemented.
-
- var (
- diff --git a/libgo/go/net/interface_bsd.go b/libgo/go/net/interface_bsd.go
- index 35b1c26..563cf77 100644
- --- a/libgo/go/net/interface_bsd.go
- +++ b/libgo/go/net/interface_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/interface_bsdvar.go b/libgo/go/net/interface_bsdvar.go
- index 0b84ca3..c161ad9 100644
- --- a/libgo/go/net/interface_bsdvar.go
- +++ b/libgo/go/net/interface_bsdvar.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build dragonfly netbsd openbsd
- +// +build dragonfly netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/interface_test.go b/libgo/go/net/interface_test.go
- index 534137a..32df538 100644
- --- a/libgo/go/net/interface_test.go
- +++ b/libgo/go/net/interface_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -276,7 +280,7 @@ func checkUnicastStats(ifStats *ifStats, uniStats *routeStats) error {
-
- func checkMulticastStats(ifStats *ifStats, uniStats, multiStats *routeStats) error {
- switch runtime.GOOS {
- - case "dragonfly", "nacl", "netbsd", "openbsd", "plan9", "solaris":
- + case "dragonfly", "nacl", "netbsd", "openbsd", "hyperbolabsd", "plan9", "solaris":
- default:
- // Test the existence of connected multicast route
- // clones for IPv4. Unlike IPv6, IPv4 multicast
- diff --git a/libgo/go/net/internal/socktest/switch_unix.go b/libgo/go/net/internal/socktest/switch_unix.go
- index 8fb15f3..b68e6bc 100644
- --- a/libgo/go/net/internal/socktest/switch_unix.go
- +++ b/libgo/go/net/internal/socktest/switch_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package socktest
-
- diff --git a/libgo/go/net/internal/socktest/sys_unix.go b/libgo/go/net/internal/socktest/sys_unix.go
- index 397c524..caf08f6 100644
- --- a/libgo/go/net/internal/socktest/sys_unix.go
- +++ b/libgo/go/net/internal/socktest/sys_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package socktest
-
- diff --git a/libgo/go/net/iprawsock_posix.go b/libgo/go/net/iprawsock_posix.go
- index d613e6f..946910f 100644
- --- a/libgo/go/net/iprawsock_posix.go
- +++ b/libgo/go/net/iprawsock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/ipsock.go b/libgo/go/net/ipsock.go
- index 947bdf3..cf8956b 100644
- --- a/libgo/go/net/ipsock.go
- +++ b/libgo/go/net/ipsock.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -9,11 +13,11 @@ import (
- "sync"
- )
-
- -// BUG(rsc,mikio): On DragonFly BSD and OpenBSD, listening on the
- -// "tcp" and "udp" networks does not listen for both IPv4 and IPv6
- -// connections. This is due to the fact that IPv4 traffic will not be
- -// routed to an IPv6 socket - two separate sockets are required if
- -// both address families are to be supported.
- +// BUG(rsc,mikio): On DragonFly BSD, HyperbolaBSD and OpenBSD,
- +// listening on the "tcp" and "udp" networks does not listen for both
- +// IPv4 and IPv6 connections. This is due to the fact that
- +// IPv4 traffic will not be routed to an IPv6 socket - two separate
- +// sockets are required if both address families are to be supported.
- // See inet6(4) for details.
-
- type ipStackCapabilities struct {
- diff --git a/libgo/go/net/ipsock_posix.go b/libgo/go/net/ipsock_posix.go
- index 9cff960..17cf6c3 100644
- --- a/libgo/go/net/ipsock_posix.go
- +++ b/libgo/go/net/ipsock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- @@ -41,8 +45,8 @@ func (p *ipStackCapabilities) probe() {
- {laddr: TCPAddr{IP: IPv4(127, 0, 0, 1)}, value: 0},
- }
- switch runtime.GOOS {
- - case "dragonfly", "openbsd":
- - // The latest DragonFly BSD and OpenBSD kernels don't
- + case "dragonfly", "openbsd", "hyperbolabsd":
- + // The latest DragonFly BSD, HyperbolaBSD and OpenBSD kernels don't
- // support IPV6_V6ONLY=0. They always return an error
- // and we don't need to probe the capability.
- probes = probes[:1]
- @@ -105,7 +109,7 @@ func (p *ipStackCapabilities) probe() {
- // or else returns AF_INET6. It also returns a boolean value what
- // designates IPV6_V6ONLY option.
- //
- -// Note that the latest DragonFly BSD and OpenBSD kernels allow
- +// Note that the latest DragonFly BSD, HyperbolaBSD and OpenBSD kernels allow
- // neither "net.inet6.ip6.v6only=1" change nor IPPROTO_IPV6 level
- // IPV6_V6ONLY socket option setting.
- func favoriteAddrFamily(network string, laddr, raddr sockaddr, mode string) (family int, ipv6only bool) {
- @@ -134,7 +138,7 @@ func favoriteAddrFamily(network string, laddr, raddr sockaddr, mode string) (fam
- }
-
- func internetSocket(ctx context.Context, net string, laddr, raddr sockaddr, sotype, proto int, mode string) (fd *netFD, err error) {
- - if (runtime.GOOS == "windows" || runtime.GOOS == "openbsd" || runtime.GOOS == "nacl") && mode == "dial" && raddr.isWildcard() {
- + if (runtime.GOOS == "windows" || runtime.GOOS == "openbsd" || runtime.GOOS == "hyperbolabsd" || runtime.GOOS == "nacl") && mode == "dial" && raddr.isWildcard() {
- raddr = raddr.toLocal(net)
- }
- family, ipv6only := favoriteAddrFamily(net, laddr, raddr, mode)
- diff --git a/libgo/go/net/listen_test.go b/libgo/go/net/listen_test.go
- index 96624f9..c58e8bf 100644
- --- a/libgo/go/net/listen_test.go
- +++ b/libgo/go/net/listen_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -192,6 +196,8 @@ var dualStackTCPListenerTests = []struct {
- // net.ipv6.bindv6only=0 (overridable by sysctl or IPV6_V6ONLY option)
- // openbsd, kernel version 5.0
- // net.inet6.ip6.v6only=1 (overriding is prohibited)
- + // hyperbolabsd (openbsd based)
- + // net.inet6.ip6.v6only=1 (overriding is prohibited)
-
- {"tcp", "", "tcp", "", syscall.EADDRINUSE},
- {"tcp", "", "tcp", "0.0.0.0", syscall.EADDRINUSE},
- @@ -673,7 +679,7 @@ func checkMulticastListener(c *UDPConn, ip IP) error {
-
- func multicastRIBContains(ip IP) (bool, error) {
- switch runtime.GOOS {
- - case "dragonfly", "netbsd", "openbsd", "plan9", "solaris", "windows":
- + case "dragonfly", "netbsd", "openbsd", "hyperbolabsd", "plan9", "solaris", "windows":
- return true, nil // not implemented yet
- case "linux":
- if runtime.GOARCH == "arm" || runtime.GOARCH == "alpha" {
- diff --git a/libgo/go/net/lookup_unix.go b/libgo/go/net/lookup_unix.go
- index 2813f14..ebdcf08 100644
- --- a/libgo/go/net/lookup_unix.go
- +++ b/libgo/go/net/lookup_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/main_test.go b/libgo/go/net/main_test.go
- index 3e7a85a..1e8beba 100644
- --- a/libgo/go/net/main_test.go
- +++ b/libgo/go/net/main_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -131,7 +135,7 @@ func setupTestData() {
- {"udp6", "[" + addr + "%" + ifi.Name + "]:0", false},
- }...)
- switch runtime.GOOS {
- - case "darwin", "dragonfly", "freebsd", "openbsd", "netbsd":
- + case "darwin", "dragonfly", "freebsd", "hyperbolabsd", "openbsd", "netbsd":
- ipv6LinkLocalUnicastTCPTests = append(ipv6LinkLocalUnicastTCPTests, []ipv6LinkLocalUnicastTest{
- {"tcp", "[localhost%" + ifi.Name + "]:0", true},
- {"tcp6", "[localhost%" + ifi.Name + "]:0", true},
- diff --git a/libgo/go/net/main_unix_test.go b/libgo/go/net/main_unix_test.go
- index 34a8a10..649d0fe 100644
- --- a/libgo/go/net/main_unix_test.go
- +++ b/libgo/go/net/main_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/net.go b/libgo/go/net/net.go
- index 3ad9103..b9659de 100644
- --- a/libgo/go/net/net.go
- +++ b/libgo/go/net/net.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -52,7 +56,7 @@ When cgo is available, the cgo-based resolver is used instead under a variety of
- conditions: on systems that do not let programs make direct DNS requests (OS X),
- when the LOCALDOMAIN environment variable is present (even if empty),
- when the RES_OPTIONS or HOSTALIASES environment variable is non-empty,
- -when the ASR_CONFIG environment variable is non-empty (OpenBSD only),
- +when the ASR_CONFIG environment variable is non-empty (OpenBSD and HyperbolaBSD only),
- when /etc/resolv.conf or /etc/nsswitch.conf specify the use of features that the
- Go resolver does not implement, and when the name being looked up ends in .local
- or is an mDNS name.
- diff --git a/libgo/go/net/nss.go b/libgo/go/net/nss.go
- index 1650f5e..315891b 100644
- --- a/libgo/go/net/nss.go
- +++ b/libgo/go/net/nss.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/nss_test.go b/libgo/go/net/nss_test.go
- index 371deb5..ce32d75 100644
- --- a/libgo/go/net/nss_test.go
- +++ b/libgo/go/net/nss_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/port_unix.go b/libgo/go/net/port_unix.go
- index 8dd1c32..2de66b6 100644
- --- a/libgo/go/net/port_unix.go
- +++ b/libgo/go/net/port_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris nacl
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris nacl
-
- // Read system port mappings from /etc/services
-
- diff --git a/libgo/go/net/rawconn_unix_test.go b/libgo/go/net/rawconn_unix_test.go
- index 913ad86..af8b335 100644
- --- a/libgo/go/net/rawconn_unix_test.go
- +++ b/libgo/go/net/rawconn_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/sendfile_stub.go b/libgo/go/net/sendfile_stub.go
- index f043062..de3e305 100644
- --- a/libgo/go/net/sendfile_stub.go
- +++ b/libgo/go/net/sendfile_stub.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin nacl netbsd openbsd
- +// +build aix darwin nacl netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/sock_bsd.go b/libgo/go/net/sock_bsd.go
- index 516e557..752d6f3 100644
- --- a/libgo/go/net/sock_bsd.go
- +++ b/libgo/go/net/sock_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package net
-
- @@ -25,6 +29,8 @@ func maxListenerBacklog() int {
- // NOTE: NetBSD has no somaxconn-like kernel state so far
- case "openbsd":
- n, err = syscall.SysctlUint32("kern.somaxconn")
- + case "hyperbolabsd":
- + n, err = syscall.SysctlUint32("kern.somaxconn")
- }
- if n == 0 || err != nil {
- return syscall.SOMAXCONN
- diff --git a/libgo/go/net/sock_posix.go b/libgo/go/net/sock_posix.go
- index 4733c42..8ac4274 100644
- --- a/libgo/go/net/sock_posix.go
- +++ b/libgo/go/net/sock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/sockopt_bsd.go b/libgo/go/net/sockopt_bsd.go
- index 1aae88a..cb43158 100644
- --- a/libgo/go/net/sockopt_bsd.go
- +++ b/libgo/go/net/sockopt_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/net/sockopt_posix.go b/libgo/go/net/sockopt_posix.go
- index 29edddb..c63689f 100644
- --- a/libgo/go/net/sockopt_posix.go
- +++ b/libgo/go/net/sockopt_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/sockoptip_bsdvar.go b/libgo/go/net/sockoptip_bsdvar.go
- index 9560101..637be78 100644
- --- a/libgo/go/net/sockoptip_bsdvar.go
- +++ b/libgo/go/net/sockoptip_bsdvar.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd solaris
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/sockoptip_posix.go b/libgo/go/net/sockoptip_posix.go
- index b14963f..9b6e1a9 100644
- --- a/libgo/go/net/sockoptip_posix.go
- +++ b/libgo/go/net/sockoptip_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/sys_cloexec.go b/libgo/go/net/sys_cloexec.go
- index def05cb..5f3fe60 100644
- --- a/libgo/go/net/sys_cloexec.go
- +++ b/libgo/go/net/sys_cloexec.go
- @@ -1,11 +1,15 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // This file implements sysSocket and accept for platforms that do not
- // provide a fast path for setting SetNonblock and CloseOnExec.
-
- -// +build aix darwin nacl netbsd openbsd solaris
- +// +build aix darwin nacl netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/tcpsock_posix.go b/libgo/go/net/tcpsock_posix.go
- index 9ba199d..49f177e 100644
- --- a/libgo/go/net/tcpsock_posix.go
- +++ b/libgo/go/net/tcpsock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/tcpsock_test.go b/libgo/go/net/tcpsock_test.go
- index 04b38b6..5e15763 100644
- --- a/libgo/go/net/tcpsock_test.go
- +++ b/libgo/go/net/tcpsock_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -654,7 +658,7 @@ func TestTCPSelfConnect(t *testing.T) {
- n = 1000
- }
- switch runtime.GOOS {
- - case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "plan9", "solaris", "windows":
- + case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "hyperbolabsd", "plan9", "solaris", "windows":
- // Non-Linux systems take a long time to figure
- // out that there is nothing listening on localhost.
- n = 100
- diff --git b/libgo/go/net/tcpsockopt_hyperbolabsd.go b/libgo/go/net/tcpsockopt_hyperbolabsd.go
- new file mode 100644
- index 0000000..5b90893
- --- /dev/null
- +++ b/libgo/go/net/tcpsockopt_hyperbolabsd.go
- @@ -0,0 +1,20 @@
- +// Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package net
- +
- +import (
- + "syscall"
- + "time"
- +)
- +
- +func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
- + // HyperbolaBSD has no user-settable per-socket TCP keepalive
- + // options.
- + return syscall.ENOPROTOOPT
- +}
- diff --git a/libgo/go/net/tcpsockopt_posix.go b/libgo/go/net/tcpsockopt_posix.go
- index 5e00ba1..3aacb33 100644
- --- a/libgo/go/net/tcpsockopt_posix.go
- +++ b/libgo/go/net/tcpsockopt_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git b/libgo/go/net/testdata/hyperbolabsd-resolv.conf b/libgo/go/net/testdata/hyperbolabsd-resolv.conf
- new file mode 100644
- index 0000000..8281a91
- --- /dev/null
- +++ b/libgo/go/net/testdata/hyperbolabsd-resolv.conf
- @@ -0,0 +1,5 @@
- +# Generated by vio0 dhclient
- +search c.symbolic-datum-552.internal.
- +nameserver 169.254.169.254
- +nameserver 10.240.0.1
- +lookup file bind
- diff --git a/libgo/go/net/timeout_test.go b/libgo/go/net/timeout_test.go
- index 9de7801..84b6346 100644
- --- a/libgo/go/net/timeout_test.go
- +++ b/libgo/go/net/timeout_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -102,6 +106,8 @@ var dialTimeoutMaxDurationTests = []struct {
- func TestDialTimeoutMaxDuration(t *testing.T) {
- if runtime.GOOS == "openbsd" {
- testenv.SkipFlaky(t, 15157)
- + } else if runtime.GOOS == "hyperbolabsd" {
- + testenv.SkipFlaky(t, 15157)
- }
-
- ln, err := newLocalListener("tcp")
- diff --git a/libgo/go/net/udpsock_posix.go b/libgo/go/net/udpsock_posix.go
- index fe552ba..625f830 100644
- --- a/libgo/go/net/udpsock_posix.go
- +++ b/libgo/go/net/udpsock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/unixsock_posix.go b/libgo/go/net/unixsock_posix.go
- index 945aa03..d44219d 100644
- --- a/libgo/go/net/unixsock_posix.go
- +++ b/libgo/go/net/unixsock_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package net
-
- diff --git a/libgo/go/net/unixsock_test.go b/libgo/go/net/unixsock_test.go
- index 3e5c8bc..5230ee9 100644
- --- a/libgo/go/net/unixsock_test.go
- +++ b/libgo/go/net/unixsock_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -24,6 +28,8 @@ func TestReadUnixgramWithUnnamedSocket(t *testing.T) {
- }
- if runtime.GOOS == "openbsd" {
- testenv.SkipFlaky(t, 15157)
- + } else if runtime.GOOS == "hyperbolabsd" {
- + testenv.SkipFlaky(t, 15157)
- }
-
- addr := testUnixAddr()
- diff --git a/libgo/go/net/write_unix_test.go b/libgo/go/net/write_unix_test.go
- index 6d8cb6a..bcb1560 100644
- --- a/libgo/go/net/write_unix_test.go
- +++ b/libgo/go/net/write_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package net
-
- diff --git a/libgo/go/net/writev_test.go b/libgo/go/net/writev_test.go
- index 4c05be4..cf7e558 100644
- --- a/libgo/go/net/writev_test.go
- +++ b/libgo/go/net/writev_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -152,7 +156,7 @@ func testBuffer_writeTo(t *testing.T, chunks int, useCopy bool) {
-
- var wantSum int
- switch runtime.GOOS {
- - case "android", "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd":
- + case "android", "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd":
- var wantMinCalls int
- wantSum = want.Len()
- v := chunks
- diff --git a/libgo/go/net/writev_unix.go b/libgo/go/net/writev_unix.go
- index bf0fbf8..c98bd9c 100644
- --- a/libgo/go/net/writev_unix.go
- +++ b/libgo/go/net/writev_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd
-
- package net
-
- diff --git a/libgo/go/os/dir_unix.go b/libgo/go/os/dir_unix.go
- index 2dc6a89..40875df 100644
- --- a/libgo/go/os/dir_unix.go
- +++ b/libgo/go/os/dir_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/env_unix_test.go b/libgo/go/os/env_unix_test.go
- index f7b67eb..3dda1a5 100644
- --- a/libgo/go/os/env_unix_test.go
- +++ b/libgo/go/os/env_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package os_test
-
- diff --git a/libgo/go/os/error_posix.go b/libgo/go/os/error_posix.go
- index 2049e44..23f490a 100644
- --- a/libgo/go/os/error_posix.go
- +++ b/libgo/go/os/error_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package os
-
- diff --git a/libgo/go/os/error_unix.go b/libgo/go/os/error_unix.go
- index 2349851..6a62d66 100644
- --- a/libgo/go/os/error_unix.go
- +++ b/libgo/go/os/error_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/error_unix_test.go b/libgo/go/os/error_unix_test.go
- index 76fe015..484df8b 100644
- --- a/libgo/go/os/error_unix_test.go
- +++ b/libgo/go/os/error_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os_test
-
- diff --git a/libgo/go/os/exec/exec_posix_test.go b/libgo/go/os/exec/exec_posix_test.go
- index 865b6c3..6e7a19c 100644
- --- a/libgo/go/os/exec/exec_posix_test.go
- +++ b/libgo/go/os/exec/exec_posix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package exec_test
-
- diff --git a/libgo/go/os/exec/exec_test.go b/libgo/go/os/exec/exec_test.go
- index aa33570..e27ae94 100644
- --- a/libgo/go/os/exec/exec_test.go
- +++ b/libgo/go/os/exec/exec_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -676,7 +680,7 @@ func TestHelperProcess(*testing.T) {
- // Determine which command to use to display open files.
- ofcmd := "lsof"
- switch runtime.GOOS {
- - case "dragonfly", "freebsd", "netbsd", "openbsd":
- + case "dragonfly", "freebsd", "netbsd", "openbsd", "hyperbolabsd":
- ofcmd = "fstat"
- case "plan9":
- ofcmd = "/bin/cat"
- diff --git a/libgo/go/os/exec/lp_unix.go b/libgo/go/os/exec/lp_unix.go
- index 20ce7a4..d4590f2 100644
- --- a/libgo/go/os/exec/lp_unix.go
- +++ b/libgo/go/os/exec/lp_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package exec
-
- diff --git a/libgo/go/os/exec/lp_unix_test.go b/libgo/go/os/exec/lp_unix_test.go
- index d467acf..e514f18 100644
- --- a/libgo/go/os/exec/lp_unix_test.go
- +++ b/libgo/go/os/exec/lp_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package exec
-
- diff --git a/libgo/go/os/exec_posix.go b/libgo/go/os/exec_posix.go
- index 056f139..87d1bcf 100644
- --- a/libgo/go/os/exec_posix.go
- +++ b/libgo/go/os/exec_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package os
-
- diff --git a/libgo/go/os/exec_unix.go b/libgo/go/os/exec_unix.go
- index d6433bf..6de906d 100644
- --- a/libgo/go/os/exec_unix.go
- +++ b/libgo/go/os/exec_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/executable_path.go b/libgo/go/os/executable_path.go
- index 7b8b836..39c991a 100644
- --- a/libgo/go/os/executable_path.go
- +++ b/libgo/go/os/executable_path.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix openbsd
- +// +build aix openbsd hyperbolabsd
-
- package os
-
- diff --git a/libgo/go/os/executable_test.go b/libgo/go/os/executable_test.go
- index 4a9a883..bfc93c7 100644
- --- a/libgo/go/os/executable_test.go
- +++ b/libgo/go/os/executable_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -39,6 +43,9 @@ func TestExecutable(t *testing.T) {
- if runtime.GOOS == "openbsd" {
- // OpenBSD relies on argv[0]
- cmd.Args[0] = fn
- + } else if runtime.GOOS == "hyperbolabsd" {
- + // HyperbolaBSD relies on argv[0]
- + cmd.Args[0] = fn
- }
- cmd.Env = append(os.Environ(), fmt.Sprintf("%s=1", executable_EnvVar))
- out, err := cmd.CombinedOutput()
- diff --git a/libgo/go/os/file_posix.go b/libgo/go/os/file_posix.go
- index 67da384..ad7fc9a 100644
- --- a/libgo/go/os/file_posix.go
- +++ b/libgo/go/os/file_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package os
-
- diff --git a/libgo/go/os/file_unix.go b/libgo/go/os/file_unix.go
- index 67d2ee1..f00220c 100644
- --- a/libgo/go/os/file_unix.go
- +++ b/libgo/go/os/file_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/os_test.go b/libgo/go/os/os_test.go
- index 8ed9252..9554544 100644
- --- a/libgo/go/os/os_test.go
- +++ b/libgo/go/os/os_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -2225,9 +2229,11 @@ func TestPipeThreads(t *testing.T) {
-
- threads := 100
-
- - // OpenBSD has a low default for max number of files.
- + // OpenBSD (and HyperbolaBSD) has a low default for max number of files.
- if runtime.GOOS == "openbsd" {
- threads = 50
- + } else if runtime.GOOS == "hyperbolabsd" {
- + threads = 50
- }
-
- r := make([]*File, threads)
- diff --git a/libgo/go/os/os_unix_test.go b/libgo/go/os/os_unix_test.go
- index 56c885c..1269eb6 100644
- --- a/libgo/go/os/os_unix_test.go
- +++ b/libgo/go/os/os_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package os_test
-
- diff --git a/libgo/go/os/path_unix.go b/libgo/go/os/path_unix.go
- index bc0f239..f5e67b0 100644
- --- a/libgo/go/os/path_unix.go
- +++ b/libgo/go/os/path_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/pipe_bsd.go b/libgo/go/os/pipe_bsd.go
- index 8398a24..14e6ef6 100644
- --- a/libgo/go/os/pipe_bsd.go
- +++ b/libgo/go/os/pipe_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/signal/internal/pty/pty.go b/libgo/go/os/signal/internal/pty/pty.go
- index e52d19a..87708c7 100644
- --- a/libgo/go/os/signal/internal/pty/pty.go
- +++ b/libgo/go/os/signal/internal/pty/pty.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux,!android netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux,!android netbsd openbsd hyperbolabsd solaris
-
- // Package pty is a simple pseudo-terminal package for Unix systems,
- // implemented by calling C functions via cgo.
- diff --git a/libgo/go/os/signal/signal_cgo_test.go b/libgo/go/os/signal/signal_cgo_test.go
- index 16aeea8..a99ec3a 100644
- --- a/libgo/go/os/signal/signal_cgo_test.go
- +++ b/libgo/go/os/signal/signal_cgo_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux,!android netbsd openbsd
- +// +build darwin dragonfly freebsd linux,!android netbsd openbsd hyperbolabsd
- // +build cgo
-
- // Note that this test does not work on Solaris: issue #22849.
- diff --git a/libgo/go/os/signal/signal_test.go b/libgo/go/os/signal/signal_test.go
- index d27ff0b..035a781 100644
- --- a/libgo/go/os/signal/signal_test.go
- +++ b/libgo/go/os/signal/signal_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package signal
-
- diff --git a/libgo/go/os/signal/signal_unix.go b/libgo/go/os/signal/signal_unix.go
- index 5ec7e97..f93d44d 100644
- --- a/libgo/go/os/signal/signal_unix.go
- +++ b/libgo/go/os/signal/signal_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package signal
-
- diff --git a/libgo/go/os/stat_atim.go b/libgo/go/os/stat_atim.go
- index ef8a574..bf64005 100644
- --- a/libgo/go/os/stat_atim.go
- +++ b/libgo/go/os/stat_atim.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build linux openbsd solaristag
- +// +build linux openbsd hyperbolabsd solaristag
-
- package os
-
- diff --git a/libgo/go/os/stat_unix.go b/libgo/go/os/stat_unix.go
- index bc5d06c..12aa701 100644
- --- a/libgo/go/os/stat_unix.go
- +++ b/libgo/go/os/stat_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/sticky_bsd.go b/libgo/go/os/sticky_bsd.go
- index 6b54c75..41c08fc 100644
- --- a/libgo/go/os/sticky_bsd.go
- +++ b/libgo/go/os/sticky_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd solaris
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/sticky_notbsd.go b/libgo/go/os/sticky_notbsd.go
- index 834e79b..182271b 100644
- --- a/libgo/go/os/sticky_notbsd.go
- +++ b/libgo/go/os/sticky_notbsd.go
- @@ -1,4 +1,8 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -7,6 +11,7 @@
- // +build !freebsd
- // +build !netbsd
- // +build !openbsd
- +// +build !hyperbolabsd
- // +build !solaris
-
- package os
- diff --git a/libgo/go/os/sys_bsd.go b/libgo/go/os/sys_bsd.go
- index 8ad5e21..de090bc 100644
- --- a/libgo/go/os/sys_bsd.go
- +++ b/libgo/go/os/sys_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd nacl netbsd openbsd
- +// +build darwin dragonfly freebsd nacl netbsd openbsd hyperbolabsd
-
- // os code shared between *BSD systems including OS X (Darwin)
- // and FreeBSD.
- diff --git a/libgo/go/os/sys_unix.go b/libgo/go/os/sys_unix.go
- index 4caf8bd..f6e2d28 100644
- --- a/libgo/go/os/sys_unix.go
- +++ b/libgo/go/os/sys_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix dragonfly linux netbsd openbsd solaris
- +// +build aix dragonfly linux netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/os/user/cgo_lookup_unix.go b/libgo/go/os/user/cgo_lookup_unix.go
- index 6c815b4..14441d5 100644
- --- a/libgo/go/os/user/cgo_lookup_unix.go
- +++ b/libgo/go/os/user/cgo_lookup_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd !android,linux netbsd openbsd hyperbolabsd solaris
- // +build cgo
-
- package user
- diff --git a/libgo/go/os/user/cgo_unix_test.go b/libgo/go/os/user/cgo_unix_test.go
- index 6741118..31f69d5 100644
- --- a/libgo/go/os/user/cgo_unix_test.go
- +++ b/libgo/go/os/user/cgo_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd !android,linux netbsd openbsd hyperbolabsd solaris
- // +build cgo
-
- package user
- diff --git a/libgo/go/os/user/decls_unix.go b/libgo/go/os/user/decls_unix.go
- index c2eb51e..c965bcb 100644
- --- a/libgo/go/os/user/decls_unix.go
- +++ b/libgo/go/os/user/decls_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd
- // +build cgo
-
- package user
- diff --git a/libgo/go/os/user/listgroups_unix.go b/libgo/go/os/user/listgroups_unix.go
- index b142e2b..f196f11 100644
- --- a/libgo/go/os/user/listgroups_unix.go
- +++ b/libgo/go/os/user/listgroups_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build dragonfly darwin freebsd !android,linux netbsd openbsd
- +// +build dragonfly darwin freebsd !android,linux netbsd openbsd hyperbolabsd
-
- package user
-
- diff --git a/libgo/go/os/user/lookup_unix.go b/libgo/go/os/user/lookup_unix.go
- index 5f34ba8..5797707 100644
- --- a/libgo/go/os/user/lookup_unix.go
- +++ b/libgo/go/os/user/lookup_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd !android,linux nacl netbsd openbsd solaris
- +// +build darwin dragonfly freebsd !android,linux nacl netbsd openbsd hyperbolabsd solaris
- // +build !cgo
-
- package user
- diff --git a/libgo/go/os/user/lookup_unix_test.go b/libgo/go/os/user/lookup_unix_test.go
- index 02c88ab..5b22d94 100644
- --- a/libgo/go/os/user/lookup_unix_test.go
- +++ b/libgo/go/os/user/lookup_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd !android,linux nacl netbsd openbsd solaris
- +// +build darwin dragonfly freebsd !android,linux nacl netbsd openbsd hyperbolabsd solaris
- // +build !cgo
-
- package user
- diff --git a/libgo/go/os/wait_unimp.go b/libgo/go/os/wait_unimp.go
- index 98243b5..2e979e0 100644
- --- a/libgo/go/os/wait_unimp.go
- +++ b/libgo/go/os/wait_unimp.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly nacl netbsd openbsd hyperbolabsd solaris
-
- package os
-
- diff --git a/libgo/go/path/filepath/path_unix.go b/libgo/go/path/filepath/path_unix.go
- index 2d407a8..38d63da 100644
- --- a/libgo/go/path/filepath/path_unix.go
- +++ b/libgo/go/path/filepath/path_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package filepath
-
- diff --git a/libgo/go/runtime/crash_unix_test.go b/libgo/go/runtime/crash_unix_test.go
- index 584a6c7..35eb901 100644
- --- a/libgo/go/runtime/crash_unix_test.go
- +++ b/libgo/go/runtime/crash_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package runtime_test
-
- @@ -35,7 +39,7 @@ func init() {
-
- func TestCrashDumpsAllThreads(t *testing.T) {
- switch runtime.GOOS {
- - case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- default:
- t.Skipf("skipping; not supported on %v", runtime.GOOS)
- }
- @@ -274,7 +278,7 @@ func TestSignalIgnoreSIGTRAP(t *testing.T) {
-
- func TestSignalDuringExec(t *testing.T) {
- switch runtime.GOOS {
- - case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd":
- + case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd":
- default:
- t.Skipf("skipping test on %s", runtime.GOOS)
- }
- diff --git a/libgo/go/runtime/env_posix.go b/libgo/go/runtime/env_posix.go
- index ddf3c02..0826e3d 100644
- --- a/libgo/go/runtime/env_posix.go
- +++ b/libgo/go/runtime/env_posix.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package runtime
-
- diff --git a/libgo/go/runtime/export_unix_test.go b/libgo/go/runtime/export_unix_test.go
- index eecdfb7..15aea2a 100644
- --- a/libgo/go/runtime/export_unix_test.go
- +++ b/libgo/go/runtime/export_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package runtime
-
- diff --git a/libgo/go/runtime/lock_sema.go b/libgo/go/runtime/lock_sema.go
- index d000b11..ada601b 100644
- --- a/libgo/go/runtime/lock_sema.go
- +++ b/libgo/go/runtime/lock_sema.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin nacl netbsd openbsd plan9 solaris windows
- +// +build aix darwin nacl netbsd openbsd hyperbolabsd plan9 solaris windows
-
- package runtime
-
- diff --git a/libgo/go/runtime/netpoll.go b/libgo/go/runtime/netpoll.go
- index e9bbfec..ae8a44b 100644
- --- a/libgo/go/runtime/netpoll.go
- +++ b/libgo/go/runtime/netpoll.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- package runtime
-
- diff --git a/libgo/go/runtime/netpoll_kqueue.go b/libgo/go/runtime/netpoll_kqueue.go
- index 1f68eff..c69accc 100644
- --- a/libgo/go/runtime/netpoll_kqueue.go
- +++ b/libgo/go/runtime/netpoll_kqueue.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package runtime
-
- diff --git b/libgo/go/runtime/os_hyperbolabsd.go b/libgo/go/runtime/os_hyperbolabsd.go
- new file mode 100644
- index 0000000..d7770dc
- --- /dev/null
- +++ b/libgo/go/runtime/os_hyperbolabsd.go
- @@ -0,0 +1,80 @@
- +// Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package runtime
- +
- +import (
- + "runtime/internal/atomic"
- + "unsafe"
- +)
- +
- +type mOS struct {
- + waitsemacount uint32
- +}
- +
- +//go:noescape
- +//extern thrsleep
- +func thrsleep(ident uintptr, clock_id int32, tsp *timespec, lock uintptr, abort *uint32) int32
- +
- +//go:noescape
- +//extern thrwakeup
- +func thrwakeup(ident uintptr, n int32) int32
- +
- +//go:nosplit
- +func semacreate(mp *m) {
- +}
- +
- +//go:nosplit
- +func semasleep(ns int64) int32 {
- + _g_ := getg()
- +
- + // Compute sleep deadline.
- + var tsp *timespec
- + if ns >= 0 {
- + var ts timespec
- + var nsec int32
- + ns += nanotime()
- + ts.set_sec(int64(timediv(ns, 1000000000, &nsec)))
- + ts.set_nsec(nsec)
- + tsp = &ts
- + }
- +
- + for {
- + v := atomic.Load(&_g_.m.mos.waitsemacount)
- + if v > 0 {
- + if atomic.Cas(&_g_.m.mos.waitsemacount, v, v-1) {
- + return 0 // semaphore acquired
- + }
- + continue
- + }
- +
- + // Sleep until woken by semawakeup or timeout; or abort if waitsemacount != 0.
- + //
- + // From HyperbolaBSD's __thrsleep(2) manual:
- + // "The abort argument, if not NULL, points to an int that will
- + // be examined [...] immediately before blocking. If that int
- + // is non-zero then __thrsleep() will immediately return EINTR
- + // without blocking."
- + ret := thrsleep(uintptr(unsafe.Pointer(&_g_.m.mos.waitsemacount)), _CLOCK_MONOTONIC, tsp, 0, &_g_.m.mos.waitsemacount)
- + if ret == _EWOULDBLOCK {
- + return -1
- + }
- + }
- +}
- +
- +//go:nosplit
- +func semawakeup(mp *m) {
- + atomic.Xadd(&mp.mos.waitsemacount, 1)
- + ret := thrwakeup(uintptr(unsafe.Pointer(&mp.mos.waitsemacount)), 1)
- + if ret != 0 && ret != _ESRCH {
- + // semawakeup can be called on signal stack.
- + systemstack(func() {
- + print("thrwakeup addr=", &mp.mos.waitsemacount, " sem=", mp.mos.waitsemacount, " ret=", ret, "\n")
- + })
- + }
- +}
- diff --git a/libgo/go/runtime/runtime_unix_test.go b/libgo/go/runtime/runtime_unix_test.go
- index b0cbbbe..218125b 100644
- --- a/libgo/go/runtime/runtime_unix_test.go
- +++ b/libgo/go/runtime/runtime_unix_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -6,7 +10,7 @@
- // We need a fast system call to provoke the race,
- // and Close(-1) is nearly universally fast.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd plan9
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd plan9
-
- package runtime_test
-
- diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go
- index 92143ea..1197598 100644
- --- a/libgo/go/runtime/signal_gccgo.go
- +++ b/libgo/go/runtime/signal_gccgo.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package runtime
-
- diff --git a/libgo/go/runtime/signal_sighandler.go b/libgo/go/runtime/signal_sighandler.go
- index 698629d..c8cce0b 100644
- --- a/libgo/go/runtime/signal_sighandler.go
- +++ b/libgo/go/runtime/signal_sighandler.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package runtime
-
- diff --git a/libgo/go/runtime/signal_unix.go b/libgo/go/runtime/signal_unix.go
- index a8f77fa..b63823b 100644
- --- a/libgo/go/runtime/signal_unix.go
- +++ b/libgo/go/runtime/signal_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package runtime
-
- diff --git a/libgo/go/runtime/testdata/testprog/gc.go b/libgo/go/runtime/testdata/testprog/gc.go
- index 5424517..f7f15c1 100644
- --- a/libgo/go/runtime/testdata/testprog/gc.go
- +++ b/libgo/go/runtime/testdata/testprog/gc.go
- @@ -1,4 +1,8 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -102,10 +106,10 @@ func GCFairness2() {
- // to let all goroutines run, but for now we cycle through
- // them rapidly.
- //
- - // OpenBSD's scheduler makes every usleep() take at least
- - // 20ms, so we need a long time to ensure all goroutines have
- - // run. If they haven't run after 30ms, give it another 1000ms
- - // and check again.
- + // HyperbolaBSD and OpenBSD's scheduler makes every usleep()
- + // take at least 20ms, so we need a long time to ensure all
- + // goroutines have run. If they haven't run after 30ms, give it
- + // another 1000ms and check again.
- time.Sleep(30 * time.Millisecond)
- var fail bool
- for i := range count {
- diff --git a/libgo/go/runtime/testdata/testprognet/signalexec.go b/libgo/go/runtime/testdata/testprognet/signalexec.go
- index 4a988ef..e16f25f 100644
- --- a/libgo/go/runtime/testdata/testprognet/signalexec.go
- +++ b/libgo/go/runtime/testdata/testprognet/signalexec.go
- @@ -1,8 +1,12 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd
-
- // This is in testprognet instead of testprog because testprog
- // must not import anything (like net, but also like os/signal)
- diff --git a/libgo/go/runtime/trace/trace_test.go b/libgo/go/runtime/trace/trace_test.go
- index 997d486..de842f4 100644
- --- a/libgo/go/runtime/trace/trace_test.go
- +++ b/libgo/go/runtime/trace/trace_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -223,6 +227,10 @@ func TestTraceStress(t *testing.T) {
- // Reduce allocation to avoid running out of
- // memory on the builder - see issue/12032.
- n = 512
- + } else if runtime.GOOS == "hyperbolabsd" && runtime.GOARCH == "arm" {
- + // Reduce allocation to avoid running out of
- + // memory on the builder - see issue/12032.
- + n = 512
- }
- for i := 0; i < n; i++ {
- _ = make([]byte, 1<<20)
- @@ -361,6 +369,10 @@ func TestTraceStressStartStop(t *testing.T) {
- // Reduce allocation to avoid running out of
- // memory on the builder - see issue/12032.
- n = 512
- + } else if runtime.GOOS == "hyperbolabsd" && runtime.GOARCH == "arm" {
- + // Reduce allocation to avoid running out of
- + // memory on the builder - see issue/12032.
- + n = 512
- }
- for i := 0; i < n; i++ {
- _ = make([]byte, 1<<20)
- diff --git a/libgo/go/syscall/bpf_bsd.go b/libgo/go/syscall/bpf_bsd.go
- index 8b58755..6889ddc 100644
- --- a/libgo/go/syscall/bpf_bsd.go
- +++ b/libgo/go/syscall/bpf_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- // Berkeley packet filter for BSD variants
-
- diff --git a/libgo/go/syscall/dirent.go b/libgo/go/syscall/dirent.go
- index a09bf05..4e836ee 100644
- --- a/libgo/go/syscall/dirent.go
- +++ b/libgo/go/syscall/dirent.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package syscall
-
- diff --git a/libgo/go/syscall/env_unix.go b/libgo/go/syscall/env_unix.go
- index eb93e2e..7783585 100644
- --- a/libgo/go/syscall/env_unix.go
- +++ b/libgo/go/syscall/env_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- // Unix environment variables.
-
- diff --git a/libgo/go/syscall/exec_bsd.go b/libgo/go/syscall/exec_bsd.go
- index 9115cf0..ec6e71a 100644
- --- a/libgo/go/syscall/exec_bsd.go
- +++ b/libgo/go/syscall/exec_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd netbsd openbsd hyperbolabsd solaris
-
- package syscall
-
- diff --git a/libgo/go/syscall/exec_unix.go b/libgo/go/syscall/exec_unix.go
- index 8d83e91..2598021 100644
- --- a/libgo/go/syscall/exec_unix.go
- +++ b/libgo/go/syscall/exec_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- // Fork, exec, wait, etc.
-
- diff --git a/libgo/go/syscall/exec_unix_test.go b/libgo/go/syscall/exec_unix_test.go
- index 58708da..5f77986 100644
- --- a/libgo/go/syscall/exec_unix_test.go
- +++ b/libgo/go/syscall/exec_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package syscall_test
-
- diff --git a/libgo/go/syscall/export_unix_test.go b/libgo/go/syscall/export_unix_test.go
- index 120500c..e0dc72f 100644
- --- a/libgo/go/syscall/export_unix_test.go
- +++ b/libgo/go/syscall/export_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package syscall
-
- diff --git a/libgo/go/syscall/forkpipe_bsd.go b/libgo/go/syscall/forkpipe_bsd.go
- index d479284..65a8f84 100644
- --- a/libgo/go/syscall/forkpipe_bsd.go
- +++ b/libgo/go/syscall/forkpipe_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly netbsd openbsd solaris
- +// +build aix darwin dragonfly netbsd openbsd hyperbola solaris
-
- package syscall
-
- diff --git a/libgo/go/syscall/libcall_bsd.go b/libgo/go/syscall/libcall_bsd.go
- index 9a4b2d6..bd337bd 100644
- --- a/libgo/go/syscall/libcall_bsd.go
- +++ b/libgo/go/syscall/libcall_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd solaris
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd solaris
-
- // BSD library calls.
-
- diff --git a/libgo/go/syscall/libcall_posix_utimesnano.go b/libgo/go/syscall/libcall_posix_utimesnano.go
- index 372b0d7..62696e8 100644
- --- a/libgo/go/syscall/libcall_posix_utimesnano.go
- +++ b/libgo/go/syscall/libcall_posix_utimesnano.go
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd openbsd netbsd solaris
- +// +build aix darwin dragonfly freebsd hyperbolabsd openbsd netbsd solaris
-
- // General POSIX version of UtimesNano.
-
- diff --git a/libgo/go/syscall/mmap_unix_test.go b/libgo/go/syscall/mmap_unix_test.go
- index d0b3644..92140c9 100644
- --- a/libgo/go/syscall/mmap_unix_test.go
- +++ b/libgo/go/syscall/mmap_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2014 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd
-
- package syscall_test
-
- diff --git a/libgo/go/syscall/route_bsd.go b/libgo/go/syscall/route_bsd.go
- index b364eea..e4b21a0 100644
- --- a/libgo/go/syscall/route_bsd.go
- +++ b/libgo/go/syscall/route_bsd.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd netbsd openbsd
- +// +build darwin dragonfly freebsd netbsd openbsd hyperbolabsd
-
- package syscall
-
- diff --git b/libgo/go/syscall/route_hyperbolabsd.go b/libgo/go/syscall/route_hyperbolabsd.go
- new file mode 100644
- index 0000000..d254531
- --- /dev/null
- +++ b/libgo/go/syscall/route_hyperbolabsd.go
- @@ -0,0 +1,41 @@
- +// Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package syscall
- +
- +import "unsafe"
- +
- +func (any *anyMessage) toRoutingMessage(b []byte) RoutingMessage {
- + switch any.Type {
- + case RTM_ADD, RTM_DELETE, RTM_CHANGE, RTM_GET, RTM_LOSING, RTM_REDIRECT, RTM_MISS, RTM_LOCK, RTM_RESOLVE:
- + p := (*RouteMessage)(unsafe.Pointer(any))
- + // We don't support sockaddr_rtlabel for now.
- + p.Header.Addrs &= RTA_DST | RTA_GATEWAY | RTA_NETMASK | RTA_GENMASK | RTA_IFA | RTA_IFP | RTA_BRD | RTA_AUTHOR | RTA_SRC | RTA_SRCMASK
- + return &RouteMessage{Header: p.Header, Data: b[p.Header.Hdrlen:any.Msglen]}
- + case RTM_IFINFO:
- + p := (*InterfaceMessage)(unsafe.Pointer(any))
- + return &InterfaceMessage{Header: p.Header, Data: b[p.Header.Hdrlen:any.Msglen]}
- + case RTM_IFANNOUNCE:
- + p := (*InterfaceAnnounceMessage)(unsafe.Pointer(any))
- + return &InterfaceAnnounceMessage{Header: p.Header}
- + case RTM_NEWADDR, RTM_DELADDR:
- + p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- + return &InterfaceAddrMessage{Header: p.Header, Data: b[p.Header.Hdrlen:any.Msglen]}
- + }
- + return nil
- +}
- +
- +// InterfaceAnnounceMessage represents a routing message containing
- +// network interface arrival and departure information.
- +//
- +// Deprecated: Use golang.org/x/net/route instead.
- +type InterfaceAnnounceMessage struct {
- + Header IfAnnounceMsghdr
- +}
- +
- +func (m *InterfaceAnnounceMessage) sockaddr() ([]Sockaddr, error) { return nil, nil }
- diff --git a/libgo/go/syscall/sockcmsg_unix.go b/libgo/go/syscall/sockcmsg_unix.go
- index c01602f..a58304c 100644
- --- a/libgo/go/syscall/sockcmsg_unix.go
- +++ b/libgo/go/syscall/sockcmsg_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- // Socket control messages
-
- diff --git a/libgo/go/syscall/socket_bsd.go b/libgo/go/syscall/socket_bsd.go
- index cf3fc4f..d6d98d6 100644
- --- a/libgo/go/syscall/socket_bsd.go
- +++ b/libgo/go/syscall/socket_bsd.go
- @@ -1,10 +1,14 @@
- // socket_bsd.go -- Socket handling specific to *BSD based systems.
-
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd openbsd netbsd
- +// +build darwin dragonfly freebsd hyperbolabsd openbsd netbsd
-
- package syscall
-
- diff --git b/libgo/go/syscall/syscall_hyperbolabsd.go b/libgo/go/syscall/syscall_hyperbolabsd.go
- new file mode 100644
- index 0000000..7e8dadf
- --- /dev/null
- +++ b/libgo/go/syscall/syscall_hyperbolabsd.go
- @@ -0,0 +1,23 @@
- +// Copyright 2009,2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// Use of this source code is governed by a BSD-style
- +// license that can be found in the LICENSE file.
- +
- +package syscall
- +
- +import "unsafe"
- +
- +func direntIno(buf []byte) (uint64, bool) {
- + return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
- +}
- +
- +func direntReclen(buf []byte) (uint64, bool) {
- + return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
- +}
- +
- +func direntNamlen(buf []byte) (uint64, bool) {
- + return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
- +}
- diff --git a/libgo/go/syscall/syscall_unix.go b/libgo/go/syscall/syscall_unix.go
- index 61aa1c4..771aed2 100644
- --- a/libgo/go/syscall/syscall_unix.go
- +++ b/libgo/go/syscall/syscall_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package syscall
-
- diff --git a/libgo/go/syscall/syscall_unix_test.go b/libgo/go/syscall/syscall_unix_test.go
- index 637aece..07fcb73 100644
- --- a/libgo/go/syscall/syscall_unix_test.go
- +++ b/libgo/go/syscall/syscall_unix_test.go
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package syscall_test
-
- diff --git a/libgo/go/syscall/timestruct.go b/libgo/go/syscall/timestruct.go
- index 6ece338..1af1cf9 100644
- --- a/libgo/go/syscall/timestruct.go
- +++ b/libgo/go/syscall/timestruct.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package syscall
-
- diff --git a/libgo/go/time/sys_unix.go b/libgo/go/time/sys_unix.go
- index 3827965..c836c23 100644
- --- a/libgo/go/time/sys_unix.go
- +++ b/libgo/go/time/sys_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris
-
- package time
-
- diff --git a/libgo/go/time/zoneinfo_unix.go b/libgo/go/time/zoneinfo_unix.go
- index 32dc7d5..840a95f 100644
- --- a/libgo/go/time/zoneinfo_unix.go
- +++ b/libgo/go/time/zoneinfo_unix.go
- @@ -1,8 +1,12 @@
- // Copyright 2009 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin,386 darwin,amd64 dragonfly freebsd linux,!android nacl netbsd openbsd solaris
- +// +build aix darwin,386 darwin,amd64 dragonfly freebsd linux,!android nacl netbsd openbsd hyperbolabsd solaris
-
- // Parse "zoneinfo" time zone file.
- // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.
- diff --git a/libgo/match.sh b/libgo/match.sh
- index 9247ec6..7d68729 100755
- --- a/libgo/match.sh
- +++ b/libgo/match.sh
- @@ -1,6 +1,10 @@
- #!/bin/sh
-
- # Copyright 2016 The Go Authors. All rights reserved.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # Use of this source code is governed by a BSD-style
- # license that can be found in the LICENSE file.
-
- @@ -113,7 +117,7 @@ for f in $gofiles; do
- "") ;;
- $goarch) ;;
- $goos) ;;
- - aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
- + aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | hyperbolabsd | plan9 | solaris | windows)
- tag1=nonmatchingtag
- ;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
- @@ -125,7 +129,7 @@ for f in $gofiles; do
- "") ;;
- $goarch) ;;
- $goos) ;;
- - aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
- + aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | hyperbolabsd | plan9 | solaris | windows)
- tag2=nonmatchingtag
- ;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
- diff --git a/libgo/misc/cgo/test/basic.go b/libgo/misc/cgo/test/basic.go
- index 3ceb4ce..879be07 100644
- --- a/libgo/misc/cgo/test/basic.go
- +++ b/libgo/misc/cgo/test/basic.go
- @@ -1,4 +1,8 @@
- // Copyright 2010 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -125,6 +129,11 @@ func testMultipleAssign(t *testing.T) {
- if (n != 0 && n != 239089) || m != 234 {
- t.Fatal("Strtol x2: ", n, m)
- }
- + } else if runtime.GOOS == "hyperbolabsd" {
- + // Bug in HyperbolaBSD strtol(3) - base > 36 succeeds.
- + if (n != 0 && n != 239089) || m != 234 {
- + t.Fatal("Strtol x2: ", n, m)
- + }
- } else if n != 0 || m != 234 {
- t.Fatal("Strtol x2: ", n, m)
- }
- diff --git a/libgo/misc/cgo/test/cgo_thread_lock.go b/libgo/misc/cgo/test/cgo_thread_lock.go
- index b105068..a84b49e 100644
- --- a/libgo/misc/cgo/test/cgo_thread_lock.go
- +++ b/libgo/misc/cgo/test/cgo_thread_lock.go
- @@ -1,8 +1,12 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build linux,freebsd,openbsd
- +// +build linux,freebsd,openbsd,hyperbolabsd
-
- package cgotest
-
- diff --git a/libgo/misc/cgo/test/cthread_unix.c b/libgo/misc/cgo/test/cthread_unix.c
- index 247d636..1c0877c 100644
- --- a/libgo/misc/cgo/test/cthread_unix.c
- +++ b/libgo/misc/cgo/test/cthread_unix.c
- @@ -1,8 +1,12 @@
- // Copyright 2013 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build aix darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- #include <pthread.h>
- #include "_cgo_export.h"
- diff --git a/libgo/misc/cgo/test/issue18146.go b/libgo/misc/cgo/test/issue18146.go
- index a58aa1b..2d77c8e 100644
- --- a/libgo/misc/cgo/test/issue18146.go
- +++ b/libgo/misc/cgo/test/issue18146.go
- @@ -1,4 +1,8 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -48,7 +52,7 @@ func test18146(t *testing.T) {
- setNproc = false
- case "linux":
- nproc = 6
- - case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd":
- + case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "hyperbolabsd":
- nproc = 7
- case "aix":
- nproc = 9
- @@ -97,7 +101,7 @@ func test18146(t *testing.T) {
- if err := cmd.Start(); err != nil {
- // We are starting so many processes that on
- // some systems (problem seen on Darwin,
- - // Dragonfly, OpenBSD) the fork call will fail
- + // Dragonfly, OpenBSD, HyperbolaBSD) the fork call will fail
- // with EAGAIN.
- if pe, ok := err.(*os.PathError); ok {
- err = pe.Err
- diff --git a/libgo/misc/cgo/testcarchive/carchive_test.go b/libgo/misc/cgo/testcarchive/carchive_test.go
- index 4a8cc0f..6028b6c 100644
- --- a/libgo/misc/cgo/testcarchive/carchive_test.go
- +++ b/libgo/misc/cgo/testcarchive/carchive_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2016 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -91,7 +95,7 @@ func init() {
- if GOARCH == "arm" || GOARCH == "arm64" {
- libgodir += "_shared"
- }
- - case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- libgodir += "_shared"
- }
- }
- diff --git a/libgo/misc/cgo/testcshared/cshared_test.go b/libgo/misc/cgo/testcshared/cshared_test.go
- index e43422d..c54e5e9 100644
- --- a/libgo/misc/cgo/testcshared/cshared_test.go
- +++ b/libgo/misc/cgo/testcshared/cshared_test.go
- @@ -1,4 +1,8 @@
- // Copyright 2017 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -115,7 +119,7 @@ func TestMain(m *testing.M) {
- if GOARCH == "arm" || GOARCH == "arm64" {
- libgodir += "_shared"
- }
- - case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
- + case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "hyperbolabsd", "solaris":
- libgodir += "_shared"
- }
- cc = append(cc, "-I", filepath.Join("pkg", libgodir))
- diff --git a/libgo/misc/cgo/testcshared/src/libgo2/dup2.go b/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
- index d343aa5..6850d9f 100644
- --- a/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
- +++ b/libgo/misc/cgo/testcshared/src/libgo2/dup2.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux,!arm64,!riscv64 netbsd openbsd
- +// +build darwin dragonfly freebsd linux,!arm64,!riscv64 netbsd openbsd hyperbolabsd
-
- package main
-
- diff --git a/libgo/misc/cgo/testcshared/src/libgo2/libgo2.go b/libgo/misc/cgo/testcshared/src/libgo2/libgo2.go
- index e57c93b..2b989b5 100644
- --- a/libgo/misc/cgo/testcshared/src/libgo2/libgo2.go
- +++ b/libgo/misc/cgo/testcshared/src/libgo2/libgo2.go
- @@ -1,8 +1,12 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux netbsd openbsd solaris
- +// +build darwin dragonfly freebsd linux netbsd openbsd hyperbolabsd solaris
-
- package main
-
- diff --git a/libgo/misc/cgo/testso/cgoso.go b/libgo/misc/cgo/testso/cgoso.go
- index 29814fa..23e9a97 100644
- --- a/libgo/misc/cgo/testso/cgoso.go
- +++ b/libgo/misc/cgo/testso/cgoso.go
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -10,6 +14,7 @@ package cgosotest
- #cgo linux LDFLAGS: -L. -lcgosotest
- #cgo dragonfly LDFLAGS: -L. -l cgosotest
- #cgo freebsd LDFLAGS: -L. -l cgosotest
- +#cgo hyperbolabsd LDFLAGS: -L. -l cgosotest
- #cgo openbsd LDFLAGS: -L. -l cgosotest
- #cgo solaris LDFLAGS: -L. -lcgosotest
- #cgo netbsd LDFLAGS: -L. libcgosotest.so
- diff --git a/libgo/misc/cgo/testso/cgoso_c.c b/libgo/misc/cgo/testso/cgoso_c.c
- index 7a38022..3f8de46 100644
- --- a/libgo/misc/cgo/testso/cgoso_c.c
- +++ b/libgo/misc/cgo/testso/cgoso_c.c
- @@ -1,4 +1,8 @@
- // Copyright 2011 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -19,8 +23,8 @@ extern void goCallback(void);
- void setCallback(void *f) { (void)f; }
- #endif
-
- -// OpenBSD and older Darwin lack TLS support
- -#if !defined(__OpenBSD__) && !defined(__APPLE__)
- +// OpenBSD, HyperbolaBSD and older Darwin lack TLS support
- +#if !defined(__OpenBSD__) && !defined(__HyperbolaBSD__) && !defined(__APPLE__)
- __thread int tlsvar = 12345;
- #endif
-
- diff --git a/libgo/misc/cgo/testsovar/cgoso.go b/libgo/misc/cgo/testsovar/cgoso.go
- index 88d44c2..01152a3 100644
- --- a/libgo/misc/cgo/testsovar/cgoso.go
- +++ b/libgo/misc/cgo/testsovar/cgoso.go
- @@ -1,4 +1,8 @@
- // Copyright 2015 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- @@ -14,6 +18,7 @@ package cgosotest
- #cgo linux LDFLAGS: -L. -lcgosotest
- #cgo dragonfly LDFLAGS: -L. -l cgosotest
- #cgo freebsd LDFLAGS: -L. -l cgosotest
- +#cgo hyperbolabsd LDFLAGS: -L. -l cgosotest
- #cgo openbsd LDFLAGS: -L. -l cgosotest
- #cgo solaris LDFLAGS: -L. -lcgosotest
- #cgo netbsd LDFLAGS: -L. libcgosotest.so
- diff --git a/libgo/runtime/env_posix.c b/libgo/runtime/env_posix.c
- index 8cffa73..f958b4f 100644
- --- a/libgo/runtime/env_posix.c
- +++ b/libgo/runtime/env_posix.c
- @@ -1,8 +1,12 @@
- // Copyright 2012 The Go Authors. All rights reserved.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
- +// +build darwin dragonfly freebsd linux nacl netbsd openbsd hyperbolabsd solaris windows
-
- #include "runtime.h"
- #include "array.h"
- diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
- index 434c26d..8be4ef7 100755
- --- a/libgo/testsuite/gotest
- +++ b/libgo/testsuite/gotest
- @@ -1,5 +1,9 @@
- #!/bin/sh
- # Copyright 2009 The Go Authors. All rights reserved.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # Use of this source code is governed by a BSD-style
- # license that can be found in the LICENSE file.
-
- @@ -311,7 +315,7 @@ x)
- "") ;;
- $goarch) ;;
- $goos) ;;
- - aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
- + aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | hyperbolabsd | plan9 | solaris | windows)
- tag1=nonmatchingtag
- ;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
- @@ -323,7 +327,7 @@ x)
- "") ;;
- $goarch) ;;
- $goos) ;;
- - aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | plan9 | solaris | windows)
- + aix | android | darwin | dragonfly | freebsd | linux | nacl | netbsd | openbsd | hyperbolabsd | plan9 | solaris | windows)
- tag2=nonmatchingtag
- ;;
- 386 | amd64 | amd64p32 | arm | armbe | arm64 | arm64be | alpha | ia64 | m68k | ppc64 | ppc64le | mips | mipsle | mips64 | mips64le | mips64p32 | mips64p32le | ppc | riscv64 | s390 | s390x | sh | shbe | sparc | sparc64)
- diff --git a/libgomp/configure b/libgomp/configure
- index b731d04..c08a29c 100755
- --- a/libgomp/configure
- +++ b/libgomp/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5448,7 +5451,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5886,6 +5889,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9022,6 +9029,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9608,6 +9620,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10595,6 +10619,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12882,6 +12916,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs_FC=no
- @@ -13416,6 +13455,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_FC=yes
- + hardcode_shlibpath_var_FC=no
- + hardcode_direct_absolute_FC=yes
- + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_FC=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec_FC='-L$libdir'
- hardcode_minus_L_FC=yes
- @@ -14229,6 +14280,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libhsail-rt/configure b/libhsail-rt/configure
- index a4fcc10..4871b35 100755
- --- a/libhsail-rt/configure
- +++ b/libhsail-rt/configure
- @@ -8,6 +8,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5265,7 +5268,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5703,6 +5706,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8838,6 +8845,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9424,6 +9436,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10411,6 +10435,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12389,6 +12423,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13087,7 +13133,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14071,6 +14117,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libitm/configure b/libitm/configure
- index dbf386d..5f34589 100644
- --- a/libitm/configure
- +++ b/libitm/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -6086,7 +6089,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6524,6 +6527,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9661,6 +9668,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -10247,6 +10259,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -11234,6 +11258,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -13212,6 +13246,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13910,7 +13956,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14894,6 +14940,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libitm/configure.tgt b/libitm/configure.tgt
- index 0cbb097..4b07b4a 100644
- --- a/libitm/configure.tgt
- +++ b/libitm/configure.tgt
- @@ -1,5 +1,8 @@
- # -*- shell-script -*-
- # Copyright (C) 2011-2018 Free Software Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- @@ -140,8 +143,10 @@ case "${target}" in
-
- *-*-gnu* | *-*-k*bsd*-gnu \
- | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
- + | *-*-hyperbolabsd* \
- | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
- - | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
- + | *-*-darwin* | *-*-aix* | *-*-dragonfly*
- + | *-*-hyperbolabsd*)
- # POSIX system. The OS is supported.
- ;;
-
- diff --git a/libmpx/configure b/libmpx/configure
- index 7085659..783110c 100644
- --- a/libmpx/configure
- +++ b/libmpx/configure
- @@ -8,6 +8,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5798,7 +5801,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6236,6 +6239,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9101,6 +9108,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9687,6 +9699,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10674,6 +10698,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libobjc/configure b/libobjc/configure
- index d1a032f..bdd1f00 100755
- --- a/libobjc/configure
- +++ b/libobjc/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -4904,7 +4907,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5339,6 +5342,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8520,6 +8527,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9115,6 +9127,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10105,6 +10129,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/liboffloadmic/configure b/liboffloadmic/configure
- index f873716..b5a40de 100644
- --- a/liboffloadmic/configure
- +++ b/liboffloadmic/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5669,7 +5672,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6107,6 +6110,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8973,6 +8980,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9559,6 +9571,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10546,6 +10570,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12524,6 +12558,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13222,7 +13268,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14206,6 +14252,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure
- index c031eb3..80033fd 100644
- --- a/liboffloadmic/plugin/configure
- +++ b/liboffloadmic/plugin/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5107,7 +5110,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5545,6 +5548,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8680,6 +8687,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9266,6 +9278,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10253,6 +10277,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -12231,6 +12265,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -12929,7 +12975,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -13913,6 +13959,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libquadmath/configure b/libquadmath/configure
- index 14610d6..bb1fecc 100755
- --- a/libquadmath/configure
- +++ b/libquadmath/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5102,7 +5105,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5540,6 +5543,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8413,6 +8420,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9008,6 +9020,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -9998,6 +10022,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libsanitizer/configure b/libsanitizer/configure
- index 4695bc7..79c8df9 100755
- --- a/libsanitizer/configure
- +++ b/libsanitizer/configure
- @@ -8,6 +8,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -6598,7 +6601,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -7036,6 +7039,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9902,6 +9909,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -10488,6 +10500,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -11475,6 +11499,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -13453,6 +13487,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -14151,7 +14197,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -15135,6 +15181,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libssp/configure b/libssp/configure
- index 4e88e49..ca2ca79 100755
- --- a/libssp/configure
- +++ b/libssp/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -5286,7 +5289,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5724,6 +5727,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8597,6 +8604,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9192,6 +9204,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10182,6 +10206,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
- index b380a26..5b320c3 100644
- --- a/libstdc++-v3/acinclude.m4
- +++ b/libstdc++-v3/acinclude.m4
- @@ -1431,7 +1431,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
- ac_has_nanosleep=yes
- ac_has_sched_yield=yes
- ;;
- - openbsd*)
- + openbsd*|hyperbolabsd*)
- ac_has_clock_monotonic=yes
- ac_has_clock_realtime=yes
- ac_has_nanosleep=yes
- @@ -2422,7 +2422,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- dragonfly* | freebsd*)
- enable_clocale_flag=dragonfly
- ;;
- - openbsd*)
- + openbsd* | hyperbolabsd*)
- enable_clocale_flag=newlib
- ;;
- *)
- @@ -4290,7 +4290,7 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [
- fi
- if test x"$enable_libstdcxx_filesystem_ts" = x"auto"; then
- case "${target_os}" in
- - freebsd*|netbsd*|openbsd*|dragonfly*|darwin*)
- + freebsd*|netbsd*|openbsd*|dragonfly*|darwin*|hyperbolabsd*)
- enable_libstdcxx_filesystem_ts=yes
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- diff --git b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_base.h b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_base.h
- new file mode 100644
- index 0000000..ad427d0
- --- /dev/null
- +++ b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_base.h
- @@ -0,0 +1,65 @@
- +// Locale support -*- C++ -*-
- +
- +// Copyright (C) 2000-2018 Free Software Foundation, Inc.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// This file is part of the GNU ISO C++ Library. This library is free
- +// software; you can redistribute it and/or modify it under the
- +// terms of the GNU General Public License as published by the
- +// Free Software Foundation; either version 3, or (at your option)
- +// any later version.
- +
- +// This library is distributed in the hope that it will be useful,
- +// but WITHOUT ANY WARRANTY; without even the implied warranty of
- +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +// GNU General Public License for more details.
- +
- +// Under Section 7 of GPL version 3, you are granted additional
- +// permissions described in the GCC Runtime Library Exception, version
- +// 3.1, as published by the Free Software Foundation.
- +
- +// You should have received a copy of the GNU General Public License and
- +// a copy of the GCC Runtime Library Exception along with this program;
- +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- +// <http://www.gnu.org/licenses/>.
- +
- +//
- +// ISO C++ 14882: 22.1 Locales
- +//
- +
- +// Information as gleaned from /usr/include/ctype.h on HyperbolaBSD.
- +
- +namespace std _GLIBCXX_VISIBILITY(default)
- +{
- +_GLIBCXX_BEGIN_NAMESPACE_VERSION
- +
- + /// @brief Base class for ctype.
- + struct ctype_base
- + {
- + // Non-standard typedefs.
- + typedef const short* __to_type;
- +
- + // NB: Offsets into ctype<char>::_M_table force a particular size
- + // on the mask type. Because of this, we don't use an enum.
- + typedef char mask;
- +
- + static const mask upper = _U;
- + static const mask lower = _L;
- + static const mask alpha = _U | _L;
- + static const mask digit = _N;
- + static const mask xdigit = _N | _X;
- + static const mask space = _S;
- + static const mask print = _P | _U | _L | _N | _B;
- + static const mask graph = _P | _U | _L | _N;
- + static const mask cntrl = _C;
- + static const mask punct = _P;
- + static const mask alnum = _U | _L | _N;
- +#if __cplusplus >= 201103L
- + static const mask blank = space;
- +#endif
- + };
- +
- +_GLIBCXX_END_NAMESPACE_VERSION
- +} // namespace
- diff --git b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_configure_char.cc b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_configure_char.cc
- new file mode 100644
- index 0000000..bfbbce9
- --- /dev/null
- +++ b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_configure_char.cc
- @@ -0,0 +1,102 @@
- +// Locale support -*- C++ -*-
- +
- +// Copyright (C) 2011-2018 Free Software Foundation, Inc.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// This file is part of the GNU ISO C++ Library. This library is free
- +// software; you can redistribute it and/or modify it under the
- +// terms of the GNU General Public License as published by the
- +// Free Software Foundation; either version 3, or (at your option)
- +// any later version.
- +
- +// This library is distributed in the hope that it will be useful,
- +// but WITHOUT ANY WARRANTY; without even the implied warranty of
- +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +// GNU General Public License for more details.
- +
- +// Under Section 7 of GPL version 3, you are granted additional
- +// permissions described in the GCC Runtime Library Exception, version
- +// 3.1, as published by the Free Software Foundation.
- +
- +// You should have received a copy of the GNU General Public License and
- +// a copy of the GCC Runtime Library Exception along with this program;
- +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- +// <http://www.gnu.org/licenses/>.
- +
- +/** @file ctype_configure_char.cc */
- +
- +//
- +// ISO C++ 14882: 22.1 Locales
- +//
- +
- +#include <locale>
- +#include <cstdlib>
- +#include <cstring>
- +
- +namespace std _GLIBCXX_VISIBILITY(default)
- +{
- +_GLIBCXX_BEGIN_NAMESPACE_VERSION
- +
- +// Information as gleaned from /usr/include/ctype.h
- +
- + const ctype_base::mask*
- + ctype<char>::classic_table() throw()
- + { return _ctype_ + 1; }
- +
- + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
- + size_t __refs)
- + : facet(__refs), _M_del(__table != 0 && __del),
- + _M_toupper(NULL), _M_tolower(NULL),
- + _M_table(__table ? __table : classic_table())
- + {
- + memset(_M_widen, 0, sizeof(_M_widen));
- + _M_widen_ok = 0;
- + memset(_M_narrow, 0, sizeof(_M_narrow));
- + _M_narrow_ok = 0;
- + }
- +
- + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- + : facet(__refs), _M_del(__table != 0 && __del),
- + _M_toupper(NULL), _M_tolower(NULL),
- + _M_table(__table ? __table : classic_table())
- + {
- + memset(_M_widen, 0, sizeof(_M_widen));
- + _M_widen_ok = 0;
- + memset(_M_narrow, 0, sizeof(_M_narrow));
- + _M_narrow_ok = 0;
- + }
- +
- + char
- + ctype<char>::do_toupper(char __c) const
- + { return ::toupper((int) __c); }
- +
- + const char*
- + ctype<char>::do_toupper(char* __low, const char* __high) const
- + {
- + while (__low < __high)
- + {
- + *__low = ::toupper((int) *__low);
- + ++__low;
- + }
- + return __high;
- + }
- +
- + char
- + ctype<char>::do_tolower(char __c) const
- + { return ::tolower((int) __c); }
- +
- + const char*
- + ctype<char>::do_tolower(char* __low, const char* __high) const
- + {
- + while (__low < __high)
- + {
- + *__low = ::tolower((int) *__low);
- + ++__low;
- + }
- + return __high;
- + }
- +
- +_GLIBCXX_END_NAMESPACE_VERSION
- +} // namespace
- diff --git b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_inline.h
- new file mode 100644
- index 0000000..76654b3
- --- /dev/null
- +++ b/libstdc++-v3/config/os/bsd/hyperbolabsd/ctype_inline.h
- @@ -0,0 +1,77 @@
- +// Locale support -*- C++ -*-
- +
- +// Copyright (C) 2010-2018 Free Software Foundation, Inc.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// This file is part of the GNU ISO C++ Library. This library is free
- +// software; you can redistribute it and/or modify it under the
- +// terms of the GNU General Public License as published by the
- +// Free Software Foundation; either version 3, or (at your option)
- +// any later version.
- +
- +// This library is distributed in the hope that it will be useful,
- +// but WITHOUT ANY WARRANTY; without even the implied warranty of
- +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +// GNU General Public License for more details.
- +
- +// Under Section 7 of GPL version 3, you are granted additional
- +// permissions described in the GCC Runtime Library Exception, version
- +// 3.1, as published by the Free Software Foundation.
- +
- +// You should have received a copy of the GNU General Public License and
- +// a copy of the GCC Runtime Library Exception along with this program;
- +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- +// <http://www.gnu.org/licenses/>.
- +
- +/** @file bits/ctype_inline.h
- + * This is an internal header file, included by other library headers.
- + * Do not attempt to use it directly. @headername{locale}
- + */
- +
- +//
- +// ISO C++ 14882: 22.1 Locales
- +//
- +
- +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
- +// functions go in ctype.cc
- +
- +namespace std _GLIBCXX_VISIBILITY(default)
- +{
- +_GLIBCXX_BEGIN_NAMESPACE_VERSION
- +
- + bool
- + ctype<char>::
- + is(mask __m, char __c) const
- + { return _M_table[static_cast<unsigned char>(__c)] & __m; }
- +
- + const char*
- + ctype<char>::
- + is(const char* __low, const char* __high, mask* __vec) const
- + {
- + while (__low < __high)
- + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
- + return __high;
- + }
- +
- + const char*
- + ctype<char>::
- + scan_is(mask __m, const char* __low, const char* __high) const
- + {
- + while (__low < __high && !this->is(__m, *__low))
- + ++__low;
- + return __low;
- + }
- +
- + const char*
- + ctype<char>::
- + scan_not(mask __m, const char* __low, const char* __high) const
- + {
- + while (__low < __high && this->is(__m, *__low) != 0)
- + ++__low;
- + return __low;
- + }
- +
- +_GLIBCXX_END_NAMESPACE_VERSION
- +} // namespace
- diff --git b/libstdc++-v3/config/os/bsd/hyperbolabsd/os_defines.h b/libstdc++-v3/config/os/bsd/hyperbolabsd/os_defines.h
- new file mode 100644
- index 0000000..9a34bdf
- --- /dev/null
- +++ b/libstdc++-v3/config/os/bsd/hyperbolabsd/os_defines.h
- @@ -0,0 +1,44 @@
- +// Specific definitions for HyperbolaBSD -*- C++ -*-
- +
- +// Copyright (C) 2000-2018 Free Software Foundation, Inc.
- +//
- +// Modifications to support HyperbolaBSD:
- +// Copyright (C) 2020-2024 Hyperbola Project
- +//
- +// This file is part of the GNU ISO C++ Library. This library is free
- +// software; you can redistribute it and/or modify it under the
- +// terms of the GNU General Public License as published by the
- +// Free Software Foundation; either version 3, or (at your option)
- +// any later version.
- +
- +// This library is distributed in the hope that it will be useful,
- +// but WITHOUT ANY WARRANTY; without even the implied warranty of
- +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- +// GNU General Public License for more details.
- +
- +// Under Section 7 of GPL version 3, you are granted additional
- +// permissions described in the GCC Runtime Library Exception, version
- +// 3.1, as published by the Free Software Foundation.
- +
- +// You should have received a copy of the GNU General Public License and
- +// a copy of the GCC Runtime Library Exception along with this program;
- +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- +// <http://www.gnu.org/licenses/>.
- +
- +/** @file bits/os_defines.h
- + * This is an internal header file, included by other library headers.
- + * Do not attempt to use it directly. @headername{iosfwd}
- + */
- +
- +#ifndef _GLIBCXX_OS_DEFINES
- +#define _GLIBCXX_OS_DEFINES 1
- +
- +// System-specific #define, typedefs, corrections, etc, go here. This
- +// file will come before all others.
- +
- +#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
- +#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC _GLIBCXX_USE_C99_DYNAMIC
- +#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC _GLIBCXX_USE_C99_DYNAMIC
- +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC _GLIBCXX_USE_C99_DYNAMIC
- +
- +#endif
- diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
- index 61457e9..fb86e32 100755
- --- a/libstdc++-v3/configure
- +++ b/libstdc++-v3/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -6208,7 +6211,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6646,6 +6649,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9648,6 +9655,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -10243,6 +10255,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -11233,6 +11257,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -13232,6 +13266,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -13930,7 +13976,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -14917,6 +14963,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -16053,7 +16109,7 @@ fi
- dragonfly* | freebsd*)
- enable_clocale_flag=dragonfly
- ;;
- - openbsd*)
- + openbsd* | hyperbolabsd*)
- enable_clocale_flag=newlib
- ;;
- *)
- @@ -20814,7 +20870,7 @@ fi
- ac_has_nanosleep=yes
- ac_has_sched_yield=yes
- ;;
- - openbsd*)
- + openbsd*|hyperbolabsd*)
- ac_has_clock_monotonic=yes
- ac_has_clock_realtime=yes
- ac_has_nanosleep=yes
- @@ -80288,7 +80344,7 @@ $as_echo_n "checking whether to build Filesystem TS support... " >&6; }
- fi
- if test x"$enable_libstdcxx_filesystem_ts" = x"auto"; then
- case "${target_os}" in
- - freebsd*|netbsd*|openbsd*|dragonfly*|darwin*)
- + freebsd*|netbsd*|openbsd*|dragonfly*|darwin*|hyperbolabsd*)
- enable_libstdcxx_filesystem_ts=yes
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
- index 155a3cd..5417d5e 100644
- --- a/libstdc++-v3/configure.host
- +++ b/libstdc++-v3/configure.host
- @@ -295,6 +295,9 @@ case "${host_os}" in
- openbsd*)
- os_include_dir="os/bsd/openbsd"
- ;;
- + hyperbolabsd*)
- + os_include_dir="os/bsd/hyperbolabsd"
- + ;;
- qnx6.[12]*)
- os_include_dir="os/qnx/qnx6.1"
- c_model=c
- diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html
- index a7c8c30..4812224 100644
- --- a/libstdc++-v3/doc/html/manual/configure.html
- +++ b/libstdc++-v3/doc/html/manual/configure.html
- @@ -57,9 +57,9 @@
- to guess the most suitable package from the choices above. The
- default is 'generic'. On glibc-based systems of sufficient
- vintage (2.3 and newer), 'gnu' is automatically selected. On newlib-based
- - systems (<code class="code">'--with_newlib=yes'</code>) and OpenBSD, 'newlib' is
- - automatically selected. On Mac OS X 'darwin' is automatically selected.
- - This option can change the library ABI.
- + systems (<code class="code">'--with_newlib=yes'</code>), HyperbolaBSD and OpenBSD,
- + 'newlib' is automatically selected. On Mac OS X 'darwin' is automatically
- + selected. This option can change the library ABI.
- </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator</code></span></dt><dd><p>This is an abbreviated form of
- <code class="code">'--enable-libstdcxx-allocator=auto'</code> (described
- next).
- @@ -250,4 +250,4 @@
- as the usual libstdc++ and libsupc++ libraries. This is enabled by
- default on select POSIX targets where it is known to work and disabled
- otherwise.
- - </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
- \ No newline at end of file
- + </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
- diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml
- index 761ef5c..7629187 100644
- --- a/libstdc++-v3/doc/xml/manual/configure.xml
- +++ b/libstdc++-v3/doc/xml/manual/configure.xml
- @@ -103,9 +103,9 @@
- to guess the most suitable package from the choices above. The
- default is 'generic'. On glibc-based systems of sufficient
- vintage (2.3 and newer), 'gnu' is automatically selected. On newlib-based
- - systems (<code>'--with_newlib=yes'</code>) and OpenBSD, 'newlib' is
- - automatically selected. On Mac OS X 'darwin' is automatically selected.
- - This option can change the library ABI.
- + systems (<code>'--with_newlib=yes'</code>), HyperbolaBSD and OpenBSD,
- + 'newlib' is automatically selected. On Mac OS X 'darwin' is automatically
- + selected. This option can change the library ABI.
- </para>
- </listitem></varlistentry>
-
- diff --git a/libtool.m4 b/libtool.m4
- index 24d13f3..6e6e499 100644
- --- a/libtool.m4
- +++ b/libtool.m4
- @@ -4,6 +4,9 @@
- # 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- # Written by Gordon Matzigkeit, 1996
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is free software; the Free Software Foundation gives
- # unlimited permission to copy and/or distribute it, with or without
- # modifications, as long as this notice is preserved.
- @@ -13,6 +16,9 @@ m4_define([_LT_COPYING], [dnl
- # 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
- # Written by Gordon Matzigkeit, 1996
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This file is part of GNU Libtool.
- #
- # GNU Libtool is free software; you can redistribute it and/or
- @@ -1513,7 +1519,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -2557,6 +2563,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -3119,6 +3135,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -3798,7 +3818,7 @@ m4_if([$1], [CXX], [
- ;;
- esac
- ;;
- - netbsd*)
- + netbsd* | hyperbolabsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- @@ -4534,6 +4554,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- @@ -4996,6 +5021,18 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + _LT_TAGVAR(hardcode_direct, $1)=yes
- + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- + else
- + _LT_TAGVAR(ld_shlibs, $1)=no
- + fi
- + ;;
- +
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- @@ -6150,6 +6187,18 @@ if test "$_lt_caught_CXX_error" != yes; then
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + _LT_TAGVAR(hardcode_direct, $1)=yes
- + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- + else
- + _LT_TAGVAR(ld_shlibs, $1)=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- diff --git a/libvtv/configure b/libvtv/configure
- index a197f75..7b2c3b2 100755
- --- a/libvtv/configure
- +++ b/libvtv/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -6629,7 +6632,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -7067,6 +7070,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -10519,6 +10526,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -11506,6 +11525,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- @@ -13484,6 +13513,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct_CXX=yes
- + hardcode_shlibpath_var_CXX=no
- + hardcode_direct_absolute_CXX=yes
- + archive_cmds_CXX='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- + else
- + ld_shlibs_CXX=no
- + fi
- + ;;
- +
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- @@ -15166,6 +15207,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/ltmain.sh b/ltmain.sh
- index 9503ec8..304bd35 100644
- --- a/ltmain.sh
- +++ b/ltmain.sh
- @@ -5,6 +5,10 @@
-
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
- # 2007, 2008, 2009 Free Software Foundation, Inc.
- +#
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This is free software; see the source for copying conditions. There is NO
- # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- @@ -4741,7 +4745,7 @@ func_mode_link ()
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- @@ -4764,7 +4768,7 @@ func_mode_link ()
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- @@ -6703,7 +6707,7 @@ func_mode_link ()
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- + *-*-openbsd* | *-*-hyperbolabsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- diff --git a/lto-plugin/configure b/lto-plugin/configure
- index 7843cd7..25d561b 100755
- --- a/lto-plugin/configure
- +++ b/lto-plugin/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -6029,7 +6032,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -6467,6 +6470,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -9334,6 +9341,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -9920,6 +9932,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -10907,6 +10931,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- diff --git a/zlib/configure b/zlib/configure
- index ee5527c..432dd1a 100755
- --- a/zlib/configure
- +++ b/zlib/configure
- @@ -6,6 +6,9 @@
- # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
- # Foundation, Inc.
- #
- +# Modifications to support HyperbolaBSD:
- +# Copyright (C) 2020-2024 Hyperbola Project
- +#
- # This configure script is free software; the Free Software Foundation
- # gives unlimited permission to copy, distribute and modify it.
- ## -------------------- ##
- @@ -4664,7 +4667,7 @@ else
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | hyperbolabsd*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- @@ -5102,6 +5105,10 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- + ;;
- +
- osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
- @@ -8244,6 +8251,11 @@ _LT_EOF
- fi
- ;;
-
- + hyperbolabsd*)
- + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- + ;;
- +
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- @@ -8839,6 +8851,18 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- ;;
-
- + hyperbolabsd*)
- + if test -f /usr/libexec/ld.so || test -f /libexec/ld.so; then
- + hardcode_direct=yes
- + hardcode_shlibpath_var=no
- + hardcode_direct_absolute=yes
- + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- + hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- + else
- + ld_shlibs=no
- + fi
- + ;;
- +
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- @@ -9829,6 +9853,16 @@ openbsd*)
- fi
- ;;
-
- +hyperbolabsd*)
- + version_type=sunos
- + need_lib_prefix=no
- + need_version=no
- + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- + shlibpath_var=LD_LIBRARY_PATH
- + shlibpath_overrides_runpath=yes
- + ;;
- +
- os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
|