components/coreutils/patches/stdbuf.c.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Thu, 11 Feb 2016 22:32:09 -0800
changeset 5453 12788f3c6c43
parent 2050 7c6a1559c620
permissions -rw-r--r--
22302071 diffutils builds with the wrong compiler
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1895
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
     1
Change needed to get stdbuf to successfully preload libstdbuf.so
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
     2
for both 32-bit and 64-bit applications.
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
     3
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
     4
Since we don't link against libstdbuf.so, we need to LD_PRELOAD it.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
     5
libstdbuf.so lives in /usr/lib and /usr/lib/64, so we just use a
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
     6
search path value of "" and that equates to LD_PRELOAD=libstdbuf.so,
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
     7
and ld.so.1 finds the right one associated with the process class.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
     8
ie. we don't use full path names for the preload names.
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    10
This change has been passed upstream, but the GNU coreutils maintainer
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    11
turned it into a comment explaining why it's not included by default.
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    12
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    13
--- src/stdbuf.c.orig	2014-07-30 16:44:53.956056259 -0700
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    14
+++ src/stdbuf.c	2014-07-30 16:46:19.570693225 -0700
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    15
@@ -214,6 +214,7 @@
1895
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    16
   char const *const search_path[] = {
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    17
     program_path,
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    18
     PKGLIBEXECDIR,
2050
7c6a1559c620 PSARC 2014/271 GNU coreutils 8.23
Rich Burridge <rich.burridge@oracle.com>
parents: 1895
diff changeset
    19
+    "",			/* System default */
1895
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    20
     NULL
1f133713df64 15941179 coreutils "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents: 1465
diff changeset
    21
   };
1465
26be70b523fc 17408935 GNU coreutils should be 64-bit
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22