patchAVR C Runtime Library - Patches: patch #7467, Add support for c++ new and delete...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

patch #7467: Add support for c++ new and delete operators

Submitted by:  Bradley Jarvis <bradley_jarvis>
Submitted on:  Thu 17 Feb 2011 04:06:48 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Fri 13 May 2011 03:31:50 AM UTC, comment #2:

I say yes, but I am biased. It would save me having to add my patch every time I update avrlibc. And since I use gentoo it would be a bit of a pain to do this for each update (I currently compile/install avrlibc manually).

c++ support is also mentioned in the avrlibc FAQ, which technically is a gcc issue since that is where libstdc++ resides.

At the end of the day all it does is add an extra feature avr gcc support that if not wanted can be compiled out (simply compile library without c++ support).

The C++ support added to the avrlibc compilation files has been done in a standard way too (not just a hack fix) even if the patch in itself is a hack fix.

Bradley Jarvis <bradley_jarvis>
Thu 12 May 2011 11:17:33 PM UTC, comment #1:

We need to decide if we even want C++ code in avr-libc. Though I understand the usefulness of this patch since we still don't have libstdc++ built yet.

Eric Weddington <arcanum>
Project Administrator
Thu 17 Feb 2011 04:06:48 AM UTC, original submission:

Patch adds support to avr-libc for the c++ operators new and delete.

This patch wraps the malloc and free c functions in the new and delete operators, and as such does not support exceptions as the standard c++ new and delete do.

The patch adds c++ compilation support to configure.ac so that the file new.cc is compiled into the library. new.cc is added to stdlib. devtools files Device.am and Architecture.am are updated to fix AM_CXXFLAGS to include -mmcu and other AVR specific compile options.

This patch includes updating the faq documentation c++ support section to update the information about new and delete.

Tested on avr-libc from svn 2217 on system with avr c++ support

Todo: test compiling avr-libc on system without avr c++ support. It should simply not compile and add new.cc to libc

Bradley Jarvis <bradley_jarvis>

 

Attached Files
file #22707:  stdlib_new_delete.patch added by bradley_jarvis (6kB - application/octet-stream - Add support for c++ operators new and delete (wraps malloc and free))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by arcanum (Posted a comment)
  • -unavailable- added by bradley_jarvis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

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

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Feb 2011 04:06:48 AM UTCbradley_jarvisAttached File-=>Added stdlib_new_delete.patch, #22707

    Back to the top


    Powered by Savane 3.1-cleanup