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


I just sent a couple of messages to gcc-bugs, until I solved my own
problem.  Anyways this is what I discovered with gcc 3.3.1.  I don't
know if this applies to other versions of GCC as I haven't tested this.

I was trying to produce a native compiler by cross compiling, and it
produced a spec file that cross_compiling set to 1 instead of 0.  So I
took a look at how the spec file was produced.

gcc-3.3.1/gcc/Makefile.in line 997

<snippet>
specs: xgcc$(exeext)
        $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
        mv tmp-specs specs
</snippet>

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.

How should this be done?

David

P.S. changing the spec file solved my initial problem

On Tue, 2003-09-30 at 15:12, David Meggy wrote:
> Let me add to this.  One thing I just noticed.
> 
> cross_compile should = 0 not 1, since my host=target.  I'm trying to
> find out why cross_compile got set to 1, right now.
> 
> David
> > And this was how I build gcc
> > 
> > (cd ${GCC_BUILD_NATIVE_PATH}; PATH=${TARGET_PATH}/bin:$$PATH CC=arm-linux-gcc ${GCC_PATH}/configure \
> > 		--target=${TARGET} --host=${TARGET} --build=${HOST_CPU}-pc-linux-gnu \
> > 		--prefix=/usr --enable-languages=c --disable-multilib \
> > 		--enable-target-optspace --with-gnu-ld --disable-nls \
> > 		--enable-threads --enable-shared --disable-__cxa_atexit; )
> > 
> > // TARGET = arm-linux, host_cpu=i386-linux

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     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]