Matt Bartley wrote:
I've tried booting my host system with kernel linux-2.6.11.12 and building LFS up through chapter 6 gcc, but not yet installing gcc. The tests appear normal. Then I rebooted my host system into linux-2.6.12, chrooted back into the LFS tree, and then re-ran the gcc test suite (with the same previously compiled binaries). Then the test failures happen.

Test failures with the 2.6.12 kernel tree was brought up and explained the other day by Greg Schafer on the lfs-dev list. Here's a copy of said email for easy reference:

-----

Hi

I haven't seen this mentioned on the LFS lists so I'm bringing it up here
for your info.. LFS is certainly affected.

2.6.12 kernel introduced a new feature called "address space randomization"
and it's switched on by default. AFAICT, this is the same thing that Red Hat
calls "exec-shield-randomize".

The precompiled header support in GCC-3.4.4 (PCH) does not cope with the new
kernel feature which is reflected in the GCC testsuite as new failures. It
will potentially bite in the real world for example if trying to compile Qt
(with PCH enabled) under a 2.6.12 kernel. One workaround is to switch off
the new kernel feature  :-(   But there exists a patch that has been
backported from the 4.0 branch which is likely to be applied for 3.4.5:

  http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01389.html

If you study that patch, you'll see that it goes grovelling thru' /proc
looking for "/proc/sys/kernel/exec-shield-randomize". Unfortunately, that is
a RedHatism.. the name of that sysctl in vanilla 2.6.12 reads
"/proc/sys/kernel/randomize_va_space". Therefore I suspect the situation may
still be imperfect even after the patch goes into 3.4.5. I'll pester
upstream in due course after I've done some testing. But maybe not because
4.0.x appears to be OK.

You can find more information about this issue here:

  http://gcc.gnu.org/ml/gcc/2005-07/msg00851.html
  http://www.diy-linux.org/pipermail/diy-linux-dev/2005-July/000592.html


This Community Service Announcement(TM) was brought to you by...

Regards
Greg

--
Gerard Beekmans

/* If Linux doesn't have the solution, you have the wrong problem */

--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to