glibc/glibc-fedora-strict-aliasin...

92 lines
3.3 KiB
Diff
Raw Normal View History

From 96aefb90e843648812d1832789f4a88ea5350605 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Tue, 25 May 2010 15:09:20 +0200
Subject: [PATCH] Avoid strict-aliasing issues
---
elf/Makefile | 1 +
inet/Makefile | 2 ++
nis/Makefile | 2 ++
nss/Makefile | 1 +
resolv/Makefile | 1 +
sunrpc/Makefile | 4 ++++
sysdeps/powerpc/powerpc64/elf/Makefile | 2 ++
7 files changed, 13 insertions(+), 0 deletions(-)
--- a/elf/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/elf/Makefile 2012-06-07 12:15:21.572319589 -0600
@@ -50,6 +50,7 @@ include ../Makeconfig
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
endif
before-compile = $(objpfx)trusted-dirs.h
--- a/inet/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/inet/Makefile 2012-06-07 12:15:21.582319552 -0600
@@ -54,6 +54,8 @@ tests := htontest test_ifindex tst-ntoa
include ../Rules
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
+
ifeq ($(have-thread-library),yes)
CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
--- a/nis/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/nis/Makefile 2012-06-07 12:15:21.810318702 -0600
@@ -71,6 +71,8 @@ libnss_nisplus-inhibit-o = $(filter-out
include ../Rules
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
+CFLAGS-ypclnt.c += -fno-strict-aliasing
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
--- a/nss/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/nss/Makefile 2012-06-07 12:15:21.819318667 -0600
@@ -101,6 +101,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
echo '#include "$<"') > $@.new
mv -f $@.new $@
+CFLAGS-files-hosts.c += -fno-strict-aliasing
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
--- a/resolv/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/resolv/Makefile 2012-06-07 12:15:21.822318657 -0600
@@ -80,6 +80,7 @@ ifeq (yes,$(have-ssp))
CFLAGS-libresolv += -fstack-protector
endif
CFLAGS-res_hconf.c = -fexceptions
+CFLAGS-res_send.c += -fno-strict-aliasing
# The BIND code elicits some harmless warnings.
+cflags += -Wno-strict-prototypes -Wno-write-strings
--- a/sunrpc/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sunrpc/Makefile 2012-06-07 12:15:21.825318645 -0600
@@ -150,6 +150,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
CPPFLAGS += $(sunrpc-CPPFLAGS)
BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
+
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600
@@ -35,6 +35,8 @@ CFLAGS-rtld-memmove.os = $(no-special-re
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+CFLAGS-gmon-start.c += -fno-strict-aliasing
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing