01917d
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
01917d
01917d
gcc -fpic -c  -fPIE -pie -o x.o x.c
01917d
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
01917d
(.text+0x20): undefined reference to `main'
01917d
01917d
=> Change the order for overrides.
01917d
01917d
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
01917d
01917d
The correct way would be:
01917d
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
01917d
01917d
But there is a problem with testsuite.unix non-unique subdir name and also
01917d
a problem with make -j parallelization of the testsuite.
01917d
01917d
--- gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp	2011-10-11 16:44:05.000000000 +0200
01917d
+++ gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp	2011-10-11 16:44:10.000000000 +0200
01917d
@@ -77,6 +77,10 @@ proc gdb_default_target_compile {source
01917d
     set ldflags ""
01917d
     set dest [target_info name]
01917d
 
01917d
+    if {[board_info $dest exists multilib_flags]} {
01917d
+	append add_flags " [board_info $dest multilib_flags]"
01917d
+    }
01917d
+
01917d
     if {[info exists CFLAGS_FOR_TARGET]} {
01917d
 	append add_flags " $CFLAGS_FOR_TARGET"
01917d
     }
01917d
@@ -333,10 +337,6 @@ proc gdb_default_target_compile {source
01917d
 	}
01917d
     }
01917d
 
01917d
-    if {[board_info $dest exists multilib_flags]} {
01917d
-	append add_flags " [board_info $dest multilib_flags]"
01917d
-    }
01917d
-
01917d
     verbose "doing compile"
01917d
 
01917d
     set sources ""