Questions Tagged With gcchttp://linuxexchange.org/tags/gcc/?type=rssquestions tagged <span class="tag">gcc</span>enWed, 14 Sep 2011 16:20:45 -0400Temporarily Disabling Gold Linker on Ubuntuhttp://linuxexchange.org/questions/2699/temporarily-disabling-gold-linker-on-ubuntu<p>I'm trying out the Gold Linker to see if it will improve link time of our application. And it does, significantly. Occasionally, I need to use the GNU Linker. How would I go about doing this?</p> <p>I am using Ubuntu 10.04 and I installed the Gold Linker from the package manager.</p> <p>Thanks</p>Bruce BannerWed, 14 Sep 2011 16:20:45 -0400http://linuxexchange.org/questions/2699/temporarily-disabling-gold-linker-on-ubuntugccubuntu-10.04ubuntuWhich Linux to install to get gcc 3.x?http://linuxexchange.org/questions/1344/which-linux-to-install-to-get-gcc-3x<p>I'm trying to compile a program that requires gcc 3.x. I've decided to install a Linux distro in a virtual machine for this purpose. I've tried Ubuntu 7.10 and Ubuntu 6.06, but these both use gcc 4.x.</p> <p>What's a good Linux OS to install that uses gcc 3.x?</p>PhenomMon, 13 Sep 2010 08:25:38 -0400http://linuxexchange.org/questions/1344/which-linux-to-install-to-get-gcc-3xlinuxgcchow to build gcc 4.5?http://linuxexchange.org/questions/1179/how-to-build-gcc-45<p>I am having a remarkable amount of trouble building gcc 4.5 on Linux (Red Hat Enterprise 4). For good measure, I also tried on my mac running Leopard.</p> <p>I would love to just install an rpm, but the Red hat version we are running is old enough that no one has rpms for it. So I thought I would build off source, no problem, right?</p> <p>First, /opt/tools was created for me, so I could write the results in there without being sysadmin</p> <p>gcc 4.5 now requires three packages: GMP, MPFR, and MPC, all math primitives.</p> <p>I successfully built all three wth:</p> <p>./configure --prefix=/opt/tools make make install (for GMP I also did make check)</p> <p>For MPFR and MPC, configuration was slightly different:</p> <p>./configure --prefix=/opt/tools --with-gmp=/opt/tools</p> <p>So I have gmp-5.0.1, mpfr-3.0.0, mpc-0.8.2</p> <p>gcc instructions are more complicated, because it bootstraps itself. The compiler that I have on the system is 3.4.6.</p> <p>In my directory with all the packages, I first create a directory to build into: mkdir gcc451 cd gcc451 Then from inside the empty directory, I call configure in the gcc directory:</p> <p>../gcc-4.5.1/configure --prefix=/opt/tools --with-gmp=/opt/tools --with-mpfr=/opt/tools --with-mpc=/opt/tools</p> <p>On the mac, I also had to add target directives, I am a little hazy as to why, but something is messed up in the configuration evidently</p> <p>--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10</p> <p>On the mac, configure reports: checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... yes checking for the correct version of the gmp/mpfr/mpc libraries... no configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.</p> <p>I export DYLD_LIBRARY_PATH=/opt/lib still, it doesn't find those libraries, but they are there:</p> <p>libgmp.10.dylib libgmp.la libmpc.dylib libmpfr.a libgmp.a libmpc.2.dylib libmpc.la libmpfr.dylib libgmp.dylib libmpc.a libmpfr.4.dylib libmpfr.la</p> <p>On the Linux box, I somehow got it to recognize the libs in /opt/tools, and ./configure was successful. I am not there now, but will append the details later at work. However, after compiling, the code is unable to find libgmp, even though it's built, and export LD_LIBRARY_PATH=/opt/tools/lib containing all three libraries. So the problem is similar even though there, configure reports no problems.</p> <p>I'm not surprised that there's a little difficulty on the Mac, but I was startled at how hard this was on Linux. I remembered about the multi-pass build, but still there is no hardware dependency, no odd drivers to contend with....</p> <p>Any help?</p>DovWed, 04 Aug 2010 11:16:18 -0400http://linuxexchange.org/questions/1179/how-to-build-gcc-45gccbuildHow Linux gets installedhttp://linuxexchange.org/questions/59/how-linux-gets-installed<p>Hi,</p> <p>Suppose I get a Kernel source code and try to compile it on Linux which is not having gcc compiler then it will not get compiled for sure b'coz kernel needs gcc for compilation. My question is then how a Linux gets installed on raw hard disk which in not having gcc pre-installed. I also believe gcc can't be installed on raw hard disk (not sure and never tried). So, it is also not the case that Linux installs gcc first and then do the rest later. </p> <p>Can any one explain how the thing works from lower level point of view. </p>AnonymousThu, 15 Apr 2010 04:37:12 -0400http://linuxexchange.org/questions/59/how-linux-gets-installedlinuxkernellivecdlfsgcc