Contents of /smage/tags/mcore-0.2.0/include/uclibc.sminc
Parent Directory | Revision Log
Revision 1353 -
(show annotations)
(download)
Mon Feb 28 19:51:14 2011 UTC (13 years, 7 months ago) by niro
File size: 550 byte(s)
Mon Feb 28 19:51:14 2011 UTC (13 years, 7 months ago) by niro
File size: 550 byte(s)
tagged 'mcore-0.2.0'
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 |