glibc: removed locales rule.
This commit is contained in:
parent
4bc42cd533
commit
b5e6423a35
59
rules/glibc/common.bash
Normal file
59
rules/glibc/common.bash
Normal file
@ -0,0 +1,59 @@
|
||||
version=\
|
||||
(
|
||||
'2.20'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://ftp.gnu.org/pub/gnu/glibc/glibc-$version.tar.xz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'948a6e06419a01bd51e97206861595b0'
|
||||
)
|
||||
|
||||
maintainer=\
|
||||
(
|
||||
'Ricardo Martins <rasm@fe.up.pt>'
|
||||
)
|
||||
|
||||
build_dir=$pkg_var
|
||||
|
||||
post_unpack()
|
||||
{
|
||||
patches=$(ls "$pkg_dir"/patches/*.patch)
|
||||
|
||||
cd ../glibc-$version
|
||||
if [ -n "$patches" ]; then
|
||||
cat $patches | patch -p1
|
||||
fi
|
||||
}
|
||||
|
||||
configure()
|
||||
{
|
||||
export libc_cv_slibdir='/lib'
|
||||
BUILD_CC=$cmd_host_cc \
|
||||
AR="$cfg_dir_toolchain/bin/$cfg_target_canonical-ar" \
|
||||
RANLIB="$cfg_dir_toolchain/bin/$cfg_target_canonical-ranlib" \
|
||||
CC="$cfg_dir_toolchain/bin/$cfg_target_canonical-gcc" \
|
||||
CXX="$cfg_dir_toolchain/bin/$cfg_target_canonical-g++" \
|
||||
CFLAGS=$cfg_target_gcc_flags \
|
||||
"../glibc-$version/configure" \
|
||||
$cfg_target_glibc_configure_flags \
|
||||
--prefix=/usr \
|
||||
--with-headers="$cfg_dir_toolchain_sysroot/usr/include" \
|
||||
--with-build-sysroot="$cfg_dir_toolchain_sysroot" \
|
||||
--with-sysroot="$cfg_dir_toolchain_sysroot" \
|
||||
--build="$cfg_host_canonical" \
|
||||
--host="$cfg_target_canonical" \
|
||||
--disable-multilib \
|
||||
--disable-profile \
|
||||
--without-gd \
|
||||
--without-cvs \
|
||||
--enable-add-ons \
|
||||
--with-tls \
|
||||
--enable-kernel=2.6.32 \
|
||||
--disable-nls \
|
||||
--enable-static-nss
|
||||
}
|
36
rules/glibc/cross.bash
Normal file
36
rules/glibc/cross.bash
Normal file
@ -0,0 +1,36 @@
|
||||
source $pkg_common
|
||||
|
||||
requires=\
|
||||
(
|
||||
'gcc/cross_stage2'
|
||||
)
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make -j1
|
||||
}
|
||||
|
||||
host_install()
|
||||
{
|
||||
$cmd_make install_root="$cfg_dir_toolchain_sysroot" -j1 install
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_mkdir \
|
||||
"$cfg_dir_rootfs/sbin" \
|
||||
"$cfg_dir_rootfs/usr/lib" &&
|
||||
|
||||
for f in "$cfg_dir_toolchain_sysroot/lib"/*; do
|
||||
base="$(basename $f)"
|
||||
if [ -L "$f" ]; then
|
||||
cp -vd "$f" "$cfg_dir_rootfs/usr/lib/$base"
|
||||
elif [ -f "$f" ]; then
|
||||
$cmd_target_strip -v --strip-unneeded -o "$cfg_dir_rootfs/usr/lib/$base" "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
$cmd_target_strip -v --strip-unneeded "elf/ldconfig" \
|
||||
-o "$cfg_dir_rootfs/sbin/ldconfig" &&
|
||||
tar -C "$pkg_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
1
rules/glibc/fs/etc/hosts
Normal file
1
rules/glibc/fs/etc/hosts
Normal file
@ -0,0 +1 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
1
rules/glibc/fs/etc/ld.so.conf
Normal file
1
rules/glibc/fs/etc/ld.so.conf
Normal file
@ -0,0 +1 @@
|
||||
/usr/lib
|
15
rules/glibc/fs/etc/nsswitch.conf
Normal file
15
rules/glibc/fs/etc/nsswitch.conf
Normal file
@ -0,0 +1,15 @@
|
||||
passwd: files
|
||||
group: files
|
||||
shadow: files
|
||||
|
||||
publickey: files
|
||||
|
||||
hosts: files dns
|
||||
networks: files
|
||||
|
||||
protocols: files
|
||||
services: files
|
||||
ethers: files
|
||||
rpc: files
|
||||
|
||||
netgroup: files
|
26
rules/glibc/headers.bash
Normal file
26
rules/glibc/headers.bash
Normal file
@ -0,0 +1,26 @@
|
||||
source $pkg_common
|
||||
|
||||
requires=\
|
||||
(
|
||||
'gcc/cross_stage1'
|
||||
'linux-headers/cross'
|
||||
)
|
||||
|
||||
host_install()
|
||||
{
|
||||
cat >> configparms << EOF
|
||||
install-bootstrap-headers=yes
|
||||
cross-compiling=yes
|
||||
install_root="$cfg_dir_toolchain_sysroot"
|
||||
EOF
|
||||
|
||||
$cmd_make \
|
||||
install_root="$cfg_dir_toolchain_sysroot" \
|
||||
install-bootstrap-headers=yes install-headers &&
|
||||
$cmd_mkdir "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
$cmd_make csu/subdir_lib &&
|
||||
cp csu/crt1.o csu/crti.o csu/crtn.o "$cfg_dir_toolchain_sysroot/usr/lib" &&
|
||||
$cmd_target_cc -nostdlib -nostartfiles -shared -x c /dev/null -o "$cfg_dir_toolchain_sysroot/usr/lib/libc.so"
|
||||
$cmd_mkdir "$cfg_dir_toolchain_sysroot/usr/include/gnu" &&
|
||||
touch "$cfg_dir_toolchain_sysroot/usr/include/gnu/stubs.h"
|
||||
}
|
Reference in New Issue
Block a user