From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 6458D387085F for ; Wed, 13 May 2020 01:37:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6458D387085F Received: by mail-pj1-x1032.google.com with SMTP id hi11so10392784pjb.3 for ; Tue, 12 May 2020 18:37:39 -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:subject:date:message-id:mime-version :content-transfer-encoding; bh=ATU2Hf3m51N55XRzerxVIa9D7lT7cv6NVuohvc+jtZ4=; b=ELTL3JLZJD4L/XDrNqafZFsWCrMMcPwBOkXoHMEBGW+n5Y2xjH2ej1wIMteZjN6B79 uhfh/M+Do3uoq0ZM36T9zAIN6BGCoAU0FH52UNWCpOmavEp8n7invvRm5oMdmA5ed9lq PywROGnpgLXzI0VqcWGWJyvFqJx1NOKGo1qJBWSK9Furxin292dcW41rqK3Ukezlj7o/ N7Ei3CfL+G6mIwAibMYLDQU+icFjqMVOOnK1MiurhhR6Da3vLedXG8kqyUCqkaqowPmG 4jBqXcONmXKJbBjBy+P+pDnbLSVyR4hanMAi7DqfbDIcEbVLZsNP2VkeO4nJdlFt/50Q /yaQ== X-Gm-Message-State: AGi0PuZcWU/iOXMDN/BZTFugjOv30nQXRQcW6+mjnK+i4yhd7oOnp+e1 Jtk8bu+t5dkUYC+wCcwjQYX+7l8J X-Google-Smtp-Source: APiQypK5Eng2cOOCoOkTSM7ockDhYwNUlnZaHvlEperFwhHbXo99XJTPy5S+KK6dfEAIFfub3cENPQ== X-Received: by 2002:a17:902:ee06:: with SMTP id z6mr22998036plb.125.1589333858024; Tue, 12 May 2020 18:37:38 -0700 (PDT) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id i11sm1852880pjs.44.2020.05.12.18.37.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 18:37:37 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 3C6A61A0116 for ; Tue, 12 May 2020 18:37:36 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] Sync config and libiberty with GCC Date: Tue, 12 May 2020 18:37:36 -0700 Message-Id: <20200513013736.570121-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.1 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 01:37:41 -0000 config/ PR bootstrap/94998 * cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if possible. libiberty/ PR bootstrap/94998 * configure: Regenerated. --- config/ChangeLog | 9 +++++++++ config/cet.m4 | 18 ++++++++++++------ libiberty/ChangeLog | 5 +++++ libiberty/configure | 12 +++++++++--- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index ece21f28fb..de8c327b54 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,12 @@ +2020-05-12 H.J. Lu + + Sync with GCC + 2020-05-12 H.J. Lu + + PR bootstrap/94998 + * cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if + possible. + 2020-04-29 H.J. Lu Sync with GCC diff --git a/config/cet.m4 b/config/cet.m4 index ea616b728a..d9608699cd 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -111,7 +111,8 @@ if test x$may_have_cet = xyes; then fi if test x$may_have_cet = xyes; then - AC_TRY_RUN([ + if test x$cross_compiling = xno; then + AC_TRY_RUN([ static void foo (void) { @@ -137,12 +138,17 @@ main () bar (); return 0; } - ], - [have_cet=no], - [have_cet=yes]) - 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]) + ], + [have_cet=no], + [have_cet=yes]) + 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 fi +else + # Enable CET in cross compiler if possible so that it will run on both + # CET and non-CET hosts. + have_cet=yes fi if test x$enable_cet = xyes; then $1="-fcf-protection" diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index a757715850..f5691180e4 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2020-05-12 H.J. Lu + + PR bootstrap/94998 + * configure: Regenerated. + 2020-04-28 H.J. Lu PR bootstrap/94739 diff --git a/libiberty/configure b/libiberty/configure index bb76cf1b82..3f82c5bb86 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5375,7 +5375,8 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test x$may_have_cet = xyes; then - if test "$cross_compiling" = yes; then : + if test x$cross_compiling = xno; 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 @@ -5420,9 +5421,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext 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 + 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 fi +else + # Enable CET in cross compiler if possible so that it will run on both + # CET and non-CET hosts. + have_cet=yes fi if test x$enable_cet = xyes; then CET_HOST_FLAGS="-fcf-protection" -- 2.26.2