Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7669471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:36:11+00:00 2026-05-31T15:36:11+00:00

I am trying to set up a completely recent and up to date gcc

  • 0

I am trying to set up a completely recent and up to date gcc environment… basically gcc 4.6.3 and binutils 2.22. Not the fairly old gcc 4.2.1 (llvm) that comes with Xcode 4.2.1. My problem is not with compiling (for now, at least). I can compile binutils, gcc, and both at the same time perfectly. However each time I try to compile I find something like this appear at the end of configure’s output

checking where to find the target ar… just compiled
checking where to find the target as… host tool
checking where to find the target cc… just compiled
checking where to find the target c++… just compiled
checking where to find the target c++ for libstdc++… just compiled
checking where to find the target dlltool… just compiled
checking where to find the target gcc… just compiled
checking where to find the target gcj… just compiled
checking where to find the target gfortran… just compiled
checking where to find the target gccgo… host tool
checking where to find the target ld… host tool
checking where to find the target lipo… host tool
checking where to find the target nm… just compiled
checking where to find the target objdump… just compiled
checking where to find the target ranlib… just compiled
checking where to find the target strip… just compiled
checking where to find the target windres… just compiled
checking where to find the target windmc… just compiled

I made a symlinks for ld, opcodes, bfd, gas, gprof, and binutils in the gcc source folder to get this output… (if that helps)

As you can see I can get a “just compiled” version of most software, by I just can’t figure out how to compile as and ld. I have read the README file in the ld folder (which in the the binutils package) and it says to execute:

make all-ld

I do and being that I already “made” the source, it tells me nothing is left to do…

The only thing I can think of now is to temporally modify my path to not include ld. This would be pretty easy…

aka a quick check with

whereis ld

anyway immediately after thinking of this I relized it would be stupid being now I would have nothing to link gcc (or even a new version of ld (if I got to work at all))

So, in conclusion, I am trying to compile a new copy of ld and as…



The facts:


  • I am running Mac OS X Lion.
  • I am trying to compile gcc 4.6.3 using the default gcc that comes with Mac OS X Lion (gcc 4.2.1).
  • The configure scripts seem to think I do not want to compile a new linker and assembler.
  • I have successfully built a working gcc and binutils but without a new linker and assembler.
  • I have tried to compile binutils and gcc with the –with-ld=yes and –with-gold=no option, they didn’t seem to do anything.
  • I built gmp v5.0.4, mpfr v3.1.0, and mpc v0.9 using gcc v4.2.1, installing them in the same prefix as used in the gcc and binutils configure.
  • For each configure I am explicitly stating the locations of gmp, mpfr, and mpc.
  • I built gmp, mpfr, and mpc separately from gcc (doing so, resulted in some build errors).
  • gcc, binutils, gmp, mpfr, and mpc are all build in a separate directory which is not a subdirectory of the source directory (as recommended by the gcc installation instructions).
  • I am compiling gcc with the following options:

    ../gcc-4.6.3/configure –prefix=$PREFIX –with-gmp=$PREFIX –with-mpfr=$PREFIX –with-mpc=$PREFIX –enable-checking=release –program-suffix=-4.6.3 –enable-ld=yes –enable-gold=no

  • I mainly followed this tutorial.
  • Because I have no other compiler on my computer I am forced to use the mac os x default llvm compiler (what I described earlier as gcc 4.2.1) which I read here doesn’t work, however I don’t have gcc-4.2 on my computer.
  • Compiling gcc-4.7.0 (the very recent snapshot) using the new version of gcc I just compiled (gcc-4.6.3) results in compiler errors (I set the environment variables CC and CXX).
  • I have tried compiling gcc first, than binutils, and the other way around, eventually I decided building gcc with binutils was the way to go. The output above you was with both compiled at once
  • I read this little post on gold, and tried adding –enable-gold and –enable-ld. They changed nothing
  • The order in which I did things:

    1. Compile gmp.
    2. Install it.
    3. Compile mpfr.
    4. Install it.
    5. Compile mpc.
    6. Install it.
    7. Make symlinks to the main gcc src directory for ld, gas, binutils, opcodes, gprof, bfd.
    8. Configure gcc.
    9. Find that “status report.”
    10. Think of another way to possibly build ld and as.
    11. Fail at that.
    12. Go on Stack Overflow.

as “fazo” said, I am not really telling anyone much about how I compiled binutils… so here it is…

I tried first compiling gcc, than building binutils using gcc, that compiled fine, but no ld, as, or even gold. Then I tried using the llvm compiler to build binutils then gcc. It also worked fine, but still no ld, as, or gold. Finally, I read here that I could make symlinks to some items in binutils and gcc would detect and build them… I did. and gcc found most of them (as stated before I put symlinks in the gcc directory for ld, opcodes, bfd, gas, gprof, and binutils) My actual problem here is telling the configure script to compile a new assembler and linker. Also, what boggles me, is in the binutils README folder it says that a mere ./configure make make install will build and install all the tools, I am trying to figure out why this is not the case.

The final command comes out to be:
../binutils-2.22/configure –prefix=$PREFIX –with-gmp=$PREFIX –with-mpfr=$PREFIX –with-mpc=$PREFIX –program-suffix=-4.6.3 –enable-ld –with-gnu-as –with-gnu-ld

yet I still get no ld and no gas.

Any help is greatly appreciated! (also if you want some info I haven’t supplied, just ask)

thanks… 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:36:12+00:00Added an answer on May 31, 2026 at 3:36 pm

    I realized, that it was basically a mac issue. After installing and getting Ubuntu it built the linker and assembler just fine… still having a bit of trouble compiling gcc, but that is because of Debian’s new multi architecture support… but this is another issue… Thanks for your help Marco van de Voort

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm completely new to Ruby (and RoR) and I'm trying to set up a
I am trying to load/show completely different set of values in a combobox(this one
Trying to set a flag in the post to allow processing or not. The
I'm trying to set up a ContentTemplate that changes based on a DataTrigger. Syntatically,
I'm trying to set up argparse on my python program but it's not working.
I'm trying to set up an htaccess rule that'll work with the current permalink
I'm trying to set up a print job completely by code. I have my
I am trying to set up message level security for a WCF application that
I'm trying to set up my environment for developing, debugging and deploying Windows Desktop
I am trying to set up an auto-complete search form with jQuery. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.