From: Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [testsuite] Run TLS torture tests with -fpic etc.
Date: Wed, 15 Jun 2011 16:33:00 -0000 [thread overview]
Message-ID: <BANLkTimSFTZYD7HzHmf2cWi-B0HpEKXmbg@mail.gmail.com> (raw)
In-Reply-To: <yddk4ct7njh.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
>
> 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.radhakrishnan@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
next prev parent reply other threads:[~2011-06-15 16:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 17:45 Rainer Orth
2011-06-03 19:38 ` Rainer Orth
2011-06-03 19:44 ` Jakub Jelinek
2011-06-06 9:42 ` Rainer Orth
2011-06-07 16:48 ` Rainer Orth
2011-06-07 16:55 ` Jakub Jelinek
2011-06-07 16:57 ` Rainer Orth
2011-06-10 10:14 ` Rainer Orth
2011-06-10 14:13 ` Joseph S. Myers
2011-06-10 14:45 ` Rainer Orth
2011-06-10 15:11 ` Rainer Orth
2011-06-15 16:33 ` Ramana Radhakrishnan [this message]
2011-06-15 17:29 ` Mike Stump
2011-06-15 23:07 ` Ramana Radhakrishnan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTimSFTZYD7HzHmf2cWi-B0HpEKXmbg@mail.gmail.com \
--to=ramana.radhakrishnan@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=ro@cebitec.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).