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 authentication level.

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

Submitter:  Bradley Jarvis <bradley_jarvis>
Submitted:  Thu 17 Feb 2011 04:06:48 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/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>
Group 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>

 

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

Attached Files
file #22707:  stdlib_new_delete.patch added by bradley_jarvis (6KiB - 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
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by bradley_jarvis (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-17 bradley_jarvis Attached File- Added stdlib_new_delete.patch, #22707

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code