diff options
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc.inc')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc.inc | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc deleted file mode 100644 index 02cd8d1ae5..0000000000 --- a/meta/recipes-core/uclibc/uclibc.inc +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | SUMMARY = "C library for embedded systems" | ||
2 | DESCRIPTION = "The name uClibc is an abbreviation for 'the \ | ||
3 | microcontroller C library'. For simplicity, uClibc is pronounced \ | ||
4 | 'yew-see-lib-see'. The goal of uClibc is to provide as much \ | ||
5 | functionality as possible in a small amount of space, and it is intended \ | ||
6 | primarily for embedded use. It is also highly configurable in supported \ | ||
7 | features, at the cost of ABI differences for different configurations. \ | ||
8 | uClibc has been designed from the ground up to be a C library for \ | ||
9 | embedded Linux. It is NOT compatible with binaries linked against glibc." | ||
10 | |||
11 | LICENSE = "LGPLv2.1+" | ||
12 | SECTION = "libs" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
14 | file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \ | ||
15 | file://${S}/test/regex/testregex.c;beginline=1;endline=31;md5=234efb227d0a40677f895e4a1e26e960" | ||
16 | |||
17 | require uclibc-config.inc | ||
18 | |||
19 | PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" | ||
20 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}" | ||
21 | |||
22 | # siteconfig.bbclass runs configure which needs a working compiler | ||
23 | # For the compiler to work we need a working libc yet libc isn't | ||
24 | # in the sysroots directory at this point. This means the libc.so | ||
25 | # linker script won't work as the --sysroot setting isn't correct. | ||
26 | # Here we create a hacked up libc linker script and pass in the right | ||
27 | # flags to let configure work. Ugly. | ||
28 | EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'" | ||
29 | siteconfig_do_siteconfig_gencache_prepend = " \ | ||
30 | mkdir -p ${WORKDIR}/site_config_libc; \ | ||
31 | cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \ | ||
32 | sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \ | ||
33 | " | ||
34 | |||
35 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
36 | # and our build is not a uclibc one, and we skip a glibc one if our build | ||
37 | # is a uclibc build. | ||
38 | COMPATIBLE_HOST = ".*-uclibc.*" | ||
39 | |||
40 | INHIBIT_DEFAULT_DEPS = "1" | ||
41 | |||
42 | # There appears to be a parallel race in uclibc: | ||
43 | # GEN /extra/locale/locale_collate.h | ||
44 | # xargs: ../..//extra/locale/gen_collate: Text file busy | ||
45 | # make[1]: *** [../..//extra/locale/locale_collate.h] Error 126 | ||
46 | PARALLEL_MAKE = "" | ||
47 | |||
48 | # do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in | ||
49 | # the CFLAGS (when building the utils). | ||
50 | OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'" | ||
51 | EXTRA_OEMAKE = "${OEMAKE_NO_CC} \ | ||
52 | 'HOSTCC=${BUILD_CC}' \ | ||
53 | 'HOST_CFLAGS=${BUILD_CFLAGS}' \ | ||
54 | 'CC=${CC}' \ | ||
55 | ARCH=${UCLIBC_ARCH} \ | ||
56 | V=1" | ||
57 | |||
58 | EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}" | ||
59 | |||
60 | # -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported | ||
61 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860 | ||
62 | # | ||
63 | CFLAGS_remove_arm = "-fno-omit-frame-pointer" | ||
64 | UCLIBC_EXTRA_CFLAGS = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}" | ||
65 | |||
66 | # Doesn't compile in MIPS16e mode due to use of hand-written | ||
67 | # assembly | ||
68 | MIPS_INSTRUCTION_SET_pn-uclibc = "mips" | ||
69 | |||
70 | configmangle = '/^KERNEL_HEADERS/d; \ | ||
71 | /^RUNTIME_PREFIX/d; \ | ||
72 | /^DEVEL_PREFIX/d; \ | ||
73 | /^SHARED_LIB_LOADER_PREFIX/d; \ | ||
74 | /^UCLIBC_EXTRA_CFLAGS/d; \ | ||
75 | s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ | ||
76 | ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) == "thumb"]} \ | ||
77 | ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \ | ||
78 | ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \ | ||
79 | /^CROSS/d; \ | ||
80 | /^TARGET_ARCH=/d; \ | ||
81 | /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \ | ||
82 | s,^DOSTRIP.*,# DOSTRIP is not set,g; \ | ||
83 | /_[EO]*ABI/d; \ | ||
84 | /HAS_FPU/d; \ | ||
85 | ${@["","s,.*MULTILIB_DIR.*,MULTILIB_DIR=\"${baselib}\",;"][d.getVar("baselib", True) != "lib"]} \ | ||
86 | ' | ||
87 | OE_FEATURES = "${@features_to_uclibc_conf(d)}" | ||
88 | OE_DEL = "${@features_to_uclibc_del(d)}" | ||
89 | python () { | ||
90 | if "${OE_DEL}": | ||
91 | d.setVar('configmangle_append', "${OE_DEL}" + "\n") | ||
92 | |||
93 | if "${OE_FEATURES}": | ||
94 | d.setVar('configmangle_append', | ||
95 | "/^### DISTRO FEATURES$/a\\\n%s\n\n" % | ||
96 | ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) | ||
97 | d.setVar('configmangle_append', | ||
98 | "/^### CROSS$/a\\\n%s\n" % | ||
99 | ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", | ||
100 | "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"", | ||
101 | "KERNEL_HEADERS=\"${STAGING_INCDIR}\"", | ||
102 | "RUNTIME_PREFIX=\"/\"", | ||
103 | "DEVEL_PREFIX=\"/${prefix}\"", | ||
104 | "SHARED_LIB_LOADER_PREFIX=\"/lib\"", | ||
105 | ]) | ||
106 | )) | ||
107 | d.setVar('configmangle_append', | ||
108 | "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" % | ||
109 | ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}")) | ||
110 | d.setVar('configmangle_append', | ||
111 | "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', True) in [ 'soft' ]])) | ||
112 | if "${UCLIBC_ENDIAN}": | ||
113 | d.setVar('configmangle_append', | ||
114 | "/^### ABI$/a\\\nARCH_WANTS_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}")) | ||
115 | if "${UCLIBC_ABI}": | ||
116 | d.setVar('configmangle_append', | ||
117 | "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}")) | ||
118 | } | ||
119 | |||
120 | python do_patch_append() { | ||
121 | import subprocess | ||
122 | subprocess.call("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux", shell=True) | ||
123 | subprocess.call("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm", shell=True) | ||
124 | } | ||
125 | |||
126 | do_configure() { | ||
127 | rm -f ${S}/.config | ||
128 | |||
129 | # OpenEmbedded splits the uClibc.config in two parts: | ||
130 | # uClibc.machine, uClibc.distro | ||
131 | echo "### uClibc.machine ###" >${S}/merged.config | ||
132 | cat ${WORKDIR}/uClibc.machine >>${S}/merged.config | ||
133 | echo "### uClibc.distro ###" >>${S}/merged.config | ||
134 | cat ${WORKDIR}/uClibc.distro >>${S}/merged.config | ||
135 | echo "### CROSS" >>${S}/merged.config | ||
136 | echo "### TGT" >>${S}/merged.config | ||
137 | echo "### MMU" >>${S}/merged.config | ||
138 | echo "### FPU" >>${S}/merged.config | ||
139 | echo "### ABI" >>${S}/merged.config | ||
140 | echo "### DISTRO FEATURES" >>${S}/merged.config | ||
141 | |||
142 | # Mangle the resulting .config depending on OE variables | ||
143 | sed -i -e '${configmangle}' ${S}/merged.config | ||
144 | cp ${S}/merged.config .config | ||
145 | merge_config.sh -r -n -m .config ${@" ".join(find_cfgs(d))} | ||
146 | cml1_do_configure | ||
147 | |||
148 | } | ||
149 | |||
150 | do_install() { | ||
151 | oe_runmake PREFIX=${D} install | ||
152 | rm -rf ${D}${includedir}/iconv.h | ||
153 | } | ||
154 | |||
155 | # build ldd, ldconfig and friends but only for full uclibc | ||
156 | do_install_append_pn-uclibc () { | ||
157 | oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" -C utils utils_install | ||
158 | } | ||
159 | |||