From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116887 invoked by alias); 27 Feb 2018 17:56:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 116873 invoked by uid 89); 27 Feb 2018 17:56:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1837 X-HELO: relay1.mentorg.com Date: Tue, 27 Feb 2018 18:16:00 -0000 From: Joseph Myers To: Subject: Fix powerpc ifunc-sel.h build for -Os Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) X-SW-Source: 2018-02/txt/msg00810.txt.bz2 Compiling the testsuite for powerpc (multi-arch configurations) with -Os with GCC 7 fails with: In file included from ifuncmod1.c:7:0, from ifuncdep1.c:3: ../sysdeps/powerpc/ifunc-sel.h: In function 'ifunc_sel': ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 2 probably doesn't match constraints [-Werror] __asm__ ("mflr 12\n\t" ^~~~~~~ ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 3 probably doesn't match constraints [-Werror] ../sysdeps/powerpc/ifunc-sel.h:12:3: error: asm operand 4 probably doesn't match constraints [-Werror] ../sysdeps/powerpc/ifunc-sel.h:12:3: error: impossible constraint in 'asm' The "i" constraints on function pointers require the function call to be inlined so the compiler can see the constant function pointer arguments passed to the asm. This patch marks the relevant functions as always_inline accordingly. Tested that this fixes the -Os testsuite build for powerpc-linux-gnu-power4, powerpc64-linux-gnu, powerpc64le-linux-gnu with build-many-glibcs.py. 2018-02-27 Joseph Myers * sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Make always_inline. (ifunc_one): Likewise. diff --git a/sysdeps/powerpc/ifunc-sel.h b/sysdeps/powerpc/ifunc-sel.h index bdb00bf..7112bed 100644 --- a/sysdeps/powerpc/ifunc-sel.h +++ b/sysdeps/powerpc/ifunc-sel.h @@ -4,7 +4,7 @@ extern int global; -static inline void * +static inline __attribute__ ((always_inline)) void * inhibit_stack_protector ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) { @@ -32,7 +32,7 @@ ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) return ret; } -static inline void * +static inline __attribute__ ((always_inline)) void * inhibit_stack_protector ifunc_one (int (*f1) (void)) { -- Joseph S. Myers joseph@codesourcery.com