From d2d7e672ad18c54aedfa766b7918d1631a22b4fa Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Tue, 10 Mar 2015 09:43:24 +0000 Subject: linux-common.h (LIBMPX_WRAPPERSSPEC): New. gcc/ * config/i386/linux-common.h (LIBMPX_WRAPPERSSPEC): New. (CHKP_SPEC): Add wrappers library. * c-family/c.opt (static-libmpxwrappers): New. libmpx/ * Makefile.am (SUBDIRS): Add mpxwrap when used AS supports MPX. (MAKEOVERRIDES): New. * Makefile.in: Regenerate. * configure.ac: Check AS supports MPX. Add mpxintr/Makefile to config files. * configure: Regenerate. * mpxwrap/Makefile.am: New. * mpxwrap/Makefile.in: New. * mpxwrap/libtool-version: New. * mpxwrap/mpx_wrappers.cc: New. * mpxwrap/libmpxwrappers.map: New. From-SVN: r221313 --- gcc/ChangeLog | 6 ++++++ gcc/c-family/c.opt | 3 +++ gcc/config/i386/linux-common.h | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6011288..911c2ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-03-10 Ilya Enkovich + * config/i386/linux-common.h (LIBMPX_WRAPPERSSPEC): New. + (CHKP_SPEC): Add wrappers library. + * c-family/c.opt (static-libmpxwrappers): New. + +2015-03-10 Ilya Enkovich + * config/i386/linux-common.h (LIBMPX_LIBS): New. (LIBMPX_SPEC): New. (CHKP_SPEC): New. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index ac55d3c..5354500 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1044,6 +1044,9 @@ Instrument only functions marked with bnd_instrument attribute. static-libmpx Driver +static-libmpxwrappers +Driver + fcilkplus C ObjC C++ ObjC++ LTO Report Var(flag_cilkplus) Init(0) Enable Cilk Plus diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h index 868274f..9c6560b 100644 --- a/gcc/config/i386/linux-common.h +++ b/gcc/config/i386/linux-common.h @@ -73,7 +73,21 @@ along with GCC; see the file COPYING3. If not see #endif #endif +#ifndef LIBMPXWRAPPERS_SPEC +#if defined(HAVE_LD_STATIC_DYNAMIC) +#define LIBMPXWRAPPERS_SPEC "\ +%{mmpx:%{fcheck-pointer-bounds:%{!fno-chkp-use-wrappers:\ + %{static:-lmpxwrappers}\ + %{!static:%{static-libmpxwrappers:" LD_STATIC_OPTION " --whole-archive}\ + -lmpxwrappers %{static-libmpxwrappers:--no-whole-archive "\ + LD_DYNAMIC_OPTION "}}}}}" +#else +#define LIBMPXWRAPPERS_SPEC "\ +%{mmpx:%{fcheck-pointer-bounds:{!fno-chkp-use-wrappers:-lmpxwrappers}}}" +#endif +#endif + #ifndef CHKP_SPEC #define CHKP_SPEC "\ -%{!nostdlib:%{!nodefaultlibs:" LIBMPX_SPEC "}}" +%{!nostdlib:%{!nodefaultlibs:" LIBMPX_SPEC LIBMPXWRAPPERS_SPEC "}}" #endif -- cgit v1.1