On Sun, Dec 04, 2011 at 09:28:55AM -0800, Mike Stump wrote: > On Dec 4, 2011, at 9:09 AM, Jack Howarth <howa...@bromo.med.uc.edu> wrote: > > On Sat, Dec 03, 2011 at 10:45:18PM -0800, Mike Stump wrote: > >> On Dec 3, 2011, at 7:25 AM, Jack Howarth wrote: > >>> FSF gcc currently doesn't handle -fno-pie and friends properly under Lion. > >>> The darwin11 linker now defaults to -pie > >> > >>> Okay for gcc trunk and backports to gcc-4_5-branch/gcc-4_6-branch? > >> > >> Ok. > > > > Mike, > > Thanks for the commit. This leaves us with the boehm-gc testsuite > > failures... > > > > FAIL: boehm-gc.c/gctest.c -O2 execution test > > FAIL: boehm-gc.c/leak_test.c -O2 execution test > > FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test > > FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test > > > > at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker default. Iain > > had wanted > > to leave these in place to encourage boehm-gc to be fixed but I doubt that > > is a realistic > > goal in the near/middle term. Perhaps we could patch > > boehm-gc/testsuite/lib/boehm-gc.exp > > to pass -fno-pie on darwin (now that it is functional)? > > I think we should just find a way to add -fno-pie... Are there any flags > that are added because we are doing gc that we can key off of?
Mike, The simple approach would be... Index: boehm-gc/testsuite/boehm-gc.c/c.exp =================================================================== --- boehm-gc/testsuite/boehm-gc.c/c.exp (revision 181993) +++ boehm-gc/testsuite/boehm-gc.c/c.exp (working copy) @@ -17,6 +17,6 @@ dg-init boehm-gc-init -boehm-gc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "-O2" "" +boehm-gc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "-O2 -fno-pie" "" dg-finish Index: boehm-gc/testsuite/boehm-gc.lib/lib.exp =================================================================== --- boehm-gc/testsuite/boehm-gc.lib/lib.exp (revision 181993) +++ boehm-gc/testsuite/boehm-gc.lib/lib.exp (working copy) @@ -21,6 +21,6 @@ boehm-gc-init set tests [lsort [glob -nocomplain $srcdir/$subdir/*.c]] set tests [prune $tests $srcdir/$subdir/*lib.c] -boehm-gc-dg-runtest $tests "-O2" "" +boehm-gc-dg-runtest $tests "-O2 -fno-pie" "" dg-finish which yields... === boehm-gc tests === Schedule of variations: unix/-m32 unix/-m64 Running target unix/-m32 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.c/c.exp ... Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.lib/lib.exp ... === boehm-gc Summary for unix/-m32 === # of expected passes 12 # of unsupported tests 1 Running target unix/-m64 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.c/c.exp ... Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.lib/lib.exp ... === boehm-gc Summary for unix/-m64 === # of expected passes 12 # of unsupported tests 1 === boehm-gc Summary === # of expected passes 24 # of unsupported tests 2 I would argue that this is useful in that it reminds the developers that boehm-gc isn't PIE friendly and needs to be fixed. Jack