diff options
Diffstat (limited to 'libjava/classpath/ltmain.sh')
-rw-r--r-- | libjava/classpath/ltmain.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/classpath/ltmain.sh b/libjava/classpath/ltmain.sh index 219823fc45d..a3c55f9a751 100644 --- a/libjava/classpath/ltmain.sh +++ b/libjava/classpath/ltmain.sh @@ -3839,7 +3839,13 @@ extern \"C\" { fi # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then + if grep -v "^: " < "$nlist" | + if sort -k 3 </dev/null >/dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S |