https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85142
Jim Wilson <wilson at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Last reconfirmed| |2018-04-02 CC| |wilson at gcc dot gnu.org Resolution|INVALID |--- Ever confirmed|0 |1 --- Comment #7 from Jim Wilson <wilson at gcc dot gnu.org> --- As another person mentioned, you actually have two multilibs enabled. You can see what is going on if you do rohan:2144$ ./xgcc -B./ --print-multi-dir -march=rv64imafdc -mabi=lp64d lib64/lp64d rohan:2145$ ./xgcc -B./ --print-multi-os-directory -march=rv64imafdc -mabi=lp64d ../lib64/lp64d rohan:2146$ So the paths are correct for the rv64imafdc/lp64d choice, this just isn't the default choice. Except of course that it is the default choice, the compiler just doesn't realize that. There appear to be a few problems here. We aren't handling the fact that rv64gc and rv64imafdc are the same architecture. We can fix that with a multilib match. MULTILIB_MATCHES = march?rv64gc=march?rv64imafdc But now we just get "." for the path which is not what we want. We also still have two multilibs, which are the same. We should be able to fix that with a multilib default setting. #define MULTILIB_DEFAULTS { "march=rv64imafdc" "mabi=lp64d" } but that doesn't seem to work, so maybe I got a detail wrong. I'm not sure yet what to do about the fact that the path for the default choice is ".". I'll need a tree that I can install to see if that is a real problem or not. What about the --with-multilib-list option patch? I thought that was working for you.