> > After it has been determined how to check for PIE support, I'm checking > this in.
I haven't bisected it and not investigated failures in detail because I'm about to walk out of the door. This patch might have broken testing with arm-linux-gnueabi cross with defaults set to v7-a. ( configured with --with-arch=armv7-a --with-fpu=neon --with-float=-softfp) . The GNU ARM linker doesn't allow PIE modules where objects contain the MOVW_ABS_NC and MOVT_ABS relocations (which are actually absolute relocations) and thus we should require -fPIC / -fpic for these cases as well. This *gross* hack below allows testing to proceed atleast for tls.exp as far as arm-linux-gnueabi is concerned. What's the best way of taking this forward ? cheers Ramana 2011-06-15 Ramana Radhakrishnan <ramana.radhakrish...@linaro.org> * lib/wrapper.exp (target-support.exp): Load it. (${tool}_maybe_build_wrapper): Add -fPIC to the options list for testglue. diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index b7f7773..37c20f6 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -20,7 +20,7 @@ # needs it. FILENAME is the path to the wrapper file. If there are # additional arguments, they are command-line options to provide to # the compiler when compiling FILENAME. - +load_lib target-supports.exp proc ${tool}_maybe_build_wrapper { filename args } { global gluefile wrap_flags @@ -30,6 +30,9 @@ proc ${tool}_maybe_build_wrapper { filename args } { set_ld_library_path_env_vars set saved_wrap_compile_flags [target_info wrap_compile_flags] set flags [join $args " "] + if { [check_effective_target_fpic] } then { + lappend flags "-fPIC" + } # The wrapper code may contain code that gcc objects on. This # became true for dejagnu-1.4.4. The set of warnings and code # that gcc objects on may change, so just make sure -w is always