Magellan Linux

Annotation of /branches/R11-stable/include/uclibc.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6654 - (hide annotations) (download)
Tue Sep 14 16:46:32 2010 UTC (14 years, 2 months ago) by niro
Original Path: branches/magellan-next/include/uclibc.sminc
File size: 550 byte(s)
imported from trunk
1 niro 2 # uclibc functions
2    
3     # checks if compilation should be against uclibc
4     target_uclibc()
5     {
6     local cc
7    
8     if [ -n "${CHOST}" ]
9     then
10     # check if uclibc target is set in CHOST
11     [ -n "$(echo ${CHOST}|grep uclibc)" ] && return 0
12     fi
13    
14     # get gcc and check
15     [ -n "${CC}" ] && cc="${CC}" || cc="$(which gcc)"
16     [ -n "$(${cc} -dumpmachine|grep uclibc)" ] && return 0
17    
18     # or get g++ and check
19     [ -n "${CXX}" ] && cc="${CXX}" || cc="$(which g++)"
20     [ -n "$(${cc} -dumpmachine|grep uclibc)" ] && return 0
21    
22     # nothing match, we are *not* on uclibc linux
23     return 1
24     }
25    
26