commit:     a6a3bd3ef1f8235e923c7e5fd5cc54bc29d14721
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 11:33:54 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 11:33:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a6a3bd3e

sys-devel/gcc-config: use version_sorted_paths iso sort -V

Oversight on my part, just use the version_sorted_paths function which
may use sort -V in the future, but for now is the way to order the
versions (which works fine)

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../gcc-config/files/gcc-config-2.7-gcc-libs-ordered.patch     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys-devel/gcc-config/files/gcc-config-2.7-gcc-libs-ordered.patch 
b/sys-devel/gcc-config/files/gcc-config-2.7-gcc-libs-ordered.patch
index e15e83015f..63494e4813 100644
--- a/sys-devel/gcc-config/files/gcc-config-2.7-gcc-libs-ordered.patch
+++ b/sys-devel/gcc-config/files/gcc-config-2.7-gcc-libs-ordered.patch
@@ -6,19 +6,15 @@ with older binaries.
 
 --- gcc-config-2.7/gcc-config
 +++ gcc-config-2.7/gcc-config
-@@ -619,8 +619,13 @@
+@@ -619,8 +619,9 @@
                rmdir "${sourcedir}"
        }
  
 -      # We don't rely on iteration order here.
 -      local GCC_PROFILES=$(LC_ALL="C" ls ${GCC_ENV_D}/${CHOST}-*)
 +      # We want the latest version to provide the final link to an object,
-+      # for gcc's libs should be backwards compatible, so use sort -V to
-+      # get that ordering -- take into account that sort may not support
-+      # -V (yet).  Then it is better to just do whatever order ls reports.
-+      local srt='sort --version-sort'
-+      sort --help | grep -q -- --version-sort || srt='cat'
-+      local GCC_PROFILES=$(LC_ALL="C" ls ${GCC_ENV_D}/${CHOST}-* | ${srt})
++      # for gcc's libs should be backwards compatible
++      local GCC_PROFILES=$(version_sorted_paths ${GCC_ENV_D}/${CHOST}-*)
  
        local targetdirs= GCC_PATH= LDPATH=
        for x in ${GCC_PROFILES} ; do

Reply via email to