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


Hi Jim,

thanks for the reply.

On Tue, 2003-10-14 at 00:00, Jim Wilson wrote:
> 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.

This is the sed command I used.  I don't know sed very well, so I'm sure
there is a better way, but this does work.

cat specs | sed "$$(expr `cat specs | grep -n cross_compile | sed
s/":\*cross_compile:"//` + 1 ) s/1/0/" > specs.tmp && mv specs.tmp
specs;

of course this I guess doesn't work at all for build != host != target,
but then I have never tried that.

> 
> I don't know what bugs you ran into, but if this is only a problem after 

This is the only generic gcc bug.  I also have a 2 little gcj problems,
but I think that one is related to my C library (uClibc).  And the other
is functionality not yet fully provided by gcj.  I think I'll look at
this again in 6 months, as it isn't a high priority right now.

> 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.

How do I get gcc to re-generate its spec file?


David

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: dmeggy@techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~


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