Skip to content

Commit

Permalink
dev-libs/libpcre: Fix compile error on MIPS. Fixes #626564
Browse files Browse the repository at this point in the history
Fixes a compile error on certain MIPS platforms that leads to a
violation of C grammar in sljit/sljitNativeMIPS_common.c.  Patch
has been upstreamed:
https://bugs.exim.org/show_bug.cgi?id=2154

Signed-off-by: Joshua Kinard <[email protected]>
Package-Manager: Portage-2.3.6, Repoman-2.3.3
  • Loading branch information
Kumba42 committed Jul 29, 2017
1 parent f9a0572 commit 25f864c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -Naurp pcre-8.41.orig/sljit/sljitNativeMIPS_common.c pcre-8.41/sljit/sljitNativeMIPS_common.c
--- pcre-8.41.orig/sljit/sljitNativeMIPS_common.c 2017-05-07 11:32:25.000000000 -0400
+++ pcre-8.41/sljit/sljitNativeMIPS_common.c 2017-07-29 17:50:24.508909742 -0400
@@ -503,9 +503,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
#ifdef SLJIT_IS_FPU_AVAILABLE
return SLJIT_IS_FPU_AVAILABLE;
#elif defined(__GNUC__)
+ {
sljit_sw fir;
asm ("cfc1 %0, $0" : "=r"(fir));
return (fir >> 22) & 0x1;
+ }
#else
#error "FIR check is not implemented for this architecture"
#endif
7 changes: 4 additions & 3 deletions dev-libs/libpcre/libpcre-8.41.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ MULTILIB_CHOST_TOOLS=(
/usr/bin/pcre-config
)

#PATCHES=(
#)
PATCHES=(
"${FILESDIR}"/${PN}-8.41-sljit_mips-label-statement-fix.patch
)

src_prepare() {
#epatch "${PATCHES[@]}"
epatch "${PATCHES[@]}"
sed -i -e "s:-lpcre ::" libpcrecpp.pc.in || die
elibtoolize
}
Expand Down

0 comments on commit 25f864c

Please sign in to comment.