Contents of /trunk/include/uclibc.sminc
Parent Directory
|
Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
Original Path: trunk/core/include/uclibc.sminc
File size: 550 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
Original Path: trunk/core/include/uclibc.sminc
File size: 550 byte(s)
import repo
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 |