aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/c-family/c.opt3
-rw-r--r--gcc/config/i386/linux-common.h24
-rw-r--r--gcc/gcc.c5
4 files changed, 41 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84170fb..6011288 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2015-03-10 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ * config/i386/linux-common.h (LIBMPX_LIBS): New.
+ (LIBMPX_SPEC): New.
+ (CHKP_SPEC): New.
+ * gcc.c (CHKP_SPEC): New.
+ (LINK_COMMAND_SPEC): Add CHKP_SPEC.
+ * c-family/c.opt (static-libmpx): New.
+
2015-03-10 Richard Biener <rguenther@suse.de>
PR middle-end/44563
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index b3c8cee..ac55d3c 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1041,6 +1041,9 @@ fchkp-instrument-marked-only
C ObjC C++ ObjC++ LTO Report Var(flag_chkp_instrument_marked_only) Init(0)
Instrument only functions marked with bnd_instrument attribute.
+static-libmpx
+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 f93d71d..868274f 100644
--- a/gcc/config/i386/linux-common.h
+++ b/gcc/config/i386/linux-common.h
@@ -53,3 +53,27 @@ along with GCC; see the file COPYING3. If not see
GNU_USER_TARGET_ENDFILE_SPEC, \
GNU_USER_TARGET_MATHFILE_SPEC " " \
ANDROID_ENDFILE_SPEC)
+
+#ifndef LIBMPX_LIBS
+#define LIBMPX_LIBS "\
+ %:include(libmpx.spec)%(link_libmpx)"
+#endif
+
+#ifndef LIBMPX_SPEC
+#if defined(HAVE_LD_STATIC_DYNAMIC)
+#define LIBMPX_SPEC "\
+%{mmpx:%{fcheck-pointer-bounds:\
+ %{static:--whole-archive -lmpx --no-whole-archive" LIBMPX_LIBS "}\
+ %{!static:%{static-libmpx:" LD_STATIC_OPTION " --whole-archive}\
+ -lmpx %{static-libmpx:--no-whole-archive " LD_DYNAMIC_OPTION \
+ LIBMPX_LIBS "}}}}"
+#else
+#define LIBMPX_SPEC "\
+%{mmpx:%{fcheck-pointer-bounds:-lmpx" LIBMPX_LIBS "}}"
+#endif
+#endif
+
+#ifndef CHKP_SPEC
+#define CHKP_SPEC "\
+%{!nostdlib:%{!nodefaultlibs:" LIBMPX_SPEC "}}"
+#endif
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 8a163a1..d956c36 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -812,6 +812,10 @@ proper position among the other output files. */
%{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}"
#endif
+#ifndef CHKP_SPEC
+#define CHKP_SPEC ""
+#endif
+
/* -u* was put back because both BSD and SysV seem to support it. */
/* %{static:} simply prevents an error message if the target machine
doesn't handle -static. */
@@ -832,6 +836,7 @@ proper position among the other output files. */
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
+ " CHKP_SPEC " \
%{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\