author | Rich Burridge <rich.burridge@oracle.com> |
Fri, 15 Aug 2014 07:34:17 -0700 | |
changeset 2050 | 7c6a1559c620 |
parent 1900 | e587944ed7de |
permissions | -rw-r--r-- |
1898
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
These changes have not been passed upstream. It's really a Studio compiler |
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
bug CR #18752073. |
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
|
2050
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
4 |
--- src/local.mk.orig 2014-07-30 07:15:11.502530658 -0700 |
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
5 |
+++ src/local.mk 2014-07-30 07:16:58.403637868 -0700 |
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
6 |
@@ -83,6 +83,15 @@ |
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
7 |
copy_ldadd = |
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
8 |
remove_ldadd = |
1898
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
|
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
+# for chroot to work correctly for root (CR #18744156) |
1900
e587944ed7de
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents:
1898
diff
changeset
|
11 |
+# add '-z now' to disable lazy loading since we need to bring in |
e587944ed7de
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents:
1898
diff
changeset
|
12 |
+# dependencies before we chroot(2) to an environment that may not |
e587944ed7de
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents:
1898
diff
changeset
|
13 |
+# be able to satisfy them. |
2050
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
14 |
+src_chroot_LDFLAGS = -z now |
1900
e587944ed7de
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents:
1898
diff
changeset
|
15 |
+# add '-mt=no' so that we don't end up with an unnecessary dependency on |
e587944ed7de
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument (adjust approach)
Rich Burridge <rich.burridge@oracle.com>
parents:
1898
diff
changeset
|
16 |
+# libthread.so. |
2050
7c6a1559c620
PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents:
1900
diff
changeset
|
17 |
+src_chroot_LDFLAGS += -mt=no |
1898
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
+ |
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
# Sometimes, the expansion of $(LIBINTL) includes -lc which may |
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
# include modules defining variables like 'optind', so libcoreutils.a |
5c902a3c6e7e
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
# must precede $(LIBINTL) in order to ensure we use GNU getopt. |