# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/uclibc/uclibc.conf # Copyright (C) 2004 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- . $base/package/*/uclibc/functions.in var_append SYSGCC_WRAPPER_REMOVE ' ' '-mfdpic' uclibc_preparelocale() { # TODO: make the locales a config option, choose a subset to save space, # for now we use the whole set of locales (cd extra/locale; find charmaps -name "*.pairs" > codesets.txt) cp extra/locale/LOCALES extra/locale/locales.txt } uclibc_kernellinks() { ln -svf $root/usr/include/linux include/linux ln -svf $root/usr/include/asm include/asm } uclibc_ldsoconf() { cat > $root/etc/ld.so.conf <<-EOT /lib /usr/lib /usr/X11/lib /opt/*/lib EOT } if ! atstage native; then var_append makeopt " " "CROSS=${arch_target}-" var_append makeinstopt " " "CROSS=${arch_target}-" fi # rulesets var_append conffiles ' ' $base/package/*/uclibc/clean_arch.config var_append conffiles ' ' $builddir/.config default_config() { cpu=`echo $arch | arch2uname` uarch=`echo $cpu | sed -e s/superh/sh/ -e s/ppc/powerpc/` echo "X TARGET_$uarch" echo "X TARGET_ARCH \"$cpu\"" if [ "$arch_bigendian" = "yes" ]; then echo "X ARCH_BIG_ENDIAN" echo "X ARCH_WANTS_BIG_ENDIAN" else echo "X ARCH_LITTLE_ENDIAN" echo "X ARCH_WANTS_LITTLE_ENDIAN" fi [ $arch = arm ] && { if [ "$SDECFG_ARM_ABI" = "gnueabi" ]; then echo "O CONFIG_ARM_OABI" echo "X CONFIG_ARM_EABI" else echo "O CONFIG_ARM_EABI" echo "O CONFIG_ARM_OABI" fi } [ $uarch = sh64 ] && { echo -e "O CONFIG_SH4\nX CONFIG_SH5" } [ $uarch = sh ] && { echo -e "X CONFIG_${SDECFG_SH_OPT}" } [ $arch = x86 ] && { uopt=`uclibc_mapx86cpu` echo "O CONFIG_GENERIC_386" [ "$uopt" != "" ] && echo "X CONFIG_$uopt" || echo "X CONFIG_586" } [ $arch = mips ] && { uopt=`uclibc_mapMIPScpu` [ "$uopt" != "" ] && echo "X CONFIG_MIPS_$uopt" || echo "X CONFIG_MIPS_ISA_32" } # PREFIX echo "X KERNEL_HEADERS \"$sysroot/usr/include\"" echo "X RUNTIME_PREFIX \"/\"" echo "X DEVEL_PREFIX \"/$prefix\"" if [ "$SDECFG_STATIC" = 0 ]; then echo "X SHARED_LIB_LOADER_PREFIX \"/lib\"" # ld.so preload echo "X LDSO_PRELOAD_FILE_SUPPORT" else echo "O HAVE_SHARED" fi if [ "$SDECFG_DEBUG" -ne 0 ]; then echo "O DOSTRIP" fi # locale if [ "$SDECFG_DISABLE_NLS" = "0" ]; then echo "X UCLIBC_HAS_LOCALE" fi # turning off locale will break ncurses # util-linux needs it to build some mounts # FIXME: this has to be done in the oposite way (disable those mounts # if libc doesn't have support) echo "X UCLIBC_HAS_RPC" echo "X UCLIBC_HAS_FULL_RPC" # glib echo "X UCLIBC_HAS_RESOLVER_SUPPORT" # openssl echo "X UCLIBC_HAS_CONTEXT_FUNCS" # sysvinit echo "X UCLIBC_HAS_UTMPX" echo "X UCLIBC_HAS_UTMP" # to get rint (iproute2) echo "X DO_C99_MATH" # to make reiserfsprogs happy echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF" # to make sed happy echo "X UCLIBC_HAS_WCHAR" # to make alsa happy echo "X UCLIBC_HAS_WORDEXP" # I want V6 echo "X UCLIBC_HAS_IPV6" # needed for attr echo "X UCLIBC_HAS_FTW" # needed for coreutils echo "X UCLIBC_HAS_NFTW" # needed for libelf echo "X UCLIBC_HAS_FTS" # needed for acl (among others) echo "X UCLIBC_HAS_GETTEXT_AWARENESS" # make make happy :) echo "X MALLOC_GLIBC_COMPAT" # even more compatibility echo "X UCLIBC_SUSV3_LEGACY" echo "X UCLIBC_SUSV4_LEGACY" echo "X UCLIBC_HAS_PROGRAM_INVOCATION_NAME" echo "X UCLIBC_HAS___PROGNAME" echo "X UCLIBC_HAS_GNU_GETOPT" echo "X UCLIBC_HAS_GLOB" echo "X UCLIBC_HAS_GNU_GLOB" echo "X UCLIBC_HAS_FLOATS" # many packages, too: #echo "X UCLIBC_HAS_LIBINTL" # stubs only :-/ echo "X UCLIBC_HAS_LIBICONV" # Large file support echo "X UCLIBC_HAS_LFS" # Threading echo "X UCLIBC_HAS_LINUXTHREADS" echo "X LINUXTHREADS_NEW" echo "X UCLIBC_HAS_THREADS_NATIVE" # util-linux et al. echo "X UCLIBC_HAS_GLIBC_CUSTOM_STREAMS" echo "X UCLIBC_USE_NETLINK" echo "X UCLIBC_SUPPORT_AI_ADDRCONFIG" # tmux echo "X UCLIBC_HAS_LIBUTIL" echo "X UCLIBC_HAS_PTY" } if [ "$SDECFG_DISABLE_NLS" = "0" ]; then hook_add preconf 5 'uclibc_preparelocale' fi uclibc_preconf() { # add custom/target configuration from $targetdir if [ -e $targetdir/uclibc.config ]; then var_append conffiles ' ' $targetdir/uclibc.config fi default_config > $builddir/.config } hook_add preconf 3 "uclibc_preconf" uclibc_stage0() { hook_eval preconf # FIXME: inject X options early - so 2 loops are enough auto_config 3 eval $MAKE $makeopt headers # remove symlinks to avoid shares (install_dev) rm -vf include/{asm,asm-generic,linux} eval $MAKE $makeinstopt PREFIX=$sysroot install_headers } uclibc_main() { hook_eval preconf # FIXME: inject X options early - so 2 loops are enough auto_config 3 eval $MAKE $makeopt oldconfig eval $MAKE $makeopt headers if [ "$SDECFG_DISABLE_NLS" = "0" ]; then eval $MAKE $makeopt locale_headers fi eval $MAKE $makeopt all # remove symlinks to avoid shares (install_dev) rm -vf include/{asm,asm-*,linux} eval $MAKE $makeinstopt headers eval $MAKE $makeinstopt install # utils (ldd, ldconfig) uclibc_kernellinks eval $MAKE $makeopt -C utils eval $MAKE $makeinstopt install_utils } var_remove_regex makeopt ' ' 'prefix=[^ ]*' var_append makeopt ' ' PREFIX=$root if atstage toolchain; then custmain=uclibc_stage0 else custmain=uclibc_main fi hook_add postdoc 5 'cp -v .config $root$docdir/' hook_add postinstall 5 'uclibc_ldsoconf' makeinstopt="$makeopt" runconf=0