|
#!/bin/bash
|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/mnemoc/uclibc/uclibc.conf
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
. $confdir/functions.in
|
|
|
|
uclibc_preparelocale() {
|
|
find ./charmaps -name "*.pairs" > codesets.txt
|
|
cp LOCALES locales.txt
|
|
}
|
|
uclibc_kernellinks() {
|
|
ln -svf $root/include/linux include/linux
|
|
ln -svf $root/include/asm include/asm
|
|
ln -svf $root/include/scsi include/scsi
|
|
}
|
|
|
|
# rulesets
|
|
var_append conffiles ' ' $confdir/clean_arch.config
|
|
var_append conffiles ' ' /tmp/$$.config
|
|
|
|
# i'll use this file for the generated rules
|
|
rm -f /tmp/$$.config
|
|
{
|
|
# TARGET_ARCH
|
|
cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ `"
|
|
echo "X TARGET_$cpu"
|
|
echo "X TARGET_ARCH \"$cpu\""
|
|
if [ "$arch_bigendian" = "yes" ]; then
|
|
echo "X ARCH_BIG_ENDIAN"
|
|
else
|
|
echo "X ARCH_LITTLE_ENDIAN"
|
|
fi
|
|
|
|
# CONFIG_
|
|
if [ "$arch" == "x86" ]; then
|
|
case "$ROCKCFG_X86_OPT" in
|
|
generic) echo "X CONFIG_GENERIC_386" ;;
|
|
i386) echo "X CONFIG_386" ;;
|
|
i486) echo "X CONFIG_486" ;;
|
|
pentium) echo "X CONFIG_586" ;;
|
|
pentium-mmx) echo "X CONFIG_586MMX" ;;
|
|
pentiumpro|pentium2)
|
|
echo "X CONFIG_686" ;;
|
|
pentium3) echo "X CONFIG_PENTIUMIII" ;;
|
|
pentium4) echo "X CONFIG_PENTIUM4" ;;
|
|
k6*) echo "X CONFIG_K6" ;;
|
|
athlon*) echo "X CONFIG_K7" ;;
|
|
via-c3*) echo "X CONFIG_CYRIXIII" ;;
|
|
esac
|
|
fi
|
|
|
|
# PREFIX
|
|
echo "X KERNEL_SOURCE \"$root/usr/src/linux\""
|
|
echo "X RUNTIME_PREFIX \"/\""
|
|
echo "X DEVEL_PREFIX \"/usr\""
|
|
|
|
# locale
|
|
if [ "$ROCKCFG_DISABLE_NLS" = "1" ]; then
|
|
echo "O UCLIBC_HAS_LOCALE"
|
|
else
|
|
echo "X UCLIBC_HAS_LOCALE"
|
|
echo "X UCLIBC_PREGENERATED_LOCALE_DATA"
|
|
fi
|
|
|
|
# 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"
|
|
|
|
# to get rint (iproute2)
|
|
echo "X DO_C99_MATH"
|
|
|
|
# to make sed happy
|
|
echo "X ULIBC_HAS_WCHAR"
|
|
|
|
# include user config
|
|
[ -f $base/config/$config/uclibc.config ] && \
|
|
cat $base/config/$config/uclibc.config
|
|
} > /tmp/$$.config
|
|
|
|
# if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
|
|
# hook_add preconf 5 '( cd extra/locale; uclibc_preparelocale )'
|
|
# var_append patchfiles ' ' $confdir/make_locale_after_headers.diff
|
|
# fi
|
|
|
|
var_append makeopt ' ' "PREFIX=$root"
|
|
var_append makeopt ' ' "RUNTIME_PREFIX=/ DEVEL_PREFIX=/usr/"
|
|
|
|
runconf=0
|
|
|
|
makeinstopt="$makeopt"
|
|
|
|
hook_add premake 5 "auto_config 2 ; make oldconfig ; echo 'Config is:' ; cat .config"
|
|
|
|
if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
|
|
copy_locale_data() {
|
|
local x="$( cd $archdir ; ls uClibc-locale-*.tgz.raw )"
|
|
cp -av "$archdir/$x" "extra/locale/${x%.raw}"
|
|
}
|
|
hook_add preconf 5 "copy_locale_data"
|
|
fi
|
|
|
|
if [ $stagelevel -eq 0 ]; then
|
|
var_append makeopt ' ' 'headers'
|
|
var_append makeinstopt ' ' 'install_headers'
|
|
elif [ $stagelevel -eq 1 ] ; then
|
|
var_append makeopt ' ' "CC=$arch_target-gcc CROSS=$arch_target-"
|
|
var_append makeinstopt ' ' "CC=$arch_target-gcc CROSS=$arch_target- install"
|
|
|
|
# Use host system headers
|
|
var_append CC_WRAPPER_REMOVE " " "-I/usr/include/"
|
|
var_append CC_WRAPPER_APPEND " " "-I$root/usr/include/"
|
|
else
|
|
var_append makeinstopt ' ' install
|
|
|
|
# remove symlinks to avoid shares (install_dev)
|
|
hook_add inmake 9 'rm -v include/{asm,linux,scsi}'
|
|
|
|
# utils (ldd, ldconfig )
|
|
hook_add postmake 5 'uclibc_kernellinks'
|
|
hook_add postmake 6 'eval "$MAKE $makeopt utils install_utils"'
|
|
fi
|
|
var_append flist''del '|' "usr/include"
|