LFS-6.6, Stage2, glibc, nscd.c:442

linux fan linuxscratch at gmail.com
Mon Jun 7 08:35:41 PDT 2010


# Hack to solve glibc __stack_chk_guard cross compile ( < 2.4 :)
# this schpeel in LFS-6.6 ch5 gcc-pass1 and ch5 gcc-pass2 after unpack:
glibc=$(ls  /lib/libc-*.so)
read j1 v[0] v[1] v[2] j2 <<< ${glibc//[-.]/ }
if (( v[0] < 2 )) || (( v[1] < 4 )) && [ -f gcc/configure ]; then
  # kick it
  sed -i -e '/# Test for stack protector support in target C library/ {
      a\
gcc_cv_libc_provides_ssp=yes
    } ' gcc/configure
fi

# Result: nscd with stack-smashing protector + no error in ch6 glibc
# Notes:
# If should probably have (( v[0] < 3 )) && (( v[1] < 4 )),
# but could do the sed unconditionally for target LFS-6.6.
# Don't know if needed in ch5 gcc-pass1 and/or ch5 gcc-pass2.
# Testing on host lfs-6.2/linux-2.6.22.18,
# "Everything is proceeding as I have foreseen it."



More information about the lfs-support mailing list