å½???ä½?ç½?? è½?»¶ä¸?è½?/a> > åº??¨è½¯ä»?/a> > GNU Compiler Collection v4.7.0

GNU Compiler Collection

  • 大å?ï¼?78.60M
  • è¯??ï¼?ç®?ä½?ä¸???
  • ç±»å???åº??¨è½¯ä»?/li>
  • ????ï¼???è´?/li>
  • ?¶é?´ï?2021-10-15
  • å®?ç½?ï¼?????/li>
  • ???ï¼?Windows10, Windows8, Windows7, WinVista, WinXP
  • å®??¨æ?æµ?ï¼?????ä»?/span>360??è¿??¾è???è¿???å±±é??è¿???????è¿?
8.8??

????��/p>

�??��/p>

??ä¸?è½½é???ä¸?è½½å???????50%

?¸å?³è½¯ä»?/p>

GNU Compiler Collection(gccç¼?è¯??????款å?ºä?Linuxç³»ç??????????½å¼ºå¤§ç??ç¼?è¯?å·¥å?·ï?该软件è???????å®??¨ç??ï¼?GNU Compiler Collection(gccç¼?è¯????µè????ä»?PL??LGPL许å???????è¡??????±è½¯ä»¶ï?ä¹???NU计å?????³é???¨å????GNU Compiler Collection(gccç¼?è¯???主è??¨ä?ç¼?è¯?C, C++, Objective-C, Fortran, Javaç­?è¯????????è¦????¨æ?·å???´æ?¥å?¨æ???ä¸?è½?/a>ï¼?

GNU Compiler Collection(gccç¼?è¯???è½?»¶ç»???

GCC??å¤??¨æ?¥å?£é?¿å???ä¸?ä¸???????Unixç¼?è¯??¨ã??使ç?¨è???¨å?½ä»¤??ä¸?????ccä¹?ç¨?åº???ï¼?以å??ä¸?äº??½ä»¤???°ï?以便?³å?æ¯?ä¸???¥æ¡£æ¡?使ç?¨ç??ä¸????è¨?ç¼?è¯????并为è¾??ºç?åº???使ç?¨é????此硬件平?°ç??ç»???è¯??ç¼?è¯????并ä????©æ?§å?°æ?§è?è¿??¥å?¨ä»¥?¶é?????§è???ç¨?åº???æ¯?ä¸??è¨?ç¼?è¯??¨é?½æ?????ç¨?åº?ï¼?æ­¤ç?åº??????è¾??¥ç????å§???ï¼?并è??ºç???è¯???????¨é?¨ç??è¯??ç¼?è¯??¨é?½æ?¥æ???±é????ä¸???¶æ??ï¼?ä¸?ä¸???ç«?§£??ç¬þ@??æ­¤è?è¨?????å§???ï¼?并产??ä¸??½è±¡è¯????ï¼?以å??ä¸?ç¿»è?æ­¤è?æ³?????ä¸?CC????å­???a href="/r/wjzhrj" target="_blank">è½???/a>è¯????RTL??????ç«???ç¼?è¯??¨æ??ä½³å??ä¸?????ç¨?åº???解æ??????ä¾?å¦?FORTIFY_SOURCEï¼?ä¸?ä¸???¾å???°ç??²å?ºæº¢ä½???buffer overflow????ç¼?è¯????¨æ??¶æ?åº??¨ä?ç¨?åº???ä¸???????ï¼????¨ä?此硬件æ?¶æ????ç»???è¯??ç¨?åº???ä»?ack Davidsonä¸?Chris Fraser??????ç®?æ³?产å?ºã????ä¹??¨é?¨ç??GCC?½ç??????ï¼??¤ä?Ada??ç«?¤§?¨å??ä»?da??????

GNU Compiler Collection(gccç¼?è¯????ºæ?????

gcc???µå¾ª???¨å??çºþ@?è§???ï¼?

.c为å??ç¼?????件ï?Cè¯??æº?代ç????ä»?

.a为å??ç¼?????件ï????±ç??????件æ??????æ¡£æ?åº???ä»?

.Cï¼?.cc??.cxx 为å??ç¼?????件ï???++æº?代ç????件ä?å¿?é¡»è?ç»?è¿?é¢?å¤???;

.h为å??ç¼?????件ï????åº?????????头æ??ä»?

.i 为å??ç¼?????件ï???æº?代ç????件ä?ä¸?åº?该å??¶æ?§è?é¢?å¤???;

.ii为å??ç¼?????件ï???++æº?代ç????件ä?ä¸?åº?该å??¶æ?§è?é¢?å¤???;

.m为å??ç¼?????件ï???bjective-Cæº?代ç????ä»?

.mm为å??ç¼?????件ï???bjective-C++æº?代ç????ä»?

.o为å??ç¼?????件ï????è¯???????????ä»?

.s为å??ç¼?????件ï????ç¼?è¯??æº?代ç????ä»?

.S为å??ç¼?????件ï????è¿?é¢?ç¼?è¯???æ±?ç¼?è¯??æº?代ç????件ã??

GNU Compiler Collection(gccç¼?è¯????¥å?£ä?ç»?

1????ç«??¥å??/p>

??ç«??????½å?¨ä?产ç??ä¸?ä¸??????ç«????ä¹?è¯??????æ­¤è?æ³?解æ???¨æ??????ä¹???å½?è¯??解æ???¨ã??

2??ä¸???¥å??/p>

ä¸????è¯??¨ä???ä¼?å°?è¯????????ä½³å???¾å?¨å??ç«??ä½??¶å?æ­¤æ?骤并ä¸???è¯????ç§?ç±»è????ä¸???ï¼?ä¸?ä¸???è¦??¨å?°è?æ³?解æ???¨ã??

3????ç«??¥å??/p>

GCC??ç«???è¡?为å??ä¸???????å¤????¨å????¹å??¶æ???????½è??ä¸???ï¼?ä¾?å¦?ä¸?????å­?ç¬þ@°ºå¯¸ã???¼å???¹å?ä¸?大å?å°¾å?ç­?????ç«??¥å?£ç???????¨å?©ç?¨è?äº?è®????³å???TL??????å½¢å?ï¼???æ­¤è?½ç??CC??RTL??论ä?ä¸???å¤????¨å½±??ï¼?ä½??¨æ??¶æ??¶æ?½è±¡??令已è¢?½¬?¢æ???????¶æ?????¼å???

GNU Compiler Collection(gccç¼?è¯???使ç?¨æ?¹æ?

解å??ç¼?/p>

?·è?gcc-4.1.2.tar.bz2(??ä¸?è½½ç????缩æ??ä»?/a>)??usr/local/src(?¹æ????·±??好é????ä¸?,?¹æ??a href="/r/ysrj" target="_blank">??ç¼?/a>?¼å?ï¼????©ä??¢ç?¸å???ä¸?ç§??¹å?解å??(以ä?????%??表示?½ä»¤è¡???示ç?)ï¼?

% tar zxvf gcc-4.1.2.tar.gz

????

% bzcat gcc-4.1.2.tar.bz2 | tar xvf -

?°ç??????gcc-4.1.2è¿?ä¸????è¢?§°ä¸ºæ????ï¼???{srcdir}表示å®???以å???¨å?ºç??{srcdir}???°æ?¹ï?åº?该ç?¨ç??å®???è·???¥æ?¿æ?¢å?????wd?½ä»¤??»¥?¥ç??å½???è·????

??{srcdir}/INSTALL???ä¸???è¯þ>???GCCå®?è£?说æ??ï¼?????a href="/r/llq" target="_blank">æµ?è§???/a>??å¼?index.html??è¯?/a>??

建ç????????

???????(??{objdir}表示)???¨æ?¥å??¾ç?è¯?ç»??????°æ?¹ã??GCC建è?ç¼?è¯???????件ä?è¦??¾å?¨æ????${srcdir]ä¸??½ç?¶è??·å??ä¹???»¥)ï¼???好å??????¾å?¨å?þ@?ä¸?ä¸????ä¸????ä¸?ä¸??½æ??{srcdir}??å­??????

ä¾?å¦?ï¼???»¥è¿??·å»ºç«?ä¸?ä¸?? /usr/local/gcc-4.1.2?????????ï¼?

% mkdir /usr/local/gcc-4.1.2

% cd gcc-4.1.2

以ä?????ä½?主è????¨ç??????? ${objdir} ä¸?è¿?è¡???

??ç½?/p>

??ç½??????????³å?å°?GCCç¼?è¯??¨å?è£??°ä?ä¹??°æ??${destdir})ï¼?????ä»?ä¹?è¯??以å????å®??¶å?ä¸?äº???项ç????¶ä¸­ï¼?${destdir}ä¸??½ä?${objdir}??${srcdir}????¸å????

??ç½?????è¿??§è?${srcdir}ä¸???configure?¥å????????¶å?½ä»¤?¼å?ä¸?è®°å??¨ä?????å®?è·???¿æ??{destdir})ï¼?

% ${srcdir}/configure --prefix=${destdir} [?¶å???é¡?

ä¾?å¦?ï¼?å¦????³å?GCC 4.1.2å®?è£???usr/local/gcc-4.1.2???ä¸?ï¼???${destdir}就表示è?ä¸?·¯å¾???

?¨æ?????ºå?¨ä?ï¼???????·é??ç½???ï¼?

% ../gcc-4.1.2/configure --prefix=/usr/local/gcc-4.1.2 --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable-languages=c,c++,java

å°?GCCå®?è£???usr/local/gcc-4.1.2???ä¸?ï¼?????C/C++??JAVAè¯??ï¼??¶å???项å??è§?GCC??ä¾???å¸??©è?????

��

% make

��

?§è?ä¸??¢ç???½ä»¤å°?ç¼?è¯?好ç??åº???件ç??·è???{destdir}???ä¸??¹æ???设å???è·??ï¼????½é??è¦?管ç??????????)ï¼?

% make install

?³æ?ï¼?GCC 4.1.2å®?è£?è¿?ç¨?å°±å???äº???

?¶å?设置

GCC 4.1.2????????件ï??????½ä»¤??ä»?å¦?gcc??g++)??åº???件ç??½å??{destdir}???ä¸???????¾ï?å¦??½ä»¤??件æ?¾å??in???ä¸???åº???件å??ibä¸???头æ??件å??ncludeä¸?ç­????±ä??½ä»¤??件å??åº???件æ???¨ç?????è¿?没æ???????¨ç?¸å?????索路å¾???ï¼???以å?é¡»è?ä½???å½???设置ä¹???ç¼?è¯??¨æ???½é¡º?©å?°æ?¾å?°å¹¶ä½¿ç?¨å?ä»???

gcc??g++??gcj??设置

è¦??³ä½¿??CC 4.1.2??gccç­??½ä»¤ï¼?ç®??????¹æ?å°±æ????å®???è·??${destdir}/bin?¾å?¨ç???????PATHä¸?????ä¸??¨è?ç§??¹å?ï¼??????¨ç??·è??¥ç???¹å?å®??°ï?è¿??·å????好å?????ä»??¶å??»¥ä½¿ç?¨ç³»ç»?ä¸????¥ç???§ç??????GCCç¼?è¯??¨ã??

é¦???ï¼??¥ç?????¥ç??gcc???¨ç??è·??ï¼?

% which gcc

?¨æ????ç³»ç?ä¸?ï¼?ä¸?è¿°å?½ä»¤?¾ç¤ºï¼?/usr/bin/gcc????æ­¤ï????¥ç??gcc?½ä»¤??usr/bin???ä¸?????ä»???»¥??GCC 4.1.2ä¸???gcc??g++??gcjç­??½ä»¤??usr/bin???ä¸???????ä¸?ä¸???·è??¥ï?

% cd /usr/bin

% ln -s ${destdir}/bin/gcc gcc412

% ln -s ${destdir}/bin/g++ g++412

% ln -s ${destdir}/bin/gcj gcj412

è¿??·ï?å°±å??»¥????½¿??cc412??g++412??gcj412?¥è???CC 4.1.2??gcc??g++??gcjå®???å¯???C++??JAVAç¨?åº???ç¼?è¯?äº??????¶ï?ä»??¶è?½å?使ç?¨æ?§ç??????GCCç¼?è¯??¨ä¸­??gcc??g++ç­??½ä»¤??

��???设置

å°?${destdir}/libè·??æ·»å???°ç???????LD_LIBrarY_PATHä¸??ä¾?å¦?ï¼?å¦???GCC 4.1.2å®?è£???usr/local/gcc-4.1.2???ä¸?ï¼???H Linuxä¸???»¥?´æ?¥å?¨å?½ä»¤è¡?ä¸??§è?

% export LD_LIBRARY_PATH=/usr/local/gcc-4.1.2/lib

??好添???°ç³»ç»?????ç½???件中ï¼?è¿??·å°±ä¸?å¿?è¦?æ¯?次é?½è?ç½??ä¸????????äº?,?¨æ??ä»?HOME/.bash_profileä¸?·»??ä¸???¸¤?¥ï?

LD_LIBRARY_PATH=/usr/local/gcc-4.1.2/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH

????³»ç»?设置????ï¼??????§è??½ä»¤

% source $HOME/.bash_profile

��

?¨æ?°ç??ç¼?è¯??½ä»¤(gcc412??g++412ç­?)ç¼?è¯?ä½?以å????C??C++ç¨?åº?ï¼?æ£?éª??°å?è£???GCCç¼?è¯??¨æ???þA?½æ?常工ä½?

???为大家å??äº??µè??绿è?²å??¨ä?å®??¨ç??è½?»¶å¤§å?¨å??è´¹ä?è½½ï??¨è??PC?µè??好ç?¨ç??è½?»¶åº?å·¥å?·ï?ä¸?ä»???????ä»??¥å¸¸??è¦?????天工?·ã??è¾??¥æ???æµ?è§??¨ã????è½??,è¿?????ç§?娱ä???è§?é¢????¾å?¨ã???³ä????¾å?¨ç?å·¥å????ç§?ä¸?????è½?»¶åº?å·?..

�??��/p>

0?¡è?è®?/p>

    ??ç±»å??è¡?/p>

    ???ºè½¯ä»?/a> 游æ??大å?? 驱å?¨ç?åº? ?¶å?è½?»¶ ??æ¯?å®???/a> å¤?åª?ä½?ç±?/a> ?¾å½¢?¾å?? ??天软ä»?/a> åº??¨è½¯ä»?/a> ç³»ç?å·¥å??/a> ç½?ç»?è½?»¶

    ???¨å????