components/coreutils/patches/chroot-libthread.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Mon, 25 Apr 2016 23:38:13 -0700
changeset 5890 e3686c085735
parent 2050 7c6a1559c620
permissions -rw-r--r--
23169134 Move json-c library to Userland 16908756 json-c package has wrong upstream-url

These changes have not been passed upstream. It's really a Studio compiler
bug CR #18752073.

--- src/local.mk.orig	2014-07-30 07:15:11.502530658 -0700
+++ src/local.mk	2014-07-30 07:16:58.403637868 -0700
@@ -83,6 +83,15 @@
 copy_ldadd =
 remove_ldadd =
 
+# for chroot to work correctly for root (CR #18744156)
+# add '-z now' to disable lazy loading since we need to bring in
+# dependencies before we chroot(2) to an environment that may not
+# be able to satisfy them.
+src_chroot_LDFLAGS =  -z now
+# add '-mt=no' so that we don't end up with an unnecessary dependency on
+# libthread.so.
+src_chroot_LDFLAGS +=  -mt=no
+
 # Sometimes, the expansion of $(LIBINTL) includes -lc which may
 # include modules defining variables like 'optind', so libcoreutils.a
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.