bugAVR C Runtime Library - Bugs: bug #44514, Wrong build option '-mtiny-stack'...

 
 

bug #44514: Wrong build option '-mtiny-stack' instead of '-msp8'

Submitted by:  Georg-Johann Lay <gjlayde>
Submitted on:  Wed 11 Mar 2015 07:37:20 PM UTC  
 
Category: Build InfrastructureSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build system
Status: FixedPercent Complete: 100%
Assigned to: Senthil Kumar Selvaraj <saaadhu>Open/Closed: Open
Release: 1.8.0Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 18 Mar 2015 06:55:04 AM UTC, comment #1:

Committed in rev 2472- http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2472

Senthil Kumar Selvaraj <saaadhu>
Project MemberIn charge of this item.
Wed 11 Mar 2015 07:37:20 PM UTC, original submission:

Libraries are being built with a wrong option -mtiny-stack:

devtools/gen-avr-lib-tree.sh:49

To query avr-gcc for it's multilib layout, use -print-multi-lib:

For each line: Left of ';' stands the multilib subdir, right of ';' are the option(s) to select that multilib subdir (replace '@' with ' -' to get the option(s)).

Notice that -mtiny-stack is not an avr-gcc multilib option! The correct option is -msp8.

In order to query for the multilib subdir for a specific set of command options, use

Example:

'-Os' is ignored (no multilib option)
'-mmcu=avr2' is the default multilib, hence will yield '.'.
'-msp8' selects the tiny-stack subdir for avr2 and the result is './tiny-stack' i.e. 'tiny-stack'.

Also notice that apart from their multilib properties, -msp8 and -mtiny-stack are working differently:

  • -msp8 asserts that the stack pointer (SP) is 8 bits wide physically. avr-gcc will set -msp8 as needed except for the cases -mmcu=avr2 and -mmcu=avr25. These are the only core architectures which intermix devices with 16-bit wide and 8-bit wide SP. Or, to put it more precisely: avr-gcc uses -msp8 to decomposes these to sets of devices into 4 core architectures.
  • -mtiny-stack is an optimization option: Only the lower 8 bits of SP will be changed, no matter how SP is layed out physically. This applies to all devices and archirectures.
Georg-Johann Lay <gjlayde>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33357:  flags.patch added by saaadhu (453B - text/x-patch - Use msp8 instead of mtiny-stack)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by saaadhu (Updated the item)
  • -unavailable- added by gjlayde (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Mar 2015 06:55:04 AM UTCsaaadhuStatusNone=>Fixed
      Percent Complete0%=>100%
    Mon 16 Mar 2015 06:56:47 AM UTCsaaadhuAttached File-=>Added flags.patch, #33357
      Assigned toNone=>saaadhu

    Back to the top


    Powered by Savane 3.1-cleanup1