Title libgcrypt build on freebsd 10.0-amd64 fails, cast5-amd64.S not linked to build
Priority bug Status resolved
Category libgcrypt Due Date
Version 1.6.1. ExtLink (go)
Superseder Nosy List pi
Assigned To Topics  (help)

Created on 2014-07-06.10:15:52 by [P] pi, last changed 2014-08-21.12:55:15 by werner.

File name Uploaded Type Edit Remove
patch-configure.diff pi, 2014-07-06.10:53:32 text/x-patch
msg5224 (view) Author: werner Date: 2014-08-05.14:16:26
FWIW, I checked my POSIX 2001 standard and it does not define -p.  The
GNU manual for uname however has to say:

     Print the machine hardware name (sometimes called the hardware
     class or hardware type).

     Print the processor type (sometimes called the instruction set
     architecture or ISA).  Print `unknown' if the kernel does not make
     this information easily available, as is the case with Linux
msg5213 (view) Author: werner Date: 2014-08-04.13:25:17
Resolved according to freebsd tracker.
msg5190 (view) Author: werner Date: 2014-07-22.19:07:27
Well, on FreeBSD 10 "uname -p" works the same as "uname -m".  It is not POSIX
msg5189 (view) Author: werner Date: 2014-07-22.16:46:59
WTF happened to config.guess?  Upstream's ChangeLog has these entries:

2011-08-20  Ben Elliston  <>

	* config.guess (*:FreeBSD:*:*): Switch on ${UNAME_PROCESSOR}.
	* testsuite/ Remove hard to test FreeBSD cases.

2006-04-26  Bruno Haible  <>
	    Ben Elliston  <>

	* config.guess (amd64:FreeBSD:*:*) Detect as x86_64.
	* testsuite/ Add test case.

Thus in 2006 support form and64 was added and in 2011 the faulty
"uname -p" was implemented and test cases removed.  I assume that
everyone patched similar to what you suggested.  However, the correct
thing is to fix config.guess.

Unfortunately I do not have access to any FreeBSD box right now (the
FreeBSD in the gcc compile farm is offline).  Can you do some tests on
several FreeBSD boxes or give me access to a test box?

What are the patches to configure I see in the build log?  And why are
the M4 files are patched - they are not used after configure has been
created?  I would also like to see the config.rpath to see how it has been

Feel free to continue by private mail.
msg5188 (view) Author: pi Date: 2014-07-22.12:44:58
No, FreeBSD has amd64 as uname -m value.
msg5187 (view) Author: werner Date: 2014-07-22.12:40:07
That should not be required.  Did you explicitly specify host with

config.guess has this code:

	UNAME_PROCESSOR=`/usr/bin/uname -p`
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;

to map "amd64" to "x86_64" and config.sub called with "amd64" also
returns the canonical "x86_64".  Thus everything should be fine.

(I think "amd64" would have been the better and easier to type name,
but the GCC developers settled for "x86_64").
msg5174 (view) Author: pi Date: 2014-07-06.10:53:32
By patching configure it's possible to connect the cipher/*-amd64.S to the build.

See attached.
msg5173 (view) Author: pi Date: 2014-07-06.10:15:51
See for details and
build error at

Question: How to connect cipher/cast5-amd.S to the build ?
Date User Action Args
2014-08-21 12:55:15wernersetstatus: chatting -> resolved
2014-08-05 14:16:26wernersetstatus: resolved -> chatting
messages: + msg5224
2014-08-04 13:25:17wernersetstatus: chatting -> resolved
messages: + msg5213
2014-07-22 19:07:27wernersetmessages: + msg5190
2014-07-22 16:46:59wernersetmessages: + msg5189
2014-07-22 12:44:58pisetmessages: + msg5188
2014-07-22 12:40:07wernersetmessages: + msg5187
2014-07-06 10:53:32pisetfiles: + patch-configure.diff
messages: + msg5174
2014-07-06 10:15:52picreate