This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386, PR driver/66737] Don't pass '-z bndplt' to linker for 32bit target
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Jul 2015 13:57:15 -0700
- Subject: Re: [PATCH, i386, PR driver/66737] Don't pass '-z bndplt' to linker for 32bit target
- Authentication-results: sourceware.org; auth=none
- References: <20150720124233 dot GA65017 at msticlxl57 dot ims dot intel dot com>
On Mon, Jul 20, 2015 at 5:42 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> Hi,
>
> This patch adds a target filter for '-z bndplt' linker option. Bootstrapped and regtested for x86_64-unknown-linux-gnu. MPX tests at lto.exp are not marked as unsupported for 32bit any more. Going to commit it to trunk in a few days if no obections appear.
>
> Thanks,
> Ilya
> --
> gcc/
>
> 2015-07-20 Ilya Enkovich <enkovich.gnu@gmail.com>
>
> PR target/66737
> * config/i386/linux-common.h (MPX_SPEC): Use linker option
> for 64bit target only.
>
>
> diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h
> index 63dd8d8..da09d3d 100644
> --- a/gcc/config/i386/linux-common.h
> +++ b/gcc/config/i386/linux-common.h
> @@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see
>
> #ifndef MPX_SPEC
> #define MPX_SPEC "\
> - %{mmpx:%{fcheck-pointer-bounds:%{!static:" LINK_MPX "}}}"
> + %{mmpx:%{fcheck-pointer-bounds:%{!static:%{" SPEC_64 ":" LINK_MPX "}}}}"
> #endif
>
> #ifndef LIBMPX_SPEC
This doesn't build on Linux/ia32:
In file included from ./tm.h:36:0,
from /export/gnu/import/git/sources/gcc/gcc/gcc.c:34:
/export/gnu/import/git/sources/gcc/gcc/config/i386/linux-common.h:75:47:
error: expected â,â or â;â before âSPEC_64â
%{mmpx:%{fcheck-pointer-bounds:%{!static:%{" SPEC_64 ":" LINK_MPX "}}}}"
SPEC_64 may not be defined. You should use
#ifndef MPX_SPEC
#ifdef SPEC_64
#define MPX_SPEC "\
%{mmpx:%{fcheck-pointer-bounds:%{!static:%{" SPEC_64 ":" LINK_MPX "}}}}"
#else
#define MPX_SPEC "\
%{mmpx:%{fcheck-pointer-bounds}}"
#endif
#endif
--
H.J.