From a6f3079bfb8355b07bdc5eb578e2e77ff306a778 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 26 Nov 2014 15:13:27 +0000 Subject: Fix sysdeps/unix/sysv/linux/arm/libc-do-syscall.S warning. This patch fixes a warning ../include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] seen when building for ARM. This warning comes from libc-do-syscall.S being built for nscd: the nscd build uses _FORTIFY_SOURCE, while .S files aren't built with -O, and the combination produces a warning. As _FORTIFY_SOURCE doesn't do anything for .S files, undefining it in libc-do-syscall.S seems the simplest solution. Tested for ARM. * sysdeps/unix/sysv/linux/arm/libc-do-syscall.S (_FORTIFY_SOURCE): Undefine. --- sysdeps/unix/sysv/linux/arm/libc-do-syscall.S | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdeps/unix/sysv/linux/arm') diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S index d42a94a560..78e997c627 100644 --- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S +++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S @@ -15,6 +15,9 @@ License along with the GNU C Library. If not, see . */ +/* When this file is built for inclusion in nscd, _FORTIFY_SOURCE is + defined but -O is not used, resulting in a warning from features.h. */ +#undef _FORTIFY_SOURCE #include /* Out-of-line syscall stub. We expect the system call number in ip -- cgit 1.4.1