Fix for early stage2 SIGSEGV + 32-bit TARGET rework

This commit is contained in:
Jaromir Capik 2015-11-05 17:54:43 +01:00
parent 4cc081474c
commit 972d230856
2 changed files with 9 additions and 14 deletions

View File

@ -31,7 +31,7 @@ mcd $BUILDDIR/glibc
# prefill glibc cache # prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache echo libc_cv_c_cleanup=yes >> config.cache
echo libc_cv_ctors_header=yes >> config.cache #echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache echo libc_cv_gcc_builtin_expect=yes >> config.cache
@ -45,17 +45,14 @@ make DESTDIR=$ROOTFS $J ARCH=${KARCH} cross-compiling=yes install
mv mathdef.h.new mathdef.h mv mathdef.h.new mathdef.h
) )
# If we are building x86_64, then the 32-bit multilib libgcc # 32-bit multilib libgcc needs 32-bit headers
# will also need 32-bit headers. if [ ! "$TARGET32" = "" ]; then
if [ "$TARGET" = "x86_64-linux-gnu" ]; then
old_CC=$CC old_CC=$CC
old_CXX=$CC old_CXX=$CC
export CC="$TARGET-gcc -m32" export CC="$TARGET-gcc -m32"
export CXX="$TARGET-g++ -m32" export CXX="$TARGET-g++ -m32"
TARGET32=i686-pc-linux-gnu
GLIBCARGS="--prefix=/usr GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include --with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32 --enable-kernel=2.6.32

View File

@ -26,7 +26,7 @@ mcd $BUILDDIR/glibc-stage1
# prefill glibc cache # prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache echo libc_cv_c_cleanup=yes >> config.cache
echo libc_cv_ctors_header=yes >> config.cache #echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache echo libc_cv_gcc_builtin_expect=yes >> config.cache
@ -52,18 +52,16 @@ done
$TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null\ $TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null\
-o $ROOTFS/usr/lib${SUFFIX}/libc.so -o $ROOTFS/usr/lib${SUFFIX}/libc.so
# If we are building x86_64, then the 32-bit multilib libgcc
# will also need stub 32-bit libraries. # 32-bit multilib libgcc needs stub 32-bit libraries
if [ "$TARGET" = "x86_64-linux-gnu" ]; then if [ ! "$TARGET32" = "" ]; then
old_CC=$CC old_CC=$CC
old_CXX=$CC old_CXX=$CC
export CC="$TARGET-gcc -m32" export CC="$TARGET-gcc -m32"
export CXX="$TARGET-g++ -m32" export CXX="$TARGET-g++ -m32"
TARGET32="i686-pc-linux-gnu"
# setup 32-bit glibc headers # setup 32-bit glibc headers
# This path MUST be relative, not absolute
GV=$(cd $SRC; echo glibc-2*)
GLIBCARGS="--prefix=/usr GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include --with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32 --enable-kernel=2.6.32
@ -86,7 +84,7 @@ if [ "$TARGET" = "x86_64-linux-gnu" ]; then
# prefill glibc cache # prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache echo libc_cv_c_cleanup=yes >> config.cache
echo libc_cv_ctors_header=yes >> config.cache #echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache echo libc_cv_gcc_builtin_expect=yes >> config.cache