Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 19 years ago
parent
commit
da314ca198
4 changed files with 165 additions and 9 deletions
  1. +10
    -8
      package/base/glibc/config-400.in
  2. +112
    -0
      package/base/glibc/glibc.conf
  3. +6
    -1
      package/base/glibc/glibc.desc
  4. +37
    -0
      package/base/glibc/glibc24/gcc_eh.patch.cross

+ 10
- 8
package/base/glibc/config-400.in

@ -36,18 +36,20 @@ then
ROCKCFGSET_PKG_GLIBC22_USEIT=1
fi
bool 'Use glibc-2.2.5 instead of new glibc-2.3.x' \
ROCKCFG_PKG_GLIBC22_USEIT 0
choice ROCKCFG_PKG_GLIBC_BRANCH glibc23 \
glibc23 'Use glibc-2.3.x (recommended)' \
glibc24 'Use glibc-2.4 (for testing)' \
glibc22 'Use glibc-2.2.x'
if [ "$ROCKCFG_PKG_GLIBC22_USEIT" = 1 ] ; then
pkgfork glibc glibc22
pkgremove glibc
else
if [ "$ROCKCFG_PKG_GLIBC_BRANCH" = "glibc22" ] ; then
ROCKCFG_PKG_GLIBC22_USEIT=1
elif [ "$ROCKCFG_PKG_GLIBC_BRANCH" = "glibc23" ] ; then
bool 'Use old-style linuxthreads instead of NPTL' \
ROCKCFG_PKG_GLIBC23_LINUXTHREADS 0
pkgfork glibc glibc23
pkgremove glibc
fi
pkgfork glibc $ROCKCFG_PKG_GLIBC_BRANCH
pkgremove glibc
menu_end
fi

+ 112
- 0
package/base/glibc/glibc.conf

@ -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

+ 6
- 1
package/base/glibc/glibc.desc

@ -35,7 +35,7 @@
[C] base/library
[F] CORE
[E] group libc glibc22 glibc23
[E] group libc glibc22 glibc23 glibc24
[E] del libgd
[L] GPL
@ -55,5 +55,10 @@
[D] 2449696200 glibc-linuxthreads-2.3.6.tar.bz2 ftp://ftp.gnu.org/gnu/glibc/
#endif
#if xpkg == glibc24.*
[V] 2.4
[D] 1764169258 glibc-2.4.tar.bz2 http://ftp.gnu.org/gnu/glibc/
#endif
[CD] <COPY> cp $cachedir/glibc2[23].cache $confdir/$pkg.cache

+ 37
- 0
package/base/glibc/glibc24/gcc_eh.patch.cross

@ -0,0 +1,37 @@
# --- 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/glibc/glibc23/gcc_eh.patch.cross
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
diff -ruN glibc-2.3.4/Makeconfig glibc-2.3.4-new/Makeconfig
--- glibc-2.3.4/Makeconfig 2004-12-15 19:51:47.000000000 +0100
+++ glibc-2.3.4-new/Makeconfig 2005-03-27 15:47:19.000000000 +0200
@@ -514,12 +514,12 @@
libunwind = -lunwind
endif
ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh $(libunwind)
+ libgcc_eh := $(libunwind)
else
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
endif
gnulib := -lgcc $(libgcc_eh)
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
+static-gnulib := -lgcc $(libunwind)
libc.so-gnulib := -lgcc
endif
ifeq ($(elf),yes)

Loading…
Cancel
Save