1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/uclibc/uclibc.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 . $base/package/*/uclibc/functions.in
14 var_append SYSGCC_WRAPPER_REMOVE ' ' '-mfdpic'
16 uclibc_preparelocale() {
17 # TODO: make the locales a config option, choose a subset to save space,
18 # for now we use the whole set of locales
19 (cd extra/locale; find charmaps -name "*.pairs" > codesets.txt)
20 cp extra/locale/LOCALES extra/locale/locales.txt
22 uclibc_kernellinks() {
23 ln -svf $root/usr/include/linux include/linux
24 ln -svf $root/usr/include/asm include/asm
27 cat > $root/etc/ld.so.conf <<-EOT
35 if ! atstage native; then
36 var_append makeopt " " "CROSS=${arch_target}-"
37 var_append makeinstopt " " "CROSS=${arch_target}-"
41 var_append conffiles ' ' $base/package/*/uclibc/clean_arch.config
42 var_append conffiles ' ' $builddir/.config
46 cpu=`echo $arch | arch2uname`
47 uarch=`echo $cpu | sed -e s/superh/sh/ -e s/ppc/powerpc/`
48 echo "X TARGET_$uarch"
49 echo "X TARGET_ARCH \"$cpu\""
51 if [ "$arch_bigendian" = "yes" ]; then
52 echo "X ARCH_BIG_ENDIAN"
53 echo "X ARCH_WANTS_BIG_ENDIAN"
55 echo "X ARCH_LITTLE_ENDIAN"
56 echo "X ARCH_WANTS_LITTLE_ENDIAN"
60 if [ "$SDECFG_ARM_ABI" = "gnueabi" ]; then
61 echo "O CONFIG_ARM_OABI"
62 echo "X CONFIG_ARM_EABI"
64 echo "O CONFIG_ARM_EABI"
65 echo "O CONFIG_ARM_OABI"
68 [ $uarch = sh64 ] && {
69 echo -e "O CONFIG_SH4\nX CONFIG_SH5"
72 echo -e "X CONFIG_${SDECFG_SH_OPT}"
75 uopt=`uclibc_mapx86cpu`
76 echo "O CONFIG_GENERIC_386"
77 [ "$uopt" != "" ] && echo "X CONFIG_$uopt" || echo "X CONFIG_586"
80 uopt=`uclibc_mapMIPScpu`
81 [ "$uopt" != "" ] && echo "X CONFIG_MIPS_$uopt" || echo "X CONFIG_MIPS_ISA_32"
85 echo "X KERNEL_HEADERS \"$sysroot/usr/include\""
86 echo "X RUNTIME_PREFIX \"/\""
87 echo "X DEVEL_PREFIX \"/usr\""
89 if [ "$SDECFG_STATIC" = 0 ]; then
90 echo "X SHARED_LIB_LOADER_PREFIX \"/lib\""
93 echo "X LDSO_PRELOAD_FILE_SUPPORT"
98 if [ "$SDECFG_DEBUG" -ne 0 ]; then
103 if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
104 echo "X UCLIBC_HAS_LOCALE"
106 # turning off locale will break ncurses
108 # util-linux needs it to build some mounts
109 # FIXME: this has to be done in the oposite way (disable those mounts
110 # if libc doesn't have support)
111 echo "X UCLIBC_HAS_RPC"
112 echo "X UCLIBC_HAS_FULL_RPC"
115 echo "X UCLIBC_HAS_RESOLVER_SUPPORT"
118 echo "X UCLIBC_HAS_CONTEXT_FUNCS"
121 echo "X UCLIBC_HAS_UTMPX"
122 echo "X UCLIBC_HAS_UTMP"
124 # to get rint (iproute2)
127 # to make reiserfsprogs happy
128 echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF"
131 echo "X UCLIBC_HAS_WCHAR"
134 echo "X UCLIBC_HAS_WORDEXP"
137 echo "X UCLIBC_HAS_IPV6"
140 echo "X UCLIBC_HAS_FTW"
141 # needed for coreutils
142 echo "X UCLIBC_HAS_NFTW"
144 echo "X UCLIBC_HAS_FTS"
146 # needed for acl (among others)
147 echo "X UCLIBC_HAS_GETTEXT_AWARENESS"
150 echo "X MALLOC_GLIBC_COMPAT"
152 # even more compatibility
153 echo "X UCLIBC_SUSV3_LEGACY"
154 echo "X UCLIBC_SUSV4_LEGACY"
155 echo "X UCLIBC_HAS_PROGRAM_INVOCATION_NAME"
156 echo "X UCLIBC_HAS___PROGNAME"
157 echo "X UCLIBC_HAS_GNU_GETOPT"
158 echo "X UCLIBC_HAS_GLOB"
159 echo "X UCLIBC_HAS_GNU_GLOB"
160 echo "X UCLIBC_HAS_FLOATS"
162 # many packages, too:
163 #echo "X UCLIBC_HAS_LIBINTL" # stubs only :-/
164 echo "X UCLIBC_HAS_LIBICONV"
167 echo "X UCLIBC_HAS_LFS"
170 echo "X UCLIBC_HAS_LINUXTHREADS"
171 echo "X LINUXTHREADS_NEW"
172 echo "X UCLIBC_HAS_THREADS_NATIVE"
175 echo "X UCLIBC_HAS_GLIBC_CUSTOM_STREAMS"
176 echo "X UCLIBC_USE_NETLINK"
177 echo "X UCLIBC_SUPPORT_AI_ADDRCONFIG"
180 echo "X UCLIBC_HAS_LIBUTIL"
181 echo "X UCLIBC_HAS_PTY"
184 if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
185 hook_add preconf 5 'uclibc_preparelocale'
190 # add custom/target configuration from $targetdir
191 if [ -e $targetdir/uclibc.config ]; then
192 var_append conffiles ' ' $targetdir/uclibc.config
194 default_config > $builddir/.config
196 hook_add preconf 3 "uclibc_preconf"
200 # FIXME: inject X options early - so 2 loops are enough
202 eval $MAKE $makeopt headers
204 # remove symlinks to avoid shares (install_dev)
205 rm -vf include/{asm,asm-generic,linux}
207 eval $MAKE $makeinstopt PREFIX=$sysroot install_headers
212 # FIXME: inject X options early - so 2 loops are enough
214 eval $MAKE $makeopt oldconfig
216 eval $MAKE $makeopt headers
217 if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
218 eval $MAKE $makeopt locale_headers
220 eval $MAKE $makeopt all
222 # remove symlinks to avoid shares (install_dev)
223 rm -vf include/{asm,asm-*,linux}
225 eval $MAKE $makeinstopt headers
226 eval $MAKE $makeinstopt install
228 # utils (ldd, ldconfig )
230 eval $MAKE $makeopt -C utils
231 eval $MAKE $makeinstopt install_utils
234 var_remove_regex makeopt ' ' 'prefix=[^ ]*'
236 var_append makeopt ' ' PREFIX=$root
237 if atstage toolchain; then
238 custmain=uclibc_stage0
242 hook_add postdoc 5 'cp -v .config $root$docdir/'
243 hook_add postinstall 5 'uclibc_ldsoconf'
244 makeinstopt="$makeopt"