# --- 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/base/glibc23/glibc23.conf
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 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 ---
|
|
|
|
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
|
|
|
|
# Disable glibc internal debuging but build debuging and profile
|
|
# code so we can use this glibc to debug other programs.
|
|
CFLAGS="$CFLAGS -g -DNDEBUG=1" ../configure --prefix=$root/usr \
|
|
--with-gnu-binutils --enable-add-ons $G_PROFILE \
|
|
--with-headers=$root/usr/src/linux/include --with-gd=/usr \
|
|
--with-gd-lib=/usr/lib --with-gd-include=/usr/include \
|
|
--build=${arch_build} --host=${arch_target}
|
|
|
|
eval $MAKE prefix=/usr slibdir=/lib sysconfdir=/etc all
|
|
eval $MAKE prefix=/usr slibdir=/lib \
|
|
sysconfdir=/etc install_root=$root install
|
|
ln -sf libbsd-compat.a $root/usr/lib/libbsd.a
|
|
|
|
# Misc. stuff
|
|
#
|
|
if [ $stagelevel -gt 1 ] ; then
|
|
|
|
# install locales and linuxthread manpages
|
|
#
|
|
eval $MAKE localedata/install-locales
|
|
cp ../localedata/SUPPORTED $root/usr/share/i18n/
|
|
mkdir -p $root/usr/share/man/man3
|
|
if [ -f /usr/bin/perl ] ; then
|
|
eval $MAKE -C ../linuxthreads/man \
|
|
MANDIR=$root/usr/share/man/man3 all install
|
|
fi
|
|
|
|
# copy linuxthreads and crypt documentation
|
|
#
|
|
cp ../linuxthreads/ChangeLog $docdir/ChangeLog.threads
|
|
cp ../linuxthreads/Changes $docdir/Changes.threads
|
|
cp ../linuxthreads/README $docdir/README.threads
|
|
cp ../linuxthreads/FAQ.html $docdir/FAQ-threads.html
|
|
cp -r ../linuxthreads/Examples $docdir/examples.threads
|
|
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
|
|
fi
|
|
|
|
# No wrong absolute path in libc.so
|
|
#
|
|
if [ $stagelevel -le 1 ] ; then
|
|
libcso=$root/usr/lib/libc.so
|
|
sed 's,/[^ ]*/,,g' < $libcso > $libcso.new
|
|
mv $libcso.new $libcso
|
|
fi
|
|
|
|
# Install ld.so.conf
|
|
#
|
|
{ echo "/usr/lib" ; echo "/usr/X11/lib"
|
|
echo "/usr/local/lib" ; echo "/opt/*/lib"
|
|
} > $root/etc/ld.so.conf
|
|
|
|
# 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
|
|
}
|
|
|
|
glibc_prepatch() {
|
|
tar $taropt $archdir/glibc-linuxthreads-$threadsver.tar.bz2
|
|
}
|
|
|
|
glibc_stage0() {
|
|
mkdir -p objdir; cd objdir
|
|
contopt="${confopt% --target=*}"
|
|
|
|
var_append confopt " " "--enable-add-ons --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 $confopt"
|
|
make -k cross-compiling=yes install-headers || true
|
|
|
|
# make some final adaptions
|
|
cp -v ../include/features.h $root/$prefix/include
|
|
cp -v bits/stdio_lim.h $root/$prefix/include/bits
|
|
mkdir -p $root/$prefix/include/gnu
|
|
touch $root/$prefix/include/gnu/stubs.h
|
|
}
|
|
|
|
threadsver="$ver"
|
|
prepatch="glibc_prepatch"
|
|
|
|
if [ $stagelevel -eq 0 ]; then
|
|
custmain="glibc_stage0"
|
|
else
|
|
custmain="glibc_custmain"
|
|
fi
|
|
|
|
if [ $stagelevel -eq 1 ]; then
|
|
var_append patchfiles " " $confdir/no_path_in_glibcso.diff
|
|
fi
|
|
|