Magellan Linux

Contents of /branches/R11-unstable/include/uclibc.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 24893 - (show annotations) (download)
Tue Nov 25 02:21:44 2014 UTC (9 years, 5 months ago) by niro
File size: 550 byte(s)
-release R11-unstable
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