diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /zlib | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'zlib')
-rw-r--r-- | zlib/ChangeLog | 5 | ||||
-rw-r--r-- | zlib/ChangeLog.gcj | 17 | ||||
-rw-r--r-- | zlib/Makefile.am | 2 | ||||
-rw-r--r-- | zlib/Makefile.in | 6 | ||||
-rw-r--r-- | zlib/aclocal.m4 | 2 | ||||
-rwxr-xr-x | zlib/configure | 101 | ||||
-rw-r--r-- | zlib/configure.ac | 4 |
7 files changed, 131 insertions, 6 deletions
diff --git a/zlib/ChangeLog b/zlib/ChangeLog index eb7b2a9..09e2778 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -1,3 +1,8 @@ +2020-05-29 H.J. Lu <hjl.tools@gmail.com> + + PR bootstrap/95413 + * configure: Regenerated. + ChangeLog file for zlib diff --git a/zlib/ChangeLog.gcj b/zlib/ChangeLog.gcj index 60f0a1d..0986b14 100644 --- a/zlib/ChangeLog.gcj +++ b/zlib/ChangeLog.gcj @@ -1,3 +1,20 @@ +2020-05-15 H.J. Lu <hongjiu.lu@intel.com> + + PR bootstrap/95147 + * configure: Regenerated. + +2020-05-14 H.J. Lu <hongjiu.lu@intel.com> + + * configure: Regenerated. + +2020-05-12 H.J. Lu <hongjiu.lu@intel.com> + + * Makefile.am (AM_CFLAGS): New. + * configure.ac (CET_FLAGS): Add GCC_CET_FLAGS and AC_SUBST. + * Makefile.in: Regenerated. + * aclocal.m4: Likewise. + * configure.ac: Likewise. + 2020-01-24 Maciej W. Rozycki <macro@wdc.com> * configure.ac: Handle `--with-toolexeclibdir='. diff --git a/zlib/Makefile.am b/zlib/Makefile.am index 2935961..3098677 100644 --- a/zlib/Makefile.am +++ b/zlib/Makefile.am @@ -19,6 +19,8 @@ libz_a_SOURCES = $(ZLIB_SOURCES) libz_a_CFLAGS = $(AM_CFLAGS) $(PICFLAG) endif +AM_CFLAGS = $(CET_FLAGS) + # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and # friends when we are called from the top level Makefile. diff --git a/zlib/Makefile.in b/zlib/Makefile.in index ec1d4f5..8608449 100644 --- a/zlib/Makefile.in +++ b/zlib/Makefile.in @@ -92,7 +92,9 @@ host_triplet = @host@ target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/../config/cet.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/override.m4 \ @@ -275,6 +277,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CET_FLAGS = @CET_FLAGS@ CFLAGS = @CFLAGS@ COMPPATH = @COMPPATH@ CPP = @CPP@ @@ -400,6 +403,7 @@ zconf.h.in zlib.h zutil.c zutil.h @TARGET_LIBRARY_FALSE@toolexeclib_LIBRARIES = libz.a @TARGET_LIBRARY_FALSE@libz_a_SOURCES = $(ZLIB_SOURCES) @TARGET_LIBRARY_FALSE@libz_a_CFLAGS = $(AM_CFLAGS) $(PICFLAG) +AM_CFLAGS = $(CET_FLAGS) # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and diff --git a/zlib/aclocal.m4 b/zlib/aclocal.m4 index d319d09..f3676e7 100644 --- a/zlib/aclocal.m4 +++ b/zlib/aclocal.m4 @@ -1167,7 +1167,9 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([../config/cet.m4]) m4_include([../config/depstand.m4]) +m4_include([../config/enable.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/multi.m4]) m4_include([../config/override.m4]) diff --git a/zlib/configure b/zlib/configure index 484a493..f9a2689 100755 --- a/zlib/configure +++ b/zlib/configure @@ -658,6 +658,7 @@ EGREP GREP SED LIBTOOL +CET_FLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -768,6 +769,7 @@ with_target_subdir with_cross_host with_system_zlib enable_dependency_tracking +enable_cet enable_shared enable_static with_pic @@ -1411,6 +1413,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-cet enable Intel CET in target libraries [default=auto] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -3400,11 +3403,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include <stdio.h> int main () { - +printf ("hello world\n"); ; return 0; } @@ -4142,6 +4145,95 @@ fi +# Add CET specific flags if CET is enabled + + # Check whether --enable-cet was given. +if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; + case "$enableval" in + yes|no|auto) ;; + *) as_fn_error $? "Unknown argument to enable/disable cet" "$LINENO" 5 ;; + esac + +else + enable_cet=auto +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 +$as_echo_n "checking for CET support... " >&6; } + +# NB: Avoid nested save_CFLAGS and save_LDFLAGS. +case "$host" in + i[34567]86-*-linux* | x86_64-*-linux*) + case "$enable_cet" in + auto) + # Check if target supports multi-byte NOPs + # and if assembler supports CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#if !defined(__SSE2__) +#error target does not support multi-byte NOPs +#else +asm ("setssbsy"); +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + enable_cet=yes +else + enable_cet=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$cet_save_CFLAGS" + ;; + yes) + # Check if assembler supports CET. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +asm ("setssbsy"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + as_fn_error $? "assembler with CET support is required for --enable-cet" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + ;; + *) + enable_cet=no + ;; +esac +if test x$enable_cet = xyes; then + CET_FLAGS="-fcf-protection -mshstk" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -6034,7 +6126,6 @@ fi - # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -10652,7 +10743,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10655 "configure" +#line 10746 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10758,7 +10849,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10761 "configure" +#line 10852 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure.ac b/zlib/configure.ac index ad9ec73..be1cfe2 100644 --- a/zlib/configure.ac +++ b/zlib/configure.ac @@ -59,6 +59,10 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) AC_SUBST(CFLAGS) +# Add CET specific flags if CET is enabled +GCC_CET_FLAGS(CET_FLAGS) +AC_SUBST(CET_FLAGS) + AC_PROG_LIBTOOL # Find CPP now so that any conditional tests below won't do it and |