From patchwork Tue Sep 9 21:55:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 387472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id CD7EC14018A for ; Wed, 10 Sep 2014 07:56:07 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version:content-type; q=dns; s=default; b=bzAc3 nem/O/bKqsbdP1ARbFg5heduBydqNP5p1DikmIkgGN/Ja/ccEmuJZwtT7VvVYYDG Bv/hbyZuXDZlUktpZnIO5M6MG+nTqf9+Y3627DRHAeweJR8uMSPfOYnc4HVvdUz7 FbDC0w97PhUdHKK/BBWeCcDjgHTyEyb2IWdkUU= 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:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version:content-type; s=default; bh=ZyYwTvwO6r7 1tdl/iIhKdSDKeIk=; b=fHn4TNsQs2Uturt8yM/kY1B8cMwZ9xbgGHcdESo/Tg2 D5eXaYgzIarEBxMmQM/4Rc1Z7jAj91kxA1+NP3Ok2D/l34WnMOQNmQ1BkqFthZ6x MyeC9FfXajTA7sGP3v00a9QS5V/SQibd+Pneaao/GddFhlWXLc3ASWJOqWLEWcRs = Received: (qmail 25657 invoked by alias); 9 Sep 2014 21:56:02 -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 25596 invoked by uid 89); 9 Sep 2014 21:55:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Tue, 9 Sep 2014 21:55:48 +0000 From: "Joseph S. Myers" To: Roland McGrath CC: , Adhemerval Zanella Subject: Re: Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions In-Reply-To: <20140909214652.68C0E2C39D8@topped-with-meat.com> Message-ID: References: <20140909214652.68C0E2C39D8@topped-with-meat.com> MIME-Version: 1.0 On Tue, 9 Sep 2014, Roland McGrath wrote: > > +/* The PowerPC64 ELFv2 ABI is being used. > > +#undef HAVE_ELFV2_ABI > > Unterminated comment. > > Otherwise seems OK to me. Thanks, here's a version with that corrected for convenience in testing. diff --git a/config.h.in b/config.h.in index 7da1a9f..ed26221 100644 --- a/config.h.in +++ b/config.h.in @@ -257,4 +257,7 @@ /* Define if using the IEEE 754-2008 NaN encoding on the MIPS target. */ #undef HAVE_MIPS_NAN2008 +/* The PowerPC64 ELFv2 ABI is being used. */ +#undef HAVE_ELFV2_ABI + #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure index aa1302a..eb46415 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure @@ -173,6 +173,9 @@ $as_echo "$libc_cv_ppc64_elfv2_abi" >&6; } if test $libc_cv_ppc64_elfv2_abi = yes; then config_vars="$config_vars default-abi = 64-v2" + # For shlib-versions. + $as_echo "#define HAVE_ELFV2_ABI 1" >>confdefs.h + else config_vars="$config_vars default-abi = 64-v1" diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac index de04689..0822915 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac @@ -12,6 +12,8 @@ AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)]) if test $libc_cv_ppc64_elfv2_abi = yes; then LIBC_CONFIG_VAR([default-abi], [64-v2]) + # For shlib-versions. + AC_DEFINE(HAVE_ELFV2_ABI) else LIBC_CONFIG_VAR([default-abi], [64-v1]) # Compiler that do not support ELFv2 ABI does not define _CALL_ELF diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions index f648023..1febda4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions @@ -1,4 +1,7 @@ -powerpc64-.*-linux.* DEFAULT GLIBC_2.3 +%ifdef HAVE_ELFV2_ABI powerpc.*le-.*-linux.* DEFAULT GLIBC_2.17 -powerpc64-.*-linux.* libpthread=0 GLIBC_2.3 powerpc.*le-.*-linux.* libpthread=0 GLIBC_2.17 +%else +powerpc64-.*-linux.* DEFAULT GLIBC_2.3 +powerpc64-.*-linux.* libpthread=0 GLIBC_2.3 +%endif