From patchwork Wed Jun 14 22:05:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel F T Gomes X-Patchwork-Id: 21030 Received: (qmail 77613 invoked by alias); 14 Jun 2017 22:05:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 77300 invoked by uid 89); 14 Jun 2017 22:05:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=1420 X-HELO: mx0a-001b2d01.pphosted.com From: "Gabriel F. T. Gomes" To: libc-alpha@sourceware.org Subject: [PATCH 3/4] powerpc64le: Require at least POWER8 for powerpc64le Date: Wed, 14 Jun 2017 19:05:33 -0300 In-Reply-To: <1497477934-26163-1-git-send-email-gftg@linux.vnet.ibm.com> References: <1497477934-26163-1-git-send-email-gftg@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 17061422-1523-0000-0000-000002AB47E0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061422-1524-0000-0000-00002A4348E3 Message-Id: <1497477934-26163-4-git-send-email-gftg@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-14_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706140365 Support for powerpc64le requires POWER8 or newer processors. Builds for older processors are not tested. Require at least POWER8 to avoid unintentional builds. 2017-06-12 Gabriel F. T. Gomes * sysdeps/powerpc/powerpc64le/configure.ac: Check for POWER8. * sysdeps/powerpc/powerpc64le/configure: Update. --- sysdeps/powerpc/powerpc64le/configure | 30 ++++++++++++++++++++++++++++++ sysdeps/powerpc/powerpc64le/configure.ac | 16 ++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/sysdeps/powerpc/powerpc64le/configure b/sysdeps/powerpc/powerpc64le/configure index f5f1069..bf17d15 100644 --- a/sysdeps/powerpc/powerpc64le/configure +++ b/sysdeps/powerpc/powerpc64le/configure @@ -68,4 +68,34 @@ if test "$libc_cv_compiler_powerpc64le_compiler_ok" != "yes"; then : critic_missing="$critic_missing GCC >= 6.2 is required on powerpc64le." fi +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $libc_cv_cc_submachine" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the target machine is at least POWER8" >&5 +$as_echo_n "checking if the target machine is at least POWER8... " >&6; } +if ${libc_cv_target_power8_ok+:} false; then : + $as_echo_n "(cached) " >&6 +else + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _ARCH_PWR8 +#error invalid target architecture +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libc_cv_target_power8_ok=yes +else + libc_cv_target_power8_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_target_power8_ok" >&5 +$as_echo "$libc_cv_target_power8_ok" >&6; } +if test "$libc_cv_target_power8_ok" != "yes"; then : + critic_missing="$critic_missing POWER8 or newer is required on powerpc64le." +fi +CFLAGS="$OLD_CFLAGS" + test -n "$critic_missing" && as_fn_error $? "*** $critic_missing" "$LINENO" 5 diff --git a/sysdeps/powerpc/powerpc64le/configure.ac b/sysdeps/powerpc/powerpc64le/configure.ac index 9d8c54c..53d8e12 100644 --- a/sysdeps/powerpc/powerpc64le/configure.ac +++ b/sysdeps/powerpc/powerpc64le/configure.ac @@ -14,4 +14,20 @@ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ AS_IF([test "$libc_cv_compiler_powerpc64le_compiler_ok" != "yes"], [critic_missing="$critic_missing GCC >= 6.2 is required on powerpc64le."]) +dnl Require at least POWER8 on powerpc64le +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $libc_cv_cc_submachine" +AC_CACHE_CHECK([if the target machine is at least POWER8], + libc_cv_target_power8_ok, [ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#ifndef _ARCH_PWR8 +#error invalid target architecture +#endif +]])], + [libc_cv_target_power8_ok=yes], + [libc_cv_target_power8_ok=no])]) +AS_IF([test "$libc_cv_target_power8_ok" != "yes"], + [critic_missing="$critic_missing POWER8 or newer is required on powerpc64le."]) +CFLAGS="$OLD_CFLAGS" + test -n "$critic_missing" && AC_MSG_ERROR([*** $critic_missing])