Date: Sat, 17 Aug 2002 23:50:03 GMT From: Jens.Rehsack@helo.liwing.de To: FreeBSD-gnats-submit@FreeBSD.org Cc: rehsack@liwing.de Subject: ports/41752: error compiling libmcrypt on k6-processor (gcc -march=k6) Message-ID: <200208172350.g7HNo3V2031192@helo.liwing.de>
next in thread | raw e-mail | index | archive | help
>Number: 41752 >Category: ports >Synopsis: error compiling libmcrypt on k6-processor (gcc -march=k6) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 17 17:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Jens Rehsack >Release: FreeBSD 4.6-STABLE i386 >Organization: LiWing IT-Services >Environment: System: FreeBSD helo.liwing.de 4.6-STABLE FreeBSD 4.6-STABLE #9: Fri Aug 16 15:40:08 GMT 2002 root@helo.liwing.de:/usr/obj/usr/src/sys/HELO i386 AMD K6-2 333, FreeBSD 4.6-STABLE >Description: portupgrade libmcrypt fails unexpected, some "research" identified the array name k6 in file modules/algorithms/gost.c as the problem it seems the preprocessor defines a symbol named k6 if compiling for k6-architecture >How-To-Repeat: add CPUTYPE=k6/k6-2/k6-3 to /etc/make.conf cd /usr/ports/security/libmcrypt/ make build >Fix: I submit a small+fast patch which seems to work (static array's, so naming doesn't matter), but further checks from maintainer or developer of libmcrypt may are required. I didn't check, but maybe using GCC3+ fix the problem. --- gost.c.patch begins here --- --- gost.c.orig Sat Aug 17 23:38:49 2002 +++ gost.c Sat Aug 17 23:40:55 2002 @@ -78,28 +78,28 @@ */ static int init = 0; -static unsigned char const k1[16] = { +static unsigned char const _k1[16] = { 1, 15, 13, 0, 5, 7, 10, 4, 9, 2, 3, 14, 6, 11, 8, 2 }; -static unsigned char const k2[16] = { +static unsigned char const _k2[16] = { 13, 11, 4, 1, 3, 15, 5, 9, 0, 10, 14, 7, 6, 8, 2, 12 }; -static unsigned char const k3[16] = { +static unsigned char const _k3[16] = { 4, 11, 10, 0, 7, 2, 1, 13, 3, 6, 8, 5, 9, 12, 15, 14 }; -static unsigned char const k4[16] = { +static unsigned char const _k4[16] = { 6, 12, 7, 1, 5, 15, 13, 8, 4, 10, 9, 14, 0, 3, 11, 2 }; -static unsigned char const k5[16] = { +static unsigned char const _k5[16] = { 7, 13, 10, 1, 0, 8, 9, 15, 14, 4, 6, 12, 11, 2, 5, 3 }; -static unsigned char const k6[16] = { +static unsigned char const _k6[16] = { 5, 8, 1, 13, 10, 3, 4, 2, 14, 15, 12, 7, 6, 0, 9, 11 }; -static unsigned char const k7[16] = { +static unsigned char const _k7[16] = { 14, 11, 4, 12, 6, 13, 15, 10, 2, 3, 8, 1, 0, 7, 5, 9 }; -static unsigned char const k8[16] = { +static unsigned char const _k8[16] = { 4, 10, 9, 2, 13, 8, 0, 14, 6, 11, 1, 12, 7, 15, 5, 3 }; @@ -147,10 +147,10 @@ if (init == 0) { init = 1; for (i = 0; i < 256; i++) { - k87[i] = k8[i >> 4] << 4 | k7[i & 15]; - k65[i] = k6[i >> 4] << 4 | k5[i & 15]; - k43[i] = k4[i >> 4] << 4 | k3[i & 15]; - k21[i] = k2[i >> 4] << 4 | k1[i & 15]; + k87[i] = _k8[i >> 4] << 4 | _k7[i & 15]; + k65[i] = _k6[i >> 4] << 4 | _k5[i & 15]; + k43[i] = _k4[i >> 4] << 4 | _k3[i & 15]; + k21[i] = _k2[i >> 4] << 4 | _k1[i & 15]; } } --- gost.c.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208172350.g7HNo3V2031192>