From patchwork Fri Mar 21 18:40:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 219 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (caibbdcaabja.dreamhost.com [208.113.200.190]) by wilcox.dreamhost.com (Postfix) with ESMTP id 50C7D360103 for ; Fri, 21 Mar 2014 11:41:20 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id 12A4A637ED388; Fri, 21 Mar 2014 11:41:20 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id E6D72637B7F3F for ; Fri, 21 Mar 2014 11:41:19 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=s5w 5Wj3UySd2IThOqAwki+/wQPFgqjJveTTChSvLRCwI3h+ecPyfdTzRoBpX62EFbX9 gckiPx889t0g42EPGY732DnzmFv0o4TxPdFTNPagbHHbb13fmM/Da4kMdDwmuQKQ R1U9VTOv9B52nGMNf8nVivgOBJzlU2W420+RGYNo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=QcrnCrdh+ fXHHo3KCdz8cWnGvQk=; b=KxmgNS4FOiaBvqmqkJ0KB4D027fdGZjFodUMAC0CN 7tflraiN3cHb3+x35Xu0CaDWFIXnr51aggYj00A1wQWPHoKuxnCEvrbry9tzSu9X MErmw832RqEUsA6K1QgdegwjTmfmjTC24knKl1zZKeFadQjci1WQp3hZA+bvOMUL rM= Received: (qmail 13745 invoked by alias); 21 Mar 2014 18:41:16 -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 13598 invoked by uid 89); 21 Mar 2014 18:41:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp02.br.ibm.com Message-ID: <532C87B9.6020905@linux.vnet.ibm.com> Date: Fri, 21 Mar 2014 15:40:57 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "GNU C. Library" Subject: [PATCH] PowerPC: define _CALL_ELF if compiler does not define it X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032118-2194-0000-0000-0000085856F6 X-DH-Original-To: glibc@patchwork.siddhesh.in This patch make the configure adds -D_CALL_ELF=1 when compiler does not define _CALL_ELF (versions before powerpc64le support). This clean up the compiler warnings on old compiler where _CALL_ELF is not defined on powerpc64(be) builds. --- * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac (libc_cv_ppc64_def_call_elf): Define it to yes if compiler does not set _CALL_ELF. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate. --- diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure index fbb6334..d7bd482 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure @@ -163,4 +163,31 @@ default-abi = 64-v2" else config_vars="$config_vars default-abi = 64-v1" + # Compiler which do not support ELFv2 ABI does not define _CALL_ELF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler defines _CALL_ELF" >&5 +$as_echo_n "checking whether the compiler defines _CALL_ELF... " >&6; } +if ${libc_cv_ppc64_def_call_elf+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _CALL_ELF + yes + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + libc_cv_ppc64_def_call_elf=yes +else + libc_cv_ppc64_def_call_elf=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_def_call_elf" >&5 +$as_echo "$libc_cv_ppc64_def_call_elf" >&6; } + if test $libc_cv_ppc64_def_call_elf = no; then + CFLAGS="$CFLAGS -D_CALL_ELF=1" + fi fi diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac index c9cd4bc..d3c1441 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac @@ -12,4 +12,14 @@ if test $libc_cv_ppc64_elfv2_abi = yes; then LIBC_CONFIG_VAR([default-abi], [64-v2]) else LIBC_CONFIG_VAR([default-abi], [64-v1]) + # Compiler which do not support ELFv2 ABI does not define _CALL_ELF + AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], + [libc_cv_ppc64_def_call_elf], + [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF + yes + #endif + ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) + if test $libc_cv_ppc64_def_call_elf = no; then + CFLAGS="$CFLAGS -D_CALL_ELF=1" + fi fi