glibc/glibc-strict-aliasing.diff

88 lines
2.8 KiB
Diff
Raw Normal View History

Index: elf/Makefile
===================================================================
--- elf/Makefile.orig
+++ elf/Makefile
@@ -133,6 +133,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
Index: inet/Makefile
===================================================================
--- inet/Makefile.orig
+++ inet/Makefile
@@ -57,6 +57,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
Index: nis/Makefile
===================================================================
--- nis/Makefile.orig
+++ nis/Makefile
@@ -69,6 +69,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) \
Index: nss/Makefile
===================================================================
--- nss/Makefile.orig
+++ nss/Makefile
@@ -75,6 +75,7 @@ endif
include ../Rules
+CFLAGS-files-hosts.c = -fno-strict-aliasing
ifeq (yes,$(build-static-nss))
$(objpfx)getent: $(objpfx)libnss_files.a
Index: resolv/Makefile
===================================================================
--- resolv/Makefile.orig
+++ resolv/Makefile
@@ -77,6 +77,7 @@ CPPFLAGS += -Dgethostbyname=res_gethostb
-Dgetnetbyaddr=res_getnetbyaddr
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
Index: sunrpc/Makefile
===================================================================
--- sunrpc/Makefile.orig
+++ sunrpc/Makefile
@@ -152,6 +152,10 @@ CFLAGS-openchild.c = -fexceptions
CPPFLAGS += -D_RPC_THREAD_SAFE_
+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
Index: sysdeps/powerpc/powerpc64/elf/Makefile
===================================================================
--- sysdeps/powerpc/powerpc64/elf/Makefile.orig
+++ sysdeps/powerpc/powerpc64/elf/Makefile
@@ -9,3 +9,5 @@ CFLAGS-rtld-mempcpy.os = $(no-special-re
CFLAGS-rtld-memmove.os = $(no-special-regs)
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+
+CFLAGS-gmon-start.c = -fno-strict-aliasing