rpmio/fnmatch.c needs to provide __builtin_expect for non/old gcc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
building rpm from CVS (updated to 2013-10-22) on x86_64-
rpmio/fnmatch.c uses __builtin_expect, which is apparently a branch-prediction hinter for gcc. Studio doesn't provide such a builtin, so it ends up as an undefined symbol in librpmio.
Doing some web searching, it looks like other versions of fnmatch.c provide a define for __builtin_expect when it's not defined, e.g.
https:/
Looking back through my rpm build history, it looks like I was using a patch to fnmatch.c going back to at least rpm 5.1.9, but I never reported the issue back then. My bad.
I'm attaching a patch that's a bit of a combination of what modern grep, bison, etc. are using from fnmatch.c and my old patch, that has a specific case for the Studio compiler.
Changed in rpm: | |
milestone: | none → 5.4.14 |
importance: | Undecided → Medium |
status: | New → Fix Committed |