components/coreutils/patches/chroot-libthread.patch
changeset 2050 7c6a1559c620
parent 1900 e587944ed7de
equal deleted inserted replaced
2049:e2939e765e30 2050:7c6a1559c620
     1 These changes have not been passed upstream. It's really a Studio compiler
     1 These changes have not been passed upstream. It's really a Studio compiler
     2 bug CR #18752073.
     2 bug CR #18752073.
     3 
     3 
     4 --- coreutils-8.16/src/Makefile.am.orig	2014-05-15 10:13:19.739717905 -0700
     4 --- src/local.mk.orig	2014-07-30 07:15:11.502530658 -0700
     5 +++ coreutils-8.16/src/Makefile.am	2014-05-16 10:39:39.250671691 -0700
     5 +++ src/local.mk	2014-07-30 07:16:58.403637868 -0700
     6 @@ -178,6 +178,15 @@
     6 @@ -83,6 +83,15 @@
     7  # Tell the linker to omit references to unused shared libraries.
     7  copy_ldadd =
     8  AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
     8  remove_ldadd =
     9  
     9  
    10 +# for chroot to work correctly for root (CR #18744156)
    10 +# for chroot to work correctly for root (CR #18744156)
    11 +# add '-z now' to disable lazy loading since we need to bring in
    11 +# add '-z now' to disable lazy loading since we need to bring in
    12 +# dependencies before we chroot(2) to an environment that may not
    12 +# dependencies before we chroot(2) to an environment that may not
    13 +# be able to satisfy them.
    13 +# be able to satisfy them.
    14 +chroot_LDFLAGS =  -z now
    14 +src_chroot_LDFLAGS =  -z now
    15 +# add '-mt=no' so that we don't end up with an unnecessary dependency on
    15 +# add '-mt=no' so that we don't end up with an unnecessary dependency on
    16 +# libthread.so.
    16 +# libthread.so.
    17 +chroot_LDFLAGS +=  -mt=no
    17 +src_chroot_LDFLAGS +=  -mt=no
    18 +
    18 +
    19  # Sometimes, the expansion of $(LIBINTL) includes -lc which may
    19  # Sometimes, the expansion of $(LIBINTL) includes -lc which may
    20  # include modules defining variables like 'optind', so libcoreutils.a
    20  # include modules defining variables like 'optind', so libcoreutils.a
    21  # must precede $(LIBINTL) in order to ensure we use GNU getopt.
    21  # must precede $(LIBINTL) in order to ensure we use GNU getopt.