From a6a3bd3ef1f8235e923c7e5fd5cc54bc29d14721 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 6 Nov 2022 12:33:54 +0100 Subject: 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 --- .../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 -- cgit v1.2.3-18-g5258