From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 11 08:10:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1732B5A5 for ; Tue, 11 Mar 2014 08:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E72A4286 for ; Tue, 11 Mar 2014 08:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2B8A0v2073286 for ; Tue, 11 Mar 2014 08:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2B8A00D073279; Tue, 11 Mar 2014 08:10:00 GMT (envelope-from gnats) Resent-Date: Tue, 11 Mar 2014 08:10:00 GMT Resent-Message-Id: <201403110810.s2B8A00D073279@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stoyan Dimov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70A9439C for ; Tue, 11 Mar 2014 08:02:15 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4D321F for ; Tue, 11 Mar 2014 08:02:15 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2B82EZ1057498 for ; Tue, 11 Mar 2014 08:02:14 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2B82Edu057497; Tue, 11 Mar 2014 08:02:14 GMT (envelope-from nobody) Message-Id: <201403110802.s2B82Edu057497@cgiserv.freebsd.org> Date: Tue, 11 Mar 2014 08:02:14 GMT From: Stoyan Dimov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/187441: security/libgcrypt builds with generic MPI code instead of optimized assembler code X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 08:10:01 -0000 >Number: 187441 >Category: ports >Synopsis: security/libgcrypt builds with generic MPI code instead of optimized assembler code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 11 08:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Stoyan Dimov >Release: 9.1-RELEASE-p8, 10.0-RELEASE >Organization: >Environment: FreeBSD test 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r261435: Mon Feb 24 15:41:34 UTC 2014 root@test:/usr/obj/usr/src/sys/JERRY amd64 >Description: security/libgcrypt builds with generic C code instead of optimized assembler code. >How-To-Repeat: In /usr/ports/security/libgcrypt do: make configure Towards the end you will see: config.status: linking mpi/generic/mpih-add1.c to mpi/mpih-add1.c config.status: linking mpi/generic/mpih-sub1.c to mpi/mpih-sub1.c config.status: linking mpi/generic/mpih-mul1.c to mpi/mpih-mul1.c config.status: linking mpi/generic/mpih-mul2.c to mpi/mpih-mul2.c config.status: linking mpi/generic/mpih-mul3.c to mpi/mpih-mul3.c config.status: linking mpi/generic/mpih-lshift.c to mpi/mpih-lshift.c config.status: linking mpi/generic/mpih-rshift.c to mpi/mpih-rshift.c config.status: linking mpi/generic/mpi-asm-defs.h to mpi/mpi-asm-defs.h For amd64 architecture the lines above should look like this: config.status: linking mpi/amd64/mpih-add1.S to mpi/mpih-add1-asm.S config.status: linking mpi/amd64/mpih-sub1.S to mpi/mpih-sub1-asm.S config.status: linking mpi/amd64/mpih-mul1.S to mpi/mpih-mul1-asm.S config.status: linking mpi/amd64/mpih-mul2.S to mpi/mpih-mul2-asm.S config.status: linking mpi/amd64/mpih-mul3.S to mpi/mpih-mul3-asm.S config.status: linking mpi/amd64/mpih-lshift.S to mpi/mpih-lshift-asm.S config.status: linking mpi/amd64/mpih-rshift.S to mpi/mpih-rshift-asm.S config.status: linking mpi/amd64/mpi-asm-defs.h to mpi/mpi-asm-defs.h >Fix: configure script uses a helper script to decide which MPI code to use. That script is mpi/config.links. The problem is that configure script detects that host x86_64-unknown-freebsdX while FreeBSD port systems sets the 'build' type to amd64-portbld-freebsdX. In mpi/config.links there is a section for x86_64-*-* but there is nothing about amd64-*-*. IMHO the easiest way to fix this is to patch mpi/config.links by adding amd64-*-* section same as x86_64-*-* section. Attached file does that for libgcrypt 1.5.3. Patch attached with submission follows: diff -r -N -u security/libgcrypt.orig/files/patch-mpi-config.links security/libgcrypt/files/patch-mpi-config.links --- security/libgcrypt.orig/files/patch-mpi-config.links 1970-01-01 00:00:00.000000000 +0000 +++ security/libgcrypt/files/patch-mpi-config.links 2014-03-10 14:27:01.192576531 +0000 @@ -0,0 +1,14 @@ +--- mpi/config.links.orig 2014-03-10 14:24:48.337585447 +0000 ++++ mpi/config.links 2014-03-10 14:25:16.754600736 +0000 +@@ -117,6 +117,11 @@ + cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h + path="amd64" + ;; ++ amd64-*-*) ++ echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h ++ cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h ++ path="amd64" ++ ;; + alpha*-*-*) + echo '/* configured for alpha */' >>./mpi/asm-syntax.h + path="alpha" >Release-Note: >Audit-Trail: >Unformatted: