Please see also the Linux GCC-FAQ, available in HTML format by FTP from www.mrc-apu.cam.ac.uk in /pub/linux/GCC-FAQ.html.
Genika ta programmata se ena unix susthma xreiazontai liges allages gia na metafer8oun se ena allo unix. Apla akoloy8hste tis odhgies egkatastashs. Ean den jerete pws na apanthsete se merikes erwthseis kata thn diadikasia ths egkatastashs mporeite na mantecete apla, alla ayth h antimetwpish mporei na odhghsei se programmata me bugs. Se aythn thn periptwsh to kalutero poy exete na kanete einai na balete kapoion allon na kanei to porting toy programmatos gia esas.
Ean exete programmata apo to bsd prepei na dokimasete na xrhsimopoihsete sta katallhla shmeia twn grammwn toy compile tis parametroys: -I/usr/include/bsd kai -lbsd
To ld.so einai o dynamic libary loader. Ka8e dyadiko arxeio poy xrhsimopoiei shared libraries paliotera eixe peripoy 3K kwdika sthn arxh toy, poy to boh8ouse sthn aneuresh kai to fortwma twn shared libraries. Twra aytos o kwdikas exei topo8eth8ei se mia eidikh shared library, /lib/ld.so, opoy kai ola ta dyadika arxeia mporoun na ton broyn. Etsi ta binaries spataloun ligotero xwro ston disko kai mporoun na anaba8mistoun eykolotera.
Mporei kaneis na to katebasei apo to tsx-11.mit.edu apo to directory /pub/linux/packages/GCC kai sta mirror site toy. Th stigmh poy grafetai ayto to faq h teleytaia version toy ld.so einai h ld.so.1.7.11.tar.gz. Enw to /lib/ld-linux.so.1 einai to idio pragma gia ta ELF binaries kai phgainei me to idio paketo me ton a.out loader.
Prwta ap'ola, koitajte sto Linux Software Map (LSM) -- einai sto directory docs sto sunsite.unc.edu, kai se alla ftp sites. Mia mhxanh anazhthshs einai dia8esimh ston web server http://www.boutell.com/lsm.
Elegjte ta ftp sites (deite to Q2.5 'Pou mporw na brw programmata gia to linux mesw ftp ;') prwta -- elegjte ta find-ls h index arxeia gia ta katallhla strings. Elegjte kai to Linux Projects Map (LPM), sto ftp.ix.de sto /pub/Linux/docs/Projects-Map.gz.
Ean den breite tipota, mporeite h na katebasete ton kwdika toy programmatos kai na ton kanete compile monoi sas -- deite to Q5.1 'Pws mporw na metaferw ena programma sto Linux ;' -- h, ean einai megalo paketo poy mporei na xreiazetai allages ston kwdika, steilte ena mhnyma sto newsgroup : comp.os.linux.development.apps.
Ean kanete compile ena megalo programma parakalw anebaste to se ena h kai perissotera ftp sites kai steilte ena mail sto comp.os.linux.announce (steilte to mhnyma sto linux-announce@news.ornl.gov).
Ean caxnete gia ena efarmoghs-tupoy programma tote polles pi8anothtes yparxoyn na exei gracei kapoios mia dwrean ekdosh. Dokimaste na diabasete to FAQ sto comp.sources.wanted gia odhgies sto pws 8a breite kwdikes programmatwn.
8a prepei epishs na elegjete to Projects-FAQ, poy brisketai sto directory /pub/Linux/docs/faqs/Projects-FAQ sto sunsite.unc.edu.
Genika nai, ektos ean einai o kernel.
H epilogh -m486 toy GCC, h opoia xrhsimopoieitai gia na dhmioyrgh8oun dyadika arxeia gia 486 ypologistes odhgei sthn dhmioyrgia arxeiwn ligo megaluterwn poy ektelountai grhgorotera sta 486. Omws doyleuoyn kanonika kai se ena 386, me mia mikrh ptwsh ths apodoshs opws einai fysiko.
Omws apo thn ekdosh 1.3.35 o kernel xrhsimopoiei kwdika toy 486 h kai toy pentium ean einai ry8mismenos gia enan 486 h ena pentium antistoixa, etsi ginetai axrhstos gia ena 386.
To GCC mporei na ry8mistei gia enan 386 h 486. H monh diafora einai oti ean ry8mistei gia 386 h arxikh epilogh 8a einai to -m386 enw ean exei ry8mistei gia 486 8a einai to -m486. Se ka8e periptwsh ayto mporei na jeperastei me thn katallhlh parametro se ka8e compile h ean allax8ei katallhla to arxeio : /usr/lib/gcc-lib/i*-linux/n.n.n/specs.
Yparxei mia alpha ekdosh toy GCC h opoia gnwrizei pws 8a epitaxunei to binary gia ton pentium, alla einai ligo asta8hs, eidika ean dhlw8oun parametroi gia ychlh epitaxynsh. To pentium GCC mporei na bre8ei sto tsx-11.mit.edu sto directory /pub/linux/ALPHA/pentium-gcc. Systhnw thn xrhsh toy kanonikou 486 GCC sth 8esh toy. Einai protimotero na xrhsimopoieitai to -m386 sta pentium giati prokuptei kwdikas poy einai kaluteros, h to elaxisto ligo mikroteros.
Ayth th stigmh einai to idio me to -O2 (GCC 2.5) h -O3 (GCC 2.6, 2.7) h me ka8e ari8mo megalutero apo aytous kanei to idio pragma. Ta Makefiles twn kainouriwn kernel xrhsimopoioun to -O2, eseis prepei na kanete to idio.
Ayta ta arxeia einai sta directories /usr/include/linux kai /usr/include/asm.
Ta directories ayta prepei na einai symbolic links ston kwdika toy kernel sto /usr/src/linux kai oxi alh8ina directories.
An den exete ton kwdika toy kernel katebaste ton -- deite thn (Erwthsh 7.6 "Pws mporw na anaba8misw / kanw compile jana ton kernel moy ;").
Xrhsimopoihste thn rm gia na apomakrunete peritta arxeia, kai ln gia na dhmioyrghsete ta links :
rm -rf /usr/include/linux /usr/include/asm ln -sf /usr/src/linux/include/linux /usr/include/linux ln -sf /usr/src/linux/include/asm /usr/include/asmStis meres mas to /usr/src/linux/include/asm einai ena symbolic link se ena sygkekrimeno asm-$ARCH directory - ean exete enan prosfata aposympiesmeno kwdika toy kernel prepei na xrhsimopoihsete thn entolh make symlinks. 8a breite epishs oti mporei na xreiastei na kanete ena make config se enan tetoio kernel, gia na dhmioyrgh8ei to <linux/autoconf.h>.
Sigoyreyteite oti ta /usr/include/linux kai /usr/include/asm den einai kanonika directories alla symbolic links sta /usr/src/linux/include/linux kai /usr/src/linux/include/asm antistoixa.
Ean xreiazetai, sbhste ta xrhsimopoiwntas thn rm kai meta thn ln -s gia na dhmioyrghsete ta links opws sthn Erwthsh 5.6 'Poy einai ta arxeia linux/*.h kai ta asm/*.h;'.
8ymh8eite oti otan xrhsimopoieite ena patch ston kernel prepei na xrhsimopoihsete thn parametro -p0 h thn -p1. Alliws to patch mporei na topo8eth8ei la8os. Deite thn selida toy man gia thn entolh patch gia perissoteres leptomereies.
Ean kanete patch gia enan kernel poio prosfato apo ton 1.1.44 prepei na breite oti yparxoyn nea directories /usr/src/linux/include/asm-i386. To directory asm ekei prepei na sbhstei. H entolh make symlinks 8a dhmioyrghsei ayta san symbolic links sta asm-i36 kai arch/i386/boot antistoixa. O poio eukolos tropos gia na eiste sigoyroi oti h diadikasia exei ginei swsta einai na mhn pate ston kernel 1.1.45 me patch apo ton 1.1.44, alla na katebasete ton linux-1.1.45.tar.gz.
To mhnyma ld: unrecognised option `-qmagic' shmainei oti prepei na parete enan kainourio linker, apo to tsx-11.mit.edu sto /pub/linux/packages/GCC, sto arxeio binutils-2.6.0.2.bin.tar.gz.
Gia ta ELF executables :
gcc -fPIC -c *.c gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.oGia ta a.out, parte to paketo tools-n.nn.tar.gz apo to tsx-11.mit.edu, sto /pub/linux/packages/GCC/src. Erxetai mazi me odhgies oi opoies 8a sas poyn ti na kanete. Prosejte oti oi koines biblio8hkes gia a.out einai mia mallon duskolh ypo8esh.
Me ena metaglwttisth gia ELF (see Q8.2 `What's all this about ELF ?') h syxnoterh aitia megalwn ektelesimwn einai h elleich enos katallhloy syndesmoy se .so library gia mia apo tis biblio8hkes poy xrhsimopoieite. Prepei na yparxoyn sundesmoi opws to libc.so gia ka8e biblio8hkh opws h libc.so.5.2.18. Me enan metaglwttisth gia a.out (see Q8.2 `What's all this about ELF ?') h syxnoterh aitia megalwn ektelesimwn einai o orismos toy metaglwttisth -g. Ayto paragei (ektos apo mhnumata la8oys sto arxeio ejodoy) ena programma statika syndedemeno, dhladh ena to opoio symperilambanei ena antigrafo ths biblio8hkes ths C anti na xrhsimopoiei ena dynamika syndedemeno antigrafo. Alla pragmata ta opoia ajizei ton kopo na ereynhsete einai ta -O kai -O2 ta opoia energopoioun thn beltistopoihsh (elegjte tis odhgies toy GCC ) kai to -s (h thn entolh strip ) h opoia bgazei oles tis plhrofories symbolwn apo to ektelesimo (kanontas ton elegxo la8wn - debugging - entelws adunato). Mporei na 8elete na xrhsimopoihsete to -N se polu mikra ektelesima (mikrotera apo 8K me to -N), alla den 8a eprepe na to kanete ayto ektos ean katalabainete ta 8emata apodoshs, kai pote me daemons.
Opws to polyepejergastiko montelo toy Unix symperilambanei baries epejergasies, to opoio einai fysika meros toy stantart pyrhna toy Linux, yparxoyn diafores ylopoihseis elafriwn epejergasiwn h nhmatikwn, oi perissoteres ek twn opoiwn einai genika paketa gia Unix:
Parakalw epikoinwnhste me toys dhmioyrgous twn paketwn gia plhrofories.
H ekdosh 1.3.35 toy pyrhna periexei kapoia yposthrijh gia nhmata toy pyrhna, alla o kwdikas den exei elegx8ei kala.
S.t.M.: Me ton oro nhmata ypo8etw oti o syggrafes ennoei nhmatikh epejergasia. H metafrash egine me ayto san bash.
Peripoy idia leitoyrgikothta symperilambanetai sto GNU C metaglwttisth (gcc) o opoios xrhsimopoieitai apo ta systhmata Linux. Xrhsimopoieiste thn epilogh -Wall gia na energopoihsete tis perissoteres apo tis xrhsimes ejtra proeidopoihseis. Elegjte tis odhgies xrhshs gia to GCC gia perissoteres plhrofories. (pathste control-h akoloy8oumeno apo i sto Emacs kai epilejte thn kataxwrish gia to GCC).
Yparxei ena eleu8era dia8esimo programma poy legetai `lclint' poy kanei peripoy ta idia pragmata opws to paradosiako lint. H anakoinwsh kai o phgaios kwdikas einai dia8esima sto larch.lcs.mit.edu in /pub/Larch/lclint sto World Wide Web koitajte sto http://larch-www.lcs.mit.edu:8001/larch/lclint.html.
To aysthro copyright toy Kermit exei anagkasei toys perissoteroys dianomeis na to afairesoyn apo tis typikes Linux dianomes. O kwdikas kai merika ektelesima einai dia8esima sto kermit.columbia.edu ws
kermit/archives/ckermit-6.0.192-7.i386.rpm # RedHat kermit/archives/ckermit-6.0.192-7.sparc.rpm kermit/archives/ckermit-6.0.192-7.alpha.rpm kermit/archives/ckermit-6.0.192-7.src.rpm kermit/archives/cku192.debian.tar # Debian kermit/archives/cku192.slackware-i386.tgz # SlackwareEktelesima gia alla Linux einai dia8esima sta
kermit/bin/ckuker.linux-2.0-alpha kermit/bin/ckuker.linux-2.0.27-sparc kermit/bin/ckuker.linux-2.0.28-mklinux-mach3.0-ppc kermit/bin/ckuker.linux-1.2.13-i386-elf kermit/bin/ckuker.linux-2.1.13-i386-elfTa arxeia /kermit/bin/READ.ME kai /kermit/archive/READ.ME exoyn peraiterw plhrofories.