|
|
@ -28,6 +28,10 @@ pkg_glibc_cross="" |
|
|
|
|
|
|
|
case "$xpkg" in |
|
|
|
glibc??-cross-*) |
|
|
|
if [[ $xpkg = *24 ]] ; then |
|
|
|
echo_error "Cross package not yet supported by glibc24. Use glibc23!" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
pkg_glibc_cross="${xpkg#glibc*-cross-}" |
|
|
|
pkg_glibc_version=${pkg_glibc_version%-cross-*} |
|
|
|
pkg_glibc_target="${pkg_glibc_cross}-unknown-linux-gnu" |
|
|
@ -43,6 +47,7 @@ esac |
|
|
|
|
|
|
|
pkg_glibc_linuxthreads=1 |
|
|
|
[ "$ROCKCFG_PKG_GLIBC23_LINUXTHREADS" = "0" ] && pkg_glibc_linuxthreads=0 |
|
|
|
[[ $xpkg = *24 ]] && pkg_glibc_linuxthreads=0 |
|
|
|
|
|
|
|
# fall back to linuxthreads for cross glibcs |
|
|
|
[ -n "$pkg_glibc_cross" ] && pkg_glibc_linuxthreads=1 |
|
|
@ -269,6 +274,96 @@ glibc_custmain() { |
|
|
|
fi |
|
|
|
#--------------------------------- |
|
|
|
|
|
|
|
#--------------------------------- |
|
|
|
if [ $pkg_glibc_version = 24 ]; then |
|
|
|
|
|
|
|
glibc_custmain() { |
|
|
|
# check whether profiling is enabled |
|
|
|
if [ $ROCKCFG_PKG_GLIBC_ENABLE_PROFILE = 1 ] ; then |
|
|
|
G_PROFILE=--enable-profile |
|
|
|
else |
|
|
|
G_PROFILE=--disable-profile |
|
|
|
fi |
|
|
|
|
|
|
|
# Let's use an 'objdir' directory for building glibc |
|
|
|
mkdir -p objdir; cd objdir |
|
|
|
|
|
|
|
# NPTL doesn't work with plain i386 CPUs |
|
|
|
temp_arch_target="${arch_target/i386/i486}" |
|
|
|
temp_arch_build="${arch_build/i386/i486}" |
|
|
|
configure_without_tls="" |
|
|
|
|
|
|
|
# Disable glibc internal debuging but build debuging and profile |
|
|
|
# code so we can use this glibc to debug other programs. |
|
|
|
create_config_cache >> config.cache |
|
|
|
CFLAGS="$CFLAGS -g -DNDEBUG=1" ../configure --prefix=$root/$prefix \ |
|
|
|
--with-gnu-binutils --enable-add-ons"$ADDONS" $G_PROFILE \ |
|
|
|
--with-headers=$root/$prefix/include --with-gd=/$prefix \ |
|
|
|
--with-gd-lib=/$prefix/lib --with-gd-include=/$prefix/include \ |
|
|
|
$configure_without_tls --cache-file=config.cache \ |
|
|
|
--build=${temp_arch_build} --host=${temp_arch_target} |
|
|
|
|
|
|
|
eval $MAKE prefix=/usr slibdir=/lib sysconfdir=/etc all |
|
|
|
eval $MAKE prefix=/$prefix slibdir=/lib \ |
|
|
|
sysconfdir=/etc install_root=$root install |
|
|
|
|
|
|
|
ln -sf libbsd-compat.a $root/$prefix/lib/libbsd.a |
|
|
|
|
|
|
|
# install locales |
|
|
|
# |
|
|
|
if [ $stagelevel -gt 1 ] ; then |
|
|
|
# otherwise we risk the hosts /usr/lib/locale/locale-archive being overwritten |
|
|
|
eval $MAKE localedata/install-locales |
|
|
|
cp ../localedata/SUPPORTED $root/usr/share/i18n/ |
|
|
|
fi |
|
|
|
|
|
|
|
# copy crypt documentation |
|
|
|
# |
|
|
|
cp ../crypt/README.ufc-crypt $docdir/README.crypt |
|
|
|
|
|
|
|
# NSCD Init script and config |
|
|
|
# |
|
|
|
cp $confdir/nscd.conf $confdir/nsswitch.conf $root/etc/ |
|
|
|
install_init nscd $confdir/nscd.init |
|
|
|
|
|
|
|
# No wrong absolute path in *.so linker scripts |
|
|
|
# |
|
|
|
if [ -d $root/ROCK/tools.cross -a -z "$pkg_glibc_cross" ]; then |
|
|
|
rm -f $root/ROCK/tools.cross/$arch_target/lib/libc.so |
|
|
|
rm -f $root/ROCK/tools.cross/$arch_target/lib/libpthread.so |
|
|
|
sed 's,/[^ ]*/,,g' $root/$prefix/lib/libc.so > $root/ROCK/tools.cross/$arch_target/lib/libc.so |
|
|
|
sed 's,/[^ ]*/,,g' $root/$prefix/lib/libpthread.so > $root/ROCK/tools.cross/$arch_target/lib/libpthread.so |
|
|
|
fi |
|
|
|
|
|
|
|
# Install ld.so.conf |
|
|
|
# |
|
|
|
if [ ! -f $root/etc/ld.so.conf ] |
|
|
|
then |
|
|
|
{ echo "/usr/lib" ; echo "/usr/X11/lib" |
|
|
|
echo "/usr/local/lib" ; echo "/opt/*/lib" |
|
|
|
} > $root/etc/ld.so.conf |
|
|
|
fi |
|
|
|
|
|
|
|
# Move 'ldconfig' and 'sln' binaries |
|
|
|
# |
|
|
|
if [ -f "$root/usr/sbin/ldconfig" ]; then |
|
|
|
mv -v $root/usr/sbin/ldconfig $root/sbin/ldconfig |
|
|
|
fi |
|
|
|
if [ -f "$root/usr/sbin/sln" ]; then |
|
|
|
mv -v $root/usr/sbin/sln $root/sbin/sln |
|
|
|
fi |
|
|
|
|
|
|
|
# Create /lib/ld-lsb.so.1 symlink |
|
|
|
# |
|
|
|
if [ -f $root/lib/ld-linux-$arch_machine.so.2 ]; then |
|
|
|
ln -vfs ld-linux-$arch_machine.so.2 $root/lib/ld-lsb.so.1 |
|
|
|
elif [ -f $root/lib/ld-linux.so.2 ]; then |
|
|
|
ln -vfs ld-linux.so.2 $root/lib/ld-lsb.so.1 |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
fi |
|
|
|
#--------------------------------- |
|
|
|
|
|
|
|
glibc_prepatch() { |
|
|
|
if [ $pkg_glibc_linuxthreads = 1 -a -f $archdir/*linuxthreads*.tar.bz2 ]; then |
|
|
@ -277,6 +372,23 @@ glibc_prepatch() { |
|
|
|
} |
|
|
|
|
|
|
|
glibc_stage0() { |
|
|
|
if [ $pkg_glibc_version = 24 ] |
|
|
|
then |
|
|
|
mkdir -p objdir; cd objdir |
|
|
|
|
|
|
|
confopt="${confopt% --target=*}" |
|
|
|
|
|
|
|
var_append confopt " " "--enable-add-ons"$ADDONS" --build=\$arch_build \ |
|
|
|
--host=\$arch_target" |
|
|
|
|
|
|
|
# due to assembler check - and we do not yet have as ... |
|
|
|
[ $arch = hppa ] && var_append confopt " " "--enable-hacker-mode" |
|
|
|
|
|
|
|
eval "../configure --enable-add-ons"$ADDONS" $confopt" |
|
|
|
|
|
|
|
make -k cross-compiling=yes install-headers || true |
|
|
|
cp -v ../include/features.h $root/$prefix/include |
|
|
|
fi |
|
|
|
if [ $pkg_glibc_version = 23 ] |
|
|
|
then |
|
|
|
# .cross patches don't get applied automagically if we build a -cross- pkg |
|
|
|