CVS-19981209: Patch for "unsigned HOST_WIDE_INT" on Solaris2.6

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Fri Dec 18 06:51:00 GMT 1998


 > From: Jeffrey A Law <law@upchuck.cygnus.com>
 >  
 >   > Hmm, is the stage1 compiler's notion of the sizeof int/long, etc, always
 >   > the same as gcc's?  E.g. is that driven solely by the chip HW or does a
 >   > compiler have any discretion on implementation?
 > 
 > This is similar to the libiberty issue -- if they disagree, then we have
 > a case where stage1 and stage2 are not link compatible -- which is
 > effectively a cross compiler.


	Hm, I don't think if I bootstrap with the vendor's compiler for
stage1, that any disagreement between e.g. 
	stage1 cc sizeof(long)==4
would cause a link problem with
	stage2 gcc sizeof(long)==8
Rather, I think we might just get a subtle runtime inconsistency.
But I'm not 100% sure what the failure mode would be.

	Unless I'm misunderstanding the scope and context wherein
HOST_WIDE_INT is used, I think we run into problems when we rely on the
stage1 compiler to tell us this value for gcc.  Eg, what if the stage1
compiler is 32 bit, but we're building on a 64 bit capable arch and want
to take advantage of it? Your solution is to build a cross compiler, but
can you build a cross compiler from 32arch->64arch? I thought I read
somewhere this didn't completely work in gcc...  (Or maybe just some
optimizations didn't work?)

Another problem is that HOST_WIDE_INT is used for both the host and the
build systems...  (See below)


 >   > Also, that test calls AC_TRY_RUN, so what would we do for cross
 >   > compilers?
 > That's OK -- we care about the host, not the target.
 > jeff

	Um, I meant canadian cross builds.  You can't do TRY_RUN tests
for the platform e.g cc1 is meant to run on because the compiler building
cc1 is itself a cross compiler so you can't execute the autoconf tests
it compiles.  This means we have to maintain the bit sizes indefinitely
for canadian crosses to work so we may as well use hard coded bitsizes
in all cases... (?)

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.



More information about the Gcc-patches mailing list