osx: ld doesn't support --build-id
authorJon Turney <jon.turney@dronecode.org.uk>
Sun, 3 Dec 2017 21:58:12 +0000 (21:58 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Thu, 1 Feb 2018 15:13:56 +0000 (15:13 +0000)
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
configure.ac
src/mesa/drivers/dri/Makefile.am

index daa040d319414642e70bdf821538edc20979aea7..a54b7cb6650df4c5bbf0d91f4528c0ec1759c1d6 100644 (file)
@@ -685,6 +685,19 @@ AC_LINK_IFELSE(
 LDFLAGS=$save_LDFLAGS
 AM_CONDITIONAL(HAVE_LD_DYNAMIC_LIST, test "$have_ld_dynamic_list" = "yes")
 
+dnl
+dnl OSX linker does not support build-id
+dnl
+case "$host_os" in
+darwin*)
+    LD_BUILD_ID=""
+    ;;
+*)
+    LD_BUILD_ID="-Wl,--build-id=sha1"
+    ;;
+esac
+AC_SUBST([LD_BUILD_ID])
+
 dnl
 dnl compatibility symlinks
 dnl
index ae30996e028e9dd0c1b1e41286a80227c40c9083..3876d7c41924b76a677a8158b2cbf10bdfd67315 100644 (file)
@@ -57,7 +57,7 @@ mesa_dri_drivers_la_LDFLAGS = \
        -module \
        -no-undefined \
        -avoid-version \
-       -Wl,--build-id=sha1 \
+       $(LD_BUILD_ID) \
        $(BSYMBOLIC) \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)