This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/60151: HAVE_AS_GOTOFF_IN_DATA is mis-detected on x86-64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 11 Feb 2014 12:41:45 -0800
- Subject: Re: PATCH: PR target/60151: HAVE_AS_GOTOFF_IN_DATA is mis-detected on x86-64
- Authentication-results: sourceware.org; auth=none
- References: <20140211192802 dot GA26305 at intel dot com> <yddeh39e8u4 dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <CAMe9rOqq2qZ8RYjCTXJ0tsbZ976EAJ0D_4+DGX-Z3FpkoqDzKg at mail dot gmail dot com> <ydda9dxe6lv dot fsf at CeBiTec dot Uni-Bielefeld dot DE>
On Tue, Feb 11, 2014 at 12:29 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> 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?
>
> I'd rather do it for gas instead, which can be used on non-Linux
> systems, too.
>
Sure. Here is the new patch. OK to install?
--
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 GNU assembler.
* configure: Regenerated.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ac3d842..333bca6 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3867,8 +3867,14 @@ foo: nop
# These two are used unconditionally by i386.[ch]; it is to be defined
# to 1 if the feature is present, 0 otherwise.
+ if test x"$gas" = x"yes"; then
+ as_ix86_gotoff_in_data_opt="--32"
+ else
+ as_ix86_gotoff_in_data_opt=
+ fi
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