From patchwork Tue Mar 23 22:39:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1457581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=pf9AhBqN; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F4mWY64D8z9sRN for ; Wed, 24 Mar 2021 09:39:21 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BEFC338618D9; Tue, 23 Mar 2021 22:39:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEFC338618D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1616539153; bh=rDDwjtxk+9j0gK5esLb8y/6V36N623FDsU1WePtTb0g=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pf9AhBqNZZ6DAj9nlx1kq+igqvtuhfYIbj+SzZPbcpz0LCHhsGd1blAn1MttVa3ez /Ek6o0+6a15J1TG756+0+1YsFaTmbnY/8tZpi+Dc+8p5up3pfu6oKfrGYwDwFCCNkE DqsYTsZsZ8iIsKvUWqD3aRis4hvtAFe+bCjmRDcA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id C71BD386102C for ; Tue, 23 Mar 2021 22:39:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C71BD386102C Received: by mail-pg1-x534.google.com with SMTP id m7so13229783pgj.8 for ; Tue, 23 Mar 2021 15:39:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rDDwjtxk+9j0gK5esLb8y/6V36N623FDsU1WePtTb0g=; b=XFinYmaHm91YgF4Wy++Wmw/1tl1Jb2ib3xx8HxLKpStGOosopio42UudbjhZMo1YRE zJsZ+bv2rk8sw+/QVrHHL/DzOhQDNI+Kzc7gsCs9X7fAVC1FM45JXbdC4SSzy6i8lcD1 f/4QTxgWHmwKvU+JYpp+rsmWJseGt6R4ea/8kx0bw/9PoxENyqbZY0+17fSwXqi1Jqr+ dgva0tPndPO9tAeMn551w/k28qb7MaVTXyxLss3uZ+u8U7B0vEzRAliry5xWoi3q4KGw vZxNQyvWh+S23U8zA/1+XH/HsgTTUXKAyO83Uso/StEOvgmj+fkubhYzPpeqJvkIy9wo xUCQ== X-Gm-Message-State: AOAM530oIWFwgEi3xukl0qLTopFhtCwM3f1JZy9O/p7UKLyfK8SFCCXm 2vW5s980ito78Py1B8UBs47jp23eL9c= X-Google-Smtp-Source: ABdhPJxbwDTY9gBnlc0Ieykz8o6ioU2zaQ05ab6DLRyeV4XSKy+k0jxUWhuP7f3dOl91xi8rDGkUpg== X-Received: by 2002:a17:902:ed41:b029:e5:c92d:ec24 with SMTP id y1-20020a170902ed41b02900e5c92dec24mr465708plb.57.1616539149576; Tue, 23 Mar 2021 15:39:09 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.38.37]) by smtp.gmail.com with ESMTPSA id mu6sm192564pjb.35.2021.03.23.15.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 15:39:08 -0700 (PDT) Received: from gnu-cfl-2.?040none?041 (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 544E31A0246; Tue, 23 Mar 2021 15:39:07 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs Date: Tue, 23 Mar 2021 15:39:05 -0700 Message-Id: <20210323223906.7985-2-hjl.tools@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210323223906.7985-1-hjl.tools@gmail.com> References: <20210323223906.7985-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3035.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Jakub Jelinek Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Check if host supports multi-byte NOPs before enabling CET on host. config/ PR binutils/27397 * cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte NOPs. libiberty/ PR binutils/27397 * configure: Regenerated. --- config/cet.m4 | 19 ++++++++++++++++--- libiberty/configure | 29 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/config/cet.m4 b/config/cet.m4 index c67fb4f35b6..7718be1afe8 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -130,6 +130,18 @@ fi if test x$may_have_cet = xyes; then if test x$cross_compiling = xno; then AC_TRY_RUN([ +int +main () +{ + asm ("endbr32"); + return 0; +} + ], + [have_multi_byte_nop=yes], + [have_multi_byte_nop=no]) + have_cet=no + if test x$have_multi_byte_nop = xyes; then + AC_TRY_RUN([ static void foo (void) { @@ -155,9 +167,10 @@ main () bar (); return 0; } - ], - [have_cet=no], - [have_cet=yes]) + ], + [have_cet=no], + [have_cet=yes]) + fi if test x$enable_cet = xno -a x$have_cet = xyes; then AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) fi diff --git a/libiberty/configure b/libiberty/configure index 2ea7c119809..fc0c953dd1a 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5396,6 +5396,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -5432,6 +5460,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi From patchwork Tue Mar 23 22:39:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1457582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=VAId9RBd; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F4mWf2BJbz9sRN for ; Wed, 24 Mar 2021 09:39:26 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E4CD3850437; Tue, 23 Mar 2021 22:39:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E4CD3850437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1616539156; bh=dx1NC8l3PXe0Z3aQBG4OGBqCOYzF/AvaigRxTDVK+UY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VAId9RBdaiw0eustoOk5g8mON6DAedj/8s8ZwicQux4fyGKc4f+vs6lS1UHsIVUON 5Y03/1bAI21wcbMrFdmVZkgQnX5NfR0hw1Qyv96x+A/dvCeE0EkEZ3384D8j+bPkrL +gwFPEO8ueKeW4tIxSV790YA+OmnM5TAlyYvWGlQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 4EFE13861030 for ; Tue, 23 Mar 2021 22:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4EFE13861030 Received: by mail-pj1-x1033.google.com with SMTP id s21so10747551pjq.1 for ; Tue, 23 Mar 2021 15:39:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dx1NC8l3PXe0Z3aQBG4OGBqCOYzF/AvaigRxTDVK+UY=; b=mXP6aVctrDPvD2ltDlIzzoCFBaEV85uxv2JOl8NVxd1kCtC0GuoZTj1emrr6b02d1H WgkmkabzWI4in8Jw0XLfAARFSSV3EOLeUZ0XqNU+17q2y2t/YdnDDqVOKsceCoTLQqpz ion10yn0C+hBKC9QqRbU+rNGGLdyzQfbdhMdaIAKxidCI7HTtX01AuTYnwAUxTJYqCuM YnrXOqARy1aeBOfzbhHSbbAGTSoUGB/3axTbBcMq7vYu/xhKMXq8ulRmjpw/qPmsMynn 0HhnRHPj7Gl+2n6Py+EQOurTqPa8Y9L5r5JZIeALXAUehOPw2sITgikQLU1uM844y7o0 hitg== X-Gm-Message-State: AOAM531nYPwMaiZyPyCu63LvzSppJ1OdgSQe7g/JcNzAkLvQgGGB29R1 JNzgUIBxyeUDFSahZrljHgv1/rQmrJ0= X-Google-Smtp-Source: ABdhPJzLdCcuSOt0YfUDcgN0Xzuen25prXwp3PnU+xZVZTqyc5jLrLF+96fA8oGaV9BH2BX+TcPNUg== X-Received: by 2002:a17:90b:94c:: with SMTP id dw12mr289815pjb.119.1616539149811; Tue, 23 Mar 2021 15:39:09 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.38.37]) by smtp.gmail.com with ESMTPSA id y194sm215704pfb.21.2021.03.23.15.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 15:39:08 -0700 (PDT) Received: from gnu-cfl-2.?040none?041 (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 5578E1A06AD; Tue, 23 Mar 2021 15:39:07 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs Date: Tue, 23 Mar 2021 15:39:06 -0700 Message-Id: <20210323223906.7985-3-hjl.tools@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210323223906.7985-1-hjl.tools@gmail.com> References: <20210323223906.7985-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3036.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Jakub Jelinek Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Check if host supports multi-byte NOPs before enabling CET on host. gcc/ PR bootstrap/99703 * configure: Regenerated. libbacktrace/ PR bootstrap/99703 * configure: Regenerated. libcc1/ PR bootstrap/99703 * configure: Regenerated. libcpp/ PR bootstrap/99703 * configure: Regenerated. libdecnumber/ PR bootstrap/99703 * configure: Regenerated. lto-plugin/ PR bootstrap/99703 * configure: Regenerated. --- gcc/configure | 45 +++++++++++++++++++++--------- libbacktrace/configure | 29 +++++++++++++++++++ libcc1/configure | 45 +++++++++++++++++++++--------- libcpp/configure | 29 +++++++++++++++++++ libdecnumber/configure | 29 +++++++++++++++++++ lto-plugin/configure | 63 +++++++++++++++++++++++++++++++----------- 6 files changed, 198 insertions(+), 42 deletions(-) diff --git a/gcc/configure b/gcc/configure index 9bb436ce7bd..1d5cbeb7465 100755 --- a/gcc/configure +++ b/gcc/configure @@ -19392,7 +19392,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19405 "configure" +#line 19395 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19498,7 +19498,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19511 "configure" +#line 19501 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -22237,16 +22237,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - haiku*) version_type=linux need_lib_prefix=no @@ -22368,7 +22358,7 @@ linux*oldld* | linux*aout* | linux*coff*) # project, but have not yet been accepted: they are GCC-local changes # for the time being. (See # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) -linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) version_type=linux need_lib_prefix=no need_version=no @@ -31951,6 +31941,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -31987,6 +32005,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi diff --git a/libbacktrace/configure b/libbacktrace/configure index 9b66bf5563a..a2f33c0f35d 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -12517,6 +12517,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -12553,6 +12581,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi diff --git a/libcc1/configure b/libcc1/configure index 021ec265526..b198b0b9074 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -10777,7 +10777,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10790 "configure" +#line 10780 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10883,7 +10883,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10896 "configure" +#line 10886 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14028,16 +14028,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - haiku*) version_type=linux need_lib_prefix=no @@ -14159,7 +14149,7 @@ linux*oldld* | linux*aout* | linux*coff*) # project, but have not yet been accepted: they are GCC-local changes # for the time being. (See # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) -linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) version_type=linux need_lib_prefix=no need_version=no @@ -14663,6 +14653,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -14699,6 +14717,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi diff --git a/libcpp/configure b/libcpp/configure index 7e28606f605..9674cd9c7a7 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7668,6 +7668,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -7704,6 +7732,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi diff --git a/libdecnumber/configure b/libdecnumber/configure index 6b62f8ba665..da5302f9315 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -5321,6 +5321,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -5357,6 +5385,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi diff --git a/lto-plugin/configure b/lto-plugin/configure index baa84adbb6c..26aad9dd699 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -5791,6 +5791,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -5827,6 +5855,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi @@ -8429,23 +8458,25 @@ _LT_EOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) + # Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to + # build without first building modern cctools / linker. + case $host_cpu-$host_os in + *-rhapsody* | *-darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) + *-darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + *-darwin*) + # darwin 5.x (macOS 10.1) onwards we only need to adjust when the + # deployment target is forced to an earlier version. + case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in + UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) + ;; 10.[012][,.]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + *) + ;; + esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then @@ -11950,7 +11981,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11963 "configure" +#line 11984 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12056,7 +12087,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12069 "configure" +#line 12090 "configure" #include "confdefs.h" #if HAVE_DLFCN_H