source: rtems-tools/tools/4.11/gcc/gcc-4.8.1-rtems4.11-20130709.diff @ 98f78dc

4.104.11
Last change on this file since 98f78dc was 98f78dc, checked in by Chris Johns <chrisj@…>, on Jul 15, 2013 at 11:58:54 PM

The cxa_atexit support is a reqirement for destructor registration of
thread-local objects.

For *-*-elf it is already enabled by default. See comment line 810 in
"gcc/config.gcc".

Define TARGET_LIBGCC_SDATA_SECTION on PowerPC for RTEMS to ".sdata" to
place the dso_handle. The dso_handle is referenced by application
code. In case this code uses the small data section, the dso_handle
must be there.

This patch should be committed to GCC 4.8 and 4.9.

Test results:

href="http://gcc.gnu.org/ml/gcc-testresults/2013-07/msg00671.html

  • Property mode set to 100644
File size: 1.6 KB
  • gcc/config.gcc

    The __cxa_atexit support is a reqirement for destructor registration of
    thread-local objects.
    
    For *-*-elf it is already enabled by default.  See comment line 810 in
    "gcc/config.gcc".
    
    Define TARGET_LIBGCC_SDATA_SECTION on PowerPC for RTEMS to ".sdata" to
    place the __dso_handle.  The __dso_handle is referenced by application
    code.  In case this code uses the small data section, the __dso_handle
    must be there.
    
    This patch should be committed to GCC 4.8 and 4.9.
    
    Test results:
    
     href="http://gcc.gnu.org/ml/gcc-testresults/2013-07/msg00671.html
    
    gcc/ChangeLog
    2013-07-08  Sebastian Huber  &lt;sebastian.huber@embedded-brains.de&gt;
    
    	* config.gcc (*-*-rtems*): Use __cxa_atexit by default.
    	* config/rs6000/rtems.h (TARGET_LIBGCC_SDATA_SECTION): Define.
    ---
     gcc/config.gcc            |    1 +
     gcc/config/rs6000/rtems.h |    3 +++
     2 files changed, 4 insertions(+), 0 deletions(-)
    
    diff --git a/gcc/config.gcc b/gcc/config.gcc
    index a927964..1648dfe 100644
    a b case ${target} in 
    734734    yes) thread_file='rtems' ;;
    735735  esac
    736736  extra_options="${extra_options} rtems.opt"
     737  default_use_cxa_atexit=yes
    737738  use_gcc_stdint=wrap
    738739  ;;
    739740*-*-uclinux*)
  • gcc/config/rs6000/rtems.h

    diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
    index b910b5e..fb22be1 100644
    a b  
    3434    }                                     \
    3535  while (0)
    3636
     37#undef TARGET_LIBGCC_SDATA_SECTION
     38#define TARGET_LIBGCC_SDATA_SECTION ".sdata"
     39
    3740#undef CPP_OS_DEFAULT_SPEC
    3841#define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
    3942
Note: See TracBrowser for help on using the repository browser.