avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and


From: Bob Paddock
Subject: Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?
Date: Tue, 26 Jun 2012 08:57:45 -0400

>> If main(), and many other used functions, are being removed little
>> wonder the program doesn't work with LTO.
>
>
> By no means main should be optimized away, so there is evidence that
> something fundamental is breaking.
>
> Is main decorated with attributes?

#define MAIN_OS __attribute__(( OS_main ))

MAIN_OS int main( void )
{
  hardware_setup();
    for(;;)
      {
        stuff
      }
  return( 0 );
}

I'm hoping LTO will get rid of things like _exit that can never be reached.

Taking the OS_Main off leaving just 'int main()' made no difference.

>> If you have any interest in looking at this code, let me know and I'll
>> put it on a web site for you to download.
>
>
> Yes, if the project is ready to be easily rebuilt (no missing
> headers/directories, etc)

All of the source/headers is self-contained.

I'm using the Utils from WinAVR20100101 to get the POSIX shell environment:

http://sourceforge.net/projects/winavr/files/latest/download

Utils from 
http://sourceforge.net/projects/getgnuwin32/files/latest/download?source=files
to get a few more utilities.

Lastly the latest version of SRec, which is 1.59 from the link below
SourceForge shows it incorrectly as 1.47 in several places:

http://sourceforge.net/projects/srecord/files/srecord-win32/1.59/srecord-1.59-win32.zip/download

The bottom line is a *completely* self-contained project of all
sources and tools is a .zip file of 250 Megs.

Tell me what you don't need, to make a more manageable download.
For example you probably don't really need me to send you back the
4.7.1-rc1 compiler.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]