This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/rules/glibc/cross.bash

37 lines
781 B
Bash
Raw Normal View History

2015-02-05 13:45:19 +00:00
source $pkg_common
requires=\
(
'gcc/cross_stage2'
)
build()
{
2015-02-08 13:31:42 +00:00
$cmd_make
2015-02-05 13:45:19 +00:00
}
host_install()
{
2015-02-08 13:31:42 +00:00
$cmd_make install_root="$cfg_dir_toolchain_sysroot" install
2015-02-05 13:45:19 +00:00
}
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 -
}