Skip to content

Commit

Permalink
devel/binutils: Fix abort() in mingw32
Browse files Browse the repository at this point in the history
Building mingw32 results in a binutils abort() trap. Upstream commit
b7eab2a9d4f fixes this. Upstream commit log message states:

    the early-out in wild_sort is not enough, it might still be
    that filenames are equal _and_ the wildcard list doesn't specify
    a sort order either.  Don't call compare_section then.

PR:			271405
Reported by:		shurd
Upstream commit:	b7eab2a9d4f (identified by shurd)
MFH			2023Q3
  • Loading branch information
cschuber committed May 14, 2023
1 parent cee3d47 commit 783bf3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devel/binutils/Makefile
@@ -1,6 +1,6 @@
PORTNAME= binutils
DISTVERSION= 2.40
PORTREVISION= 3
PORTREVISION= 4
PORTEPOCH?= 1
CATEGORIES?= devel
MASTER_SITES= SOURCEWARE/binutils/releases
Expand Down
12 changes: 12 additions & 0 deletions devel/binutils/files/patch-ld_ldlang.c
@@ -0,0 +1,12 @@
--- ld/ldlang.c.orig 2023-01-13 16:00:00.000000000 -0800
+++ ld/ldlang.c 2023-05-13 21:48:06.006092000 -0700
@@ -649,7 +649,8 @@
looking at the sections for this file. */

/* Find the correct node to append this section. */
- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
+ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none
+ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
tree = &((*tree)->left);
else
tree = &((*tree)->right);

0 comments on commit 783bf3a

Please sign in to comment.