This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: spec files


David Meggy wrote:
Why is it using $(GCC_FOR_TARGET)?  This is a cross compiler, so at a
minimum it is going to get the line "*cross_compile:" wrong.

If we are doing a build where $(build) != $(host), then we can't use ./xgcc because it will be a binary that runs on $(host), which (usually) will be a binary that won't run on the build machine. GCC_FOR_TARGET however is safe, because it should have been defined to be a $(build)-x-$(target) cross compiler, which will run on the build machine.


You are right about getting the cross_compile spec wrong. Ideally we shouldn't get anything else wrong. Ports shouldn't be changing specs when built as cross compilers.

How should this be done?

I have no good suggestion. Maybe it just has to be fixed manually? If this is a build != host == target configuration, then we use sed to fix the cross_compile.


I don't know what bugs you ran into, but if this is only a problem after install, which seems likely, then it could be fixed with a special install script for this case that re-generates the spec file when the toolchain is installed on the host. At that point, we can run the host gcc, which should give us the correct spec file. This is probably then a documentation problem, i.e. documenting that this step must be done after installing a native compiler built from a cross.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]