libc/uClibc: force use of ctor/dtor
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Aug 13 00:05:51 2011 +0200 (2011-08-13)
changeset 2600fac4018427d2
parent 2599 c096c896e745
child 2601 f210031278e0
libc/uClibc: force use of ctor/dtor

Although ctor/dtor do not seem strictly required, missing them proves
rather inconvenient, as ld can't link binaries.

Reported-by: John Spencer <maillist-uclibc@barfooze.de> (sh4rm4 on IRC)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/libc/uClibc.sh
     1.1 --- a/scripts/build/libc/uClibc.sh	Wed Aug 10 23:09:06 2011 +0200
     1.2 +++ b/scripts/build/libc/uClibc.sh	Sat Aug 13 00:05:51 2011 +0200
     1.3 @@ -365,6 +365,11 @@
     1.4              ;;
     1.5      esac
     1.6  
     1.7 +    # We always want ctor/dtor
     1.8 +    cat <<-ENDSED
     1.9 +		s/^# (UCLIBC_CTOR_DTOR) is not set/\\1=y/
    1.10 +		ENDSED
    1.11 +
    1.12      # Change paths to work with crosstool-NG
    1.13      # From http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=16846&view=rev
    1.14      #  " we just want the kernel headers, not the whole kernel source ...
    1.15 @@ -443,7 +448,6 @@
    1.16      if [ "${CT_CC_LANG_CXX}" = "y" ]; then
    1.17          cat <<-ENDSED
    1.18  			s/^# DO_C99_MATH is not set/DO_C99_MATH=y/
    1.19 -			s/^# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/
    1.20  			s/^# UCLIBC_HAS_GNU_GETOPT is not set/UCLIBC_HAS_GNU_GETOPT=y/
    1.21  			ENDSED
    1.22      fi