Re: mips: -G0 vs __dso_handle

2006-05-09 Thread Richard Sandiford
Ian Lance Taylor  writes:
> DJ Delorie <[EMAIL PROTECTED]> writes:
>> For mips-elf builds, crtbegin.o is built with -G 0 ("in case $gp isn't
>> used").  This makes __dso_handle be put in .data.  However, the
>> "prototype" created by cp/decl.c is "void *__dso_data" which causes
>> GPrel addressing if your application is built without -G 0 (i.e. the
>> default), which causes link problems.  This is causing numerous
>> testsuite failures like this example:
>> 
>> /dev/shm/ccvHNaHr.o: In function
>>`__static_initialization_and_destruction_0(int, int)':
>>omit-frame-pointer.C:(.text+0x58): relocation truncated to fit:
>>R_MIPS_GPREL16 against `__dso_handle'
>> 
>> Ideas?
>
> Hack mips_in_small_data_p to check for this magic symbol and return
> false for it?

I think that's the wrong way around.  This looks to me like just another
case of the general rule that compiling x.c with -G0 and y.c with -GA (A>0)
is not safe if y.c refers to a normal B-byte (B<=A) variable in x.c.

Since the point of compiling libgcc and crt* with -G0 is precisely
to allow them to be linked with such -GA code, I think each variable
exported by them should be put into a small data section using
__attribute__((section...)).  This is what newlib does with its
_impure_ptr, for example.

[IMO, MIPS linker scripts should always include *(.sdata), even if every
object is compiled with -G0.  But even if a linker script doesn't include
.sdata, the linker orphan placement code should do something sensible.]

DJ: I was planning to look at this myself, but it sounds like your need
is more urgent than mine.  Are you going to be doing this very soon?

Richard


The C Compiler

2006-05-09 Thread salah Al-Din
Hello .
My name is Tarek and I'm studing Compute Engeneering.
In my project I'm going to use ATMEGA 128 and I want to programing it via
AVR studio 4.12 upgrated by service pack 2. This AVR has a C compiler.
But firstly I need to know if this C Compiler do support 64 floating point
??? This is very important to me, because I need the Mega to calculat a
specific math equations and I need to be as much exact as possible.

Thak you very much in advance for your help.Have a nice day, buy.

Tarek



--- reklama -
Ideš lyžovať? Najprv sa pozri, kde je sneh!
http://www.bleskovky.sk/se/8924/Snehove-spravy/


RE: The C Compiler

2006-05-09 Thread Dave Korn
On 09 May 2006 14:57, salah Al-Din wrote:

> In my project I'm going to use ATMEGA 128 and I want to programing it via
> AVR studio 4.12 upgrated by service pack 2. This AVR has a C compiler.
> But firstly I need to know if this C Compiler do support 64 floating point

  Then read the manual.  HTH.

  (Questions like this belong on the gcc-help list rather than the main gcc 
list, which is for highly technical discussions on compiler writing. The 
gcc-help list is suitable for general questions about how to use and work with 
the compiler.)

cheers,
  DaveK
-- 
Can't think of a witty .sigline today



Executing a copyright assignment

2006-05-09 Thread Dustin Laurence
Hi,

I am making some contributions to a package that the authors hope will
someday go into the GCC mainline, so I need to execute a copyright
assignment.  It's probably easier to make it for "all future
contributions" to GCC or even to GNU so we don't have to do this ever
again. :-)

At the moment, I don't have any employer or school issues to deal with,
so I would just have to remember to deal with this issue when that
changes.

Dustin


pgp9563Zft9Jk.pgp
Description: PGP signature


Re: 4.2 hasn't bootstrapped on powerpc-apple-darwin G5 machine for a very long time

2006-05-09 Thread Bradley Lucier


On May 3, 2006, at 7:50 PM, David Fang wrote:


FWIW, the 20060415 mainline (4.2) snapshot bootstrapped for me, using
odcctools-20060413 (odcctools-590.36od13).  This machine is a dual G5
(ppc970) using OS X 10.3.9, and Apple's gcc-3.3 (build 1640).

However, before building, I patched the following 2 files:
In gcc/config/darwin.h:
at: #define LINK_COMMAND_SPEC :
replace:/usr/bin/libtool
with:   /path/to/odcctools/bin/libtool


Thanks.  Is there any reason to hardwire which version of libtool to  
use?


Brad


Re: 4.2 hasn't bootstrapped on powerpc-apple-darwin G5 machine for a very long time

2006-05-09 Thread Shantonu Sen
Because it's hardcoded in the original darwin.h to something else, and  
the right one does not get detected during configuration.


Why must you use libtool from the same source as ld? Because libtool  
has binary detection logic, and an old version can reject object files  
with new load commands or new architectures, like ppc64 on a 10.3  
system.


Shantonu

On May 9, 2006, at 12:37 PM, Bradley Lucier wrote:



On May 3, 2006, at 7:50 PM, David Fang wrote:


FWIW, the 20060415 mainline (4.2) snapshot bootstrapped for me, using
odcctools-20060413 (odcctools-590.36od13).  This machine is a dual G5
(ppc970) using OS X 10.3.9, and Apple's gcc-3.3 (build 1640).

However, before building, I patched the following 2 files:
In gcc/config/darwin.h:
at: #define LINK_COMMAND_SPEC :
replace:/usr/bin/libtool
with:   /path/to/odcctools/bin/libtool


Thanks.  Is there any reason to hardwire which version of libtool to  
use?


Brad




Re: 4.2 hasn't bootstrapped on powerpc-apple-darwin G5 machine for a very long time

2006-05-09 Thread Geoffrey Keating


On 09/05/2006, at 12:37 PM, Bradley Lucier wrote:



On May 3, 2006, at 7:50 PM, David Fang wrote:


FWIW, the 20060415 mainline (4.2) snapshot bootstrapped for me, using
odcctools-20060413 (odcctools-590.36od13).  This machine is a dual G5
(ppc970) using OS X 10.3.9, and Apple's gcc-3.3 (build 1640).

However, before building, I patched the following 2 files:
In gcc/config/darwin.h:
at: #define LINK_COMMAND_SPEC :
replace:/usr/bin/libtool
with:   /path/to/odcctools/bin/libtool


Thanks.  Is there any reason to hardwire which version of libtool  
to use?


You can't just go searching for 'libtool' in the path because if  
someone installs GNU libtool, that would be found and since it's a  
completely different program, it won't work.

smime.p7s
Description: S/MIME cryptographic signature


CC0 questions

2006-05-09 Thread Kazu Hirata
Hi,

Can a jump_insn use cc0 but not actually jump?  The following
instruction is found in the H8 port.

(jump_insn 18 17 20
   (set (reg:HI 3 r3)
(eq:HI (cc0)
   (const_int 0

Is there a requirement that every cc0 user must be a jump_insn?

Can there be two consecutive insns that use cc0 after cc0 is set?  (I
don't think so.  I think there should be one-to-one correspondence
between cc0 setters and cc0 users, but I've never seen a rule written
somewhere.)

Thanks,

Kazu Hirata


Re: CC0 questions

2006-05-09 Thread Richard Kenner
 Can a jump_insn use cc0 but not actually jump?  The following
 instruction is found in the H8 port.

 (jump_insn 18 17 20
   (set (reg:HI 3 r3)
(eq:HI (cc0)
   (const_int 0

A jump_insn is supposed to modify the PC.  That one doesn't, so isn't a
legitimate jump_insn.
 
 Is there a requirement that every cc0 user must be a jump_insn?

No.

Can there be two consecutive insns that use cc0 after cc0 is set? 

No.


default_secondary_reload: class vs scratch_class

2006-05-09 Thread DJ Delorie

In default_secondary_reload, we have this code:

  if (reg_class_subset_p (reload_class, insn_class))
{
  gcc_assert (scratch_class == class);
  class = NO_REGS;

Why doesn't it allow the scratch class to be a superset of the desired
class?  I'm trying to build am33_2.0-linux-gnu, and I'm getting to
here with scratch_class GENERAL_REGS and class DATA_OR_EXTENDED_REGS.
reload_class and insn_class are ADDRESS_REGS.


-Wextra and unsigned template parameters

2006-05-09 Thread Aliesha Finkel
Hi, I'm using -Wextra (-W) to compile my code, one
feature of which is throwing a warning when an
unsigned type is checked for >= 0 since it's always
true.  In general I find this to be very helpful, but
it throws this error even for templated types.  A code
example is included below.  Does anyone know how best
to supress this warning without resorting to removing
the condition or turning off -Wextra?  Thank you in
advance.

template 
struct foo {
  foo(T bar) { if (bar >= 0) bar = 1; }
};

If foo is instantiated elsewhere then
this check could still be useful.

I apologize in advance if this question is better
suited to gcc-help.  I tried there, and not having
gotten an answer I fear it may be a defect in -Wextra
so I took it up here.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: default_secondary_reload: class vs scratch_class

2006-05-09 Thread Ian Lance Taylor
DJ Delorie <[EMAIL PROTECTED]> writes:

> In default_secondary_reload, we have this code:
> 
> if (reg_class_subset_p (reload_class, insn_class))
>   {
> gcc_assert (scratch_class == class);
> class = NO_REGS;
> 
> Why doesn't it allow the scratch class to be a superset of the desired
> class?  I'm trying to build am33_2.0-linux-gnu, and I'm getting to
> here with scratch_class GENERAL_REGS and class DATA_OR_EXTENDED_REGS.
> reload_class and insn_class are ADDRESS_REGS.

In general the reload_in and reload_out instructions should match
SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS.  It's
a sanity check.  What reason is there to have scratch_class be
something else?

Ian