public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Uros Bizjak <ubizjak@gmail.com>
Subject: Re: PATCH: PR target/60151: HAVE_AS_GOTOFF_IN_DATA is mis-detected on x86-64
Date: Tue, 11 Feb 2014 20:03:00 -0000	[thread overview]
Message-ID: <CAMe9rOqq2qZ8RYjCTXJ0tsbZ976EAJ0D_4+DGX-Z3FpkoqDzKg@mail.gmail.com> (raw)
In-Reply-To: <yddeh39e8u4.fsf@CeBiTec.Uni-Bielefeld.DE>

On Tue, Feb 11, 2014 at 11:40 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Hi H.J.,
>
>> HAVE_AS_GOTOFF_IN_DATA defines a 32-bit assembler feature, we need to
>> pass --32 to assembler. Otherwise, we get the wrong result on x86-64.
>> We already pass --32 to assembler on x86.  It should be OK to do it
>> in configure.  OK for trunk?
>
> This would break Solaris/x86 with as configurations, where this test
> currently passes, but would fail since as doesn't understand --32.
>

How about passing --32 to as only for Linux?  OK to install?

Thanks.


-- 
H.J.
---
2014-02-11  H.J. Lu  <hongjiu.lu@intel.com>

PR target/60151
* configure.ac (HAVE_AS_GOTOFF_IN_DATA): Pass --32 to assembler
for Linux target.
* configure: Regenerated.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index ac3d842..1b5dca2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3867,8 +3867,17 @@ foo: nop

     # These two are used unconditionally by i386.[ch]; it is to be defined
     # to 1 if the feature is present, 0 otherwise.
+    case $target_os in
+    linux*)
+      as_ix86_gotoff_in_data_opt="--32"
+      ;;
+    *)
+      as_ix86_gotoff_in_data_opt=
+      ;;
+    esac
     gcc_GAS_CHECK_FEATURE([GOTOFF in data],
-        gcc_cv_as_ix86_gotoff_in_data, [2,11,0],,
+        gcc_cv_as_ix86_gotoff_in_data, [2,11,0],
+ $as_ix86_gotoff_in_data_opt,
 [ .text
 .L0:
  nop

  reply	other threads:[~2014-02-11 20:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 19:28 H.J. Lu
2014-02-11 19:41 ` Rainer Orth
2014-02-11 20:03   ` H.J. Lu [this message]
2014-02-11 20:29     ` Rainer Orth
2014-02-11 20:41       ` H.J. Lu
2014-02-12  8:20         ` Uros Bizjak
2014-02-12 16:13           ` H.J. Lu
2014-02-11 19:41 ` Uros Bizjak

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=CAMe9rOqq2qZ8RYjCTXJ0tsbZ976EAJ0D_4+DGX-Z3FpkoqDzKg@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ro@cebitec.uni-bielefeld.de \
    --cc=ubizjak@gmail.com \
    /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).