Magellan Linux

Contents of /smage/trunk/include/uclibc.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sat Jan 2 16:59:51 2010 UTC (14 years, 4 months ago) by niro
File size: 550 byte(s)
-initial smage includes
1 # 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