diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch')
-rw-r--r-- | dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch b/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch new file mode 100644 index 000000000000..9602146b0af9 --- /dev/null +++ b/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch @@ -0,0 +1,58 @@ +--- /usr/bin/colorgcc 2010-12-13 00:08:37.000000000 -0200 ++++ colorgcc 2011-10-05 15:26:53.000000000 -0300 +@@ -221,17 +221,16 @@ + # Figure out which compiler to invoke based on our program name. + $0 =~ m%.*/(.*)$%; + my $progName = $1 || $0; +-my $compiler_pid; ++my $compiler; + + # If called as "colorgcc", just filter STDIN to STDOUT. +-if ($progName eq 'colorgcc') ++if ($progName =~ m/^colorgcc[-0-9.]*(\.pl)?$/) + { +- open(GCCOUT, "<&STDIN"); ++ $compiler = 'gcc'; + } + else + { + # See if the user asked for a specific compiler. +- my $compiler; + if (!defined($compiler = $compilerPaths{$progName})) + { + # Find our wrapper dir on the PATH and tweak the PATH to remove +@@ -257,23 +256,23 @@ + } + $compiler = $progName; + } ++} + +- # Get the terminal type. +- my $terminal = $ENV{"TERM"} || "dumb"; ++# Get the terminal type. ++my $terminal = $ENV{"TERM"} || "dumb"; + +- # If it's in the list of terminal types not to color, or if +- # we're writing to something that's not a tty, don't do color. +- if (! -t STDOUT || $nocolor{$terminal}) +- { ++# If it's in the list of terminal types not to color, or if ++# we're writing to something that's not a tty, don't do color. ++if (! -t STDOUT || $nocolor{$terminal}) ++{ + exec $compiler, @ARGV + or die("Couldn't exec"); +- } +- +- # Keep the pid of the compiler process so we can get its return +- # code and use that as our return code. +- $compiler_pid = open3('<&STDIN', \*GCCOUT, \*GCCOUT, $compiler, @ARGV); + } + ++# Keep the pid of the compiler process so we can get its return ++# code and use that as our return code. ++my $compiler_pid = open3('<&STDIN', \*GCCOUT, \*GCCOUT, $compiler, @ARGV); ++ + # Colorize the output from the compiler. + while(<GCCOUT>) + { |