From: Rhys Kidd Date: Sat, 25 Jul 2015 05:50:10 +0000 (+0000) Subject: Fix clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64 X-Git-Tag: svn/VALGRIND_3_11_0~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48487813511a114f53d8558d7f647e0754c55688;p=thirdparty%2Fvalgrind.git Fix clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64 bz#349769 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15450 --- diff --git a/NEWS b/NEWS index 974de96133..f5a80439d2 100644 --- a/NEWS +++ b/NEWS @@ -263,6 +263,7 @@ where XXXXXX is the bug number as listed below. 349087 Fix UNKNOWN task message [id 3410, to mach_task_self(), reply 0x........] (task_set_special_port) 349626 Implemented additional Xen hypercalls +349769 Fix clang/osx: ld: warning: -read_only_relocs cannot be used with x86_64 349874 Fix typos in source code 349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so) 349941 di_notify_mmap might create wrong start/size DebugInfoMapping diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index 25391c25df..f5654c1692 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -36,9 +36,13 @@ valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) if VGCONF_PLATVARIANT_IS_ANDROID valgrind_listener_CFLAGS += -static endif +# If there is no secondary platform, and the platforms include x86-darwin, +# then the primary platform must be x86-darwin. Hence: +if ! VGCONF_HAVE_PLATFORM_SEC if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN valgrind_listener_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif +endif if VGCONF_OS_IS_SOLARIS valgrind_listener_LDADD = -lsocket -lnsl endif @@ -51,9 +55,13 @@ valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI) if VGCONF_PLATVARIANT_IS_ANDROID valgrind_di_server_CFLAGS += -static endif +# If there is no secondary platform, and the platforms include x86-darwin, +# then the primary platform must be x86-darwin. Hence: +if ! VGCONF_HAVE_PLATFORM_SEC if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN valgrind_di_server_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif +endif if VGCONF_OS_IS_SOLARIS valgrind_di_server_LDADD = -lsocket -lnsl endif diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am index af9f80493a..a587d24124 100644 --- a/cachegrind/Makefile.am +++ b/cachegrind/Makefile.am @@ -28,9 +28,13 @@ cg_merge_CPPFLAGS = $(AM_CPPFLAGS_PRI) cg_merge_CFLAGS = $(AM_CFLAGS_PRI) cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI) cg_merge_LDFLAGS = $(AM_CFLAGS_PRI) +# If there is no secondary platform, and the platforms include x86-darwin, +# then the primary platform must be x86-darwin. Hence: +if ! VGCONF_HAVE_PLATFORM_SEC if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN cg_merge_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif +endif #---------------------------------------------------------------------------- # cachegrind- diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index e22f117e5a..7f25f489df 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -54,9 +54,13 @@ valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI) valgrind_CFLAGS = $(AM_CFLAGS_PRI) valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI) valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ +# If there is no secondary platform, and the platforms include x86-darwin, +# then the primary platform must be x86-darwin. Hence: +if ! VGCONF_HAVE_PLATFORM_SEC if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN valgrind_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif +endif # On Android we must ask for non-executable stack, not sure why. if VGCONF_PLATVARIANT_IS_ANDROID valgrind_CFLAGS += -static @@ -96,9 +100,13 @@ if !VGCONF_PLATVARIANT_IS_ANDROID vgdb_LDADD = -lpthread endif endif +# If there is no secondary platform, and the platforms include x86-darwin, +# then the primary platform must be x86-darwin. Hence: +if ! VGCONF_HAVE_PLATFORM_SEC if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN vgdb_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif +endif #---------------------------------------------------------------------------- # Darwin Mach stuff