Bug 3865

Summary: getconf ARG_MAX returns undefined, confusing configure
Product: uClibc Reporter: Michael Deutschmann <michael>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: uclibc-cvs
Priority: P5    
Version: 0.9.32   
Target Milestone: 0.9.33.2   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: Patch to make sysconf always return ARG_MAX

Description Michael Deutschmann 2011-06-17 12:56:36 UTC
Created attachment 3397 [details]
Patch to make sysconf always return ARG_MAX

When uClibc's getconf utility is installed, and uClibc is not built for threads, GNU autoconf scripts will malfunction when determining the maximum length of command-line arguments.

This is because uClibc's sysconf() returns -1, causing getconf to print "undefined".  The autoconf scripts cannot tolerate a non-numeric response there.

Attached is a patch that forces sysconf to return legacy_ARG_MAX as a last resort, rather than -1.
Comment 1 Bernhard Reutner-Fischer 2012-04-17 22:34:58 UTC
Fixed in 4b24c5ad368d0312dbb9cfd6e028a3b21bba48cd

Thanks!
Comment 2 Mike Frysinger 2012-04-19 03:41:45 UTC
the libtool code is broken by not handling "undefined" as a value.  i'll post a patch to them though.