components/coreutils/patches/chroot-libthread.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 2050 7c6a1559c620
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers

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.