{"id":3041,"date":"2022-12-30T17:44:27","date_gmt":"2022-12-30T09:44:27","guid":{"rendered":"https:\/\/jir.idv.tw\/wordpress\/?p=3041"},"modified":"2022-12-30T17:44:27","modified_gmt":"2022-12-30T09:44:27","slug":"debian-11-%e5%9b%a0%e9%9c%80%e8%a6%81%e8%80%8c%e5%ae%89%e8%a3%9d%e8%88%8a%e7%89%88gcc-8-5-0%e7%9a%84%e8%a7%a3%e6%b3%95","status":"publish","type":"post","link":"https:\/\/jir.idv.tw\/wordpress\/?p=3041","title":{"rendered":"DEBIAN 11 \u56e0\u9700\u8981\u800c\u5b89\u88dd\u820a\u7248Gcc-8.5.0\u7684\u89e3\u6cd5"},"content":{"rendered":"<p>\u770b\u8d77\u4f86Debian 10\u7684\u7cfb\u7d71\u88ddKernel 4.x\u7248\u7684\u6642\u5019\uff0c\u662f\u7528Gcc-8.x\u7248\u7684\u4f86\u7de8\u8b6f\u3002<br \/>\n\u6240\u4ee5\u5347\u7d1a\u5230Debian 11\u4e4b\u5f8c\uff0c\u56e0\u70ba\u5df2\u7d93\u6539\u652f\u63f4Kernel 5.x\u7248\uff0c\u6240\u4ee5\u5982\u679c\u56e0\u70ba\u539f\u4f86\u76844.x\u7248\u8981\u66f4\u65b0\u9a45\u52d5\u7a0b\u5f0f\uff0c\u8981\u704clinux-headers\u5957\u4ef6\u6703\u8aaa\u6c92\u6709\u5b89\u88dd\u5230Gcc-8.x\u7248\uff0c\u7121\u6cd5\u4f7f\u7528\u3002<br \/>\n\u76ee\u524d\u53ea\u80fd\u6539\u5230\u5b98\u7db2\u6293\u4f86\u91cd\u65b0\u7de8\u8b6f\uff0c\u662f\u5b89\u5168\u7684\u505a\u6cd5\uff0c\u4f86\u500b\u96d9Gcc\u57f7\u884c\u74b0\u5883\u3002<\/p>\n<p>\u76ee\u524d\u770b8.x\u7248\u6700\u5f8c\u7dad\u8b77\u7684\u7248\u672c\u662fGcc-8.5.0\uff0c\u6240\u4ee5\u76f8\u95dc\u6307\u4ee4\u5c31\u9019\u6a23\u6574\u7406\uff1a<br \/>\n<code>git clone git:\/\/gcc.gnu.org\/git\/gcc.git<br \/>\ncd gcc<br \/>\ngit checkout releases\/gcc-8.5.0<br \/>\n(.\/contrib\/download_prerequisites \u4e0b\u8f09\u4f9d\u8cf4)<br \/>\n(.\/contrib\/gcc_update \u4e0b\u8f09\u76f8\u95dc\u66f4\u65b0\u88dc\u91d8)<br \/>\nmkdir build<br \/>\ncd build<br \/>\n..\/configure --prefix \/usr\/local\/gcc\/8.5.0 --disable-multilib<br \/>\n(..\/configure -enable-checking=release -enable-languages=c,c++ -disable-multilib)<br \/>\nmake -j8<br \/>\nsudo make install<\/code><br \/>\n\u770b\u5230\u9019\u500b\u8868\u793a\u5927\u529f\u544a\u6210\u5566!!<br \/>\n<code>----------------------------------------------------------------------<br \/>\nLibraries have been installed in:<br \/>\n   \/usr\/local\/gcc\/8.5.0\/lib\/..\/lib64<\/p>\n<p>If you ever happen to want to link against installed libraries<br \/>\nin a given directory, LIBDIR, you must either use libtool, and<br \/>\nspecify the full pathname of the library, or use the `-LLIBDIR'<br \/>\nflag during linking and do at least one of the following:<br \/>\n   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable<br \/>\n     during execution<br \/>\n   - add LIBDIR to the `LD_RUN_PATH' environment variable<br \/>\n     during linking<br \/>\n   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag<br \/>\n   - have your system administrator add LIBDIR to `\/etc\/ld.so.conf'<\/p>\n<p>See any operating system documentation about shared libraries for<br \/>\nmore information, such as the ld(1) and ld.so(8) manual pages.<br \/>\n----------------------------------------------------------------------<\/code><\/p>\n<p>\u5b8c\u6210\u5b89\u88dd\u5f8c\uff0c\u82e5\u8981\u7528\u820a\u7248\u7684Gcc\u5957\u4ef6\u4f86\u547c\u53eb\u9700\u8981\u7684\u7a0b\u5f0f\uff0c\u53ea\u8981\u628a\u74b0\u5883\u8b8a\u6578\u57f7\u884c\u544a\u8a34\u7cfb\u7d71\u60f3\u8981\u600e\u9ebc\u904b\u4f5c\u4ea6\u53ef\u3002<br \/>\n\u6307\u4ee4\u5982\u4e0b\uff1a<br \/>\n<code>export PATH=\/usr\/local\/gcc\/8.5.0\/bin:$PATH<br \/>\nexport LD_RUN_PATH=\/usr\/local\/gcc\/8.5.0\/lib64<br \/>\n$gcc -v     #\u78ba\u8a8d\u5ba3\u544a\u547c\u53eb\u5f8cGcc\u57f7\u884c\u7684\u74b0\u5883\u7248\u672c<br \/>\n$.\/\u57f7\u884c\u8981\u8dd1\u7684\u7a0b\u5f0f<\/code><\/p>\n<p><strong>GCC\u5b98\u65b9\u7db2\u7ad9\uff1a<\/strong><br \/>\n<a href=\"http:\/\/gcc.gnu.org\" rel=\"noopener\" target=\"_blank\">http:\/\/gcc.gnu.org<\/a><\/p>\n<p><strong>\u53c3\u8003\u6587\u7ae0\uff1a<\/strong><br \/>\n<a href=\"https:\/\/markito3.wordpress.com\/tag\/gcc-8-3-0\/\" rel=\"noopener\" target=\"_blank\">https:\/\/markito3.wordpress.com\/tag\/gcc-8-3-0\/<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/33461938\/how-to-apply-a-gcc-patch-in-ubuntu\" rel=\"noopener\" target=\"_blank\">https:\/\/stackoverflow.com\/questions\/33461938\/how-to-apply-a-gcc-patch-in-ubuntu<\/a><br \/>\n<a href=\"https:\/\/lantern.cool\/tool-linux-muti-gcc\/\" rel=\"noopener\" target=\"_blank\">https:\/\/lantern.cool\/tool-linux-muti-gcc\/<\/a><br \/>\n<a href=\"https:\/\/blog.csdn.net\/liuzq\/article\/details\/89254806\" rel=\"noopener\" target=\"_blank\">https:\/\/blog.csdn.net\/liuzq\/article\/details\/89254806<\/a><br \/>\n<a href=\"https:\/\/imicrobenson.blogspot.com\/2011\/06\/gcc.html\" rel=\"noopener\" target=\"_blank\">https:\/\/imicrobenson.blogspot.com\/2011\/06\/gcc.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u8d77\u4f86Debian 10\u7684\u7cfb\u7d71\u88ddKernel 4.x\u7248\u7684\u6642\u5019\uff0c\u662f\u7528Gcc-8.x\u7248\u7684\u4f86\u7de8\u8b6f\u3002 \u6240\u4ee5\u5347\u7d1a\u5230Debian 11\u4e4b\u5f8c\uff0c\u56e0\u70ba\u5df2\u7d93\u6539\u652f\u63f4Kernel 5.x\u7248\uff0c\u6240\u4ee5\u5982\u679c\u56e0\u70ba\u539f\u4f86\u76844.x\u7248\u8981\u66f4\u65b0\u9a45\u52d5\u7a0b\u5f0f\uff0c\u8981\u704clinux-headers\u5957\u4ef6\u6703\u8aaa\u6c92\u6709\u5b89\u88dd\u5230Gcc-8.x\u7248\uff0c\u7121\u6cd5\u4f7f\u7528\u3002 \u76ee\u524d\u53ea\u80fd\u6539\u5230\u5b98\u7db2\u6293\u4f86\u91cd\u65b0\u7de8\u8b6f\uff0c\u662f\u5b89\u5168\u7684\u505a\u6cd5\uff0c\u4f86\u500b\u96d9Gcc\u57f7\u884c\u74b0\u5883\u3002 \u76ee\u524d\u770b8.x\u7248\u6700\u5f8c\u7dad\u8b77\u7684\u7248\u672c\u662fGcc-8.5.0\uff0c\u6240\u4ee5\u76f8\u95dc\u6307\u4ee4\u5c31\u9019\u6a23\u6574\u7406\uff1a git clone git:\/\/gcc.gnu.org\/git\/gcc.git cd gcc git checkout releases\/gcc-8.5.0 (.\/contrib\/download_prerequisites \u4e0b\u8f09\u4f9d\u8cf4) (.\/contrib\/gcc_update \u4e0b\u8f09\u76f8\u95dc\u66f4\u65b0\u88dc\u91d8) mkdir build cd build ..\/configure &#8211;prefix \/usr\/local\/gcc\/8.5.0 &#8211;disable-multilib (..\/configure -enable-checking=release -enable-lang&#8230; <a href=\"https:\/\/jir.idv.tw\/wordpress\/?p=3041\" class=\"readmore\">Read more (\u5b8c\u6574\u6587\u7ae0\u5167\u5bb9)<span class=\"screen-reader-text\">DEBIAN 11 \u56e0\u9700\u8981\u800c\u5b89\u88dd\u820a\u7248Gcc-8.5.0\u7684\u89e3\u6cd5<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3041","post","type-post","status-publish","format-standard","hentry","category-4","content-layout-excerpt-thumb"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3041"}],"version-history":[{"count":7,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3041\/revisions"}],"predecessor-version":[{"id":3048,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3041\/revisions\/3048"}],"wp:attachment":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}