[PATCH] Re: Forward error correction routines?

Howard Goldstein hg at queue.to
Thu Dec 15 02:06:17 UTC 2011


On 12/13/2011 22:45, Dennis Glatting wrote:
> I am looking for /any/ forward error correction code under FreeBSD,
> whether Hamming Codes, Golay Codes, Reed-Solomon, BCH codes, etc. or
> convolution encoders/decoders.
>
> All I've found is:
>
> * libfec, which only runs under i386 (I am 64 bit), and

Here are patches allowing libfec to compile on amd64. I'll submit a pr.

*** libfec/Makefile.orig	2011-12-14 20:34:24.653733990 -0500
--- libfec/Makefile	2011-12-14 20:50:52.306036812 -0500
***************
*** 22,31 ****
   GNU_CONFIGURE=	yes
   USE_GMAKE=	yes
   USE_LDCONFIG=	yes
! ONLY_FOR_ARCHS=	i386
   PLIST_FILES=	include/fec.h lib/libfec.so lib/libfec.a

   post-patch:
   	@${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/makefile.in

   .include <bsd.port.mk>
--- 22,35 ----
   GNU_CONFIGURE=	yes
   USE_GMAKE=	yes
   USE_LDCONFIG=	yes
! ONLY_FOR_ARCHS=	i386 amd64
   PLIST_FILES=	include/fec.h lib/libfec.so lib/libfec.a

   post-patch:
   	@${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/makefile.in

   .include <bsd.port.mk>
+
+ .if ${ARCH} == "amd64"
+ CFLAGS+=	-fPIC
+ .endif
*** /dev/null	2011-12-14 20:57:48.000000000 -0500
--- libfec/files/patch-dotprod.c	2011-12-14 20:44:01.336529860 -0500
***************
*** 0 ****
--- 1,12 ----
+ *** dotprod.c	2006-10-12 21:10:53.000000000 -0400
+ --- ../../foowork/fec-3.0.1/dotprod.c	2011-12-14 20:43:00.132752233 -0500
+ ***************
+ *** 54,59 ****
+ --- 54,60 ----
+     switch(Cpu_mode){
+     case PORT:
+     default:
+ +     return feedp_port(p);
+   #ifdef __i386__
+     case MMX:
+     case SSE:


More information about the freebsd-questions mailing list