From MAILER-DAEMON Thu Aug 09 17:37:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzaQQ-0008Ie-Vx
	for mharc-autoconf@gnu.org; Thu, 09 Aug 2012 17:37:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58213)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1SzaQO-0008Gv-GG
	for autoconf@gnu.org; Thu, 09 Aug 2012 17:37:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1SzaQN-0000xQ-Az
	for autoconf@gnu.org; Thu, 09 Aug 2012 17:37:48 -0400
Received: from mail-pb0-f41.google.com ([209.85.160.41]:55995)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruce.korb@gmail.com>) id 1SzaQN-0000xE-45
	for autoconf@gnu.org; Thu, 09 Aug 2012 17:37:47 -0400
Received: by pbbro12 with SMTP id ro12so1700459pbb.0
	for <autoconf@gnu.org>; Thu, 09 Aug 2012 14:37:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	bh=s8kHFy5MqvmXOHtJ3OYNFy4aO6tZTZ4b2zhpO/ExuOI=;
	b=VcUgqr2TIkqSHBygLbULrkW6UOOtM9AMLVstUf1gtK6iSnhcjEQeeT8HYdmynxpZwW
	4OOZEISqteVdAJALI6I7qxFfdhQjLQmCVHiC+KMkqX3AKYuFYxRCOSi3UVPEXLughh+H
	RF/UNLHLGHR9Hnhz7KzpIr98ksBLJoad7+NE6IwczKCUEg/NxFHX3B/tvFt+SZNTPoJB
	IROc3eYxOE3fpfF6ViYvq3TdvqRM71v7IFigWCyU8Jl83lVEHLjlH4Xfefd2QU7w8/F1
	fvjpOvCZnj5LmkklNSGqvN2Ku6tfpK+tm9k+B/sO9M6vliH5DHQS9B8ZM+5uaW8p5RmB
	f4eg==
Received: by 10.68.217.99 with SMTP id ox3mr2052524pbc.47.1344548266253;
	Thu, 09 Aug 2012 14:37:46 -0700 (PDT)
Received: from [192.168.10.2] (adsl-76-254-26-157.dsl.pltn13.sbcglobal.net.
	[76.254.26.157])
	by mx.google.com with ESMTPS id ru4sm1851399pbc.66.2012.08.09.14.37.44
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 09 Aug 2012 14:37:45 -0700 (PDT)
Message-ID: <50242DA7.30505@gmail.com>
Date: Thu, 09 Aug 2012 14:37:43 -0700
From: Bruce Korb <bruce.korb@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: What is the right way to specify -Wno-format-contains-nul?
References: <50241658.5030208@gmail.com> <502426FA.7080105@gmail.com>
In-Reply-To: <502426FA.7080105@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.41
Cc: autoconf <autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 21:37:49 -0000

On 08/09/12 14:09, Stefano Lattarini wrote:
>> It seems that AM_PROG_CC
>>
> Huh?  There is no such think like 'AM_PROG_CC'.  I guess you mean
> AC_PROG_CC.

Yes, thank you.  Wrong forum, too.  (autoconf not automake)

> How can -Wall cause the compiler to die?  Have you added -Werror to
> $(AM_CFLAGS) maybe?

Me?  No.  My clients?  Sometimes.

> This would go against the principle that "the user is always right (when
> he is explicit)"

Which is the root of the problem:

>> (Actually, gcc probably ought not override a specifically set option
>> with a "-Wall", but this the wrong forum for that...)

In that forum, it seems that some folks think that "-Wall" appearing after
"-Wno-some-obscure-warning-thingy" over-rides it, and others think it
nonsensical.  I'm in the latter camp, obviously.  I am explicit in that
this "format-contains-nul" should never have been warned about in the
first place and someone specifying CFLAGS a la:

    ./configure CFLAGS="-Dxxx -Wall -Werror"

ought to work, even given gcc's pickishness about format strings.
And, yes, in this particular case, I'd like to just say any user
turning on that warning is wrong -- whether deliberate or accidentally
with -Wall.  So I'll fix it in GCC and we'll have it fixed in user
space in a few years. :)

Cheers - Bruce


From MAILER-DAEMON Mon Aug 13 06:16:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0rh1-0006iU-PN
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 06:16:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51305)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0k97-0007wv-L5
	for autoconf@gnu.org; Sun, 12 Aug 2012 22:12:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0k96-00054v-J4
	for autoconf@gnu.org; Sun, 12 Aug 2012 22:12:45 -0400
Received: from hp57.hostpapa.com ([69.90.163.85]:43975)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0k96-00054V-E9
	for autoconf@gnu.org; Sun, 12 Aug 2012 22:12:44 -0400
Received: from [75.57.174.255] (port=49621 helo=[192.168.1.64])
	by hp57.hostpapa.com with esmtpa (Exim 4.77)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0k93-0005YJ-RD
	for autoconf@gnu.org; Sun, 12 Aug 2012 22:12:41 -0400
Message-ID: <5028629A.9050007@ieee.org>
Date: Sun, 12 Aug 2012 21:12:42 -0500
From: Daniel J Sebald <daniel.sebald@ieee.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Build directory option for configure script
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - hp57.hostpapa.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - ieee.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 69.90.163.85
X-Mailman-Approved-At: Mon, 13 Aug 2012 06:16:15 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 02:12:46 -0000

Hello Autoconf,

The Octave maintainers had a discussion about adding an option to 
"configure" for a build directory.  The reason is that a lot of people 
like running configure from a directory other than the source tree so 
that 1) object files end up in a different directory that can easily be 
recursively removed to start over, and 2) multiple configurations and 
builds can be done (the analogy being a debug and non-debug menu 
selection in some C/C++ developer suite).

It was suggested this might be a generic feature rather than an 
Octave-added option.  So please give me your thoughts on adding this 
option to Autoconf.  By having this as an option, it lets people know 
that a separate build directory can be done, and it might be useful down 
the road to someone who wants to build a generic script.  Patterning 
after this:

Fine tuning of the installation directories:
   --bindir=DIR            user executables [EPREFIX/bin]
   --sbindir=DIR           system admin executables [EPREFIX/sbin]

it might be something like:

--builddir=DIR           object and libraries

which is essentially the same as doing:

mkdir ../DIR
cd ../DIR
../<projname>/configure OTHER_OPTS
cd ../<projname>

Or something like that.

Thanks,

Dan


From MAILER-DAEMON Mon Aug 13 10:05:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0vGP-00005X-7b
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 10:05:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55260)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T0vGI-0008DL-IM
	for autoconf@gnu.org; Mon, 13 Aug 2012 10:04:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T0vGF-0001Qc-O9
	for autoconf@gnu.org; Mon, 13 Aug 2012 10:04:54 -0400
Received: from mx1.redhat.com ([209.132.183.28]:64754)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1T0vGF-0001QQ-FR; Mon, 13 Aug 2012 10:04:51 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7DE4oed014595
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 13 Aug 2012 10:04:50 -0400
Received: from [10.3.113.122] (ovpn-113-122.phx2.redhat.com [10.3.113.122])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7DE4nXi029932; Mon, 13 Aug 2012 10:04:49 -0400
Message-ID: <50290980.8040808@redhat.com>
Date: Mon, 13 Aug 2012 08:04:48 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Daniel J Sebald <daniel.sebald@ieee.org>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org>
In-Reply-To: <5028629A.9050007@ieee.org>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig2BA6F400AA89FFFA41CA5C23"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org, bug-standards@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 14:04:59 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig2BA6F400AA89FFFA41CA5C23
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

[adding bug-standards]

On 08/12/2012 08:12 PM, Daniel J Sebald wrote:
> Hello Autoconf,
>=20
> The Octave maintainers had a discussion about adding an option to
> "configure" for a build directory.  The reason is that a lot of people
> like running configure from a directory other than the source tree so
> that 1) object files end up in a different directory that can easily be=

> recursively removed to start over, and 2) multiple configurations and
> builds can be done (the analogy being a debug and non-debug menu
> selection in some C/C++ developer suite).
>=20
> It was suggested this might be a generic feature rather than an
> Octave-added option.  So please give me your thoughts on adding this
> option to Autoconf.  By having this as an option, it lets people know
> that a separate build directory can be done, and it might be useful dow=
n
> the road to someone who wants to build a generic script.  Patterning
> after this:
>=20
> Fine tuning of the installation directories:
>   --bindir=3DDIR            user executables [EPREFIX/bin]
>   --sbindir=3DDIR           system admin executables [EPREFIX/sbin]
>=20
> it might be something like:
>=20
> --builddir=3DDIR           object and libraries
>=20
> which is essentially the same as doing:
>=20
> mkdir ../DIR
> cd ../DIR
> ../<projname>/configure OTHER_OPTS
> cd ../<projname>

We already document in the generic INSTALL file the possibility of using
VPATH builds to set up alternative build dirs, but you are correct that
the user has to pre-create the directory and start from that location.

Your idea may make sense, but I'd first like to have an opinion from the
folks that maintain the GNU Coding Standards [cc'd] on whether we should
require the syntactic sugar for automating the creation of a VPATH build
from within a different directory.  That is, I don't see the point in
adding complexity to Autoconf to support this for every package unless
we first want to codify it into the GNU Coding Standards.

The other thing to realize is that VPATH builds tend to tickle bugs in a
number of non-GNU make programs, if they are not carefully written;
while we don't want to discourage VPATH builds, I worry slightly that
making VPATH builds triggered by a one-liner might backfire with more
reports of people having failed builds when they weren't familiar with
the risks of a VPATH build.  The current status quo of having the user
take a several-step process to do a VPATH build tends to weed out some
of the cluelessness.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig2BA6F400AA89FFFA41CA5C23
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQKQmAAAoJEKeha0olJ0NqFEgH/RdOyISygxGIV8X9a7gOjF1W
X4gPq/OxcByGvK3RhsDeG3BhZHvshElW7sy5FOcrwfDtHE5w5DoEIUBo1cMttOan
Hu25UrtnaH3oA+R623ANjjqTspCAqyvPfq2FtyGT0AUIfxlARo55U7JqYHHd2mRF
2Wy/Z2JVF+2X8Zo/dHuApRT+lB4K0cr1qESaPLNztjx0cAiJLWjCj/tbHTHEEd9T
8Y9pOuR5hP+9vbOsS3hmnillHJsn9hI4hWSKrh/VK2aUytLqVbLFN1MVOCBtyUAb
GAfaqel7K7P5n17msH43Oz0yeTOo9WMzrcv7xw+US+c4z1XzcGOb10b4jwzQRFg=
=pXgI
-----END PGP SIGNATURE-----

--------------enig2BA6F400AA89FFFA41CA5C23--


From MAILER-DAEMON Mon Aug 13 12:59:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0xyo-0000wG-KV
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 12:59:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45081)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0xxz-0000n1-Sq
	for autoconf@gnu.org; Mon, 13 Aug 2012 12:59:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0xxH-0001Cd-8p
	for autoconf@gnu.org; Mon, 13 Aug 2012 12:58:11 -0400
Received: from hp57.hostpapa.com ([69.90.163.85]:49265)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0xxH-0001CU-3U; Mon, 13 Aug 2012 12:57:27 -0400
Received: from adsl-76-202-231-231.dsl.emhril.sbcglobal.net
	([76.202.231.231]:51269 helo=[192.168.1.64])
	by hp57.hostpapa.com with esmtpa (Exim 4.77)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0xxD-0003t2-DN; Mon, 13 Aug 2012 12:57:23 -0400
Message-ID: <502931F2.8010808@ieee.org>
Date: Mon, 13 Aug 2012 11:57:22 -0500
From: Daniel J Sebald <daniel.sebald@ieee.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org> <50290980.8040808@redhat.com>
In-Reply-To: <50290980.8040808@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - hp57.hostpapa.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - ieee.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 69.90.163.85
Cc: autoconf@gnu.org, bug-standards@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 16:59:01 -0000

On 08/13/2012 09:04 AM, Eric Blake wrote:
> [adding bug-standards]
>
> On 08/12/2012 08:12 PM, Daniel J Sebald wrote:
>> Hello Autoconf,
>>
>> The Octave maintainers had a discussion about adding an option to
>> "configure" for a build directory.  The reason is that a lot of people
>> like running configure from a directory other than the source tree so
>> that 1) object files end up in a different directory that can easily be
>> recursively removed to start over, and 2) multiple configurations and
>> builds can be done (the analogy being a debug and non-debug menu
>> selection in some C/C++ developer suite).
>>
>> It was suggested this might be a generic feature rather than an
>> Octave-added option.  So please give me your thoughts on adding this
>> option to Autoconf.  By having this as an option, it lets people know
>> that a separate build directory can be done, and it might be useful down
>> the road to someone who wants to build a generic script.  Patterning
>> after this:
>>
>> Fine tuning of the installation directories:
>>    --bindir=DIR            user executables [EPREFIX/bin]
>>    --sbindir=DIR           system admin executables [EPREFIX/sbin]
>>
>> it might be something like:
>>
>> --builddir=DIR           object and libraries
>>
>> which is essentially the same as doing:
>>
>> mkdir ../DIR
>> cd ../DIR
>> ../<projname>/configure OTHER_OPTS
>> cd ../<projname>
>
> We already document in the generic INSTALL file the possibility of using
> VPATH builds to set up alternative build dirs, but you are correct that
> the user has to pre-create the directory and start from that location.
>
> Your idea may make sense, but I'd first like to have an opinion from the
> folks that maintain the GNU Coding Standards [cc'd] on whether we should
> require the syntactic sugar for automating the creation of a VPATH build
> from within a different directory.  That is, I don't see the point in
> adding complexity to Autoconf to support this for every package unless
> we first want to codify it into the GNU Coding Standards.
>
> The other thing to realize is that VPATH builds tend to tickle bugs in a
> number of non-GNU make programs, if they are not carefully written;
> while we don't want to discourage VPATH builds, I worry slightly that
> making VPATH builds triggered by a one-liner might backfire with more
> reports of people having failed builds when they weren't familiar with
> the risks of a VPATH build.  The current status quo of having the user
> take a several-step process to do a VPATH build tends to weed out some
> of the cluelessness.

I'm reading up on VPATH builds.  I'll toss the VPATH method over to the 
Octave discussion list.

Thanks,

Dan


From MAILER-DAEMON Mon Aug 13 13:07:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0y6q-0003yB-Ar
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 13:07:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59984)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T0y6k-0003uG-Ok
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:07:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T0y6d-0004R4-GK
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:07:14 -0400
Received: from mx1.redhat.com ([209.132.183.28]:8348)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>)
	id 1T0y6d-0004Qu-7q; Mon, 13 Aug 2012 13:07:07 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7DH76Iq017962
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 13 Aug 2012 13:07:06 -0400
Received: from [10.3.113.122] (ovpn-113-122.phx2.redhat.com [10.3.113.122])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7DH75du000753; Mon, 13 Aug 2012 13:07:06 -0400
Message-ID: <50293439.80602@redhat.com>
Date: Mon, 13 Aug 2012 11:07:05 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Daniel J Sebald <daniel.sebald@ieee.org>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org> <50290980.8040808@redhat.com>
	<502931F2.8010808@ieee.org>
In-Reply-To: <502931F2.8010808@ieee.org>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigE5B028F0B998E8C891AE0BF8"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org, bug-standards@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 17:07:18 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE5B028F0B998E8C891AE0BF8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 08/13/2012 10:57 AM, Daniel J Sebald wrote:
>>> it might be something like:
>>>
>>> --builddir=3DDIR           object and libraries
>>>
>>> which is essentially the same as doing:
>>>
>>> mkdir ../DIR
>>> cd ../DIR
>>> ../<projname>/configure OTHER_OPTS
>>> cd ../<projname>
>>

>=20
> I'm reading up on VPATH builds.  I'll toss the VPATH method over to the=

> Octave discussion list.

What you suggested above IS a VPATH build.  VPATH is the 'make' variable
name for using a builddir that is different from the sourcedir, and your
proposal is just about adding syntactic sugar to the ./configure command
to make a VPATH build easier to specify from the configure command line,
by naming something other than '.' as the builddir.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigE5B028F0B998E8C891AE0BF8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQKTQ5AAoJEKeha0olJ0NqR50IAINce61el6Y46oiKfBLKWnOe
bX/SwerKHv2XUbXZDP4uVd8lz8lJ5udMKdWj2IK7WztrFpJctjwxy4ffJT1iIDAp
ZSEJ8H9reAN9shv4qviEzOmmtt9de5oBZRVSYvfWnx1uN9g6LoqstA/u3C4JWXtZ
JQ0L9AMEU1hQm91c7QwxO2lIrRMc5m9rksDbpAkebJh9h2TjkV9dsFgvNx+hBty5
RA2bauqO7kQkuRRpK5Veq128EnY93DpYcGBbCdJByz1CUzp35qMNkhReh23QHdfW
RAuqXt6UYy0bu4BxVY5IxbLGvm6na2vAF4+FZqdEkjzW86Il6QkKZtiIcUZGjFo=
=r9EW
-----END PGP SIGNATURE-----

--------------enigE5B028F0B998E8C891AE0BF8--


From MAILER-DAEMON Mon Aug 13 13:23:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0yMJ-0007qS-Is
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 13:23:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59423)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0yMG-0007ln-Is
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:23:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0yMF-0000Yk-DQ
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:23:16 -0400
Received: from hp57.hostpapa.com ([69.90.163.85]:40807)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0yMF-0000Yg-8o; Mon, 13 Aug 2012 13:23:15 -0400
Received: from adsl-76-202-231-231.dsl.emhril.sbcglobal.net
	([76.202.231.231]:51918 helo=[192.168.1.64])
	by hp57.hostpapa.com with esmtpa (Exim 4.77)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0yMD-0007I8-5S; Mon, 13 Aug 2012 13:23:13 -0400
Message-ID: <50293800.3020003@ieee.org>
Date: Mon, 13 Aug 2012 12:23:12 -0500
From: Daniel J Sebald <daniel.sebald@ieee.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org> <50290980.8040808@redhat.com>
	<502931F2.8010808@ieee.org> <50293439.80602@redhat.com>
In-Reply-To: <50293439.80602@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - hp57.hostpapa.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - ieee.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 69.90.163.85
Cc: autoconf@gnu.org, bug-standards@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 17:23:18 -0000

On 08/13/2012 12:07 PM, Eric Blake wrote:
> On 08/13/2012 10:57 AM, Daniel J Sebald wrote:
>>>> it might be something like:
>>>>
>>>> --builddir=DIR           object and libraries
>>>>
>>>> which is essentially the same as doing:
>>>>
>>>> mkdir ../DIR
>>>> cd ../DIR
>>>> ../<projname>/configure OTHER_OPTS
>>>> cd ../<projname>
>>>
>
>>
>> I'm reading up on VPATH builds.  I'll toss the VPATH method over to the
>> Octave discussion list.
>
> What you suggested above IS a VPATH build.  VPATH is the 'make' variable
> name for using a builddir that is different from the sourcedir, and your
> proposal is just about adding syntactic sugar to the ./configure command
> to make a VPATH build easier to specify from the configure command line,
> by naming something other than '.' as the builddir.

Got it.

Thanks,

Dan


From MAILER-DAEMON Mon Aug 13 13:53:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0ypi-00061d-Av
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 13:53:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41084)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0ypf-00060B-06
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:53:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>) id 1T0ype-0001c7-2X
	for autoconf@gnu.org; Mon, 13 Aug 2012 13:53:38 -0400
Received: from hp57.hostpapa.com ([69.90.163.85]:39146)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0ypd-0001bz-Ue; Mon, 13 Aug 2012 13:53:38 -0400
Received: from adsl-76-202-231-231.dsl.emhril.sbcglobal.net
	([76.202.231.231]:52309 helo=[192.168.1.64])
	by hp57.hostpapa.com with esmtpa (Exim 4.77)
	(envelope-from <daniel.sebald@ieee.org>)
	id 1T0ypb-00050V-RM; Mon, 13 Aug 2012 13:53:35 -0400
Message-ID: <50293F1E.2000404@ieee.org>
Date: Mon, 13 Aug 2012 12:53:34 -0500
From: Daniel J Sebald <daniel.sebald@ieee.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org> <50290980.8040808@redhat.com>
	<502931F2.8010808@ieee.org> <50293439.80602@redhat.com>
In-Reply-To: <50293439.80602@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - hp57.hostpapa.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - ieee.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 69.90.163.85
Cc: autoconf@gnu.org, bug-standards@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 17:53:41 -0000

On 08/13/2012 12:07 PM, Eric Blake wrote:
> On 08/13/2012 10:57 AM, Daniel J Sebald wrote:
>>>> it might be something like:
>>>>
>>>> --builddir=DIR           object and libraries
>>>>
>>>> which is essentially the same as doing:
>>>>
>>>> mkdir ../DIR
>>>> cd ../DIR
>>>> ../<projname>/configure OTHER_OPTS
>>>> cd ../<projname>
>>>
>
>>
>> I'm reading up on VPATH builds.  I'll toss the VPATH method over to the
>> Octave discussion list.
>
> What you suggested above IS a VPATH build.  VPATH is the 'make' variable
> name for using a builddir that is different from the sourcedir, and your
> proposal is just about adding syntactic sugar to the ./configure command
> to make a VPATH build easier to specify from the configure command line,
> by naming something other than '.' as the builddir.

Octave main developers see it the same way.  VPATH is what's being used 
and it works fine.  The proposal is just a convenience, i.e., syntactic 
sugar.

Dan


From MAILER-DAEMON Mon Aug 13 18:02:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T12iZ-0000vA-Cw
	for mharc-autoconf@gnu.org; Mon, 13 Aug 2012 18:02:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52877)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <karl@freefriends.org>) id 1T12iW-0000rm-11
	for autoconf@gnu.org; Mon, 13 Aug 2012 18:02:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <karl@freefriends.org>) id 1T12iV-0000av-2x
	for autoconf@gnu.org; Mon, 13 Aug 2012 18:02:31 -0400
Received: from frenzy.freefriends.org ([66.54.153.139]:57745
	helo=freefriends.org) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <karl@freefriends.org>)
	id 1T12iR-0000a6-Li; Mon, 13 Aug 2012 18:02:27 -0400
X-Envelope-From: karl@freefriends.org
Received: from freefriends.org (localhost [127.0.0.1])
	by freefriends.org (8.14.5/8.14.5) with ESMTP id q7DM2Qjk009827;
	Mon, 13 Aug 2012 16:02:26 -0600
Received: (from nobody@localhost)
	by freefriends.org (8.14.5/8.14.5/submit) id q7DM2PxW009826;
	Mon, 13 Aug 2012 22:02:25 GMT
Date: Mon, 13 Aug 2012 22:02:25 GMT
Message-Id: <201208132202.q7DM2PxW009826@freefriends.org>
X-Authentication-Warning: frenzy.freefriends.org: nobody set sender to
	karl@freefriends.org using -f
From: karl@freefriends.org (Karl Berry)
To: daniel.sebald@ieee.org, autoconf@gnu.org, bug-standards@gnu.org
Subject: Re: Build directory option for configure script
In-Reply-To: <50290980.8040808@redhat.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 66.54.153.139
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 22:02:33 -0000

Hi Eric and all,

    Your idea may make sense, but I'd first like to have an opinion from the
    folks that maintain the GNU Coding Standards

rms is the only "maintainer" of the coding standards, in the sense of
being empowered to make nontrivial changes.  (I get to make trivial
changes. :)

    I worry slightly that making VPATH builds triggered by a one-liner
    might backfire with more reports of people having failed builds when
    they weren't familiar with the risks of a VPATH build.

I agree with you, FWIW.  Do we really want to complicate autoconf and
friends for this "syntactic sugar" option?  It seems to me that the
current process is not overly burdensome -- running a couple of commands
instead of specifying an option.  If someone does it so often that it
gets to be annoying, they can do their own trivial shell script.

But I don't feel all that strongly about it myself.  If there's a
consensus you (autoconfers) like to do it, I'll ask rms.

k


From MAILER-DAEMON Tue Aug 14 01:59:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1AAH-0002l5-CS
	for mharc-autoconf@gnu.org; Tue, 14 Aug 2012 01:59:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35341)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <blp@cs.stanford.edu>) id 1T1AAE-0002ky-BW
	for autoconf@gnu.org; Tue, 14 Aug 2012 01:59:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <blp@cs.stanford.edu>) id 1T1AAD-0003dA-Dd
	for autoconf@gnu.org; Tue, 14 Aug 2012 01:59:38 -0400
Received: from cs-smtp-3.stanford.edu ([171.64.64.27]:48028)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <blp@cs.stanford.edu>) id 1T1AAD-0003d2-7W
	for autoconf@gnu.org; Tue, 14 Aug 2012 01:59:37 -0400
Received: from [76.14.48.202] (helo=blp.benpfaff.org)
	by cs-smtp-3.Stanford.EDU with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.76) (envelope-from <blp@cs.stanford.edu>)
	id 1T1AAB-0004oI-HJ; Mon, 13 Aug 2012 22:59:35 -0700
From: Ben Pfaff <blp@cs.stanford.edu>
To: Daniel J Sebald <daniel.sebald@ieee.org>
Subject: Re: Build directory option for configure script
References: <5028629A.9050007@ieee.org>
Date: Mon, 13 Aug 2012 22:59:31 -0700
In-Reply-To: <5028629A.9050007@ieee.org> (Daniel J. Sebald's message of "Sun, 
	12 Aug 2012 21:12:42 -0500")
Message-ID: <87fw7qko8s.fsf@blp.benpfaff.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Scan-Signature: 67f4a389e065da33eb5969ecb4726704
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.64.64.27
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: blp@cs.stanford.edu
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2012 05:59:40 -0000

Daniel J Sebald <daniel.sebald@ieee.org> writes, proposing a new
"configure" option:
> it might be something like:
>
> --builddir=DIR           object and libraries
>
> which is essentially the same as doing:
>
> mkdir ../DIR
> cd ../DIR
> ../<projname>/configure OTHER_OPTS
> cd ../<projname>

Following the "configure", the next step will be to run "make".
To do that, the user will need to "cd" into the new directory.
So in a common workflow, this will save only one line of typing,
where:

        mkdir DIR
        cd DIR
        ../configure
        make

becomes

        ./configure --builddir=DIR
        cd DIR
        make

To me, the benefit seems questionable, especially since DIR is
repeated the same number of times in each case, and "mkdir" is
shorter than "--builddir".

(I put my build directories below the source directory, not as
siblings of the source.)


From MAILER-DAEMON Tue Aug 14 18:16:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1PPd-0008Rr-51
	for mharc-autoconf@gnu.org; Tue, 14 Aug 2012 18:16:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51551)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T1PPa-0008JD-Db
	for Autoconf@gnu.org; Tue, 14 Aug 2012 18:16:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T1PPZ-00062W-D8
	for Autoconf@gnu.org; Tue, 14 Aug 2012 18:16:30 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:51830)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1T1PPW-00062B-SI; Tue, 14 Aug 2012 18:16:26 -0400
Received: by wgbez12 with SMTP id ez12so674194wgb.30
	for <multiple recipients>; Tue, 14 Aug 2012 15:16:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=xWiJC0mnge6etq4JWvK5LiKIBDVDVkk3K3AGL7ehOIA=;
	b=bZ8SBoiaOS32MVEpmfQTjkOLPf6qtBTqYbxLVHaRwvW4p1PODaccROKUySVIM2GHpQ
	GLH4ODnGOf4VC01A3sudeBJdInuE4VM4t1glNJI9C09gqgtwxkPymPFB6ASA2lH8w098
	kNYoxD7URacsxGtbrYIozwwNnTjLsUJuFxEVJhYkZTU4dptubc0kX8dLrpSwEO21039S
	SFaushKF5e2dJssrgLLPaRhdE4xCiXbcQVRo1Saefde1QP6xvBxbu+FyQIWUbiO5c3+B
	812bKg6CEFDHgPi7YSnaynHD4RmDY2yF6fXYni7ANH+lyBQ7KP7jZSuklAYyIfLotlq8
	VgMA==
Received: by 10.180.82.39 with SMTP id f7mr31513312wiy.2.1344982585932;
	Tue, 14 Aug 2012 15:16:25 -0700 (PDT)
Received: from [192.168.178.21]
	(host170-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.170])
	by mx.google.com with ESMTPS id q4sm24886278wix.9.2012.08.14.15.16.24
	(version=SSLv3 cipher=OTHER); Tue, 14 Aug 2012 15:16:25 -0700 (PDT)
Message-ID: <502ACE37.60907@gmail.com>
Date: Wed, 15 Aug 2012 00:16:23 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>, 
	Automake List <automake@gnu.org>, Autoconf <Autoconf@gnu.org>
Subject: Dynamic package version numbers with Autoconf and Automake (was:
	Re: Automake 1.12.0b test release)
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2012 22:16:31 -0000

Hi Bob, I managed to find your old message about "dynamically computing
package versions for Automake and Autoconf".  Some initial comments
follows.  I'm adding the Autoconf list in CC:, because I believe this
is an Autoconf issue more than an Automake one.

On 05/20/2012 12:59 AM, Bob Friesenhahn wrote:
> Stefano,
> 
> This change will cause significant issues for GraphicsMagick unless there is a workaround:
> 
>   - Support for the two- and three-arguments invocation forms of the
>     AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
>     of Automake (1.12.1) and removed in the next major version (1.13).
> 
> GraphicsMagick invokes it like
> 
> AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
> 
> The reason is because it avoids needing to edit configure.ac (a really stupid
> practice)
>
I agree with this; with today's DVCS, it's very tempting (and IMHO useful)
to base a package's version number on the current revision number/SHA-1; so
that the version is bound to change with every commit, and forcing a full
re-autotooling + reconfiguration + rebuild of the package for every commit
sounds just crazy.

But then, I believe this is something that should to be fixed at the Autoconf
level.  I.e., the version number shouldn't be hard-coded in the generated
configure and config.status scripts, nor put in 'config.h' or other generated
headers -- or at least, we should be able to tell Autoconf not do that, and
how to fetch/define/compute the version number at runtime instead.

> every time a new release tarball will be cut. Instead the version information
> to apply is computed by a script which is sourced by configure.
> 
> What is the workaround for this?
>
Actually, it depends.  Where and why do you use such dynamically-computed
version number in exactly?

Thanks,
  Stefano


From MAILER-DAEMON Tue Aug 14 18:26:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1PZG-0002tE-Rt
	for mharc-autoconf@gnu.org; Tue, 14 Aug 2012 18:26:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37071)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1PZE-0002t6-V2
	for Autoconf@gnu.org; Tue, 14 Aug 2012 18:26:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1PZD-0000Ae-Mn
	for Autoconf@gnu.org; Tue, 14 Aug 2012 18:26:28 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:42556)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>)
	id 1T1PZD-0000A2-BE; Tue, 14 Aug 2012 18:26:27 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q7EMQHTo028195; Tue, 14 Aug 2012 17:26:18 -0500 (CDT)
Date: Tue, 14 Aug 2012 17:26:17 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Dynamic package version numbers with Autoconf and Automake (was:
	Re: Automake 1.12.0b test release)
In-Reply-To: <502ACE37.60907@gmail.com>
Message-ID: <alpine.GSO.2.01.1208141719400.4263@freddy.simplesystems.org>
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Tue, 14 Aug 2012 17:26:18 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2012 22:26:30 -0000

On Wed, 15 Aug 2012, Stefano Lattarini wrote:
>> AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
>>
>> The reason is because it avoids needing to edit configure.ac (a really stupid
>> practice)
>>
> I agree with this; with today's DVCS, it's very tempting (and IMHO useful)
> to base a package's version number on the current revision number/SHA-1; so
> that the version is bound to change with every commit, and forcing a full
> re-autotooling + reconfiguration + rebuild of the package for every commit
> sounds just crazy.

Yes, and in your suggested scenario, it is not possible to edit a file 
without adding a new changeset (Catch-22).

> But then, I believe this is something that should to be fixed at the Autoconf
> level.  I.e., the version number shouldn't be hard-coded in the generated
> configure and config.status scripts, nor put in 'config.h' or other generated
> headers -- or at least, we should be able to tell Autoconf not do that, and
> how to fetch/define/compute the version number at runtime instead.

Agreed.

>> every time a new release tarball will be cut. Instead the version information
>> to apply is computed by a script which is sourced by configure.
>>
>> What is the workaround for this?
>>
> Actually, it depends.  Where and why do you use such dynamically-computed
> version number in exactly?

A script ("version.sh") is executed in order to obtain the package and 
version information.  In the most common case, the version is a 
development "snapshot" and the version is based on the latest 
specified date in the ChangeLog file.  For formal releases, the 
version is hard-coded in the script.

Any time that 'make' is executed is a candidate time for the package 
version to be changed.  In the GraphicsMagick project, editing the 
top ChangeLog file causes configure to be re-executed (due to added 
rules). This assures that the version is always correct (at the 
expense of more compilation time).

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Tue Aug 14 19:57:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1Qyy-0003Wv-UT
	for mharc-autoconf@gnu.org; Tue, 14 Aug 2012 19:57:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60810)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1Qyw-0003Wn-HS
	for Autoconf@gnu.org; Tue, 14 Aug 2012 19:57:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1Qyv-00088U-90
	for Autoconf@gnu.org; Tue, 14 Aug 2012 19:57:06 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:42668)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>)
	id 1T1Qyv-00088O-0e; Tue, 14 Aug 2012 19:57:05 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q7ENv23t028801; Tue, 14 Aug 2012 18:57:02 -0500 (CDT)
Date: Tue, 14 Aug 2012 18:57:02 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Dynamic package version numbers with Autoconf and Automake (was:
	Re: Automake 1.12.0b test release)
In-Reply-To: <502ACE37.60907@gmail.com>
Message-ID: <alpine.GSO.2.01.1208141851360.27589@freddy.simplesystems.org>
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Tue, 14 Aug 2012 18:57:03 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2012 23:57:07 -0000

The script I intend to use to obtain package information is in the 
GraphicsMagick repository and produces information gleaned from a 
'version.sh' script which has the smarts to produce some obvious 
variable names.

echo `./scripts/pkginfo.sh package_bugreport`
graphicsmagick-bugs@lists.sourceforge.net

% echo `./scripts/pkginfo.sh package_name`
GraphicsMagick

% echo `./scripts/pkginfo.sh package_version`
1.4.020120814

It is intended to be used like this in configure.ac:

AC_INIT(m4_esyscmd([scripts/pkginfo.sh package_name]),
         m4_esyscmd([scripts/pkginfo.sh package_version]),
         m4_esyscmd([scripts/pkginfo.sh package_bugreport]))

Unfortunately, the values passed to AC_INIT are cached so even if the 
configure script is run again, it uses the cached values rather than 
the new values.

The script:

#!/bin/sh
#
# Print the package version based on content of $srcdir/version.sh.
#
# This script is expected to be run under the context of a configure
# script (via AC_INIT) to dynamically determine the package version.
me=$0
info=$1
srcdir=`dirname $0`/..
value=
nl='
'
. version.sh

case "${info}" in
   package_bugreport )
     value="${PACKAGE_BUGREPORT}"
     ;;
   package_name )
     value="${PACKAGE_NAME}"
     ;;
   package_version )
     value="${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
     ;;
   * )
     echo "$me: Must supply argument {package_bugreport, package_name, package_version}"
     exit 1
     ;;
esac

# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "${value}" | tr -d "$nl"

-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Wed Aug 15 00:13:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1Uz3-00043Z-Q6
	for mharc-autoconf@gnu.org; Wed, 15 Aug 2012 00:13:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48868)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1T1Uz1-00042A-Ep
	for Autoconf@gnu.org; Wed, 15 Aug 2012 00:13:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1T1Uz0-0002qe-Ee
	for Autoconf@gnu.org; Wed, 15 Aug 2012 00:13:27 -0400
Received: from smtp11.dentaku.gol.com ([203.216.5.73]:45732)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>)
	id 1T1Uz0-0002qV-5t; Wed, 15 Aug 2012 00:13:26 -0400
Received: from 218.231.148.116.eo.eaccess.ne.jp ([218.231.148.116]
	helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku)
	(envelope-from <miles@gnu.org>)
	id 1T1Uyx-0003I2-BV; Wed, 15 Aug 2012 13:13:23 +0900
Received: by catnip.gol.com (Postfix, from userid 1000)
	id 07911DFCC; Wed, 15 Aug 2012 13:13:21 +0900 (JST)
From: Miles Bader <miles@gnu.org>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Dynamic package version numbers with Autoconf and Automake
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com>
System-Type: x86_64-unknown-linux-gnu
Date: Wed, 15 Aug 2012 13:13:21 +0900
In-Reply-To: <502ACE37.60907@gmail.com> (Stefano Lattarini's message of "Wed, 
	15 Aug 2012 00:16:23 +0200")
Message-ID: <87ipckyeqm.fsf@catnip.gol.com>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: ClamAV GOL (outbound)
X-Abuse-Complaints: abuse@gol.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 203.216.5.73
Cc: Automake List <automake@gnu.org>, Autoconf <Autoconf@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Aug 2012 04:13:28 -0000

Stefano Lattarini <stefano.lattarini@gmail.com> writes:
> Actually, it depends.  Where and why do you use such
> dynamically-computed version number in exactly?

That seems the real question.

My own method is to have:

(1) The "primary" version number is based on VCS info (this is
    obviously unavailable for source trees not based on a VCS
    checkout).

(2) The "autoconf" version number (in AC_INIT) is used as a
    backup/default only when VCS info is unavailable.  This number is
    relatively static, and typically only updated after a release.

(3) The final version info is updated (using VCS info and/or autoconf
    version info) at make time using a script, and when it changes,
    only causes a source file (e.g., version.c) to change.

    This means that although some things are rebuilt after a commit
    (version.o, and relinking of any binaries that use it), the amount
    of rebuilding is relatively minor while still yielding accurate
    info.

-miles

-- 
Non-combatant, n. A dead Quaker.


From MAILER-DAEMON Wed Aug 15 09:36:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1dmB-00054B-W7
	for mharc-autoconf@gnu.org; Wed, 15 Aug 2012 09:36:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37159)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rleigh@codelibre.net>) id 1T1dm9-00053D-FN
	for Autoconf@gnu.org; Wed, 15 Aug 2012 09:36:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rleigh@codelibre.net>) id 1T1dm4-0003AK-4v
	for Autoconf@gnu.org; Wed, 15 Aug 2012 09:36:45 -0400
Received: from nagini.codelibre.net ([80.68.93.164]:37387)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rleigh@codelibre.net>)
	id 1T1dm3-0003A4-SC; Wed, 15 Aug 2012 09:36:40 -0400
Received: by nagini.codelibre.net (Postfix, from userid 1000)
	id 23A6E18584; Wed, 15 Aug 2012 14:36:38 +0100 (BST)
Date: Wed, 15 Aug 2012 14:36:38 +0100
From: Roger Leigh <rleigh@codelibre.net>
To: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
Subject: Re: Dynamic package version numbers with Autoconf and Automake
	(was: Re: Automake 1.12.0b test release)
Message-ID: <20120815133637.GU25141@codelibre.net>
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com>
	<alpine.GSO.2.01.1208141851360.27589@freddy.simplesystems.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <alpine.GSO.2.01.1208141851360.27589@freddy.simplesystems.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-Received-From: 80.68.93.164
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Aug 2012 13:36:46 -0000

On Tue, Aug 14, 2012 at 06:57:02PM -0500, Bob Friesenhahn wrote:
> AC_INIT(m4_esyscmd([scripts/pkginfo.sh package_name]),
>         m4_esyscmd([scripts/pkginfo.sh package_version]),
>         m4_esyscmd([scripts/pkginfo.sh package_bugreport]))
> 
> Unfortunately, the values passed to AC_INIT are cached so even if
> the configure script is run again, it uses the cached values rather
> than the new values.

I've been doing a similar thing, though I do it directly in configure.ac
rather than using an external script:

AC_INIT(sbuild_m4_esyscmd_s([sed -ne '/^Package:/{s/Package:[[:space:]][[:space:]]*//p;q}' VERSION]),
        [sbuild_m4_esyscmd_s([sed -ne '/^Version:/{s/Version:[[:space:]][[:space:]]*//p;q}' VERSION])],
        [buildd-tools-devel@lists.alioth.debian.org])

In this case, the information is taken from a static file with the format:

Package: schroot
Version: 1.6.3
Release-Date: 23 Jul 2012
Released-By: Roger Leigh <rleigh@debian.org>
Git-Tag: release/schroot-1.6.3

This is generated by the bootstrap script.
Package and Version are derived from NEWS (since this must be updated
for a release, we require the version here to be the definitive source
of the version.
The other date is taken from the release tag in git; if it's not a
release, i.e. isn't tagged, it's just left as "Unreleased".

Your version is better, because it permits vanilla autoreconf to be
used.  Providing that we have a stable interface for autoconf to
call an external script, packages could do whatever they wish to
provide the information.  Maybe a single-argument AC_INIT which
just has a script file as its argument?  However it's done, having
this standardised would be beneficial to all.

In addition to it invoking the script with arguments for
package, version and bugreport address, it might also be nice to
provide the ability to supply information for arbitrary other
stuff such as
- public git URI
- public website
- public bug tracker
- git release and distribution tags
- git branch

And perhaps also allow this to be extended by the builder/distributor,
for example with
- build date
- builder
- distribution
- distribution bug tracker etc.

These are all examples of things which are currently done by some
packages on an ad-hoc basis, but which would benefit from more
generalised support in autoconf.  Maybe add a command-line option
to run additional script(s) to source supplementary/overriding
information?


On the automake side, I'm still using custom targets for git integration
with "make dist" which inject $(distdir) into a separate git branch and
tag that as a "distribution"; a separate step tags the "release", which
is then distributed.  If it's not possible to support directly in
automake, being able to disable tarball generation in the dist target
and do completely custom stuff there would be useful.  In particular,
having a logical separation of "releasing" and "distributing" would be
good.

One thing which is currently done wrong is that some stuf, e.g.
gettext, tries to regenerate stuff at "make dist" time.  This is
rather annoying, as it's creating updated versions of files /after/
you've tagged the release.  This means you need to run "make dist", then
tag, then run "make dist" again.  While workable, it's easy to forget and
mess up the release process.  When you're using a DVCS, this is the wrong
point.  We only want to tag the release /after/ all sources changes have
been made and *committed*.  Thus there are three steps:

1) release preparation
  - updates any files e.g. gettext po files etc.
  - commit any changes resulting from this step
2) release
  - tags the repo with a signed release tag
3) distribution
  - makes the distdir and injects it onto a distribution branch
  - branch is tagged
  - release tarball is obtained (if required) using "git archive"
    to export the tagged distribution.  Not needed for an all-git
    workflow (e.g. future Debian git source package format).

The existing "make dist" does of course do everything in a single
step; but it would be nice if these were split into separate,
overridable/hookable targets, and tools like gettext updated to
run in the release prep stage.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


From MAILER-DAEMON Wed Aug 15 09:45:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1duI-0008Ju-9i
	for mharc-autoconf@gnu.org; Wed, 15 Aug 2012 09:45:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46890)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1duG-0008Hi-3f
	for Autoconf@gnu.org; Wed, 15 Aug 2012 09:45:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T1duB-0004rP-73
	for Autoconf@gnu.org; Wed, 15 Aug 2012 09:45:08 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:44194)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>)
	id 1T1duA-0004qx-VD; Wed, 15 Aug 2012 09:45:03 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q7FDj1uq006831; Wed, 15 Aug 2012 08:45:01 -0500 (CDT)
Date: Wed, 15 Aug 2012 08:45:01 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Miles Bader <miles@gnu.org>
Subject: Re: Dynamic package version numbers with Autoconf and Automake
In-Reply-To: <87ipckyeqm.fsf@catnip.gol.com>
Message-ID: <alpine.GSO.2.01.1208150840580.27589@freddy.simplesystems.org>
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com> <87ipckyeqm.fsf@catnip.gol.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Wed, 15 Aug 2012 08:45:01 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Aug 2012 13:45:09 -0000

On Wed, 15 Aug 2012, Miles Bader wrote:
>
> (3) The final version info is updated (using VCS info and/or autoconf
>    version info) at make time using a script, and when it changes,
>    only causes a source file (e.g., version.c) to change.
>
>    This means that although some things are rebuilt after a commit
>    (version.o, and relinking of any binaries that use it), the amount
>    of rebuilding is relatively minor while still yielding accurate
>    info.

Likewise, GraphicsMagick configures a "version.h" as well as a version 
file used for non-autotools builds under Windows.  With the currently 
used mechanism, only the few files depending on version.h need to be 
rebuilt but the whole project relinks.

If the project "config.h" was to be re-generated (seems to be 
necessary with new AC_INIT), then all of the source modules would need 
to be recompiled and relinked since everything depends on the 
configuration header.

Bpb
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Wed Aug 15 12:58:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1gvk-00060a-DP
	for mharc-autoconf@gnu.org; Wed, 15 Aug 2012 12:58:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <robertb@trdlnk.com>) id 1T1gvh-000603-Ow
	for Autoconf@gnu.org; Wed, 15 Aug 2012 12:58:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <robertb@trdlnk.com>) id 1T1gvg-0000LB-EX
	for Autoconf@gnu.org; Wed, 15 Aug 2012 12:58:49 -0400
Received: from mailrelay.trdlnk.com ([192.160.124.251]:60976
	helo=biscuit.vlan100.wacker.trdlnk.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <robertb@trdlnk.com>)
	id 1T1gvg-0000L5-A2; Wed, 15 Aug 2012 12:58:48 -0400
Received: from [10.100.48.27] (unknown [10.100.100.35])
	(Authenticated sender: robertb)
	by biscuit.vlan100.wacker.trdlnk.com (Postfix) with ESMTPSA id
	1D54181395; Wed, 15 Aug 2012 11:58:47 -0500 (CDT)
Message-ID: <502BD546.50708@trdlnk.com>
Date: Wed, 15 Aug 2012 11:58:46 -0500
From: Robert Boehne <robertb@trdlnk.com>
User-Agent: Mozilla/5.0 (X11; SunOS i86pc;
	rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: Dynamic package version numbers with Autoconf and Automake
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com> <87ipckyeqm.fsf@catnip.gol.com>
	<alpine.GSO.2.01.1208150840580.27589@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1208150840580.27589@freddy.simplesystems.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 192.160.124.251
Cc: Automake List <automake@gnu.org>, Autoconf <Autoconf@gnu.org>,
	Miles Bader <miles@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Aug 2012 16:58:51 -0000

On 08/15/12 08:45, Bob Friesenhahn wrote:
> On Wed, 15 Aug 2012, Miles Bader wrote:
>>
>> (3) The final version info is updated (using VCS info and/or autoconf
>>    version info) at make time using a script, and when it changes,
>>    only causes a source file (e.g., version.c) to change.
>>
>>    This means that although some things are rebuilt after a commit
>>    (version.o, and relinking of any binaries that use it), the amount
>>    of rebuilding is relatively minor while still yielding accurate
>>    info.
>
> Likewise, GraphicsMagick configures a "version.h" as well as a version 
> file used for non-autotools builds under Windows.  With the currently 
> used mechanism, only the few files depending on version.h need to be 
> rebuilt but the whole project relinks.
>
> If the project "config.h" was to be re-generated (seems to be 
> necessary with new AC_INIT), then all of the source modules would need 
> to be recompiled and relinked since everything depends on the 
> configuration header.
>
> Bpb

I've had a similar complaint when using Autotest.  In my project, the 
test suite depends on an M4 input file that has the project version 
encoded in it.
  cat test_suite/package.m4
# Signature of the current package.
m4_define([AT_PACKAGE_NAME],  [my_server])
m4_define([AT_PACKAGE_TARNAME],  [my_server])
m4_define([AT_PACKAGE_MINOR_VERSION], 4.18)
m4_define([AT_PACKAGE_VERSION],  [4.18.5])
m4_define([AT_PACKAGE_STRING],  [my_server 4.18.5])

Which is created by a makefile rule as suggested in the autoconf 
documentation:

http://www.gnu.org/software/autoconf/manual/autoconf.html#Making-testsuite-Scripts

So when I change the version of the package, I autoreconf, then make 
then autoreconf again.

Scenario #2 -

I have inherited a library versioning scheme that doesn't play nice with 
Libtool  (an absolute requirement)
when the Automake name is not encoded with the version -

   lib_LTLIBRARIES = libmy_server-4.18.la

  So every time I change the version argument to AC_INIT, I have to 
search around my makefiles for anything
that references each library and make the same changes there.

So I would be very interested in a solution to these issues.

Cheers,

Robert


From MAILER-DAEMON Thu Aug 16 16:04:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T26JA-0001TE-VH
	for mharc-autoconf@gnu.org; Thu, 16 Aug 2012 16:04:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53675)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T26J8-0001Sg-9E
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:04:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T26J6-0002j9-7J
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:04:42 -0400
Received: from mail-qc0-f169.google.com ([209.85.216.169]:48020)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T26J6-0002j3-3N
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:04:40 -0400
Received: by qcsd16 with SMTP id d16so2777690qcs.0
	for <autoconf@gnu.org>; Thu, 16 Aug 2012 13:04:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:from:date:x-google-sender-auth:message-id
	:subject:to:content-type:content-transfer-encoding;
	bh=hf0l+mD0V3GPdv8EZ79IBNc4MZ9eV2OIB/9pPoPDgbg=;
	b=UVhYB88U1aidmBo3VOjkb1lgkYk4GlgiO8y+/DAE1KICvyKt/68w4p+zfIpIussr6p
	C0BgF4Q2mPnXB3/u7zBo9GScT/NpyZG8PP1rv+QAtvcoMgHOuA+OEGlSLOpYAjMv7ogG
	FsG4q9dzgxCdxYMdIFwRmLb8GB/P5vS0CaOr1UNc0rfLOIo6CSWWFF14ibB1cgYXv2hr
	La8LbDagOidAlmqy80fB58b1tWtcr+ISjDXc5wNlZT5CsHFT+o4syBFJQ0bGSQ5WNFiu
	FWJ1XwqfNl2BWnWHong0dARKRv/E8FCQTb5YfnZFt88PWjn31ikE7YUHiaSq8/beqnTd
	nSIw==
Received: by 10.229.137.21 with SMTP id u21mr1529964qct.142.1345147479477;
	Thu, 16 Aug 2012 13:04:39 -0700 (PDT)
MIME-Version: 1.0
Sender: javierjc1982@gmail.com
Received: by 10.229.166.1 with HTTP; Thu, 16 Aug 2012 13:04:19 -0700 (PDT)
From: =?UTF-8?Q?Javier_Jard=C3=B3n?= <jjardon@gnome.org>
Date: Fri, 17 Aug 2012 05:04:19 +0900
X-Google-Sender-Auth: dY-YffVZFzBULJDVTnnIjUbsdIE
Message-ID: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
Subject: Add more check in autoreconf
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.169
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Aug 2012 20:04:43 -0000

Hello,

Im working on port GNOME moduels to use autoreconf instead our own
tool, gnome-autogen [1] (they do almost the same,  but gnome-autogen
was created before autoreconf exist)
But now I have to stop, as some developers complain because
gnome-autogen is still useful for us as it check for the presence of
these packages:

- intltool [1]
- gtk-doc [2]
- yelp-tools [3]

(Almost all the GNOME modules depends at least on one of those)
My question is if the check for these modules could be added to autoreconf.
If yes, Id happry to start continue porting all the GNOME modules to
the "upstream" tool

Regards

[1] http://bazaar.launchpad.net/~intltool/intltool/trunk/files
[2] http://git.gnome.org/browse/gtk-doc/tree/
[3] http://git.gnome.org/browse/yelp-tools/tree/
[4] http://git.gnome.org/browse/gnome-common/tree/macros2/gnome-autogen.sh

--=20
Javier Jard=C3=B3n Cabezas


From MAILER-DAEMON Thu Aug 16 16:17:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T26VW-0004C1-SQ
	for mharc-autoconf@gnu.org; Thu, 16 Aug 2012 16:17:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36203)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T26VV-0004Bu-9i
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:17:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T26VT-00077c-UO
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:17:29 -0400
Received: from mx1.redhat.com ([209.132.183.28]:23918)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T26VT-00077W-M0
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:17:27 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7GKHOLx006288
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 16 Aug 2012 16:17:24 -0400
Received: from [10.3.113.99] (ovpn-113-99.phx2.redhat.com [10.3.113.99])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7GKHOOQ014399; Thu, 16 Aug 2012 16:17:24 -0400
Message-ID: <502D5553.20908@redhat.com>
Date: Thu, 16 Aug 2012 14:17:23 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: =?UTF-8?B?SmF2aWVyIEphcmTDs24=?= <jjardon@gnome.org>
Subject: Re: Add more check in autoreconf
References: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
In-Reply-To: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig198C4727969948B34BABAB3B"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Aug 2012 20:17:30 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig198C4727969948B34BABAB3B
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 08/16/2012 02:04 PM, Javier Jard=C3=B3n wrote:
> Hello,
>=20
> Im working on port GNOME moduels to use autoreconf instead our own
> tool, gnome-autogen [1] (they do almost the same,  but gnome-autogen
> was created before autoreconf exist)

A bit of research shows that you got some facts mixed up.

gnome-autogen.sh was created (as autogen.sh) in 2000:
http://git.gnome.org/browse/gnome-common/commit/macros2/autogen.sh?id=3D7=
d133ecfaf798c274fa0fb978364fe45771fa0ba

while autoreconf has existed since 1994:
http://git.savannah.gnu.org/cgit/autoconf.git/commit/bin/autoreconf.in?id=
=3Dcdf79c42edd28b4972535fdcc1160f402a6d6a29

> But now I have to stop, as some developers complain because
> gnome-autogen is still useful for us as it check for the presence of
> these packages:
>=20
> - intltool [1]
> - gtk-doc [2]
> - yelp-tools [3]
>=20
> (Almost all the GNOME modules depends at least on one of those)
> My question is if the check for these modules could be added to autorec=
onf.
> If yes, Id happry to start continue porting all the GNOME modules to
> the "upstream" tool

If you are willing to write patches to autoreconf to incorporate new
tools into the common autotools, then we will gladly review them.  But I
probably won't write those patches.  GNOME isn't the only project to
have an initial checkout script that wraps not only autoreconf but
several other tools; gnulib is a primary example of this, where many
gnulib clients (such as GNU coreutils) don't directly use autoreconf.
Note that many packages name their initial script 'bootstrap' rather
than a variant of 'autogen', so as to avoid confusion with the actual
'AutoGen' package.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig198C4727969948B34BABAB3B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQLVVTAAoJEKeha0olJ0NqhVoH/1AJs/QDJV39aGxuDESSxiZF
sMFAQ3FA5j9bDpv2Wd8vpOmXphiXvClhu9uLiUGRI9I4PSz3GEqkmLu75IF6itIq
va+c0nCi7jerDeCeTSIgv0VEwXfsSoEFKQ6ePP/r1rByCMA/SNjzf2PbNAqH/gpe
CGouQSAUTPLe9X5vKjlt+uHdrirSaUwjRlgZkawCp4tGQETfKUKln5+WBpD4TQy4
nKpyUnIsvKFFtpS0j3/D5EZFUFplzLSv6Dur+11MBLVhdlVWfrFH1I/ITuBAmgvQ
EbQn1BIdxdEIoK4OoUHn/730AZMUkFZcq5TSRHlEqgMcNoidd/dDxOm3ad3M6WU=
=P2Gr
-----END PGP SIGNATURE-----

--------------enig198C4727969948B34BABAB3B--


From MAILER-DAEMON Thu Aug 16 16:43:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T26ur-00075u-Vm
	for mharc-autoconf@gnu.org; Thu, 16 Aug 2012 16:43:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60342)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1T26uq-00075V-Ek
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:43:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1T26up-0006XR-7e
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:43:40 -0400
Received: from mail.lysator.liu.se ([130.236.254.3]:35727)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <peda@lysator.liu.se>) id 1T26up-0006XE-0Z
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:43:39 -0400
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id C1B0D40450;
	Thu, 16 Aug 2012 22:43:36 +0200 (CEST)
Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com
	[90.227.119.137])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id 4B498400A7;
	Thu, 16 Aug 2012 22:43:35 +0200 (CEST)
Message-ID: <502D5BA4.6080903@lysator.liu.se>
Date: Thu, 16 Aug 2012 22:44:20 +0200
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Eric Blake <eblake@redhat.com>
Subject: Re: Add more check in autoreconf
References: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
	<502D5553.20908@redhat.com>
In-Reply-To: <502D5553.20908@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: ClamAV using ClamSMTP
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 130.236.254.3
Cc: autoconf@gnu.org, =?ISO-8859-1?Q?Javier_Jard=F3n?= <jjardon@gnome.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Aug 2012 20:43:41 -0000

On 2012-08-16 22:17, Eric Blake wrote:
> On 08/16/2012 02:04 PM, Javier Jard=F3n wrote:
>> Hello,
>>
>> Im working on port GNOME moduels to use autoreconf instead our own
>> tool, gnome-autogen [1] (they do almost the same,  but gnome-autogen
>> was created before autoreconf exist)
>=20
> A bit of research shows that you got some facts mixed up.
>=20
> gnome-autogen.sh was created (as autogen.sh) in 2000:
> http://git.gnome.org/browse/gnome-common/commit/macros2/autogen.sh?id=3D=
7d133ecfaf798c274fa0fb978364fe45771fa0ba

A bit of research shows that you got some facts mixed up. :-)
I see this, which hints that the GNOME autogen.sh is at least
from 1998.
http://git.gnome.org/browse/gnome-common/commit/macros/autogen.sh?id=3Da2=
5999004d9f3bdd79c50bc92b54c0bf5b73e8d5

That is still not 1994, but it is also not the creation of
the autogen.sh file as the commit mentions that it "has most
of the guts of $topdir/autogen.sh". However, I'm not able to
locate $topdir so I dig out when it was actually created.

Not that it really matters...

> while autoreconf has existed since 1994:
> http://git.savannah.gnu.org/cgit/autoconf.git/commit/bin/autoreconf.in?=
id=3Dcdf79c42edd28b4972535fdcc1160f402a6d6a29

Cheers,
Peter



From MAILER-DAEMON Thu Aug 16 16:55:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2766-0001Px-3o
	for mharc-autoconf@gnu.org; Thu, 16 Aug 2012 16:55:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51422)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T2764-0001Nm-2F
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:55:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T2762-0001j4-UG
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:55:16 -0400
Received: from mx1.redhat.com ([209.132.183.28]:44114)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T2762-0001iv-Ld
	for autoconf@gnu.org; Thu, 16 Aug 2012 16:55:14 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7GKtCJc017571
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 16 Aug 2012 16:55:12 -0400
Received: from [10.3.113.99] (ovpn-113-99.phx2.redhat.com [10.3.113.99])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7GKtBdY028249; Thu, 16 Aug 2012 16:55:12 -0400
Message-ID: <502D5E2F.9030605@redhat.com>
Date: Thu, 16 Aug 2012 14:55:11 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Peter Rosin <peda@lysator.liu.se>
Subject: Re: Add more check in autoreconf
References: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
	<502D5553.20908@redhat.com> <502D5BA4.6080903@lysator.liu.se>
In-Reply-To: <502D5BA4.6080903@lysator.liu.se>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigAD247A92B20371C3EEA249FF"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: autoconf@gnu.org, =?ISO-8859-1?Q?Javier_Jard=F3n?= <jjardon@gnome.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Aug 2012 20:55:17 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigAD247A92B20371C3EEA249FF
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 08/16/2012 02:44 PM, Peter Rosin wrote:
> On 2012-08-16 22:17, Eric Blake wrote:
>> On 08/16/2012 02:04 PM, Javier Jard=F3n wrote:
>>> Hello,
>>>
>>> Im working on port GNOME moduels to use autoreconf instead our own
>>> tool, gnome-autogen [1] (they do almost the same,  but gnome-autogen
>>> was created before autoreconf exist)
>>
>> A bit of research shows that you got some facts mixed up.
>>
>> gnome-autogen.sh was created (as autogen.sh) in 2000:
>> http://git.gnome.org/browse/gnome-common/commit/macros2/autogen.sh?id=3D=
7d133ecfaf798c274fa0fb978364fe45771fa0ba
>=20
> A bit of research shows that you got some facts mixed up. :-)
> I see this, which hints that the GNOME autogen.sh is at least
> from 1998.
> http://git.gnome.org/browse/gnome-common/commit/macros/autogen.sh?id=3D=
a25999004d9f3bdd79c50bc92b54c0bf5b73e8d5

Fair enough :)  I found $topdir, and here's the initial commit, still in
1998:

http://git.gnome.org/browse/gnome-common/commit/autogen.sh?id=3Da6b9fea58=
e85e63e773ffad46db6b69275bd649d

>=20
> That is still not 1994, but it is also not the creation of
> the autogen.sh file as the commit mentions that it "has most
> of the guts of $topdir/autogen.sh". However, I'm not able to
> locate $topdir so I dig out when it was actually created.
>=20
> Not that it really matters...

Agreed :)  Just a nice show of how easy history trawling is these days
with modern DVCS (can you imagine having this 'friendly discussion' back
in the days of CVS?)

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigAD247A92B20371C3EEA249FF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQLV4vAAoJEKeha0olJ0Nq24MH/30gc2saqoH0iPnKLLiU2nZm
Ai5D8O5VTuk5Ipa414vbZ+K9jomXOTwPBfbJdAPW4+MCC8Whp6oSlxllLSN/wJ+W
myhPLitB9wlp9AKYlWCDnq0ruUsgwFUFn2W9wPO0IJgNOsP9+W6QCXb8SYnMX9ul
dRylU6paMrGPLtmzTpQUq3zTTsCVaH75xhPRO6pMevGEQSp0HcyRdN6QhkcBIg7g
WoazdObQ2gvX6HKNCsTBt0dquxd85Xa105lCYQ/zvAyS5VxSmoS7RpWGLXetUY8+
6gP0LKXUyyq/5MdOBriQ8JYeePwuvXtPgGGKzzlDHBveescFwOHsnGHUCj84RK4=
=zGVn
-----END PGP SIGNATURE-----

--------------enigAD247A92B20371C3EEA249FF--


From MAILER-DAEMON Fri Aug 17 00:10:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2DtI-000562-U0
	for mharc-autoconf@gnu.org; Fri, 17 Aug 2012 00:10:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43219)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T2DtG-00055w-6H
	for autoconf@gnu.org; Fri, 17 Aug 2012 00:10:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T2DtF-0004qF-2Q
	for autoconf@gnu.org; Fri, 17 Aug 2012 00:10:30 -0400
Received: from mail-qa0-f48.google.com ([209.85.216.48]:54185)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T2DtE-0004q7-TC
	for autoconf@gnu.org; Fri, 17 Aug 2012 00:10:29 -0400
Received: by qady1 with SMTP id y1so1391447qad.0
	for <autoconf@gnu.org>; Thu, 16 Aug 2012 21:10:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=PAFJG8aE4I09I/X8hw2QV/nWvxb9xhUCe4vDFWtgVsk=;
	b=q8zZZHdDzbA0QmL0xltqHYs6GqbtQEl1ZeYi1Fim/qkgAJHlZDK08HQ7BbKFtvE8oj
	cDNM2OJh7mOMNhwBZ41hyS7OC47QdSMo37IYkleSKkOIV7XoU9WNslADaDPM+YVwiAY2
	SQCfdZ3Ut4FgUK3LfDcq+DeiTFp2tGw+c9s9YqNqU0wbkwEcvUHY2SdULX+k5UiT2tBo
	SPR2SNItFp17Js1cI5EC1ynrH3T3w6J2YU02GvZprpWPY0TsAS0QJTU833X46gN75qDt
	YQKAJCsU0i91rvt5pv8ocOxzRjjMnjVbBm0kpy7aAKOsixeAJMOKRgnvbSk5l3YZa7KN
	w03w==
Received: by 10.229.136.144 with SMTP id r16mr2582128qct.152.1345176628400;
	Thu, 16 Aug 2012 21:10:28 -0700 (PDT)
MIME-Version: 1.0
Sender: javierjc1982@gmail.com
Received: by 10.229.166.1 with HTTP; Thu, 16 Aug 2012 21:10:08 -0700 (PDT)
In-Reply-To: <502D5553.20908@redhat.com>
References: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
	<502D5553.20908@redhat.com>
From: =?UTF-8?Q?Javier_Jard=C3=B3n?= <jjardon@gnome.org>
Date: Fri, 17 Aug 2012 13:10:08 +0900
X-Google-Sender-Auth: qsrx0et1dFyaVecocxnV8nRdumk
Message-ID: <CAF6QBXHFxBE-2ecAp7CtrXfpeRR5Jetgj3J1oCYHbNsE3OCcMQ@mail.gmail.com>
Subject: Re: Add more check in autoreconf
To: Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.48
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Aug 2012 04:10:31 -0000

On 17 August 2012 05:17, Eric Blake <eblake@redhat.com> wrote:
> On 08/16/2012 02:04 PM, Javier Jard=C3=B3n wrote:
>
> A bit of research shows that you got some facts mixed up.
> gnome-autogen.sh was created (as autogen.sh) in 2000:
> while autoreconf has existed since 1994:

Oh sorry about this I didnt know the details about the creation of
gnome-autogen (I relatively new to the GNOME project). I wonder why it
was created then ...
Anyway

> If you are willing to write patches to autoreconf to incorporate new
> tools into the common autotools, then we will gladly review them.  But I
> probably won't write those patches.  GNOME isn't the only project to
> have an initial checkout script that wraps not only autoreconf but
> several other tools; gnulib is a primary example of this, where many
> gnulib clients (such as GNU coreutils) don't directly use autoreconf.
> Note that many packages name their initial script 'bootstrap' rather
> than a variant of 'autogen', so as to avoid confusion with the actual
> 'AutoGen' package.

Excellent! O do not speak perl myself, but Ill try to find someone or
maybe learn some perl is not a bad idea ;)

Regards


From MAILER-DAEMON Sun Aug 19 14:04:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T39r6-000317-5G
	for mharc-autoconf@gnu.org; Sun, 19 Aug 2012 14:04:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54586)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T39r4-0002un-1w
	for Autoconf@gnu.org; Sun, 19 Aug 2012 14:04:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T39r3-0001Iy-2U
	for Autoconf@gnu.org; Sun, 19 Aug 2012 14:04:05 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:55055)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1T39r0-0001If-AJ; Sun, 19 Aug 2012 14:04:02 -0400
Received: by bkcjc3 with SMTP id jc3so1750414bkc.0
	for <multiple recipients>; Sun, 19 Aug 2012 11:04:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=yXvBlgqNzH5x66kRf9CUTq24qheIp7KNHu2TiIm+JtQ=;
	b=eGcsr2+R3S9yVhNcB3J+hy7eXnIFJOzX/zY/HUaJqev7XXWAKhawEqv1bBGDlrRImz
	vZXMfSgMC666/89Lvhi/av4V1/aJc/k1CMuOWBRokTFSB6U28621wiOrTd238UAY79IC
	/vZ8fvUko/iB4FG0QE1zV95PAhTSStXP3PT0SJx8lLoKG4efgr5QAzUJbVowHBakh2pT
	YGJDD3Zoi2832tYZZZXvTBhPaOcZvicLiBgcwQDOUhhigs1lvx2kNJodXsjJGii8SZpr
	tGEGcp0Vc/Y+6CS5Zoi3oKht2vfXX4vob39avtGWITZcZYatWHSdNy8DARN9q6YIMuaO
	CDnw==
Received: by 10.204.147.65 with SMTP id k1mr3740470bkv.29.1345399440620;
	Sun, 19 Aug 2012 11:04:00 -0700 (PDT)
Received: from [192.168.178.21]
	(host170-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.170])
	by mx.google.com with ESMTPS id j9sm5198045bkv.0.2012.08.19.11.03.59
	(version=SSLv3 cipher=OTHER); Sun, 19 Aug 2012 11:03:59 -0700 (PDT)
Message-ID: <50312A82.6060009@gmail.com>
Date: Sun, 19 Aug 2012 20:03:46 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Automake, Autoconf and POSIX shells (was: Re: GraphicsMagick Automake
	TAP)
References: <alpine.GSO.2.01.1208152126310.27589@freddy.simplesystems.org>
	<502CA499.90505@gmail.com>
	<alpine.GSO.2.01.1208162139520.27589@freddy.simplesystems.org>
	<502E2520.80909@gmail.com>
	<alpine.GSO.2.01.1208170815320.27589@freddy.simplesystems.org>
	<502E4C35.6000304@gmail.com>
	<alpine.GSO.2.01.1208170856490.27589@freddy.simplesystems.org>
	<502E53C0.6070109@gmail.com>
	<alpine.GSO.2.01.1208171028060.3717@freddy.simplesystems.org>
	<502E7D9F.9070704@gmail.com>
	<alpine.GSO.2.01.1208191037580.27589@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1208191037580.27589@freddy.simplesystems.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Aug 2012 18:04:07 -0000

[Adding the Automake and Autoconf list, as this might be of public interest]

On 08/19/2012 05:48 PM, Bob Friesenhahn wrote:
> Something I notice is that Automake's configure.ac contains an
> elaborate testing of shells resulting in a AM_TEST_RUNNER_SHELL
> definition which is used for the Bourne shell based test drivers.
>
No, $(AM_TEST_RUNNER_SHELL) is meant to be used only by the Automake's
*own* test scripts.  The Automake-provided test driver scripts and test
harness recipes are expected to work also on Bourne shells, like (say)
Solaris /bin/sh.

Let me stress this: until Autoconf can ensure that the $CONFIG_SHELL
it detects and sets is a proper POSIX shell (and I hope this will be
done soon!), Automake will continue to assume just Bourne-shell
features in its generated recipes and provided scripts.

> Users of Automake-based test suites do not have access to this
> functionality.
>
And they don't need it, not by default anyway.

> It is not good that users of Automake-based tests don't have
> access to the smarts necessary to run the test drivers without
> copying large-chunks of GPL-licensed code into their program.
>
Again, this is a misunderstanding.  The $(AM_TEST_RUNNER_SHELL) is
not required to run the test drivers at all.  In fact, if you peek
in the Automake's own Makefile.in, you'll see that the scripts
'test-driver' and 'tap-driver.sh' are run simply by $(SHELL).

> Under Solaris 10, I found that some fancy ksh-style syntax was
> failing due to use of /bin/sh.
>
You mean in your test scripts, or in the Automake-provided driver
scripts?  The latter would be an Automake bug, while the former would
be a user error: if you want to use POSIX features in your scripts,
it's *your* responsibility to ensure they're run through a capable
enough shell; Automake leaves the developer full freedom (and thus
full burden) to decide which shell or interpreter (if any) must be
used to run his tests.

> Setting SH_LOG_COMPILER and TAP_LOG_COMPILER to $(SHELL) at least
> seemed to pick up the shell selected by configure, which is better
> than /bin/sh under Solaris 10.
>
This is the correct way to proceed IMHO.  It's not 100% fool-proof,
because Autoconf does not ensure that $SHELL will be set to a POSIX
shell; still, I expect that could happen only on very old or very
fringe systems.

> For my test scripts, I have the option of either coding everything
> to work with the weakest shell, or else hoping to find a better
> shell on the system without the kind assistance of Automake.
>
Yes (I'd personally go with the second option BTW).  And I believe
this is not Automake's fault -- I believe it should be Autoconf to
be enhanced to guarantee the presence of a decent shell (as, e.g.,
AC_PROG_AWK guarantees to find a proper awk, and Automake can then
rely on that in its recipes).  I recall that the Autoconf developers
agreed with last time I brought this up, so everything should work
out for the best in the end.

Thanks,
  Stefano



From MAILER-DAEMON Sun Aug 19 15:46:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3BRo-00011X-Ir
	for mharc-autoconf@gnu.org; Sun, 19 Aug 2012 15:46:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44908)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T3BRm-00011Q-El
	for Autoconf@gnu.org; Sun, 19 Aug 2012 15:46:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T3BRl-0000Wg-Bp
	for Autoconf@gnu.org; Sun, 19 Aug 2012 15:46:06 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:52567)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>)
	id 1T3BRl-0000WZ-3K; Sun, 19 Aug 2012 15:46:05 -0400
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q7JJk1Uo015454; Sun, 19 Aug 2012 14:46:02 -0500 (CDT)
Date: Sun, 19 Aug 2012 14:46:01 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: Automake, Autoconf and POSIX shells (was: Re: GraphicsMagick
	Automake TAP)
In-Reply-To: <50312A82.6060009@gmail.com>
Message-ID: <alpine.GSO.2.01.1208191437240.27589@freddy.simplesystems.org>
References: <alpine.GSO.2.01.1208152126310.27589@freddy.simplesystems.org>
	<502CA499.90505@gmail.com>
	<alpine.GSO.2.01.1208162139520.27589@freddy.simplesystems.org>
	<502E2520.80909@gmail.com>
	<alpine.GSO.2.01.1208170815320.27589@freddy.simplesystems.org>
	<502E4C35.6000304@gmail.com>
	<alpine.GSO.2.01.1208170856490.27589@freddy.simplesystems.org>
	<502E53C0.6070109@gmail.com>
	<alpine.GSO.2.01.1208171028060.3717@freddy.simplesystems.org>
	<502E7D9F.9070704@gmail.com>
	<alpine.GSO.2.01.1208191037580.27589@freddy.simplesystems.org>
	<50312A82.6060009@gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Sun, 19 Aug 2012 14:46:02 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: Autoconf <Autoconf@gnu.org>, Automake List <automake@gnu.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Aug 2012 19:46:07 -0000

On Sun, 19 Aug 2012, Stefano Lattarini wrote:
>> Under Solaris 10, I found that some fancy ksh-style syntax was
>> failing due to use of /bin/sh.
>>
> You mean in your test scripts, or in the Automake-provided driver
> scripts?  The latter would be an Automake bug, while the former would
> be a user error: if you want to use POSIX features in your scripts,
> it's *your* responsibility to ensure they're run through a capable
> enough shell; Automake leaves the developer full freedom (and thus
> full burden) to decide which shell or interpreter (if any) must be
> used to run his tests.

This was in my own test scripts.  Certainly it is possible that a user 
TAP script might be written in something like guile, Tcl, Lua, Java, 
etc., rather than sh so Automake's TAP test driver can not 
automatically anticipate the test implementation approach.

>> For my test scripts, I have the option of either coding everything
>> to work with the weakest shell, or else hoping to find a better
>> shell on the system without the kind assistance of Automake.
>>
> Yes (I'd personally go with the second option BTW).  And I believe
> this is not Automake's fault -- I believe it should be Autoconf to

It is true that as systems evolve, they typically offer more capable 
shells, even if they are not called /bin/sh.

My software's test suite does not need to work on systems more than 12 
years old.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Tue Aug 21 21:21:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3zdc-0002PI-L6
	for mharc-autoconf@gnu.org; Tue, 21 Aug 2012 21:21:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38163)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T3ybv-0003hZ-H2
	for autoconf@gnu.org; Tue, 21 Aug 2012 20:15:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T3ybt-0005U9-M9
	for autoconf@gnu.org; Tue, 21 Aug 2012 20:15:51 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:59971)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T3ybt-0005U5-EQ
	for autoconf@gnu.org; Tue, 21 Aug 2012 20:15:49 -0400
Received: by vcbfl10 with SMTP id fl10so512742vcb.0
	for <autoconf@gnu.org>; Tue, 21 Aug 2012 17:15:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:date:message-id:subject:from:to:content-type;
	bh=0SR+Wcrrm3jbzj7m6vgk/dfr+/27fneXTOve0B8CrG0=;
	b=uUiEltH5bKsFL61883oMQCEnY4QK5OgfB4quFyrC2W8sQVchNbVJ5KYCLcezgy8WKM
	eZfx329aixBU9H3UfSURCgsZYe01+MXzoRNIh4vs2OQNjcqyD1/IgoHvooBTYw3sRdbK
	WVMyudzj7zRqPbcYHZ6psQpbHqL2Xf3KBqDUGxjBTBgZst334k/JU2suISgW9vfk1SPW
	s78YqZyD991DlxfLrnKeobCjhRg07rmpjQ5H228+I06ZitVdqgiZDFVBEFzOBYbX70Ei
	7Gh3SDE5S+4PttKWowf94yrqehjun3V1R2zLmuWq+aVIl9KeW/9nrbPYJFqZbcmQR3+d
	5f8Q==
MIME-Version: 1.0
Received: by 10.52.72.229 with SMTP id g5mr13012291vdv.26.1345594548918; Tue,
	21 Aug 2012 17:15:48 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Tue, 21 Aug 2012 17:15:48 -0700 (PDT)
Date: Tue, 21 Aug 2012 20:15:48 -0400
Message-ID: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
Subject: Problems Configuring (C Compiler cannot produce executables)
From: Jeffrey Walton <noloader@gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
X-Mailman-Approved-At: Tue, 21 Aug 2012 21:21:39 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 00:15:53 -0000

Hi All,

Any ideas on how to fix this? I was using -fPIC/-shared due to
limitations in Make and LDFLAGS. According to [1], we can use
-fPIC/-shared all the time.

$ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIC
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

Jeff

[1] "Request: Add -aslr switch that invokes -fPIE/-pie or
-fPIC/-shared as appropriate,"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885

*****

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure CFLAGS=-Wall -Wextra -Wconversion -fPIC
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now

## --------- ##
## Platform. ##
## --------- ##

hostname = mint-12-x64
uname -m = x86_64
uname -r = 3.0.0-12-generic
uname -s = Linux
uname -v = #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/lib/lightdm/lightdm
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2456: checking build system type
configure:2470: result: x86_64-unknown-linux-gnu
configure:2490: checking host system type
configure:2503: result: x86_64-unknown-linux-gnu
configure:2523: checking target system type
configure:2536: result: x86_64-unknown-linux-gnu
configure:2611: checking for gcc
configure:2627: found /usr/bin/gcc
configure:2638: result: gcc
configure:2867: checking for C compiler version
configure:2876: gcc --version >&5
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2887: $? = 0
configure:2876: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
configure:2887: $? = 0
configure:2876: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2887: $? = 4
configure:2876: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2887: $? = 4
configure:2907: checking whether the C compiler works
configure:2929: gcc -Wall -Wextra -Wconversion -fPIC
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now   conftest.c  >&5
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
could not read symbols: Bad value
collect2: ld returned 1 exit status
configure:2933: $? = 1
configure:2971: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2976: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
configure:2978: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-Wall -Wextra -Wconversion -fPIC
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_EXOSIP2_CFLAGS_set=
ac_cv_env_EXOSIP2_CFLAGS_value=
ac_cv_env_EXOSIP2_LIBS_set=
ac_cv_env_EXOSIP2_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBOSIP2_CFLAGS_set=
ac_cv_env_LIBOSIP2_CFLAGS_value=
ac_cv_env_LIBOSIP2_LIBS_set=
ac_cv_env_LIBOSIP2_LIBS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_QT_CFLAGS_set=
ac_cv_env_QT_CFLAGS_value=
ac_cv_env_QT_LIBS_set=
ac_cv_env_QT_LIBS_value=
ac_cv_env_UCOMMON_CFLAGS_set=
ac_cv_env_UCOMMON_CFLAGS_value=
ac_cv_env_UCOMMON_LIBS_set=
ac_cv_env_UCOMMON_LIBS_value=
ac_cv_env_ZEROCONF_CFLAGS_set=
ac_cv_env_ZEROCONF_CFLAGS_value=
ac_cv_env_ZEROCONF_LIBS_set=
ac_cv_env_ZEROCONF_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=x86_64-unknown-linux-gnu

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AR=''
AS=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
CC='gcc'
CCDEPMODE=''
CFLAGS='-Wall -Wextra -Wconversion -fPIC -Wno-unused-parameter
-Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
-Wl,-shared -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W=''
DAEMON_LIBS=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DLOPEN=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXOSIP2_CFLAGS=''
EXOSIP2_LIBS=''
EXPORT_FLAGS=''
EXPORT_LIBS=''
FGREP=''
GREP=''
INCLUDE_FLAGS=''
INITRDDIR=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
LD=''
LDFLAGS=''
LIBOBJS=''
LIBOSIP2_CFLAGS=''
LIBOSIP2_LIBS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_VERSION='1:6:0'
MAKEINFO=''
MANIFEST_TOOL=''
MKDIR_P=''
MOC=''
MODFLAGS=''
NETWORK_DOWN=''
NETWORK_RELOAD=''
NETWORK_UP=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
QTAPPS=''
QT_CFLAGS=''
QT_LIBS=''
RANLIB=''
RCC=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
SIPWITCH_EXOSIP2=''
SIPWITCH_FLAGS=''
SIPWITCH_LIBS=''
STATIC_MODULES_FALSE=''
STATIC_MODULES_TRUE=''
STRIP=''
UCOMMON=''
UCOMMON_CFLAGS=''
UCOMMON_CLINK=''
UCOMMON_LIBS=''
UCOMMON_LINK=''
UCOMMON_MODEL=''
UCOMMON_REQUIRES='5.2.0'
UIC=''
USECURE_LINK=''
VERSION='1.3.1'
ZEROCONF_CFLAGS=''
ZEROCONF_FALSE=''
ZEROCONF_LIBS=''
ZEROCONF_TRUE=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
cgibindir=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
default_cfgpath=''
default_incpath=''
default_libexec=''
default_libpath=''
default_varpath=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
plugindir=''
prefix='NONE'
prefix_libdir=''
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'
translatedir=''
translations=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77


From MAILER-DAEMON Tue Aug 21 21:59:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T40EY-00069e-Ky
	for mharc-autoconf@gnu.org; Tue, 21 Aug 2012 21:59:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37634)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T40EW-00069X-7q
	for autoconf@gnu.org; Tue, 21 Aug 2012 21:59:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T40EU-0003C3-2a
	for autoconf@gnu.org; Tue, 21 Aug 2012 21:59:48 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:41043)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T40ET-0003Bi-93
	for autoconf@gnu.org; Tue, 21 Aug 2012 21:59:45 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 2FE80E78015;
	Wed, 22 Aug 2012 10:59:39 +0900 (JST)
Received: from [133.41.203.227] (203-227.cup.hiroshima-u.ac.jp
	[133.41.203.227]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id 07EAEE78010;
	Wed, 22 Aug 2012 10:59:39 +0900 (JST)
Message-ID: <50343D0A.8030802@hiroshima-u.ac.jp>
Date: Wed, 22 Aug 2012 10:59:38 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
In-Reply-To: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19130.003
X-TM-AS-Result: No--19.405-10.0-31-10
X-imss-scan-details: No--19.405-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: 6i9BTbUAHf1ITndh1lLRAZpaQZrxtVBsWyQijpt1UQnagsZM0qVv156r
	j6KmghEnvsVoNN6KMR4TdlN3F14QtaG5TOkQgnJJGFMYlDUzwr14Xox68xVlQDYHN4zOpht9fQ2
	8T7selJxcC0ZA61qedgKnB6R02m6RrE+g6/fP28kmEURBmKrZlNF9F+XaXgXe/k12Sb2MaHnBZD
	Kfh0ReHFUHrn/zjIH116IIvUwuq4+feiNngYomh/HkpkyUphL9cWZEfrt7JgX4JyR+b5tvoL+xr
	+LBXiQ/xDbcwtuvNnxLTmvmHr3PYlSU1d+VJ4IjhMGTNuQTHbNaNEmt5o5a/n/VZP/aS98L38DZ
	dG8OwtVfcTZ8crFLko2ds8fRsS3uVBPkQPqJRpvkKCFOKwAEzMTfSi2Auq7RTgrQgyTabcay9Ls
	NrrL1qlpairZc+G+hwCYml6DEXKB8JdSxphnAVhD3+0w1DhqKQKuv8uQBDjpC0CaF0L/Tiw+PzN
	D1U86e9lMon/p15lvZGGE6hr7LusgNYoWONkdvEroQVzSW9XQf3D0415bAcjb9TB28Ubki9sULE
	BDqysIFt0Y8uw2ABs1Vu21d62qcnhLJWEjAGHNCnGIuUMP0VaUB+KILVUD9ar//kCjXDy4exylQ
	Wi46a2moInzn9LIFbYRwe0VhCxk5pFKu5J7vuRIMDPFEv6UxxTUwU9PRpWIgOnjvjQ5gMbsG+AS
	qq0/TPGGq+W6wbwtnuf4R+4oGDzp3zB6h4uJpj2FGM19l45c+0OxGJE/R31u8qioAloW4Zf0MUg
	lOzUecFASjLMO2zSs6L3bFZPPBYWo9dIuk10AksSBZTGCrwrTrdaH1ZWqC1n4UsocU0g59asptM
	+kOK61Ia4IbeAdL3QfwsVk0UbslCGssfkpInQ==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 01:59:49 -0000

I think your set of CFLAGS makes GCC disabled to make a simple
executables like "hello world". So I wonder why you want autoconf
to "fix" the result caused by your CFLAGS. For generic CFLAGS,
you must set CFLAGS that the compiler can make an executable
successfully. You gave CFLAGS that the compiler cannot make
an executable.

Also I've checked the discussion on GCC bugzilla; Andrew Pinski
mentioned automake, but I don't think he recommends a method using
"CFLAGS=blahblahblah ./configure". I guess he recommends to write
configure.am & Makefile.am to insert non-generic & special flags
in the compiling for shared object.

Anyway, you didn't clarified how such special flags are required,
and the coverages of the objects to be compiled with the special
flags, so nobody will be able to the answer to be used immediately.

Regards,
mpsuzuki

Jeffrey Walton wrote:
> Hi All,
> 
> Any ideas on how to fix this? I was using -fPIC/-shared due to
> limitations in Make and LDFLAGS. According to [1], we can use
> -fPIC/-shared all the time.
> 
> $ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIC
> -Wno-unused-parameter -Wformat=2 -Wformat-security
> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now"
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for gcc... gcc
> checking whether the C compiler works... no
> configure: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> 
> Jeff
> 
> [1] "Request: Add -aslr switch that invokes -fPIE/-pie or
> -fPIC/-shared as appropriate,"
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885
> 
> *****
> 
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> It was created by configure, which was
> generated by GNU Autoconf 2.68.  Invocation command line was
> 
>   $ ./configure CFLAGS=-Wall -Wextra -Wconversion -fPIC
> -Wno-unused-parameter -Wformat=2 -Wformat-security
> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now
> 
> ## --------- ##
> ## Platform. ##
> ## --------- ##
> 
> hostname = mint-12-x64
> uname -m = x86_64
> uname -r = 3.0.0-12-generic
> uname -s = Linux
> uname -v = #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
> 
> /usr/bin/uname -p = unknown
> /bin/uname -X     = unknown
> 
> /bin/arch              = unknown
> /usr/bin/arch -k       = unknown
> /usr/convex/getsysinfo = unknown
> /usr/bin/hostinfo      = unknown
> /bin/machine           = unknown
> /usr/bin/oslevel       = unknown
> /bin/universe          = unknown
> 
> PATH: /usr/lib/lightdm/lightdm
> PATH: /usr/local/sbin
> PATH: /usr/local/bin
> PATH: /usr/sbin
> PATH: /usr/bin
> PATH: /sbin
> PATH: /bin
> PATH: /usr/games
> 
> 
> ## ----------- ##
> ## Core tests. ##
> ## ----------- ##
> 
> configure:2456: checking build system type
> configure:2470: result: x86_64-unknown-linux-gnu
> configure:2490: checking host system type
> configure:2503: result: x86_64-unknown-linux-gnu
> configure:2523: checking target system type
> configure:2536: result: x86_64-unknown-linux-gnu
> configure:2611: checking for gcc
> configure:2627: found /usr/bin/gcc
> configure:2638: result: gcc
> configure:2867: checking for C compiler version
> configure:2876: gcc --version >&5
> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
> Copyright (C) 2011 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> configure:2887: $? = 0
> configure:2876: gcc -v >&5
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.6.1-9ubuntu3'
> --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
> --enable-objc-gc --disable-werror --with-arch-32=i686
> --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
> configure:2887: $? = 0
> configure:2876: gcc -V >&5
> gcc: error: unrecognized option '-V'
> gcc: fatal error: no input files
> compilation terminated.
> configure:2887: $? = 4
> configure:2876: gcc -qversion >&5
> gcc: error: unrecognized option '-qversion'
> gcc: fatal error: no input files
> compilation terminated.
> configure:2887: $? = 4
> configure:2907: checking whether the C compiler works
> configure:2929: gcc -Wall -Wextra -Wconversion -fPIC
> -Wno-unused-parameter -Wformat=2 -Wformat-security
> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now   conftest.c  >&5
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> configure:2933: $? = 1
> configure:2971: result: no
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:2976: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
> configure:2978: error: C compiler cannot create executables
> See `config.log' for more details
> 
> ## ---------------- ##
> ## Cache variables. ##
> ## ---------------- ##
> 
> ac_cv_build=x86_64-unknown-linux-gnu
> ac_cv_env_CCC_set=
> ac_cv_env_CCC_value=
> ac_cv_env_CC_set=
> ac_cv_env_CC_value=
> ac_cv_env_CFLAGS_set=set
> ac_cv_env_CFLAGS_value='-Wall -Wextra -Wconversion -fPIC
> -Wno-unused-parameter -Wformat=2 -Wformat-security
> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now'
> ac_cv_env_CPPFLAGS_set=
> ac_cv_env_CPPFLAGS_value=
> ac_cv_env_CPP_set=
> ac_cv_env_CPP_value=
> ac_cv_env_CXXCPP_set=
> ac_cv_env_CXXCPP_value=
> ac_cv_env_CXXFLAGS_set=
> ac_cv_env_CXXFLAGS_value=
> ac_cv_env_CXX_set=
> ac_cv_env_CXX_value=
> ac_cv_env_EXOSIP2_CFLAGS_set=
> ac_cv_env_EXOSIP2_CFLAGS_value=
> ac_cv_env_EXOSIP2_LIBS_set=
> ac_cv_env_EXOSIP2_LIBS_value=
> ac_cv_env_LDFLAGS_set=
> ac_cv_env_LDFLAGS_value=
> ac_cv_env_LIBOSIP2_CFLAGS_set=
> ac_cv_env_LIBOSIP2_CFLAGS_value=
> ac_cv_env_LIBOSIP2_LIBS_set=
> ac_cv_env_LIBOSIP2_LIBS_value=
> ac_cv_env_LIBS_set=
> ac_cv_env_LIBS_value=
> ac_cv_env_PKG_CONFIG_LIBDIR_set=
> ac_cv_env_PKG_CONFIG_LIBDIR_value=
> ac_cv_env_PKG_CONFIG_PATH_set=
> ac_cv_env_PKG_CONFIG_PATH_value=
> ac_cv_env_PKG_CONFIG_set=
> ac_cv_env_PKG_CONFIG_value=
> ac_cv_env_QT_CFLAGS_set=
> ac_cv_env_QT_CFLAGS_value=
> ac_cv_env_QT_LIBS_set=
> ac_cv_env_QT_LIBS_value=
> ac_cv_env_UCOMMON_CFLAGS_set=
> ac_cv_env_UCOMMON_CFLAGS_value=
> ac_cv_env_UCOMMON_LIBS_set=
> ac_cv_env_UCOMMON_LIBS_value=
> ac_cv_env_ZEROCONF_CFLAGS_set=
> ac_cv_env_ZEROCONF_CFLAGS_value=
> ac_cv_env_ZEROCONF_LIBS_set=
> ac_cv_env_ZEROCONF_LIBS_value=
> ac_cv_env_build_alias_set=
> ac_cv_env_build_alias_value=
> ac_cv_env_host_alias_set=
> ac_cv_env_host_alias_value=
> ac_cv_env_target_alias_set=
> ac_cv_env_target_alias_value=
> ac_cv_host=x86_64-unknown-linux-gnu
> ac_cv_prog_ac_ct_CC=gcc
> ac_cv_target=x86_64-unknown-linux-gnu
> 
> ## ----------------- ##
> ## Output variables. ##
> ## ----------------- ##
> 
> ACLOCAL=''
> AMDEPBACKSLASH=''
> AMDEP_FALSE=''
> AMDEP_TRUE=''
> AMTAR=''
> AR=''
> AS=''
> AUTOCONF=''
> AUTOHEADER=''
> AUTOMAKE=''
> AWK=''
> CC='gcc'
> CCDEPMODE=''
> CFLAGS='-Wall -Wextra -Wconversion -fPIC -Wno-unused-parameter
> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
> -Wl,-shared -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'
> CPP=''
> CPPFLAGS=''
> CXX=''
> CXXCPP=''
> CXXDEPMODE=''
> CXXFLAGS=''
> CYGPATH_W=''
> DAEMON_LIBS=''
> DEFS=''
> DEPDIR=''
> DLLTOOL=''
> DLOPEN=''
> DSYMUTIL=''
> DUMPBIN=''
> ECHO_C=''
> ECHO_N='-n'
> ECHO_T=''
> EGREP=''
> EXEEXT=''
> EXOSIP2_CFLAGS=''
> EXOSIP2_LIBS=''
> EXPORT_FLAGS=''
> EXPORT_LIBS=''
> FGREP=''
> GREP=''
> INCLUDE_FLAGS=''
> INITRDDIR=''
> INSTALL_DATA=''
> INSTALL_PROGRAM=''
> INSTALL_SCRIPT=''
> INSTALL_STRIP_PROGRAM=''
> LD=''
> LDFLAGS=''
> LIBOBJS=''
> LIBOSIP2_CFLAGS=''
> LIBOSIP2_LIBS=''
> LIBS=''
> LIBTOOL=''
> LIPO=''
> LN_S=''
> LTLIBOBJS=''
> LT_VERSION='1:6:0'
> MAKEINFO=''
> MANIFEST_TOOL=''
> MKDIR_P=''
> MOC=''
> MODFLAGS=''
> NETWORK_DOWN=''
> NETWORK_RELOAD=''
> NETWORK_UP=''
> NM=''
> NMEDIT=''
> OBJDUMP=''
> OBJEXT=''
> OTOOL64=''
> OTOOL=''
> PACKAGE=''
> PACKAGE_BUGREPORT=''
> PACKAGE_NAME=''
> PACKAGE_STRING=''
> PACKAGE_TARNAME=''
> PACKAGE_URL=''
> PACKAGE_VERSION=''
> PATH_SEPARATOR=':'
> PKG_CONFIG=''
> PKG_CONFIG_LIBDIR=''
> PKG_CONFIG_PATH=''
> QTAPPS=''
> QT_CFLAGS=''
> QT_LIBS=''
> RANLIB=''
> RCC=''
> SED=''
> SET_MAKE=''
> SHELL='/bin/bash'
> SIPWITCH_EXOSIP2=''
> SIPWITCH_FLAGS=''
> SIPWITCH_LIBS=''
> STATIC_MODULES_FALSE=''
> STATIC_MODULES_TRUE=''
> STRIP=''
> UCOMMON=''
> UCOMMON_CFLAGS=''
> UCOMMON_CLINK=''
> UCOMMON_LIBS=''
> UCOMMON_LINK=''
> UCOMMON_MODEL=''
> UCOMMON_REQUIRES='5.2.0'
> UIC=''
> USECURE_LINK=''
> VERSION='1.3.1'
> ZEROCONF_CFLAGS=''
> ZEROCONF_FALSE=''
> ZEROCONF_LIBS=''
> ZEROCONF_TRUE=''
> ac_ct_AR=''
> ac_ct_CC='gcc'
> ac_ct_CXX=''
> ac_ct_DUMPBIN=''
> am__EXEEXT_FALSE=''
> am__EXEEXT_TRUE=''
> am__fastdepCC_FALSE=''
> am__fastdepCC_TRUE=''
> am__fastdepCXX_FALSE=''
> am__fastdepCXX_TRUE=''
> am__include=''
> am__isrc=''
> am__leading_dot=''
> am__nodep=''
> am__quote=''
> am__tar=''
> am__untar=''
> bindir='${exec_prefix}/bin'
> build='x86_64-unknown-linux-gnu'
> build_alias=''
> build_cpu='x86_64'
> build_os='linux-gnu'
> build_vendor='unknown'
> cgibindir=''
> datadir='${datarootdir}'
> datarootdir='${prefix}/share'
> default_cfgpath=''
> default_incpath=''
> default_libexec=''
> default_libpath=''
> default_varpath=''
> docdir='${datarootdir}/doc/${PACKAGE}'
> dvidir='${docdir}'
> exec_prefix='NONE'
> host='x86_64-unknown-linux-gnu'
> host_alias=''
> host_cpu='x86_64'
> host_os='linux-gnu'
> host_vendor='unknown'
> htmldir='${docdir}'
> includedir='${prefix}/include'
> infodir='${datarootdir}/info'
> install_sh=''
> libdir='${exec_prefix}/lib'
> libexecdir='${exec_prefix}/libexec'
> localedir='${datarootdir}/locale'
> localstatedir='${prefix}/var'
> mandir='${datarootdir}/man'
> mkdir_p=''
> oldincludedir='/usr/include'
> pdfdir='${docdir}'
> plugindir=''
> prefix='NONE'
> prefix_libdir=''
> program_transform_name='s,x,x,'
> psdir='${docdir}'
> sbindir='${exec_prefix}/sbin'
> sharedstatedir='${prefix}/com'
> sysconfdir='${prefix}/etc'
> target='x86_64-unknown-linux-gnu'
> target_alias=''
> target_cpu='x86_64'
> target_os='linux-gnu'
> target_vendor='unknown'
> translatedir=''
> translations=''
> 
> ## ----------- ##
> ## confdefs.h. ##
> ## ----------- ##
> 
> /* confdefs.h */
> #define PACKAGE_NAME ""
> #define PACKAGE_TARNAME ""
> #define PACKAGE_VERSION ""
> #define PACKAGE_STRING ""
> #define PACKAGE_BUGREPORT ""
> #define PACKAGE_URL ""
> 
> configure: exit 77
> 
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf



From MAILER-DAEMON Tue Aug 21 23:10:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T41L2-0002Or-Qw
	for mharc-autoconf@gnu.org; Tue, 21 Aug 2012 23:10:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42585)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T41Kx-0002Nu-Ic
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:10:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T41Kv-00088k-8J
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:10:31 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:38824)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T41Kv-00088b-1c
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:10:29 -0400
Received: by vcbfl10 with SMTP id fl10so640997vcb.0
	for <autoconf@gnu.org>; Tue, 21 Aug 2012 20:10:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=Q/Ku3OvjnekiIlyqAJcKXdjiEBB9B7Vm9W2x1j23eRY=;
	b=Q9O4VGG59KGx1kpOYSauL+3kbda7GdrqSG/mEMxSBZGyv+f7XscQaTriBcNWqMK6lI
	12Ttr67Ut/TrPrmxInlgBaAnxgfQEjfuIAFUzOpb1YFE8KnvgOOqvgZlx5huPTGW/7+P
	MWhpA4Z9ZPE6+E3sM99z1pZ3+FD3k4e4R/W0O2reKJzUzGbriQbILFKpRUp4S9hXFxbI
	ZawpCZny6/HdhH2u4Fs9g866MrHfNIirBEJfj+IhHANlZTAp0y60A3+PVXIim59RcSsu
	YWV0G9vLvTigXOBTzhOdTcZM9nL2SpJZAdcCkRD0mgbV7xZ2YwA0QVgFFFOrb9Ivnu7+
	j7sA==
MIME-Version: 1.0
Received: by 10.52.67.240 with SMTP id q16mr13056808vdt.45.1345605028371; Tue,
	21 Aug 2012 20:10:28 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Tue, 21 Aug 2012 20:10:28 -0700 (PDT)
In-Reply-To: <50343D0A.8030802@hiroshima-u.ac.jp>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
Date: Tue, 21 Aug 2012 23:10:28 -0400
Message-ID: <CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 03:10:35 -0000

Hi Suzuki,

> So I wonder why you want autoconf
> to "fix" the result caused by your CFLAGS
I was trying to set CFLAGS, CPPFLAGS, etc though `configure`. Its a
supported option, and Autoconf produced the configure file. Where else
would you suggest I look?

> Anyway, you didn't clarified how such special flags are required,
> and the coverages of the objects to be compiled with the special
> flags, so nobody will be able to the answer to be used immediately.
I was not aware hardeneing was considered "special flags" and we had
to justify their usage :) Security conscious folks usually look at it
the other way: we look at a typical project's configuration, and ask
why they are not being used. Anyway, the flags have actually been
around for some time, but most folks don't use them. -1 to those folks
for ignoring awesome platform security measures.

Projects use `configure` to configure all binaries output in a project
- regardless of the binary type (executable or shared object). Though
there may be multiple executables and shared objects, there is only
one configure. So I need something that provides what I
want/desire/require at the single configure point.

I want hardened executables and shared objects. That includes ASLR,
which means -fPIE -pie for executables; -fPIC and -shared for shared
objects. According to the dialog from the GCC feature request, -fPIC
and -shared should be used as it appears to be a "superset" of -fPIE
-pie.

Jeff

On Tue, Aug 21, 2012 at 9:59 PM, suzuki toshiya
<mpsuzuki@hiroshima-u.ac.jp> wrote:
> I think your set of CFLAGS makes GCC disabled to make a simple
> executables like "hello world". So I wonder why you want autoconf
> to "fix" the result caused by your CFLAGS. For generic CFLAGS,
> you must set CFLAGS that the compiler can make an executable
> successfully. You gave CFLAGS that the compiler cannot make
> an executable.
>
> Also I've checked the discussion on GCC bugzilla; Andrew Pinski
> mentioned automake, but I don't think he recommends a method using
> "CFLAGS=blahblahblah ./configure". I guess he recommends to write
> configure.am & Makefile.am to insert non-generic & special flags
> in the compiling for shared object.
>
> Anyway, you didn't clarified how such special flags are required,
> and the coverages of the objects to be compiled with the special
> flags, so nobody will be able to the answer to be used immediately.
>
> Regards,
> mpsuzuki
>
> Jeffrey Walton wrote:
>> Hi All,
>>
>> Any ideas on how to fix this? I was using -fPIC/-shared due to
>> limitations in Make and LDFLAGS. According to [1], we can use
>> -fPIC/-shared all the time.
>>
>> $ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIC
>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>> -Wl,-z,relro -Wl,-z,now"
>> checking build system type... x86_64-unknown-linux-gnu
>> checking host system type... x86_64-unknown-linux-gnu
>> checking target system type... x86_64-unknown-linux-gnu
>> checking for gcc... gcc
>> checking whether the C compiler works... no
>> configure: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
>> configure: error: C compiler cannot create executables
>> See `config.log' for more details
>>
>> Jeff
>>
>> [1] "Request: Add -aslr switch that invokes -fPIE/-pie or
>> -fPIC/-shared as appropriate,"
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885
>>
>> *****
>>
>> This file contains any messages produced by compilers while
>> running configure, to aid debugging if configure makes a mistake.
>>
>> It was created by configure, which was
>> generated by GNU Autoconf 2.68.  Invocation command line was
>>
>>   $ ./configure CFLAGS=-Wall -Wextra -Wconversion -fPIC
>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>> -Wl,-z,relro -Wl,-z,now
>>
>> ## --------- ##
>> ## Platform. ##
>> ## --------- ##
>>
>> hostname = mint-12-x64
>> uname -m = x86_64
>> uname -r = 3.0.0-12-generic
>> uname -s = Linux
>> uname -v = #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
>>
>> /usr/bin/uname -p = unknown
>> /bin/uname -X     = unknown
>>
>> /bin/arch              = unknown
>> /usr/bin/arch -k       = unknown
>> /usr/convex/getsysinfo = unknown
>> /usr/bin/hostinfo      = unknown
>> /bin/machine           = unknown
>> /usr/bin/oslevel       = unknown
>> /bin/universe          = unknown
>>
>> PATH: /usr/lib/lightdm/lightdm
>> PATH: /usr/local/sbin
>> PATH: /usr/local/bin
>> PATH: /usr/sbin
>> PATH: /usr/bin
>> PATH: /sbin
>> PATH: /bin
>> PATH: /usr/games
>>
>>
>> ## ----------- ##
>> ## Core tests. ##
>> ## ----------- ##
>>
>> configure:2456: checking build system type
>> configure:2470: result: x86_64-unknown-linux-gnu
>> configure:2490: checking host system type
>> configure:2503: result: x86_64-unknown-linux-gnu
>> configure:2523: checking target system type
>> configure:2536: result: x86_64-unknown-linux-gnu
>> configure:2611: checking for gcc
>> configure:2627: found /usr/bin/gcc
>> configure:2638: result: gcc
>> configure:2867: checking for C compiler version
>> configure:2876: gcc --version >&5
>> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
>> Copyright (C) 2011 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> configure:2887: $? = 0
>> configure:2876: gcc -v >&5
>> Using built-in specs.
>> COLLECT_GCC=gcc
>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
>> Target: x86_64-linux-gnu
>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
>> 4.6.1-9ubuntu3'
>> --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
>> --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
>> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
>> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
>> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
>> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
>> --enable-objc-gc --disable-werror --with-arch-32=i686
>> --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>> Thread model: posix
>> gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
>> configure:2887: $? = 0
>> configure:2876: gcc -V >&5
>> gcc: error: unrecognized option '-V'
>> gcc: fatal error: no input files
>> compilation terminated.
>> configure:2887: $? = 4
>> configure:2876: gcc -qversion >&5
>> gcc: error: unrecognized option '-qversion'
>> gcc: fatal error: no input files
>> compilation terminated.
>> configure:2887: $? = 4
>> configure:2907: checking whether the C compiler works
>> configure:2929: gcc -Wall -Wextra -Wconversion -fPIC
>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>> -Wl,-z,relro -Wl,-z,now   conftest.c  >&5
>> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
>> relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
>> making a shared object; recompile with -fPIC
>> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
>> could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> configure:2933: $? = 1
>> configure:2971: result: no
>> configure: failed program was:
>> | /* confdefs.h */
>> | #define PACKAGE_NAME ""
>> | #define PACKAGE_TARNAME ""
>> | #define PACKAGE_VERSION ""
>> | #define PACKAGE_STRING ""
>> | #define PACKAGE_BUGREPORT ""
>> | #define PACKAGE_URL ""
>> | /* end confdefs.h.  */
>> |
>> | int
>> | main ()
>> | {
>> |
>> |   ;
>> |   return 0;
>> | }
>> configure:2976: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
>> configure:2978: error: C compiler cannot create executables
>> See `config.log' for more details
>>
>> ## ---------------- ##
>> ## Cache variables. ##
>> ## ---------------- ##
>>
>> ac_cv_build=x86_64-unknown-linux-gnu
>> ac_cv_env_CCC_set=
>> ac_cv_env_CCC_value=
>> ac_cv_env_CC_set=
>> ac_cv_env_CC_value=
>> ac_cv_env_CFLAGS_set=set
>> ac_cv_env_CFLAGS_value='-Wall -Wextra -Wconversion -fPIC
>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>> -Wl,-z,relro -Wl,-z,now'
>> ac_cv_env_CPPFLAGS_set=
>> ac_cv_env_CPPFLAGS_value=
>> ac_cv_env_CPP_set=
>> ac_cv_env_CPP_value=
>> ac_cv_env_CXXCPP_set=
>> ac_cv_env_CXXCPP_value=
>> ac_cv_env_CXXFLAGS_set=
>> ac_cv_env_CXXFLAGS_value=
>> ac_cv_env_CXX_set=
>> ac_cv_env_CXX_value=
>> ac_cv_env_EXOSIP2_CFLAGS_set=
>> ac_cv_env_EXOSIP2_CFLAGS_value=
>> ac_cv_env_EXOSIP2_LIBS_set=
>> ac_cv_env_EXOSIP2_LIBS_value=
>> ac_cv_env_LDFLAGS_set=
>> ac_cv_env_LDFLAGS_value=
>> ac_cv_env_LIBOSIP2_CFLAGS_set=
>> ac_cv_env_LIBOSIP2_CFLAGS_value=
>> ac_cv_env_LIBOSIP2_LIBS_set=
>> ac_cv_env_LIBOSIP2_LIBS_value=
>> ac_cv_env_LIBS_set=
>> ac_cv_env_LIBS_value=
>> ac_cv_env_PKG_CONFIG_LIBDIR_set=
>> ac_cv_env_PKG_CONFIG_LIBDIR_value=
>> ac_cv_env_PKG_CONFIG_PATH_set=
>> ac_cv_env_PKG_CONFIG_PATH_value=
>> ac_cv_env_PKG_CONFIG_set=
>> ac_cv_env_PKG_CONFIG_value=
>> ac_cv_env_QT_CFLAGS_set=
>> ac_cv_env_QT_CFLAGS_value=
>> ac_cv_env_QT_LIBS_set=
>> ac_cv_env_QT_LIBS_value=
>> ac_cv_env_UCOMMON_CFLAGS_set=
>> ac_cv_env_UCOMMON_CFLAGS_value=
>> ac_cv_env_UCOMMON_LIBS_set=
>> ac_cv_env_UCOMMON_LIBS_value=
>> ac_cv_env_ZEROCONF_CFLAGS_set=
>> ac_cv_env_ZEROCONF_CFLAGS_value=
>> ac_cv_env_ZEROCONF_LIBS_set=
>> ac_cv_env_ZEROCONF_LIBS_value=
>> ac_cv_env_build_alias_set=
>> ac_cv_env_build_alias_value=
>> ac_cv_env_host_alias_set=
>> ac_cv_env_host_alias_value=
>> ac_cv_env_target_alias_set=
>> ac_cv_env_target_alias_value=
>> ac_cv_host=x86_64-unknown-linux-gnu
>> ac_cv_prog_ac_ct_CC=gcc
>> ac_cv_target=x86_64-unknown-linux-gnu
>>
>> ## ----------------- ##
>> ## Output variables. ##
>> ## ----------------- ##
>>
>> ACLOCAL=''
>> AMDEPBACKSLASH=''
>> AMDEP_FALSE=''
>> AMDEP_TRUE=''
>> AMTAR=''
>> AR=''
>> AS=''
>> AUTOCONF=''
>> AUTOHEADER=''
>> AUTOMAKE=''
>> AWK=''
>> CC='gcc'
>> CCDEPMODE=''
>> CFLAGS='-Wall -Wextra -Wconversion -fPIC -Wno-unused-parameter
>> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
>> -Wl,-shared -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'
>> CPP=''
>> CPPFLAGS=''
>> CXX=''
>> CXXCPP=''
>> CXXDEPMODE=''
>> CXXFLAGS=''
>> CYGPATH_W=''
>> DAEMON_LIBS=''
>> DEFS=''
>> DEPDIR=''
>> DLLTOOL=''
>> DLOPEN=''
>> DSYMUTIL=''
>> DUMPBIN=''
>> ECHO_C=''
>> ECHO_N='-n'
>> ECHO_T=''
>> EGREP=''
>> EXEEXT=''
>> EXOSIP2_CFLAGS=''
>> EXOSIP2_LIBS=''
>> EXPORT_FLAGS=''
>> EXPORT_LIBS=''
>> FGREP=''
>> GREP=''
>> INCLUDE_FLAGS=''
>> INITRDDIR=''
>> INSTALL_DATA=''
>> INSTALL_PROGRAM=''
>> INSTALL_SCRIPT=''
>> INSTALL_STRIP_PROGRAM=''
>> LD=''
>> LDFLAGS=''
>> LIBOBJS=''
>> LIBOSIP2_CFLAGS=''
>> LIBOSIP2_LIBS=''
>> LIBS=''
>> LIBTOOL=''
>> LIPO=''
>> LN_S=''
>> LTLIBOBJS=''
>> LT_VERSION='1:6:0'
>> MAKEINFO=''
>> MANIFEST_TOOL=''
>> MKDIR_P=''
>> MOC=''
>> MODFLAGS=''
>> NETWORK_DOWN=''
>> NETWORK_RELOAD=''
>> NETWORK_UP=''
>> NM=''
>> NMEDIT=''
>> OBJDUMP=''
>> OBJEXT=''
>> OTOOL64=''
>> OTOOL=''
>> PACKAGE=''
>> PACKAGE_BUGREPORT=''
>> PACKAGE_NAME=''
>> PACKAGE_STRING=''
>> PACKAGE_TARNAME=''
>> PACKAGE_URL=''
>> PACKAGE_VERSION=''
>> PATH_SEPARATOR=':'
>> PKG_CONFIG=''
>> PKG_CONFIG_LIBDIR=''
>> PKG_CONFIG_PATH=''
>> QTAPPS=''
>> QT_CFLAGS=''
>> QT_LIBS=''
>> RANLIB=''
>> RCC=''
>> SED=''
>> SET_MAKE=''
>> SHELL='/bin/bash'
>> SIPWITCH_EXOSIP2=''
>> SIPWITCH_FLAGS=''
>> SIPWITCH_LIBS=''
>> STATIC_MODULES_FALSE=''
>> STATIC_MODULES_TRUE=''
>> STRIP=''
>> UCOMMON=''
>> UCOMMON_CFLAGS=''
>> UCOMMON_CLINK=''
>> UCOMMON_LIBS=''
>> UCOMMON_LINK=''
>> UCOMMON_MODEL=''
>> UCOMMON_REQUIRES='5.2.0'
>> UIC=''
>> USECURE_LINK=''
>> VERSION='1.3.1'
>> ZEROCONF_CFLAGS=''
>> ZEROCONF_FALSE=''
>> ZEROCONF_LIBS=''
>> ZEROCONF_TRUE=''
>> ac_ct_AR=''
>> ac_ct_CC='gcc'
>> ac_ct_CXX=''
>> ac_ct_DUMPBIN=''
>> am__EXEEXT_FALSE=''
>> am__EXEEXT_TRUE=''
>> am__fastdepCC_FALSE=''
>> am__fastdepCC_TRUE=''
>> am__fastdepCXX_FALSE=''
>> am__fastdepCXX_TRUE=''
>> am__include=''
>> am__isrc=''
>> am__leading_dot=''
>> am__nodep=''
>> am__quote=''
>> am__tar=''
>> am__untar=''
>> bindir='${exec_prefix}/bin'
>> build='x86_64-unknown-linux-gnu'
>> build_alias=''
>> build_cpu='x86_64'
>> build_os='linux-gnu'
>> build_vendor='unknown'
>> cgibindir=''
>> datadir='${datarootdir}'
>> datarootdir='${prefix}/share'
>> default_cfgpath=''
>> default_incpath=''
>> default_libexec=''
>> default_libpath=''
>> default_varpath=''
>> docdir='${datarootdir}/doc/${PACKAGE}'
>> dvidir='${docdir}'
>> exec_prefix='NONE'
>> host='x86_64-unknown-linux-gnu'
>> host_alias=''
>> host_cpu='x86_64'
>> host_os='linux-gnu'
>> host_vendor='unknown'
>> htmldir='${docdir}'
>> includedir='${prefix}/include'
>> infodir='${datarootdir}/info'
>> install_sh=''
>> libdir='${exec_prefix}/lib'
>> libexecdir='${exec_prefix}/libexec'
>> localedir='${datarootdir}/locale'
>> localstatedir='${prefix}/var'
>> mandir='${datarootdir}/man'
>> mkdir_p=''
>> oldincludedir='/usr/include'
>> pdfdir='${docdir}'
>> plugindir=''
>> prefix='NONE'
>> prefix_libdir=''
>> program_transform_name='s,x,x,'
>> psdir='${docdir}'
>> sbindir='${exec_prefix}/sbin'
>> sharedstatedir='${prefix}/com'
>> sysconfdir='${prefix}/etc'
>> target='x86_64-unknown-linux-gnu'
>> target_alias=''
>> target_cpu='x86_64'
>> target_os='linux-gnu'
>> target_vendor='unknown'
>> translatedir=''
>> translations=''
>>
>> ## ----------- ##
>> ## confdefs.h. ##
>> ## ----------- ##
>>
>> /* confdefs.h */
>> #define PACKAGE_NAME ""
>> #define PACKAGE_TARNAME ""
>> #define PACKAGE_VERSION ""
>> #define PACKAGE_STRING ""
>> #define PACKAGE_BUGREPORT ""
>> #define PACKAGE_URL ""
>>
>> configure: exit 77
>>
>> _______________________________________________
>> Autoconf mailing list
>> Autoconf@gnu.org
>> https://lists.gnu.org/mailman/listinfo/autoconf
>
>
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf


From MAILER-DAEMON Tue Aug 21 23:35:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T41jH-0003zL-VQ
	for mharc-autoconf@gnu.org; Tue, 21 Aug 2012 23:35:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33030)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T41jE-0003xa-LD
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:35:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T41jC-0006eu-KW
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:35:36 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:49719)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T41jB-0006eV-KB
	for autoconf@gnu.org; Tue, 21 Aug 2012 23:35:34 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 5264B525823;
	Wed, 22 Aug 2012 12:35:30 +0900 (JST)
Received: from [133.41.203.227] (203-227.cup.hiroshima-u.ac.jp
	[133.41.203.227]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id 2F6485257E6;
	Wed, 22 Aug 2012 12:35:30 +0900 (JST)
Message-ID: <50345381.5040602@hiroshima-u.ac.jp>
Date: Wed, 22 Aug 2012 12:35:29 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
In-Reply-To: <CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19130.004
X-TM-AS-Result: No--13.387-10.0-31-10
X-imss-scan-details: No--13.387-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: 6i9BTbUAHf1ITndh1lLRAZpaQZrxtVBsWyQijpt1UQkNcckEPxfz2AQ9
	n8U23GDfvsVoNN6KMR66hVtpC5OVsbPiqbEFJcmFneIQmu8UmaFKoLt3o3FOY1lDV0KgHSWH1/8
	kexyAzWpSy4x3nIheaALC7UzB8hj4UWPCbK1OvtRomJbPMdjPdBLDxzOohy92azG2pCTfDnnk1s
	sA2jl8FEM1zFTxSuLh1FSbfEOqAoaxpgqXoiq0QbMjW/sniEQKK9jw4MDFmyIKA2OoGAlTkzC0p
	JIQUiJOM0TH1m3JEEHSPic6cdIcu/VCVGBI5SdrhCecAVGCOf0UkWvaqUqLHzW6NGnP3v23vACb
	PSJBQvXfN+VKgiBNDC2gCAF6KmwHVCbg4i7HgN6PmEs8Jfdl0xjXlJXYkrx9H/9vPj/FgoCN6ej
	PkSACDk4kHnA/WiqEcTwTy1nILiKGaFPdOu7GZzBqv2CXC4/8MZm0+sEE9mv+pGLSU84AkiMMMK
	o4/OXezVpf9Z3myVUTseRmLUlPwj95f95FaTdFdnC5uaS6tb+zIliRm3oSCWb6JVx3BK3E4TY06
	MC9tLRXnKguhI6seNH77WQEtU3kBpcCsZUCTuYR7kPXQyW0tjacujaE3jwhJLfQYoCQHFaptdRz
	v83DjR3/oZbbH/rXGZNUNHSkKMx55Kivg4hQPov2/i8VNqeOQPU9oY5lliPa+IH8mvgPVMCS2AM
	m1nQC3LUROADJ0Sv0rLRBjedYu/qEXpDvht4AjQlVVwSbjyf/lBG+uXYJkF2blfck/QLAi18y27
	0V9uvl094aNdRwplBFqzxFjyKLuRiLMrkF73oksSBZTGCrwrTrdaH1ZWqC1n4UsocU0g59asptM
	+kOK61Ia4IbeAdL3QfwsVk0UbtuRXh7bFKB7o9YYA77Ov40OuupIf/XZ7k2MfBugOSMzzDKfGpe
	rpLEHIV02d1rpG8=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 03:35:38 -0000

Jeffrey Walton wrote:
> Hi Suzuki,
> 
>> So I wonder why you want autoconf
>> to "fix" the result caused by your CFLAGS
> I was trying to set CFLAGS, CPPFLAGS, etc though `configure`. Its a
> supported option, and Autoconf produced the configure file. Where else
> would you suggest I look?

In your environment,

gcc "your set of CFLAGS" -o hello.exe hello.c

can generate the executable successfully?

>> Anyway, you didn't clarified how such special flags are required,
>> and the coverages of the objects to be compiled with the special
>> flags, so nobody will be able to the answer to be used immediately.
> I was not aware hardeneing was considered "special flags" and we had
> to justify their usage :) Security conscious folks usually look at it
> the other way: we look at a typical project's configuration, and ask
> why they are not being used. Anyway, the flags have actually been
> around for some time, but most folks don't use them. -1 to those folks
> for ignoring awesome platform security measures.
> 
> Projects use `configure` to configure all binaries output in a project
> - regardless of the binary type (executable or shared object). Though
> there may be multiple executables and shared objects, there is only
> one configure. So I need something that provides what I
> want/desire/require at the single configure point.
> 
> I want hardened executables and shared objects. That includes ASLR,
> which means -fPIE -pie for executables; -fPIC and -shared for shared
> objects. According to the dialog from the GCC feature request, -fPIC
> and -shared should be used as it appears to be a "superset" of -fPIE
> -pie.
> 
> Jeff
> 
> On Tue, Aug 21, 2012 at 9:59 PM, suzuki toshiya
> <mpsuzuki@hiroshima-u.ac.jp> wrote:
>> I think your set of CFLAGS makes GCC disabled to make a simple
>> executables like "hello world". So I wonder why you want autoconf
>> to "fix" the result caused by your CFLAGS. For generic CFLAGS,
>> you must set CFLAGS that the compiler can make an executable
>> successfully. You gave CFLAGS that the compiler cannot make
>> an executable.
>>
>> Also I've checked the discussion on GCC bugzilla; Andrew Pinski
>> mentioned automake, but I don't think he recommends a method using
>> "CFLAGS=blahblahblah ./configure". I guess he recommends to write
>> configure.am & Makefile.am to insert non-generic & special flags
>> in the compiling for shared object.
>>
>> Anyway, you didn't clarified how such special flags are required,
>> and the coverages of the objects to be compiled with the special
>> flags, so nobody will be able to the answer to be used immediately.
>>
>> Regards,
>> mpsuzuki
>>
>> Jeffrey Walton wrote:
>>> Hi All,
>>>
>>> Any ideas on how to fix this? I was using -fPIC/-shared due to
>>> limitations in Make and LDFLAGS. According to [1], we can use
>>> -fPIC/-shared all the time.
>>>
>>> $ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIC
>>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>>> -Wl,-z,relro -Wl,-z,now"
>>> checking build system type... x86_64-unknown-linux-gnu
>>> checking host system type... x86_64-unknown-linux-gnu
>>> checking target system type... x86_64-unknown-linux-gnu
>>> checking for gcc... gcc
>>> checking whether the C compiler works... no
>>> configure: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
>>> configure: error: C compiler cannot create executables
>>> See `config.log' for more details
>>>
>>> Jeff
>>>
>>> [1] "Request: Add -aslr switch that invokes -fPIE/-pie or
>>> -fPIC/-shared as appropriate,"
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885
>>>
>>> *****
>>>
>>> This file contains any messages produced by compilers while
>>> running configure, to aid debugging if configure makes a mistake.
>>>
>>> It was created by configure, which was
>>> generated by GNU Autoconf 2.68.  Invocation command line was
>>>
>>>   $ ./configure CFLAGS=-Wall -Wextra -Wconversion -fPIC
>>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>>> -Wl,-z,relro -Wl,-z,now
>>>
>>> ## --------- ##
>>> ## Platform. ##
>>> ## --------- ##
>>>
>>> hostname = mint-12-x64
>>> uname -m = x86_64
>>> uname -r = 3.0.0-12-generic
>>> uname -s = Linux
>>> uname -v = #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
>>>
>>> /usr/bin/uname -p = unknown
>>> /bin/uname -X     = unknown
>>>
>>> /bin/arch              = unknown
>>> /usr/bin/arch -k       = unknown
>>> /usr/convex/getsysinfo = unknown
>>> /usr/bin/hostinfo      = unknown
>>> /bin/machine           = unknown
>>> /usr/bin/oslevel       = unknown
>>> /bin/universe          = unknown
>>>
>>> PATH: /usr/lib/lightdm/lightdm
>>> PATH: /usr/local/sbin
>>> PATH: /usr/local/bin
>>> PATH: /usr/sbin
>>> PATH: /usr/bin
>>> PATH: /sbin
>>> PATH: /bin
>>> PATH: /usr/games
>>>
>>>
>>> ## ----------- ##
>>> ## Core tests. ##
>>> ## ----------- ##
>>>
>>> configure:2456: checking build system type
>>> configure:2470: result: x86_64-unknown-linux-gnu
>>> configure:2490: checking host system type
>>> configure:2503: result: x86_64-unknown-linux-gnu
>>> configure:2523: checking target system type
>>> configure:2536: result: x86_64-unknown-linux-gnu
>>> configure:2611: checking for gcc
>>> configure:2627: found /usr/bin/gcc
>>> configure:2638: result: gcc
>>> configure:2867: checking for C compiler version
>>> configure:2876: gcc --version >&5
>>> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
>>> Copyright (C) 2011 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions.  There is NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>>
>>> configure:2887: $? = 0
>>> configure:2876: gcc -v >&5
>>> Using built-in specs.
>>> COLLECT_GCC=gcc
>>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
>>> Target: x86_64-linux-gnu
>>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
>>> 4.6.1-9ubuntu3'
>>> --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
>>> --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
>>> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
>>> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
>>> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
>>> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
>>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
>>> --enable-objc-gc --disable-werror --with-arch-32=i686
>>> --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
>>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>>> Thread model: posix
>>> gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
>>> configure:2887: $? = 0
>>> configure:2876: gcc -V >&5
>>> gcc: error: unrecognized option '-V'
>>> gcc: fatal error: no input files
>>> compilation terminated.
>>> configure:2887: $? = 4
>>> configure:2876: gcc -qversion >&5
>>> gcc: error: unrecognized option '-qversion'
>>> gcc: fatal error: no input files
>>> compilation terminated.
>>> configure:2887: $? = 4
>>> configure:2907: checking whether the C compiler works
>>> configure:2929: gcc -Wall -Wextra -Wconversion -fPIC
>>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>>> -Wl,-z,relro -Wl,-z,now   conftest.c  >&5
>>> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
>>> relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
>>> making a shared object; recompile with -fPIC
>>> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
>>> could not read symbols: Bad value
>>> collect2: ld returned 1 exit status
>>> configure:2933: $? = 1
>>> configure:2971: result: no
>>> configure: failed program was:
>>> | /* confdefs.h */
>>> | #define PACKAGE_NAME ""
>>> | #define PACKAGE_TARNAME ""
>>> | #define PACKAGE_VERSION ""
>>> | #define PACKAGE_STRING ""
>>> | #define PACKAGE_BUGREPORT ""
>>> | #define PACKAGE_URL ""
>>> | /* end confdefs.h.  */
>>> |
>>> | int
>>> | main ()
>>> | {
>>> |
>>> |   ;
>>> |   return 0;
>>> | }
>>> configure:2976: error: in `/home/jeffrey/Desktop/sipwitch-1.3.1':
>>> configure:2978: error: C compiler cannot create executables
>>> See `config.log' for more details
>>>
>>> ## ---------------- ##
>>> ## Cache variables. ##
>>> ## ---------------- ##
>>>
>>> ac_cv_build=x86_64-unknown-linux-gnu
>>> ac_cv_env_CCC_set=
>>> ac_cv_env_CCC_value=
>>> ac_cv_env_CC_set=
>>> ac_cv_env_CC_value=
>>> ac_cv_env_CFLAGS_set=set
>>> ac_cv_env_CFLAGS_value='-Wall -Wextra -Wconversion -fPIC
>>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>>> -fstack-protector-all -Wstrict-overflow -Wl,-shared -Wl,-z,noexecstack
>>> -Wl,-z,relro -Wl,-z,now'
>>> ac_cv_env_CPPFLAGS_set=
>>> ac_cv_env_CPPFLAGS_value=
>>> ac_cv_env_CPP_set=
>>> ac_cv_env_CPP_value=
>>> ac_cv_env_CXXCPP_set=
>>> ac_cv_env_CXXCPP_value=
>>> ac_cv_env_CXXFLAGS_set=
>>> ac_cv_env_CXXFLAGS_value=
>>> ac_cv_env_CXX_set=
>>> ac_cv_env_CXX_value=
>>> ac_cv_env_EXOSIP2_CFLAGS_set=
>>> ac_cv_env_EXOSIP2_CFLAGS_value=
>>> ac_cv_env_EXOSIP2_LIBS_set=
>>> ac_cv_env_EXOSIP2_LIBS_value=
>>> ac_cv_env_LDFLAGS_set=
>>> ac_cv_env_LDFLAGS_value=
>>> ac_cv_env_LIBOSIP2_CFLAGS_set=
>>> ac_cv_env_LIBOSIP2_CFLAGS_value=
>>> ac_cv_env_LIBOSIP2_LIBS_set=
>>> ac_cv_env_LIBOSIP2_LIBS_value=
>>> ac_cv_env_LIBS_set=
>>> ac_cv_env_LIBS_value=
>>> ac_cv_env_PKG_CONFIG_LIBDIR_set=
>>> ac_cv_env_PKG_CONFIG_LIBDIR_value=
>>> ac_cv_env_PKG_CONFIG_PATH_set=
>>> ac_cv_env_PKG_CONFIG_PATH_value=
>>> ac_cv_env_PKG_CONFIG_set=
>>> ac_cv_env_PKG_CONFIG_value=
>>> ac_cv_env_QT_CFLAGS_set=
>>> ac_cv_env_QT_CFLAGS_value=
>>> ac_cv_env_QT_LIBS_set=
>>> ac_cv_env_QT_LIBS_value=
>>> ac_cv_env_UCOMMON_CFLAGS_set=
>>> ac_cv_env_UCOMMON_CFLAGS_value=
>>> ac_cv_env_UCOMMON_LIBS_set=
>>> ac_cv_env_UCOMMON_LIBS_value=
>>> ac_cv_env_ZEROCONF_CFLAGS_set=
>>> ac_cv_env_ZEROCONF_CFLAGS_value=
>>> ac_cv_env_ZEROCONF_LIBS_set=
>>> ac_cv_env_ZEROCONF_LIBS_value=
>>> ac_cv_env_build_alias_set=
>>> ac_cv_env_build_alias_value=
>>> ac_cv_env_host_alias_set=
>>> ac_cv_env_host_alias_value=
>>> ac_cv_env_target_alias_set=
>>> ac_cv_env_target_alias_value=
>>> ac_cv_host=x86_64-unknown-linux-gnu
>>> ac_cv_prog_ac_ct_CC=gcc
>>> ac_cv_target=x86_64-unknown-linux-gnu
>>>
>>> ## ----------------- ##
>>> ## Output variables. ##
>>> ## ----------------- ##
>>>
>>> ACLOCAL=''
>>> AMDEPBACKSLASH=''
>>> AMDEP_FALSE=''
>>> AMDEP_TRUE=''
>>> AMTAR=''
>>> AR=''
>>> AS=''
>>> AUTOCONF=''
>>> AUTOHEADER=''
>>> AUTOMAKE=''
>>> AWK=''
>>> CC='gcc'
>>> CCDEPMODE=''
>>> CFLAGS='-Wall -Wextra -Wconversion -fPIC -Wno-unused-parameter
>>> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
>>> -Wl,-shared -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'
>>> CPP=''
>>> CPPFLAGS=''
>>> CXX=''
>>> CXXCPP=''
>>> CXXDEPMODE=''
>>> CXXFLAGS=''
>>> CYGPATH_W=''
>>> DAEMON_LIBS=''
>>> DEFS=''
>>> DEPDIR=''
>>> DLLTOOL=''
>>> DLOPEN=''
>>> DSYMUTIL=''
>>> DUMPBIN=''
>>> ECHO_C=''
>>> ECHO_N='-n'
>>> ECHO_T=''
>>> EGREP=''
>>> EXEEXT=''
>>> EXOSIP2_CFLAGS=''
>>> EXOSIP2_LIBS=''
>>> EXPORT_FLAGS=''
>>> EXPORT_LIBS=''
>>> FGREP=''
>>> GREP=''
>>> INCLUDE_FLAGS=''
>>> INITRDDIR=''
>>> INSTALL_DATA=''
>>> INSTALL_PROGRAM=''
>>> INSTALL_SCRIPT=''
>>> INSTALL_STRIP_PROGRAM=''
>>> LD=''
>>> LDFLAGS=''
>>> LIBOBJS=''
>>> LIBOSIP2_CFLAGS=''
>>> LIBOSIP2_LIBS=''
>>> LIBS=''
>>> LIBTOOL=''
>>> LIPO=''
>>> LN_S=''
>>> LTLIBOBJS=''
>>> LT_VERSION='1:6:0'
>>> MAKEINFO=''
>>> MANIFEST_TOOL=''
>>> MKDIR_P=''
>>> MOC=''
>>> MODFLAGS=''
>>> NETWORK_DOWN=''
>>> NETWORK_RELOAD=''
>>> NETWORK_UP=''
>>> NM=''
>>> NMEDIT=''
>>> OBJDUMP=''
>>> OBJEXT=''
>>> OTOOL64=''
>>> OTOOL=''
>>> PACKAGE=''
>>> PACKAGE_BUGREPORT=''
>>> PACKAGE_NAME=''
>>> PACKAGE_STRING=''
>>> PACKAGE_TARNAME=''
>>> PACKAGE_URL=''
>>> PACKAGE_VERSION=''
>>> PATH_SEPARATOR=':'
>>> PKG_CONFIG=''
>>> PKG_CONFIG_LIBDIR=''
>>> PKG_CONFIG_PATH=''
>>> QTAPPS=''
>>> QT_CFLAGS=''
>>> QT_LIBS=''
>>> RANLIB=''
>>> RCC=''
>>> SED=''
>>> SET_MAKE=''
>>> SHELL='/bin/bash'
>>> SIPWITCH_EXOSIP2=''
>>> SIPWITCH_FLAGS=''
>>> SIPWITCH_LIBS=''
>>> STATIC_MODULES_FALSE=''
>>> STATIC_MODULES_TRUE=''
>>> STRIP=''
>>> UCOMMON=''
>>> UCOMMON_CFLAGS=''
>>> UCOMMON_CLINK=''
>>> UCOMMON_LIBS=''
>>> UCOMMON_LINK=''
>>> UCOMMON_MODEL=''
>>> UCOMMON_REQUIRES='5.2.0'
>>> UIC=''
>>> USECURE_LINK=''
>>> VERSION='1.3.1'
>>> ZEROCONF_CFLAGS=''
>>> ZEROCONF_FALSE=''
>>> ZEROCONF_LIBS=''
>>> ZEROCONF_TRUE=''
>>> ac_ct_AR=''
>>> ac_ct_CC='gcc'
>>> ac_ct_CXX=''
>>> ac_ct_DUMPBIN=''
>>> am__EXEEXT_FALSE=''
>>> am__EXEEXT_TRUE=''
>>> am__fastdepCC_FALSE=''
>>> am__fastdepCC_TRUE=''
>>> am__fastdepCXX_FALSE=''
>>> am__fastdepCXX_TRUE=''
>>> am__include=''
>>> am__isrc=''
>>> am__leading_dot=''
>>> am__nodep=''
>>> am__quote=''
>>> am__tar=''
>>> am__untar=''
>>> bindir='${exec_prefix}/bin'
>>> build='x86_64-unknown-linux-gnu'
>>> build_alias=''
>>> build_cpu='x86_64'
>>> build_os='linux-gnu'
>>> build_vendor='unknown'
>>> cgibindir=''
>>> datadir='${datarootdir}'
>>> datarootdir='${prefix}/share'
>>> default_cfgpath=''
>>> default_incpath=''
>>> default_libexec=''
>>> default_libpath=''
>>> default_varpath=''
>>> docdir='${datarootdir}/doc/${PACKAGE}'
>>> dvidir='${docdir}'
>>> exec_prefix='NONE'
>>> host='x86_64-unknown-linux-gnu'
>>> host_alias=''
>>> host_cpu='x86_64'
>>> host_os='linux-gnu'
>>> host_vendor='unknown'
>>> htmldir='${docdir}'
>>> includedir='${prefix}/include'
>>> infodir='${datarootdir}/info'
>>> install_sh=''
>>> libdir='${exec_prefix}/lib'
>>> libexecdir='${exec_prefix}/libexec'
>>> localedir='${datarootdir}/locale'
>>> localstatedir='${prefix}/var'
>>> mandir='${datarootdir}/man'
>>> mkdir_p=''
>>> oldincludedir='/usr/include'
>>> pdfdir='${docdir}'
>>> plugindir=''
>>> prefix='NONE'
>>> prefix_libdir=''
>>> program_transform_name='s,x,x,'
>>> psdir='${docdir}'
>>> sbindir='${exec_prefix}/sbin'
>>> sharedstatedir='${prefix}/com'
>>> sysconfdir='${prefix}/etc'
>>> target='x86_64-unknown-linux-gnu'
>>> target_alias=''
>>> target_cpu='x86_64'
>>> target_os='linux-gnu'
>>> target_vendor='unknown'
>>> translatedir=''
>>> translations=''
>>>
>>> ## ----------- ##
>>> ## confdefs.h. ##
>>> ## ----------- ##
>>>
>>> /* confdefs.h */
>>> #define PACKAGE_NAME ""
>>> #define PACKAGE_TARNAME ""
>>> #define PACKAGE_VERSION ""
>>> #define PACKAGE_STRING ""
>>> #define PACKAGE_BUGREPORT ""
>>> #define PACKAGE_URL ""
>>>
>>> configure: exit 77
>>>
>>> _______________________________________________
>>> Autoconf mailing list
>>> Autoconf@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/autoconf
>>
>> _______________________________________________
>> Autoconf mailing list
>> Autoconf@gnu.org
>> https://lists.gnu.org/mailman/listinfo/autoconf



From MAILER-DAEMON Wed Aug 22 00:07:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T42EL-0006SY-IH
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 00:07:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59225)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T42EI-0006SC-Hm
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:07:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T42EH-0008JH-Kx
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:07:42 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:47539)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T42EH-0008JB-Fd
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:07:41 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id C3F5033DD18;
	Wed, 22 Aug 2012 04:07:39 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org,
 noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
Date: Wed, 22 Aug 2012 00:07:38 -0400
User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; )
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
In-Reply-To: <CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2072359.PTjo0TYn8u";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201208220007.39433.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 04:07:43 -0000

--nextPart2072359.PTjo0TYn8u
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Tuesday 21 August 2012 23:10:28 Jeffrey Walton wrote:
> Hi Suzuki,
> > Anyway, you didn't clarified how such special flags are required,
> > and the coverages of the objects to be compiled with the special
> > flags, so nobody will be able to the answer to be used immediately.
>=20
> I was not aware hardeneing was considered "special flags" and we had
> to justify their usage :)

=2DfPIC is not "hardening flags", -fPIE is.  suzuki is correct that your fl=
ag=20
selection is wrong.
=2Dmike

--nextPart2072359.PTjo0TYn8u
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJQNFsLAAoJEEFjO5/oN/WB51YP/1xCJUvQlTo2N7utmkXhj5iM
/SuFzYjkRL0Yc5JFnojAtkM5tTwO/LSKXbffercQ3UruAbRSccBas7K24R45ZeJ+
T29bmg2/6lNjrqod4P/4ayMoGTXszkBPt3yyBTc1ELnkGG145evY07SlQ06n59L9
sLuAIMqsehYe1eIlt+aucMTTWV9yRJlB4gCEhCFM5i6+ZuD1Pkkrgk/JvurTXuzd
iIiDY9yCVPzygKWGp8x2hfSufkeK0cUBMn4DxW9TS6m3kc2P+9UoC4E69aBI/ebd
TK/0otTlYEIhFRJbOP3RYxFNrKQVwZyWUbF9ath7l2pGC+GP4W4wX/khdgI3qh9Y
Cw2U+OvurJVqTyQB18fXtVLf29yFS4GvIiIVqG1YQf12Iu896YKDbmfYW8n3fKRJ
HTScNF6U8QMiNCvCdSaqglLsAA0/nTPb+END6VgR84o2L+tWTybqLoYJJoN+PAK2
+UmpzGiJNPm1jdWCXktH8my60UBMgX3wNVcwYh26WRDhABO4kDK+DAM22NMZlppe
N4X52LR3DaRS0gcDZaHWgmi0xqfuuObgM3twGK5VJx1m6Qh+NTDa6chyCcMW2s+k
51CuOeLeuZolt4cMc75N7AdsW2Ex9gkwYnKTO4XPMN4F2I5BOA1Y5IBdUc1JSYd2
zI8n/rcT6sQWSI9TJ8X9
=MApH
-----END PGP SIGNATURE-----

--nextPart2072359.PTjo0TYn8u--


From MAILER-DAEMON Wed Aug 22 00:20:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T42Qf-0007VA-Bc
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 00:20:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49536)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42QZ-0007T3-H8
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:20:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42QT-0003Wz-Mc
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:20:23 -0400
Received: from smtp3.stanford.edu ([171.67.219.83]:47831
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42QT-0003UC-Fs
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:20:17 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 6FCD445BEB5;
	Tue, 21 Aug 2012 21:20:16 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id 0997445BE97;
	Tue, 21 Aug 2012 21:20:16 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id E354D2F45E; Tue, 21 Aug 2012 21:20:15 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	(Jeffrey Walton's message of "Tue, 21 Aug 2012 23:10:28 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Tue, 21 Aug 2012 21:20:15 -0700
Message-ID: <87ipcbtv5s.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.83
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 04:20:27 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> I want hardened executables and shared objects. That includes ASLR,
> which means -fPIE -pie for executables; -fPIC and -shared for shared
> objects. According to the dialog from the GCC feature request, -fPIC and
> -shared should be used as it appears to be a "superset" of -fPIE -pie.

-fPIC is only for libraries.  For executables, such as what's created by
configure, you want -fPIE.  See, for example, the documentation for how to
deploy hardening flags in Debian (as one of many examples of distributions
doing this that I just happen to be familiar with personally):

    http://wiki.debian.org/Hardening/

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 00:38:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T42hq-0001LT-A5
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 00:38:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37212)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42hj-0001KV-VZ
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:38:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42hf-0000fM-LJ
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:38:07 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:34484)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42hf-0000fF-Gx
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:38:03 -0400
Received: by vbkv13 with SMTP id v13so701505vbk.0
	for <autoconf@gnu.org>; Tue, 21 Aug 2012 21:38:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=ZY6bdpDxvuNs21plAmII5tRAFCaLOS8ZslBcosLHs9k=;
	b=r08jEKqen789Se4aOkhBluRSXvblVgxQ6mSFDS872pdOltWE9SGiSkhd2VeD0cvOkR
	jSNRFqVESKa8esIgPcJt3vLgbJqs+cEUyxThryhlnyty9A/mchiQTiCiqeH5Vp7ZfRz6
	uhVAzqY2ZBZr//U9b7ZktU1205b4hcStefMZqH4zkPEfuLxe2zROh2R348CkuxhJic+A
	SWJqTPz0AtjiXPGvwuKOKBVfBLRXJQYx+sDaBRzRJCtz7AGuIhsYyy0tueDOWX1dI0JT
	GkJNMm0Tp+bhu9Z/QHk5MLObbGe6c7PXs48r7msNf8mCR2SVmb6QqRfIoC+6hRH/CcX4
	3P/A==
MIME-Version: 1.0
Received: by 10.58.211.71 with SMTP id na7mr16933156vec.39.1345610282987; Tue,
	21 Aug 2012 21:38:02 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Tue, 21 Aug 2012 21:38:02 -0700 (PDT)
In-Reply-To: <87ipcbtv5s.fsf@windlord.stanford.edu>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
Date: Wed, 22 Aug 2012 00:38:02 -0400
Message-ID: <CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Russ Allbery <rra@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 04:38:12 -0000

On Wed, Aug 22, 2012 at 12:20 AM, Russ Allbery <rra@stanford.edu> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
>
>> I want hardened executables and shared objects. That includes ASLR,
>> which means -fPIE -pie for executables; -fPIC and -shared for shared
>> objects. According to the dialog from the GCC feature request, -fPIC and
>> -shared should be used as it appears to be a "superset" of -fPIE -pie.
>
> -fPIC is only for libraries.  For executables, such as what's created by
> configure, you want -fPIE.  See, for example, the documentation for how to
> deploy hardening flags in Debian (as one of many examples of distributions
> doing this that I just happen to be familiar with personally):
According to Pinksi at GCC, -fPIC can be used for both. Both -fPIC and
-fPIE produce a relocatable section. I know from experience readelf(1)
produces the same result (DYN).

When using -fPIE, the optimizer can begin optomizing sooner. Andrew
Pinski (GCC developer): "With PIE, global variables and functions are
considered to bind local while with PIC they are considered to bind
globally (aka override able)." [1]

Pinski specifically recommended -fPIC because of this situation
(inability to configure executables and shared objects separately when
using the GNU tool chain).

Jeff

[1] Request: Add -aslr switch that invokes -fPIE/-pie or -fPIC/-shared
as appropriate, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885


From MAILER-DAEMON Wed Aug 22 00:44:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T42oK-0002Iy-0c
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 00:44:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42882)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42oE-0002IA-J4
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:44:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42oA-0002Sy-9k
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:44:50 -0400
Received: from smtp2.stanford.edu ([171.67.219.82]:57616
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T42oA-0002So-43
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:44:46 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 5FFE46290FD;
	Tue, 21 Aug 2012 21:44:45 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id DDF4B629010;
	Tue, 21 Aug 2012 21:44:44 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id B266D2F45E; Tue, 21 Aug 2012 21:44:44 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	(Jeffrey Walton's message of "Wed, 22 Aug 2012 00:38:02 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Tue, 21 Aug 2012 21:44:44 -0700
Message-ID: <877gsrtu0z.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.82
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 04:44:54 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> According to Pinksi at GCC, -fPIC can be used for both. Both -fPIC and
> -fPIE produce a relocatable section. I know from experience readelf(1)
> produces the same result (DYN).

> When using -fPIE, the optimizer can begin optomizing sooner. Andrew
> Pinski (GCC developer): "With PIE, global variables and functions are
> considered to bind local while with PIC they are considered to bind
> globally (aka override able)." [1]

> Pinski specifically recommended -fPIC because of this situation
> (inability to configure executables and shared objects separately when
> using the GNU tool chain).

Well, all that's fine and good, but then you passed those flags into GCC
and they didn't, er, work.  :)  So reality seems to have come into
conflict with the advice you got.

This definitely isn't Autoconf's fault, at least.

I suspect the actual problem may be more the -Wl,-shared than the -fPIC,
since ld -shared specifically means that you are *not* creating an
executable, but rather are creating a shared library:

       -shared
       -Bshareable
           Create a shared library.  This is currently only supported on ELF,
           XCOFF and SunOS platforms.  On SunOS, the linker will automatically
           create a shared library if the -e option is not used and there are
           undefined symbols in the link.

But you're passing it *only* to the linker (via -Wl), not to the compiler,
so the compiler and the linker now disagree on whether the result is going
to be a shared library or an executable, and badness happens.

So, well, don't do that.  :)

I know for certain that the Debian set of hardening flags, which use
-fPIE, not -fPIC, for executables, work across a *very large* array of
open source software (although we do have to omit -fPIE from the default
set since -fPIE breaks some software), and I believe that other
distributions do the same.  I won't venture to express an opinion on the
relative merits of -fPIC versus -fPIE, particularly to compiler experts,
but in my humble opinion you should prefer flags that actually function.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 00:55:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T42yB-00033j-DN
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 00:55:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53539)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42y7-00031E-I6
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:55:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42y3-00065K-GM
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:55:03 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:64573)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T42y3-00065A-CV
	for autoconf@gnu.org; Wed, 22 Aug 2012 00:54:59 -0400
Received: by vcbfl10 with SMTP id fl10so706904vcb.0
	for <autoconf@gnu.org>; Tue, 21 Aug 2012 21:54:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=uta5GkF5IhB9fCm1joQy7IsTAlNThGCQp4dcGkN2xHo=;
	b=oEtkChBialog8l+o03/XyLab5FXxr+DkQCPJqgAEig89fvCBwa3WLznqYBQdAIaMqI
	zYFbuLDsuo+T+/L+/fUjlb3tSGQZjd556Cz3aP/Zi+e9bJC1yCxg5Au/SWbOcwgCJevB
	YquDVuPEVBrMhq+foX/BVYL+t8937n8aoACcUBbV+hIrvA1ZW6Rv3kN5O7EgXGEAmBfC
	uPzMET7wZKrFws+bCL6+9T1nUANBnbEGaOCduBihnZ11tEkAjZUkViVi4O5Q3AZKxzUM
	seWOx9A9EEs4z3LtnEsJ0KWiH5/CmEYw8JUipjnaGqanWwS/uFJhDhKYE1HhR50QaMLX
	bU2w==
MIME-Version: 1.0
Received: by 10.220.152.67 with SMTP id f3mr15698059vcw.19.1345611298750; Tue,
	21 Aug 2012 21:54:58 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Tue, 21 Aug 2012 21:54:58 -0700 (PDT)
In-Reply-To: <877gsrtu0z.fsf@windlord.stanford.edu>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
Date: Wed, 22 Aug 2012 00:54:58 -0400
Message-ID: <CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Russ Allbery <rra@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 04:55:06 -0000

On Wed, Aug 22, 2012 at 12:44 AM, Russ Allbery <rra@stanford.edu> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
>
>> According to Pinksi at GCC, -fPIC can be used for both. Both -fPIC and
>> -fPIE produce a relocatable section. I know from experience readelf(1)
>> produces the same result (DYN).
>
>> When using -fPIE, the optimizer can begin optomizing sooner. Andrew
>> Pinski (GCC developer): "With PIE, global variables and functions are
>> considered to bind local while with PIC they are considered to bind
>> globally (aka override able)." [1]
>
>> Pinski specifically recommended -fPIC because of this situation
>> (inability to configure executables and shared objects separately when
>> using the GNU tool chain).
>
> Well, all that's fine and good, but then you passed those flags into GCC
> and they didn't, er, work.  :)  So reality seems to have come into
> conflict with the advice you got.
:)

> I know for certain that the Debian set of hardening flags, which use
> -fPIE, not -fPIC, for executables, work across a *very large* array of
> open source software (although we do have to omit -fPIE from the default
> set since -fPIE breaks some software), and I believe that other
> distributions do the same.  I won't venture to express an opinion on the
> relative merits of -fPIC versus -fPIE, particularly to compiler experts,
> but in my humble opinion you should prefer flags that actually function.
:)

I think the solution is to update Make so that there are separate
LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...

I just wish everyone would get in line so things function as expected
from cradle to grave. There's too much "it's not my fault." It reminds
me of the old Macs.

Jeff


From MAILER-DAEMON Wed Aug 22 01:10:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T43D0-0005rC-3E
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 01:10:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32844)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T43Cu-0005r3-Bt
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:10:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T43Cq-0002jp-0N
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:10:20 -0400
Received: from smtp1.stanford.edu ([171.67.219.81]:49860
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T43Cp-0002gK-QY
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:10:15 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id B016B12D8DA;
	Tue, 21 Aug 2012 22:10:14 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id 23D9012D8CE;
	Tue, 21 Aug 2012 22:10:14 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id 0A59B2F45E; Tue, 21 Aug 2012 22:10:13 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	(Jeffrey Walton's message of "Wed, 22 Aug 2012 00:54:58 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Tue, 21 Aug 2012 22:10:13 -0700
Message-ID: <871uiztsui.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.81
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 05:10:24 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> I think the solution is to update Make so that there are separate
> LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...

Yeah, I understand both the reason why the idea was rejected and the
reason why it's appealing.

Autoconf isn't the place to look for new flags to pass only to shared
library links (which I think would be the right way to go about that), but
the Automake folks might be interested in talking that over.  I've run
into a few places where I'd like to do that as well (for example,
-Wl,-Bsymbolic).

Currently, the way this works in the Automake world is that the shared
library builds are done via Libtool, which adds the appropriate additional
flags for shared libraries on the local platform.  This generally works
quite well, but so far as I know there isn't a good way to do that
globally across the project.  You can set individual flags for specific
libraries with the _LDFLAGS setting in Automake, but that's for the
developer (since it requires modifying Makefile.am), not for the person
doing the compile.

This would be something that would need to be added to Automake, at least
as I understand it.

In any event, I don't think passing -Wl,-shared into a configure script is
ever going to make sense unless I'm missing some subtlety.  That flag is
specifically for creating shared libraries, and if the package is already
building a shared library, it's (necessarily) already going to add that
flag in exactly the places where it's appropriate.

Note that it is safe to pass -fPIE globally via CFLAGS even if shared
libraries (which must use -fPIC instead of -fPIE) are in play provided
Libtool is in use, since Libtool is smart enough to not pass -fPIE into
shared library builds.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 01:17:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T43Jz-0006Ko-W7
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 01:17:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60201)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T43Jv-0006Ki-EH
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:17:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T43Ju-0004bk-I2
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:17:35 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:59040)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T43Ju-0004bd-7l
	for autoconf@gnu.org; Wed, 22 Aug 2012 01:17:34 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id DA9F2525895;
	Wed, 22 Aug 2012 14:17:31 +0900 (JST)
Received: from [133.41.203.227] (203-227.cup.hiroshima-u.ac.jp
	[133.41.203.227]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id C2A2F525876;
	Wed, 22 Aug 2012 14:17:31 +0900 (JST)
Message-ID: <50346B6B.4090401@hiroshima-u.ac.jp>
Date: Wed, 22 Aug 2012 14:17:31 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot
	produce	executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>	<50343D0A.8030802@hiroshima-u.ac.jp>	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>	<87ipcbtv5s.fsf@windlord.stanford.edu>	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
In-Reply-To: <CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19130.004
X-TM-AS-Result: No--11.850-10.0-31-10
X-imss-scan-details: No--11.850-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: vMI3egdXDQ1ITndh1lLRAZpaQZrxtVBsWyQijpt1UQkNcckEPxfz2IP+
	YDa/Dhu9BRSMenHhs0a9TNBKEyzNUbsl8Gv1eXkKfuyIS1Zjfrs6En2bnefhoCcVycCgCnmvCpB
	BAsyHrqc2zL0+m0e9N3VUSbHuxOT/Ymoi4eoUtiidtRmRhPNchuNlVbqPGsKiGoXIaM/vL8LLZq
	GSZOjpof1ALR2pad+hucTaKO3I778KQjtweN2DTs/8zK5WVP8LoPPe4M9v8m5QSFbL1bvQASAHA
	opEd76vXTg2fIQowiuaHMHsAEel8F7lwiLe8+Aa7EXrYflMvcSPgPjBLwf8pA==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 05:17:39 -0000

Jeffrey Walton wrote:
> I just wish everyone would get in line so things function as expected
> from cradle to grave. There's too much "it's not my fault." It reminds
> me of the old Macs.

It's a pity that you got so many "it's not my fault", but what I can
say is only "please describe what you want to do in detail, and please
ask the experts where you can consult for the solution".

> I think the solution is to update Make so that there are separate
> LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...

I don't understand what you mean with the word "update Make" (I'm not
playing dumb, I'm really wondering what you did). And, I wonder who
told you to use LD_EXE_FLAGS and LD_SO_FLAGS (because they are not
managed by autotools, I guess).

Regards,
mpsuzuki


From MAILER-DAEMON Wed Aug 22 13:47:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4F1o-0002Lp-54
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 13:47:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34907)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4F1k-0002Kz-FR
	for autoconf@gnu.org; Wed, 22 Aug 2012 13:47:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4F1f-0003qk-4t
	for autoconf@gnu.org; Wed, 22 Aug 2012 13:47:36 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:46446)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4F1e-0003qf-VA
	for autoconf@gnu.org; Wed, 22 Aug 2012 13:47:31 -0400
Received: by vbkv13 with SMTP id v13so1547171vbk.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 10:47:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=TXywgzGJh6CyBJ5ODYEA86ZHT9Lx71dl6kfShzpj49o=;
	b=cGGIcWPFEz/iXpsxXTwb/CxquKgbHwmyTMFsdaksAAfuIINTLyjpOstc4hNtteNYXc
	F23fpI6GHJHs+/P5x4c/mi5CCtIZjwznGt8WATl/kF4xu4Z6UsxK15JBEE1cjnNB7AB7
	7fwwzDVXBS6ujJWvwX5RGR0/kfEL6D3DNjfUgh583KUgTLuaEKmbxmhPH90Fg0koIUYH
	npCEcRmbz1nvPcm+rKRsOWbyazos02zS7qYpiNA2uytsHQ6AtMIlHFtGOhw7e3hGnY9O
	k2X+u+1Rz/PDWiv5jzxcdfoP7xf+t2QPZH4SS9FLUDXKwAqShPCrXCKrrahmbkxpc8kz
	drIA==
MIME-Version: 1.0
Received: by 10.220.116.6 with SMTP id k6mr17479013vcq.59.1345657650316; Wed,
	22 Aug 2012 10:47:30 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 10:47:30 -0700 (PDT)
In-Reply-To: <50346B6B.4090401@hiroshima-u.ac.jp>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
Date: Wed, 22 Aug 2012 13:47:30 -0400
Message-ID: <CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 17:47:38 -0000

Hi Suzuki,

Keep in mind I am a library user (so I run configure/make/make
install); not a library developer; and not a Autoconf/Automake/Make
expert.

On Wed, Aug 22, 2012 at 1:17 AM, suzuki toshiya
<mpsuzuki@hiroshima-u.ac.jp> wrote:
> Jeffrey Walton wrote:
>> I just wish everyone would get in line so things function as expected
>> from cradle to grave. There's too much "it's not my fault." It reminds
>> me of the old Macs.
>
> It's a pity that you got so many "it's not my fault", but what I can
> say is only "please describe what you want to do in detail, and please
> ask the experts where you can consult for the solution".

Here's the example I am working with: SIP Witch
(https://www.gnu.org/software/sipwitch/). It creates one or more LIBS,
and one or more EXES. You will experience it with any GNU library if
it supplies a test program. In that case, you will likely build (1)
static lib, (2) dynamic lib (shared object), and (3) test harness
(executable).

>From INSTALL: "The simplest way to compile this package is:  1. `cd'
to the directory containing the package's source code and
type`./configure' to configure the package for your system.... "

Now I know from experience developers don't use secure settings, so I
know I have to supply hardened settings with `configure` via
CFLAGS/CPPFLAGS/LDFLAGS, etc. I want to do it with configure because:
(1) it should be "one stop shopping", and (2) I don't know how to
modify Automake/Autoconf files.

Here are the flags I am interested in. Again, the developers generally
don't supply them ("it compiles, so ship it!"). I'm interested in
warnings too because I need to see dumb, CompSci 101 mistakes such as
ignoring return values, truncation problems, and conversion problems.
When I find them, I need to fix them because developers don't care
about these things ("it compiles, so ship it!")

EXECUTABLE:
-Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=2
-Wformat-security -fstack-protector-all -Wstrict-overflow
-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

SHARED OBJECT:
-Wall -Wextra -Wconversion -fPIC -shared -Wno-unused-parameter
-Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

The difference between EXE's and SO's is -fPIE -pie (ASLR) and -fPIC
-shared. By definition, shared objects are relocatable (some hand
waiving), so I need to be sure the EXEs are compiled correctly. ASLR
comes into play when the dynamic linker answers the question: "where
is the library relocated when loaded into memory"?

Unfortunately, we cannot differentiate between compilation of an EXE
or SO, so we can't pass different flags (i.e., either  -fPIE -pie or
-fPIC -shared).

>> I think the solution is to update Make so that there are separate
>> LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...
>
> I don't understand what you mean with the word "update Make" (I'm not
> playing dumb, I'm really wondering what you did). And, I wonder who
> told you to use LD_EXE_FLAGS and LD_SO_FLAGS (because they are not
> managed by autotools, I guess).
I asked this question some time ago on GNU Make.

Make only offers LDFLAGS. When software architectures changed (i.e.,
shared objects were introduced), Make did not evolve. Hence the reason
we are pigeon hole'd here. If Make would have evolved with software
architectures, then we would have something like LD_EXE_FLAGS and
LD_SO_FLAGS (and this would not be a problem).

Jeff


From MAILER-DAEMON Wed Aug 22 14:17:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4FV5-0007dI-VK
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 14:17:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35803)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4FUy-0007cc-58
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:17:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4FUs-0004ca-7q
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:17:48 -0400
Received: from smtp2.stanford.edu ([171.67.219.82]:47650
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4FUs-0004cW-1r
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:17:42 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 9FC00628B68;
	Wed, 22 Aug 2012 11:17:40 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id 2DF4362900B;
	Wed, 22 Aug 2012 11:17:40 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id 1483B2F45E; Wed, 22 Aug 2012 11:17:39 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	(Jeffrey Walton's message of "Wed, 22 Aug 2012 13:47:30 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Wed, 22 Aug 2012 11:17:39 -0700
Message-ID: <871uiy94fw.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.82
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 18:17:55 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> Here are the flags I am interested in. Again, the developers generally
> don't supply them ("it compiles, so ship it!"). I'm interested in
> warnings too because I need to see dumb, CompSci 101 mistakes such as
> ignoring return values, truncation problems, and conversion problems.
> When I find them, I need to fix them because developers don't care about
> these things ("it compiles, so ship it!")

> EXECUTABLE:
> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=2
> -Wformat-security -fstack-protector-all -Wstrict-overflow
> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

> SHARED OBJECT:
> -Wall -Wextra -Wconversion -fPIC -shared -Wno-unused-parameter
> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now

*If* the package uses libtool, which I realize is a big if, just pass
-fPIE in CFLAGS and don't worry about the difference.  Libtool is already
adding -fPIC -shared when building the shared objects, and is smart enough
to drop -fPIE from the shared objects as pointless.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 14:58:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4G8Z-0006w1-0O
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 14:58:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55931)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4G8U-0006u8-M3
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:58:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4G8T-0008TG-Ar
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:58:38 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:55166)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4G8T-0008T8-6K
	for autoconf@gnu.org; Wed, 22 Aug 2012 14:58:37 -0400
Received: by vbkv13 with SMTP id v13so1640596vbk.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 11:58:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=iwGsnTJN2maPHSE0hB7VGk6R0kXN6mMVofcT5T/xdJE=;
	b=LReGl0YBDduO2HrOQatlrX7MQVYQ/SDqHNXF/Z/DGaaqWVPiOO4ET5G2x1aXMBLg2s
	pLoc3bHbz0/pe1ra5eRFQnyc/lpTz2MIIiHuplgef7a/yWwV4NIM5s7ClNqmIkwMRsKn
	7Dg9rk0/qKlWsq+uPzu2DxYzmEkUVtOcXXuRn8RDRYEgVqvInZOBCgG8ksq1v00pBcW2
	yoU/JxEMJQUo7YAMfkrEWdrgFtvwGewvyKjwWT86KFd9N3dbsm+h9rCVCnoNGYz6U3k9
	k2qvfpcTmm+atM+jtaKWjfDX9vPmJxhLBDmM56xaA81KfOkFeAdrnHu49quiZUxlurvy
	c3rA==
MIME-Version: 1.0
Received: by 10.58.31.228 with SMTP id d4mr19201474vei.40.1345661916581; Wed,
	22 Aug 2012 11:58:36 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 11:58:36 -0700 (PDT)
In-Reply-To: <871uiy94fw.fsf@windlord.stanford.edu>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
Date: Wed, 22 Aug 2012 14:58:36 -0400
Message-ID: <CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Russ Allbery <rra@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 18:58:41 -0000

On Wed, Aug 22, 2012 at 2:17 PM, Russ Allbery <rra@stanford.edu> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
>
>> Here are the flags I am interested in. Again, the developers generally
>> don't supply them ("it compiles, so ship it!"). I'm interested in
>> warnings too because I need to see dumb, CompSci 101 mistakes such as
>> ignoring return values, truncation problems, and conversion problems.
>> When I find them, I need to fix them because developers don't care about
>> these things ("it compiles, so ship it!")
>
>> EXECUTABLE:
>> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=2
>> -Wformat-security -fstack-protector-all -Wstrict-overflow
>> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
>
>> SHARED OBJECT:
>> -Wall -Wextra -Wconversion -fPIC -shared -Wno-unused-parameter
>> -Wformat=2 -Wformat-security -fstack-protector-all -Wstrict-overflow
>> -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
>
> *If* the package uses libtool, which I realize is a big if, just pass
> -fPIE in CFLAGS and don't worry about the difference.  Libtool is already
> adding -fPIC -shared when building the shared objects, and is smart enough
> to drop -fPIE from the shared objects as pointless.
Thanks Russ. No joy.

Did I mention I tried to do an end around, and add platform hardening
after the fact ("Add compiler and linker hardening after the fact,"
http://sourceware.org/ml/binutils/2012-03/msg00309.html)? No joy
there, either.

No wonder GNU programmers don't use any security features....

Jeff

$ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIE
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-pie -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/jeffrey/Desktop/ucommon-5.5.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

*****

configure:2957: checking whether the C compiler works
configure:2979: gcc -Wall -Wextra -Wconversion -fPIE
-Wno-unused-parameter -Wformat=2 -Wformat-security
-fstack-protector-all -Wstrict-overflow -Wl,-pie -Wl,-z,noexecstack
-Wl,-z,relro -Wl,-z,now   conftest.c  >&5
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o:
could not read symbols: Bad value
collect2: ld returned 1 exit status
configure:2983: $? = 1
configure:3021: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3026: error: in `/home/jeffrey/Desktop/ucommon-5.5.0':
configure:3028: error: C compiler cannot create executables
See `config.log' for more details


From MAILER-DAEMON Wed Aug 22 15:01:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4GB2-0007K3-AH
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:01:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48755)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T4GAu-0007JE-NC
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:01:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T4GAo-00018C-U3
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:01:08 -0400
Received: from blade.simplesystems.org ([65.66.246.74]:59819)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bfriesen@simple.dallas.tx.us>) id 1T4GAo-0000ye-M6
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:01:02 -0400
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q7MJ0s5B011342; Wed, 22 Aug 2012 14:00:54 -0500 (CDT)
Date: Wed, 22 Aug 2012 14:00:54 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@scooby.simplesystems.org
To: Jeffrey Walton <noloader@gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
Message-ID: <alpine.DEB.2.02.1208221359260.26630@scooby.simplesystems.org>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
User-Agent: Alpine 2.02 (DEB 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Wed, 22 Aug 2012 14:00:54 -0500 (CDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 65.66.246.74
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:01:14 -0000

On Wed, 22 Aug 2012, Jeffrey Walton wrote:
>
> No wonder GNU programmers don't use any security features....

GNU programmers don't need to use any security features since they 
write code which does not contain any bugs.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


From MAILER-DAEMON Wed Aug 22 15:06:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4GFv-0008Q0-24
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:06:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37062)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GFo-0008PH-4l
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:06:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GFi-0002fb-Aq
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:06:12 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:55595)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GFi-0002f7-5A
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:06:06 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 945FF33DF19;
	Wed, 22 Aug 2012 19:06:04 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org,
 noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
Date: Wed, 22 Aug 2012 15:06:04 -0400
User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; )
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
In-Reply-To: <CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart3854922.13fIbk9Vam";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201208221506.05372.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:06:17 -0000

--nextPart3854922.13fIbk9Vam
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Wednesday 22 August 2012 13:47:30 Jeffrey Walton wrote:
> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=3D2

read the log you actually posted.  you aren't using -pie (which would be=20
correct), you're using -Wl,-pie (which is wrong).
=2Dmike

--nextPart3854922.13fIbk9Vam
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJQNS2dAAoJEEFjO5/oN/WBr8EQAM3k6ytdeV6UaNzgGSx9DOM0
aLPHnSI2lwyKvQ/8rYdtXzBx1X7gYhrZA1qxf3gxjhbbGsO0D/gs/ADJcAvhH+h9
udzdlZ4J036KzJHDg26MGyL5DOm3VSLQrRCh3FJlFE2Cs/EGEUrwdvk7IdWLxi3y
gbdWIBd6lqkvpWzeNt7cpCbX/dt9HzRfvpJQx1m0M/lKPjztV+zbZp304l4R5/VD
nPkZCgHxtIpGn5b+8sh8yi+GzJlOd3UKap98+vLoWSPRZLSBfuy81ot5E/CY3iQJ
6/EHiIUBUhEUrb8Lr8hw+tJKf5nTuMdjlMNhCelbUrVawDoHcuhpCd24N3ahNcDY
pBpxFdkZ0P+B96lDI+r6pm0RCwCmXvOUK/HtVvqhnQR2PZqigQ/W2zbh4oy/0LOR
SkPnPVCjx9Qy58bE0VZ3fNdr1208d7Vs4Gn2CTK+541PErEL9EVTktZL15lyGa2w
nrOMIFzx5FbWwfJZKbWNjhxBslGpKb/NR40G4vQUaGL+go0YvMPvPYVokelmztcc
NAjajUdjN9ow1kesWo9MjxBKT5RfNy7hY2IeSlvWNbvcAziY5rnLGjct1N2uoSSq
0VJfUE/ZjZQs0H4Y0/LkrULhnfbSFNbslKenSLGVwCA8mfNLd7y41xP5jXybV27f
r/XiWPNK9cvC32AZ+Bs9
=2lLi
-----END PGP SIGNATURE-----

--nextPart3854922.13fIbk9Vam--


From MAILER-DAEMON Wed Aug 22 15:08:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4GIV-0000Ps-Ku
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:08:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37554)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GIT-0000Pe-Pd
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:08:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GIM-0003IU-QU
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:08:57 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:40673)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GIM-0003IO-KQ
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:08:50 -0400
Received: by vbkv13 with SMTP id v13so1653535vbk.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 12:08:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=Zu49EGYK+1pVxn/VNiDfRosHiTdlMKOvtXguIqQfjAc=;
	b=I8DrzuDZnr3sR50bgQfSsuJGTa9Uq102Xah9VD9Wk6Yajzrwx85MF0lyddfDdOvQDZ
	WXxd3n5ms/aq5vP/pKm34KTsm5V9YD4A9XH2Ifg7tb39zO0hhus5cBG+88aJ5eWBgUA8
	l3hWhzHFpSW/uWvmWno4XbpC3ALHUZavmnFXCfkoM5GE6adSOqgBvdn5xzduO1KDYvBw
	AG2jnqjR+i3iYA6DsrHN352bejDVX4JV8Zlpq3zNZqWydn2oFgV0iSnB4qKGTbGnZAPi
	iif/jvTBy28Cus3Blz1TnYngqjXQLrqt5rwB3jlVUVtVt+L8gesvTkXYqGE5EInlxB99
	IHZg==
MIME-Version: 1.0
Received: by 10.58.31.228 with SMTP id d4mr19235578vei.40.1345662530299; Wed,
	22 Aug 2012 12:08:50 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 12:08:50 -0700 (PDT)
In-Reply-To: <alpine.DEB.2.02.1208221359260.26630@scooby.simplesystems.org>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<alpine.DEB.2.02.1208221359260.26630@scooby.simplesystems.org>
Date: Wed, 22 Aug 2012 15:08:50 -0400
Message-ID: <CAH8yC8nT8So6o0_BO3ER35OB3mVkZHoiaom5MNJ6p+2O5f-jSg@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:08:58 -0000

On Wed, Aug 22, 2012 at 3:00 PM, Bob Friesenhahn
<bfriesen@simple.dallas.tx.us> wrote:
> On Wed, 22 Aug 2012, Jeffrey Walton wrote:
>>
>>
>> No wonder GNU programmers don't use any security features....
>
>
> GNU programmers don't need to use any security features since they write
> code which does not contain any bugs.
:)


From MAILER-DAEMON Wed Aug 22 15:15:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4GOW-0002Sh-IN
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:15:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50849)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GOU-0002Qz-1S
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:15:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GOS-0005V4-Iv
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:15:09 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:42091)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4GOS-0005U7-Do
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:15:08 -0400
Received: by vcbfl10 with SMTP id fl10so1659301vcb.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 12:15:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=9pAraDFkb1RCWcA5Mon1JCNCxETzreDyd0NEStZ6Y8E=;
	b=S/Yfzivr8qqNu8c9r7vH4F5a09ouloSLW5N/pMLMhy8a2vZwzdiTgH4oAf7WdYZuGv
	SaK+HxSSLelgIsNvf5DI6NjoBvOah8mf+zK15f7N7CbASrs+Rydn7L5Nf2nj/4JoZU9N
	ZVajowCZsQ8USgqBw1DyGLKu+TdBmuCTce97KtvFc4qOrfc/+g+DqC7MLp1MKtUvJuoc
	rr2mUnUWDQ1AR2hZNFTHwt8BjYJeL235AKU35Az9eBiXCZwVC/KAJ0LhBl7dywRZyXVG
	tjSH8swl27qYgLw7cuC7uCkynVDjIG6k6m0xEkB5wYs74PH3x2Kv/7Pw7S6kJxh5tgQk
	qt9A==
MIME-Version: 1.0
Received: by 10.52.72.229 with SMTP id g5mr15204331vdv.26.1345662907850; Wed,
	22 Aug 2012 12:15:07 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 12:15:07 -0700 (PDT)
In-Reply-To: <201208221506.05372.vapier@gentoo.org>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<201208221506.05372.vapier@gentoo.org>
Date: Wed, 22 Aug 2012 15:15:07 -0400
Message-ID: <CAH8yC8kg=8Z-NjdnPXhSHTDOFroo=99q1DURwoY4wndtDL3KcA@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:15:11 -0000

Hi Mike,

On Wed, Aug 22, 2012 at 3:06 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Wednesday 22 August 2012 13:47:30 Jeffrey Walton wrote:
>> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=2
>
> read the log you actually posted.  you aren't using -pie (which would be
> correct), you're using -Wl,-pie (which is wrong).
Believe it or not, you need both -fPIE and -pie. The linker consumes
the -pie switch. The -Wl just passes the switch through the compiler
drive to the linker.

If you omit -pie, `readelf -l xxx.exe | grep -i "Type"` will return
the file type is an EXE (without ASLR); and not DYN (with ASLR).

Jeff


From MAILER-DAEMON Wed Aug 22 15:21:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4GUY-0004VP-5r
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:21:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35840)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GUV-0004Uz-Jj
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:21:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GUQ-0008Bh-Qc
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:21:23 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:56805)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4GUQ-0008At-Kb
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:21:18 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id CBEB933DF71;
	Wed, 22 Aug 2012 19:21:17 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
Date: Wed, 22 Aug 2012 15:21:17 -0400
User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; )
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<201208221506.05372.vapier@gentoo.org>
	<CAH8yC8kg=8Z-NjdnPXhSHTDOFroo=99q1DURwoY4wndtDL3KcA@mail.gmail.com>
In-Reply-To: <CAH8yC8kg=8Z-NjdnPXhSHTDOFroo=99q1DURwoY4wndtDL3KcA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2701731.u4nK3flpmv";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201208221521.18929.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: autoconf@gnu.org, suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:21:25 -0000

--nextPart2701731.u4nK3flpmv
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

On Wednesday 22 August 2012 15:15:07 Jeffrey Walton wrote:
> On Wed, Aug 22, 2012 at 3:06 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Wednesday 22 August 2012 13:47:30 Jeffrey Walton wrote:
> >> -Wall -Wextra -Wconversion -fPIE -pie -Wno-unused-parameter -Wformat=
=3D2
> >=20
> > read the log you actually posted.  you aren't using -pie (which would be
> > correct), you're using -Wl,-pie (which is wrong).
>=20
> Believe it or not, you need both -fPIE and -pie. The linker consumes
> the -pie switch. The -Wl just passes the switch through the compiler
> drive to the linker.

believe it or not, i understand how PIE works.  i think you missed my point=
=20
that your latest config.log is using wrong flags and it has nothing to do w=
ith=20
autotools -- you cannot link with -pie only as the compiler driver must see=
 it=20
in order to adjust the startup files used.
=2Dmike

--nextPart2701731.u4nK3flpmv
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJQNTEuAAoJEEFjO5/oN/WB6P4P/A+WZ3VMg0xQybfbMOZCBAcb
CUL7MY9O/dVnlm5ymAZSHNSeOrbXiCUocxJdKINSxN2tXRoQAWlo2q7BsEeHG9oO
Tw33yhYeh6cwP3ftroStGTkvCjUypWK/l3Z5JQv4xekua/ezyacO7rg9/CoswnJy
uNQDC0RHNi35vKcHlVD+YEy7j32yS65OYhXb6JXHMom+LTlz4b2G7coW9qPyJfca
kKZnFE29cj98HuA6r1BTUAHNWlUxVeVU/Q/R/4fTGMrM4yq7k00nc8GgmB++rlk9
uHuFMVuBEasYPlcnhP4waz/6HMAaZjgcInrhrCyiJoykYzKJhSzADMKWuamjnRWp
lN65x6BTCp0cP+zpVZQOoy8ONRVBAolZEAxe/tbrOFRAZA87SCFCDd3ks+Qm4e/n
HJthSoCFSHv7f+kB3AutSobhwa6O2MuEWjZ1v6hMnNmBz8pH3WDI/xNPF4Mginp1
f+vLXPy4K4UZIMDnVdkZmn40WJklqLPdCHyGc1e+K8WUpHu8xEVQ2lQOa244EEs3
+If8lYUWY9qZnTaZpw4hb7sezqOgG/AlzzfImuFKAyrjE3xA3c6uy4qsQDgM0s0X
VJH4T2JoO2nSR2ybWeXGpgyTjo4PMYLoEAfcKMDn+qjNZAS6T9EiJaIrSnYO+LXD
Vx4jr+lc1MygMWcWQglH
=tsJj
-----END PGP SIGNATURE-----

--nextPart2701731.u4nK3flpmv--


From MAILER-DAEMON Wed Aug 22 15:36:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Gip-0000sB-7x
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 15:36:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60830)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4Gim-0000py-Fz
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:36:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4Gil-0005Xq-66
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:36:08 -0400
Received: from smtp2.stanford.edu ([171.67.219.82]:37528
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4Gil-0005XW-0I
	for autoconf@gnu.org; Wed, 22 Aug 2012 15:36:07 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 02EFA628C91;
	Wed, 22 Aug 2012 12:36:06 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id A4BB8628AFA;
	Wed, 22 Aug 2012 12:36:05 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id 8DF752F45E; Wed, 22 Aug 2012 12:36:05 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	(Jeffrey Walton's message of "Wed, 22 Aug 2012 14:58:36 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Wed, 22 Aug 2012 12:36:05 -0700
Message-ID: <87boi27m8q.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.82
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 19:36:10 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> $ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIE
> -Wno-unused-parameter -Wformat=2 -Wformat-security
> -fstack-protector-all -Wstrict-overflow -Wl,-pie -Wl,-z,noexecstack
> -Wl,-z,relro -Wl,-z,now"

The thing that jumps out at me as different between what Debian uses for
its normal hardening flags and what you're using is the -Wl,-pie flag in
CFLAGS.  Debian just uses -fPIE in CFLAGS and then adds -fPIE -pie to
LDFLAGS.  I'm not sure if that would make a difference.

You in general want to avoid ever using -Wl if you can help it, since
you're hiding the flag from the compiler by using that.  If the compiler
needed to know that you were linking that way so that it could do other
magic itself, you break that support by using -Wl.

Here's what Debian is using:

CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
CPPFLAGS=-D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
FFLAGS=-g -O2
LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now

Also, you should generally not add -Wall -Wextra to the configure flags,
and instead add it after configure completes, since many of the tricks
configure has to use will result in warnings when you turn on all the
compiler warnings, which can confuse configure.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 18:17:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4JFD-0008NF-J9
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 18:17:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41658)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JF5-0008N6-Qf
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:17:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JF4-0000ir-Jx
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:17:39 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:46705)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JF4-0000im-FW
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:17:38 -0400
Received: by vcbfl10 with SMTP id fl10so139649vcb.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 15:17:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=StvgV1Ram6edLbow4pwcUdGorY0fugOLWlFCXuqS3y8=;
	b=WWU3046K9uNa3gUCWjmAEhMckOuVL/pyyjpz4O1t/jOPwj2Z/nY7woyH1S5c9HYHPJ
	AUMo6W2IwmiZtUn48mfIfri2gLRcNcIUc7nrEGuQ0SzZuOuWNXro3MSbHeHxD4HZpxfJ
	lwvQygOFd4LABTb+lcXe9wZ3iFFU/E7BtG813n0wfUAN+Pvy9LfmaY1wT2MkULslim0U
	EHei6ScwkQOYJaAx/l5NcfyN6FRRgH7t7oVPPUZ9l7mh7SIROv+sFcrGR6iIlh5ASspt
	BiLcSdBQFBG93tpyILm1W0zdSfU3OVYljMCcKF60JPzA2WCy5rHTNKwqYogYBO1haIcN
	lG6w==
MIME-Version: 1.0
Received: by 10.58.85.2 with SMTP id d2mr19694263vez.33.1345673857724; Wed, 22
	Aug 2012 15:17:37 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 15:17:37 -0700 (PDT)
In-Reply-To: <87boi27m8q.fsf@windlord.stanford.edu>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
Date: Wed, 22 Aug 2012 18:17:37 -0400
Message-ID: <CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Russ Allbery <rra@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 22:17:45 -0000

On Wed, Aug 22, 2012 at 3:36 PM, Russ Allbery <rra@stanford.edu> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
>
>> $ ./configure CFLAGS="-Wall -Wextra -Wconversion -fPIE
>> -Wno-unused-parameter -Wformat=2 -Wformat-security
>> -fstack-protector-all -Wstrict-overflow -Wl,-pie -Wl,-z,noexecstack
>> -Wl,-z,relro -Wl,-z,now"
>
> The thing that jumps out at me as different between what Debian uses for
> its normal hardening flags and what you're using is the -Wl,-pie flag in
> CFLAGS.  Debian just uses -fPIE in CFLAGS and then adds -fPIE -pie to
> LDFLAGS.  I'm not sure if that would make a difference.
Yea, I usually use -fPIE -pie (or -fPIC -pic),  but I was having so
much trouble I tried passing -pie directly to the linker.

> You in general want to avoid ever using -Wl if you can help it, since
> you're hiding the flag from the compiler by using that.  If the compiler
> needed to know that you were linking that way so that it could do other
> magic itself, you break that support by using -Wl.
I've never really thought of it that way - it was more like :I'm
talking to the linker." Good point, taken.

> Here's what Debian is using:
>
> CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
> CPPFLAGS=-D_FORTIFY_SOURCE=2
> CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
> FFLAGS=-g -O2
> LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now
Debian does a good job. I think there is room for improvement (such as
DEP and ASLR), and hope the maintainers stiffen their security posture
in the future. The idea: make it secure out of the box, and let those
who want to shot themselves in the foot do so. For example, apply
-z,noexecstack out of the box, and let folks turn it off with
-z,execstack.

The posture would have saved a number of folks from, for example,
Pidgin's latest rounds of Critical Vulnerabilities (memory corruption
and code execution). No-exec stacks and heaps would have reduced
many/most to an annoying UI problem (a call to abort()).

> Also, you should generally not add -Wall -Wextra to the configure flags,
> and instead add it after configure completes, since many of the tricks
> configure has to use will result in warnings when you turn on all the
> compiler warnings, which can confuse configure.
This was a very good point and I had to think about it for a while.

Are there Autoconf variable for this? For example, rather than:
  ./configure "CFLAGS=..." "CXXFLAGS=..."

could we instead use Autoconf defined stuff:
  ./configure "ac_warnings=-Wall -Wextra -Wconversion" \
    "ac_cflags=-fstack-protector-all..." \
    ac_so_flags=... ac_exe_flags=...

Autoconf could use ac_cflags as it being used now(?) and save
ac_warnings for later use (by Automake?) when real source files are
compiled.

Jeff


From MAILER-DAEMON Wed Aug 22 18:29:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4JQ5-0000ck-UN
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 18:29:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42421)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4JQ3-0000ce-DZ
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:29:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4JPz-0003iV-C8
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:28:59 -0400
Received: from smtp2.stanford.edu ([171.67.219.82]:56239
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4JPz-0003i2-6J
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:28:55 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 1775F6291B1;
	Wed, 22 Aug 2012 15:28:53 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id D9D626291A6;
	Wed, 22 Aug 2012 15:28:52 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id ACF6A2F45E; Wed, 22 Aug 2012 15:28:52 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
In-Reply-To: <CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
	(Jeffrey Walton's message of "Wed, 22 Aug 2012 18:17:37 -0400")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Wed, 22 Aug 2012 15:28:52 -0700
Message-ID: <87ipca36jf.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.82
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 22:29:00 -0000

Jeffrey Walton <noloader@gmail.com> writes:

> Debian does a good job. I think there is room for improvement (such as
> DEP and ASLR), and hope the maintainers stiffen their security posture
> in the future. The idea: make it secure out of the box, and let those
> who want to shot themselves in the foot do so. For example, apply
> -z,noexecstack out of the box, and let folks turn it off with
> -z,execstack.

Right.  Debian took a fairly conservative approach (in fact, pie and
bindnow are off by default, but can be easily turned on) because we were
trying to do something archive-wide without having to make a lot of
special exceptions.  Being able to turn of executable stack as at least
another easily-accessible option is an interesting idea, and I may raise
that on debian-devel.  (Although it can be a little hard to predict which
packages need that.  Hm, and I seem to recall that GCC does some stuff
with executable stack automatically.)

> This was a very good point and I had to think about it for a while.

> Are there Autoconf variable for this? For example, rather than:
>   ./configure "CFLAGS=..." "CXXFLAGS=..."

> could we instead use Autoconf defined stuff:
>   ./configure "ac_warnings=-Wall -Wextra -Wconversion" \
>     "ac_cflags=-fstack-protector-all..." \
>     ac_so_flags=... ac_exe_flags=...

There are not, at least so far as I know.

It's a little tricky to add the flags after the fact unless you override
all of CFLAGS at build time and provide the full set of hardening flags
again.  One of the standard tricks is to override CC instead, with
something like:

    make CC="gcc -Wall -Wextra"

> Autoconf could use ac_cflags as it being used now(?) and save
> ac_warnings for later use (by Automake?) when real source files are
> compiled.

It would be nice to have some additional support directly in standard
Autoconf macros for handling compiler warning flags, although I suspect
there is stuff in both the macro archive and in gnulib.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Wed Aug 22 18:30:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4JR3-0000pI-4y
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 18:30:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54589)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JR1-0000pB-GE
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:30:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JR0-0003rJ-Ga
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:29:59 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:51427)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4JR0-0003rF-AY
	for autoconf@gnu.org; Wed, 22 Aug 2012 18:29:58 -0400
Received: by vbkv13 with SMTP id v13so144484vbk.0
	for <autoconf@gnu.org>; Wed, 22 Aug 2012 15:29:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=j7GpZL6Mae5EYy5wJOWgcKOKaBZBxlcyniYiRj4Xf7A=;
	b=yDfsbA82JGuaYkw49C3oQaG9owJJqF0jtb65GJ5inJVXyDATJ5iDRaaIIQuj2L8ppu
	ILsr1UIJ2fBjwBvIZiLoS/GlWpI3UOWArJrpSbENKnXhdJ3p6aQ0WUJNnh43kJKAlXch
	jelO2G58Q1YQEy/fvfNy37zg6/yFmvtIbnF+i3j/dkK1xACyBYQNmD3qPQLDyG9QNNd0
	mMWJvIu3qY2ivm3iRvv9jKK3GNskQZO3Dmc9l/GiAJC6YSvOzdkZK+tafZa/n4x7K+cO
	Sh08BfgbJjJzn8G37apvQfkN5sG2ZPIHAidgzItVD2pUpAze9X7uAGuhwK4i/MChXmvD
	uhNA==
MIME-Version: 1.0
Received: by 10.58.211.71 with SMTP id na7mr19722626vec.39.1345674597753; Wed,
	22 Aug 2012 15:29:57 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Wed, 22 Aug 2012 15:29:57 -0700 (PDT)
In-Reply-To: <CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
Date: Wed, 22 Aug 2012 18:29:57 -0400
Message-ID: <CAH8yC8kYN+Kp-3V-DGnySnnfa3uD1Rvo72iVgF8zSCDA-WBO2A@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Russ Allbery <rra@stanford.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 22:30:00 -0000

On Wed, Aug 22, 2012 at 6:17 PM, Jeffrey Walton <noloader@gmail.com> wrote:
> On Wed, Aug 22, 2012 at 3:36 PM, Russ Allbery <rra@stanford.edu> wrote:
>> Jeffrey Walton <noloader@gmail.com> writes:
>>
>> Here's what Debian is using:
>>
>> CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
>> CPPFLAGS=-D_FORTIFY_SOURCE=2
>> CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
>> FFLAGS=-g -O2
>> LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now
> Debian does a good job. I think there is room for improvement (such as
> DEP and ASLR), and hope the maintainers stiffen their security posture
> in the future.
Forgot to mention.... I know some folks in DoD that have some really
interesting stack based attacks. They can take out an innocent looking
frame in an area different than the call site. Hence the reason to
consider -fstack-protector-all (make it as painful as possible on
them).

Jeff


From MAILER-DAEMON Wed Aug 22 19:21:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4KF2-0008P3-OW
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 19:21:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51822)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4KF1-0008Ox-4X
	for autoconf@gnu.org; Wed, 22 Aug 2012 19:21:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4KF0-0003JA-01
	for autoconf@gnu.org; Wed, 22 Aug 2012 19:21:38 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:46912)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4KEz-0003J6-QA
	for autoconf@gnu.org; Wed, 22 Aug 2012 19:21:37 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 22BBC33DEFF;
	Wed, 22 Aug 2012 23:21:36 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org,
 noloader@gmail.com
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
Date: Wed, 22 Aug 2012 19:21:35 -0400
User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; )
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
In-Reply-To: <CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1713803.y6ndT4sF6Y";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201208221921.37490.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Russ Allbery <rra@stanford.edu>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 23:21:40 -0000

--nextPart1713803.y6ndT4sF6Y
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Wednesday 22 August 2012 18:17:37 Jeffrey Walton wrote:
> The posture would have saved a number of folks from, for example,
> Pidgin's latest rounds of Critical Vulnerabilities (memory corruption
> and code execution). No-exec stacks and heaps would have reduced
> many/most to an annoying UI problem (a call to abort()).

bad example: pidgin doesn't require execstacks (i'm not sure it ever has), =
so=20
that would have made 0 difference.  no one does exec-heaps by default ... t=
he=20
code itself has to explicitly do this, and there's nothing the toolchain co=
uld=20
have done to stop that (not that pidgin enables exec on memory returned by=
=20
malloc afaik).  only a kernel patch (such as PaX) which explicitly denies=20
mprotect calls that try to enable exec & write bits simultaneously would ha=
ve=20
prevented this scenario proactively.

in fact, very little to no packages request an executable stack by default.=
 =20
binary-only packages tend to be the only ones nowadays that do, and that's=
=20
usually because the people producing the pkgs have broken code.
=2Dmike

--nextPart1713803.y6ndT4sF6Y
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJQNWmBAAoJEEFjO5/oN/WBFbIQAIov8X6nLU8SotepNKaPmbGl
d0zrMsXhexhX1/K50Jsp/ESRxuo257ay1EI1uupTuLjQ/aLAmzAm37aEDMaEW9Xi
L+xT3COH3G7213U10ZHm2DlFdYF9jb6ORocWU0M1AWUcvYPAMJzkfV6UNowIOMdv
gb3jZhRSTzINmEwVOgAmoZIuyPcWJ4HMKzOWlm3Dv7faFh+hncdAXR+Ab4GIZDDl
awifi+9slJVNT3LQe/R44tc3ue1xLg/pNgvYX8N+yv+PZepQCe7d5T8ASvFbE2YV
fDxVGntgc3fKL+PgBh6Sqh3h6czfxwDiG/8piLbTP1XKGlDN6bWopjBY8uTsUC8p
8a3Hbe350VEQY2odVkRXQru98pthZ7uUyfUAHegbMDXtoODjsgSUWkf3Vn518OHR
aS49EzpLXgGbfrHuiF2kNAeTyqIQKf4xUddi6EkPU/V5BuytxnvlxbKPr4wbfl0e
vkYUnh0ZIJDz10uKDtVeTIiEMIfnRwCB5bO145v6hoq+Y3oHgcz6sL1nFGB336uU
cF0cjdqhqJC0RfgvLZPUAnv7Oefhm4Ba24/+KDsUToukPch9+XiFFoEezCjZlOUa
QAE1MQ0JRjOiBS/uksDcuO1hnLTt4/MIlMu5k4K83eJ0bWaOAIMl0rPXeInk/3TE
hSHjyTqbUWf4AUZ9zu/P
=bvYM
-----END PGP SIGNATURE-----

--nextPart1713803.y6ndT4sF6Y--


From MAILER-DAEMON Wed Aug 22 21:41:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4MPw-0007nm-1y
	for mharc-autoconf@gnu.org; Wed, 22 Aug 2012 21:41:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50018)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4MPu-0007nS-8U
	for autoconf@gnu.org; Wed, 22 Aug 2012 21:41:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4MPs-0002Zq-32
	for autoconf@gnu.org; Wed, 22 Aug 2012 21:41:02 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:53109)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1T4MPr-0002Z1-T2
	for autoconf@gnu.org; Wed, 22 Aug 2012 21:41:00 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 10F9A33DF26;
	Thu, 23 Aug 2012 01:40:59 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: autoconf@gnu.org
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
Date: Wed, 22 Aug 2012 21:41:00 -0400
User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; )
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
	<87ipca36jf.fsf@windlord.stanford.edu>
In-Reply-To: <87ipca36jf.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1718082.uoKtySDO0G";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201208222141.01972.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: noloader@gmail.com, Russ Allbery <rra@stanford.edu>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 01:41:03 -0000

--nextPart1718082.uoKtySDO0G
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Wednesday 22 August 2012 18:28:52 Russ Allbery wrote:
> special exceptions.  Being able to turn of executable stack as at least
> another easily-accessible option is an interesting idea, and I may raise
> that on debian-devel.  (Although it can be a little hard to predict which
> packages need that.

it's trivial to locate:
	readelf -lW /bin/bash | grep GNU_STACK
if it's set as RWE, that's bad.  if the ELF lacks a GNU_STACK, that's bad.

or use scanelf to quickly find all ELFs on the system:
	scanelf /{,usr/}{,s}bin -qry -F '%e %F'

very few packages in Gentoo have these (69 out of ~15k), and almost all of=
=20
those are either binary-only packages or games.

> Hm, and I seem to recall that GCC does some stuff with executable stack
> automatically.)

yes, trampolines can trigger executable stacks, but usually that only happe=
ns=20
with nested functions, which is usually pretty easy to rewrite to avoid.  i=
=20
think i've seen maybe two packages where this came up (one of which was gru=
b).

> > Autoconf could use ac_cflags as it being used now(?) and save
> > ac_warnings for later use (by Automake?) when real source files are
> > compiled.
>=20
> It would be nice to have some additional support directly in standard
> Autoconf macros for handling compiler warning flags, although I suspect
> there is stuff in both the macro archive and in gnulib.

yes, the autoconf-archive has a bunch already written
=2Dmike

--nextPart1718082.uoKtySDO0G
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJQNYotAAoJEEFjO5/oN/WBEoIQAJYchwmHt+IYlpe80keUi6Il
k52L+lg/qjY0TD+hksIOeew7vpBJR6diP1lS6DYqoLORPmOrbflE1U/3TWbv5Ahi
+RR8TOeiydD0lYF6c6+NN8CL2prbCasFihIx68GGE6uJuCqEZXfyt/KtbKmpiyJx
76XqbjklpfuaMX1QVZfBb5Dc5syRt8ObF88ojh5P8oHgZoIQaa7F2xNZVnI9rh5B
BzVCCdG6MKvSRW4sXbc2XT34em08oGHSZ/tcZ7GP3dKKpWa7kWCnwsHOKVCVwPS1
21cOAh0ZNRM0lJNaDKQ4H9KEtgevXtUJHC0/fWirwyMhctxfCbNVbGc0v9Gn6Tg3
gcHJDVgsUCgsftOJSdvu/nnH1P0bnHCzb58RWq624zBoZb3zfo3HO52bEiEEflm8
E4/mCu8MKsfhmMW596UmiMwTJsSVUz1wfMvnLjK8x8pCRDZLuUOuzp/Cn+M9hV/c
OUp79AXmvJS4ldeK1pI50v/klNUt5qUR4REd8crGdUpJd5sphdutHwRBKNTVIREj
pC3abr/tZvN3oxw9+UUYZWlh9in8CSK4jL4zgnLTDLgBTb7sCvCHmuWVQWmMDDbe
7CFEheWB+5IVAd0gcETcqTe49kx2E/GGiPxkJmKpoF9SF1Q46UK4hokZw01SWhLD
VKBf2L/QW29/advjATxB
=qYnp
-----END PGP SIGNATURE-----

--nextPart1718082.uoKtySDO0G--


From MAILER-DAEMON Thu Aug 23 03:14:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Rcu-0005Nc-Oo
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 03:14:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50956)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1T4Rcs-0005NW-B3
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:14:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1T4Rcr-0007fP-Av
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:14:46 -0400
Received: from smtp12.dentaku.gol.com ([203.216.5.74]:49681)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>)
	id 1T4Rcr-0007fI-1S; Thu, 23 Aug 2012 03:14:45 -0400
Received: from 61.245.22.235.eo.eaccess.ne.jp ([61.245.22.235]
	helo=catnip.gol.com) by smtp12.dentaku.gol.com with esmtpa (Dentaku)
	(envelope-from <miles@gnu.org>)
	id 1T4Rco-0003OB-7s; Thu, 23 Aug 2012 16:14:42 +0900
Received: by catnip.gol.com (Postfix, from userid 1000)
	id 588E7DFD2; Thu, 23 Aug 2012 16:14:41 +0900 (JST)
From: Miles Bader <miles@gnu.org>
To: Russ Allbery <rra@stanford.edu>
Subject: Re: Problems Configuring (C Compiler cannot produce executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
System-Type: x86_64-unknown-linux-gnu
Date: Thu, 23 Aug 2012 16:14:41 +0900
In-Reply-To: <87boi27m8q.fsf@windlord.stanford.edu> (Russ Allbery's message of
	"Wed, 22 Aug 2012 12:36:05 -0700")
Message-ID: <87txvuuljy.fsf@catnip.gol.com>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: ClamAV GOL (outbound)
X-Abuse-Complaints: abuse@gol.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 203.216.5.74
Cc: noloader@gmail.com, autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 07:14:47 -0000

Russ Allbery <rra@stanford.edu> writes:
> Also, you should generally not add -Wall -Wextra to the configure flags,
> and instead add it after configure completes, since many of the tricks
> configure has to use will result in warnings when you turn on all the
> compiler warnings, which can confuse configure.

How can that confuse configure?

AFAICT, configure seems quite unconcerned with warnings during
configuration.

Thanks,

-miles

-- 
Is it true that nothing can be known?  If so how do we know this?  -Woody Allen


From MAILER-DAEMON Thu Aug 23 03:19:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Rhc-00069f-Qj
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 03:19:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36671)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4RhZ-00066y-LJ
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:19:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4RhY-0000k3-IZ
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:19:37 -0400
Received: from smtp3.stanford.edu ([171.67.219.83]:35591
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>)
	id 1T4RhY-0000jy-Cu; Thu, 23 Aug 2012 03:19:36 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id 91ED645BB91;
	Thu, 23 Aug 2012 00:19:35 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id 69AF645BB8D;
	Thu, 23 Aug 2012 00:19:35 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id 3867F2F45E; Thu, 23 Aug 2012 00:19:35 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: Miles Bader <miles@gnu.org>
Subject: Re: Problems Configuring (C Compiler cannot produce executables)
In-Reply-To: <87txvuuljy.fsf@catnip.gol.com> (Miles Bader's message of "Thu,
	23 Aug 2012 16:14:41 +0900")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu> <87txvuuljy.fsf@catnip.gol.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Thu, 23 Aug 2012 00:19:35 -0700
Message-ID: <87lih6xego.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.83
Cc: noloader@gmail.com, autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 07:19:38 -0000

Miles Bader <miles@gnu.org> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> Also, you should generally not add -Wall -Wextra to the configure
>> flags, and instead add it after configure completes, since many of the
>> tricks configure has to use will result in warnings when you turn on
>> all the compiler warnings, which can confuse configure.

> How can that confuse configure?

> AFAICT, configure seems quite unconcerned with warnings during
> configuration.

I may be misremembering previous discussions here, and the fact that we do
indeed seem to pass -Wall into configure all the time without any trouble
makes me think that I am misremembering, but I thought there were some
checks where (due largely to various broken vendor compilers) configure
had to analyze the compiler output to figure out if things went wrong.

It's possible that I'm conflating this discussion with cases where people
use -Werror, which has more obvious issues.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Thu Aug 23 03:30:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Rrj-0008TF-P1
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 03:30:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45898)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T4Rrc-0008Qh-LM
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:30:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T4RrY-0003WR-RW
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:30:00 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:45870)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>)
	id 1T4RrY-0003Vx-AB; Thu, 23 Aug 2012 03:29:56 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 25A6A525944;
	Thu, 23 Aug 2012 16:29:48 +0900 (JST)
Received: from [133.41.203.227] (203-227.cup.hiroshima-u.ac.jp
	[133.41.203.227]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id 04F55525959;
	Thu, 23 Aug 2012 16:29:48 +0900 (JST)
Message-ID: <5035DBEB.5090906@hiroshima-u.ac.jp>
Date: Thu, 23 Aug 2012 16:29:47 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: Miles Bader <miles@gnu.org>
Subject: Re: [autoconf] Re: Problems Configuring (C Compiler cannot produce
	executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>	<50343D0A.8030802@hiroshima-u.ac.jp>	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>	<87ipcbtv5s.fsf@windlord.stanford.edu>	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>	<877gsrtu0z.fsf@windlord.stanford.edu>	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>	<50346B6B.4090401@hiroshima-u.ac.jp>	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>	<871uiy94fw.fsf@windlord.stanford.edu>	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>	<87boi27m8q.fsf@windlord.stanford.edu>
	<87txvuuljy.fsf@catnip.gol.com>
In-Reply-To: <87txvuuljy.fsf@catnip.gol.com>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19132.005
X-TM-AS-Result: No--13.192-10.0-31-10
X-imss-scan-details: No--13.192-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: jOF9SGbtYWxITndh1lLRAe5i6weAmSDKc3ewuwbSaG7VnLbqO0wxoEs5
	YrdGOOYVXNWvXpKhYVrJfxrRI0LlGxO7OIF//E5DJrUxoq6hvw8L8TGleseLPBUb9+x7ts888U1
	60P1TrZByN5/1BJc8UgzRvCJRF+bJlh5qb5HiiQdgP1dNF1ow7dSqEluSYtV7ClyrX4tOmxQue4
	Vh9pZKpgPTK4qtAgwIP+fP7xq5aHNEcGY6dokS79mzcdRxL+xwKrauXd3MZDWPVW1YJvSDubIzQ
	3hz1tf+WbMqXtRBppi4+myaA1osXO8i5GWyVSb0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
Cc: noloader@gmail.com, Russ Allbery <rra@stanford.edu>, autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 07:30:07 -0000

It is not autoconf's responsibility, and I think the testing code
in configure should not depend with -Wall and -Wextra, but some
software packages may have the configure checking if any warnings
are issued /or not. I remember, the configure in pixman had ever
checked the warning.

Regards,
mpsuzuki

Miles Bader wrote:
> Russ Allbery <rra@stanford.edu> writes:
>> Also, you should generally not add -Wall -Wextra to the configure flags,
>> and instead add it after configure completes, since many of the tricks
>> configure has to use will result in warnings when you turn on all the
>> compiler warnings, which can confuse configure.
> 
> How can that confuse configure?
> 
> AFAICT, configure seems quite unconcerned with warnings during
> configuration.
> 
> Thanks,
> 
> -miles
> 



From MAILER-DAEMON Thu Aug 23 03:39:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4S0Q-0001yi-2P
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 03:39:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55547)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1T4S0N-0001y8-EV
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:39:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1T4S0J-0005oK-1m
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:39:03 -0400
Received: from mout1.freenet.de ([195.4.92.91]:58011)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rc040203@freenet.de>) id 1T4S0I-0005oB-Rb
	for autoconf@gnu.org; Thu, 23 Aug 2012 03:38:58 -0400
Received: from [195.4.92.140] (helo=mjail0.freenet.de)
	by mout1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port
	25) (Exim 4.76 #1) id 1T4S0H-0004EF-0P
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:38:57 +0200
Received: from localhost ([::1]:60769 helo=mjail0.freenet.de)
	by mjail0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.76 #1) id 1T4S0G-0005ov-ST
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:38:56 +0200
Received: from [195.4.92.24] (port=34545 helo=14.mx.freenet.de)
	by mjail0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim
	4.76 #1) id 1T4RxX-0004pi-Ik
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:36:07 +0200
Received: from hsi-kbw-46-223-133-48.hsi.kabel-badenwuerttemberg.de
	([46.223.133.48]:38366 helo=[192.168.1.104])
	by 14.mx.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de)
	(TLSv1:CAMELLIA256-SHA:256) (port 587) (Exim 4.76 #1)
	id 1T4RxX-0007VY-5C
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:36:07 +0200
Message-ID: <5035DD66.1070601@freenet.de>
Date: Thu, 23 Aug 2012 09:36:06 +0200
From: Ralf Corsepius <rc040203@freenet.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Re: Problems Configuring (C Compiler cannot produce executables)
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
	<87txvuuljy.fsf@catnip.gol.com>
In-Reply-To: <87txvuuljy.fsf@catnip.gol.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 195.4.92.91
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 07:39:04 -0000

On 08/23/2012 09:14 AM, Miles Bader wrote:
> Russ Allbery <rra@stanford.edu> writes:
>> Also, you should generally not add -Wall -Wextra to the configure flags,
>> and instead add it after configure completes, since many of the tricks
>> configure has to use will result in warnings when you turn on all the
>> compiler warnings, which can confuse configure.
>
> How can that confuse configure?

No idea. The working priciples of standard autoconf checks are based on 
evaluating compiler errors only and to ignore warnings[1], therefore 
-Wall -Wextra must not desturb "by definition".

However, adding -Werror to CFLAGS is dangerous, because this will raise 
GCC warnings to errors, which will cause autoconf to become confused and 
to produce bogus results.

Ralf

[1] There exist (non-standard) autoconf checks which are based on 
evaluating compiler warnings. If properly written, these also should not 
be affected by "-Wall -Wextra", ... if they are, these checks need to be 
considered broken ;)



From MAILER-DAEMON Thu Aug 23 09:08:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4X9K-0008NO-Nv
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 09:08:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40023)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4X9E-0008ND-Bv
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:08:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4X9C-0003OB-VA
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:08:32 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:39376)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4X9C-0003O5-Qo
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:08:30 -0400
Received: by vbkv13 with SMTP id v13so853109vbk.0
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 06:08:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=Tk9Auz6Tqd3BBRQKKnVgSBRctQWYWQpFoY81jesiEqE=;
	b=HszzlNl3V+CxVIHIS+llGOZ5Jw6RmmfcOO17KarJQi5V15iqdszdB+83hy3p7UHT9P
	cxJXf9YlzOXSenc+8ixSdsjfvQ8q511LnruJqlmrUWAVmESK0uldORLFRuj/ydu2dYan
	aLwZISM0tPn4D/JOZRGkaLYG9ZVL6BmB6sHLRdyZGLxtTGPiexTqYluNFuRAI+kyvee8
	2qKUiJEqjHTp0BesaDCnksGj4CRI2KEamCIDjgblLR3urX+++NuuL0fcWZHDz6I7hEV+
	kuULplaf+KhD2jq3NQdznsJRRmVVMJdrylcWRN9Mw4YOuBJsC/MVOHW7iRmYSaXey65k
	WLmA==
MIME-Version: 1.0
Received: by 10.220.119.204 with SMTP id a12mr1122760vcr.66.1345727310108;
	Thu, 23 Aug 2012 06:08:30 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Thu, 23 Aug 2012 06:08:29 -0700 (PDT)
In-Reply-To: <201208221921.37490.vapier@gentoo.org>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
	<201208221921.37490.vapier@gentoo.org>
Date: Thu, 23 Aug 2012 09:08:29 -0400
Message-ID: <CAH8yC8kBuYFPmw20J6ko-vSPr0o_uw3QEzU1YuAB0dCEU2u8gg@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 13:08:38 -0000

On Wed, Aug 22, 2012 at 7:21 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Wednesday 22 August 2012 18:17:37 Jeffrey Walton wrote:
>> The posture would have saved a number of folks from, for example,
>> Pidgin's latest rounds of Critical Vulnerabilities (memory corruption
>> and code execution). No-exec stacks and heaps would have reduced
>> many/most to an annoying UI problem (a call to abort()).
>
> bad example: pidgin doesn't require execstacks (i'm not sure it ever has), so
> that would have made 0 difference.
I think Pidgin is a perfect example (humbly):
http://www.pidgin.im/news/security/ and
http://www.securityfocus.com/archive/105/515814.

If Pidgin does not require NX stacks and heaps, why was it running
with them? Not only did Pidgin not observe an SDLC on Linux, it did
not do so on Windows either. "Pidgin for Windows (2.10.6) - Missing
DEP and ASLR," http://developer.pidgin.im/ticket/15209,

Linux might not have an SDLC, but Microsoft certainly does.

> no one does exec-heaps by default ... the
> code itself has to explicitly do this, and there's nothing the toolchain could
> have done to stop that (not that pidgin enables exec on memory returned by
> malloc afaik).  only a kernel patch (such as PaX) which explicitly denies
> mprotect calls that try to enable exec & write bits simultaneously would have
> prevented this scenario proactively.
Its unfortunate that most Linux do not do no-exec heaps. Gentoo is an
exception with its PaX security.

X^W is fine, too. Nothing is befuddling since the defenses are there -
all a programmer has to do is ask for them.

> in fact, very little to no packages request an executable stack by default.
> binary-only packages tend to be the only ones nowadays that do, and that's
> usually because the people producing the pkgs have broken code.
All code has bugs. Its the reason we should be running with full defenses.

Jeff


From MAILER-DAEMON Thu Aug 23 09:13:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4XE8-0001sr-0I
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 09:13:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50514)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4XDx-0001s1-16
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:13:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4XDs-0004op-SY
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:13:24 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:41630)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4XDs-0004ol-O6
	for autoconf@gnu.org; Thu, 23 Aug 2012 09:13:20 -0400
Received: by vcbfl10 with SMTP id fl10so878082vcb.0
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 06:13:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=lM0F6btWhoEiROGXiRW10rZ5oZ2H0aOPgGr6aDH5hcU=;
	b=aKdg47yWU2D9biurFlHhhR7qlQ9FhiYIm/FoPaGZDsdTw52jy8P9pPij7I+tEqZ/dT
	id8iIbdWop8JPhl+ElfGR/i1znHAmYNlV+1qN4bt8PALfdE6kSia7OXBdmmwWtzdPutS
	6Yb3lpaoUb0kVHnvG8n7DVcqSrriq8WVRwn9zKZNMOxKRKqtz42yPpb0MgYdxmdomhqm
	nGy0VU2+xfzPdetogbdzkBmt60w7AYwM7RNOMrGFBUqdd6lQPrm8gk4Tic12YO0h4aVS
	hYL+88rXdTxTcjd3Q9KZbD187uTK3o5py1ShUm0yZbbV30HJk1qoZBqYagGyFYJxezYJ
	iSOQ==
MIME-Version: 1.0
Received: by 10.220.214.208 with SMTP id hb16mr348824vcb.56.1345727600265;
	Thu, 23 Aug 2012 06:13:20 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Thu, 23 Aug 2012 06:13:20 -0700 (PDT)
In-Reply-To: <201208222141.01972.vapier@gentoo.org>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
	<87ipca36jf.fsf@windlord.stanford.edu>
	<201208222141.01972.vapier@gentoo.org>
Date: Thu, 23 Aug 2012 09:13:20 -0400
Message-ID: <CAH8yC8=upcYEkC=mGfbb7yp1J0x5xSk+6qS2O9tAsS9j8AjXTg@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
Cc: Russ Allbery <rra@stanford.edu>, autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 13:13:35 -0000

On Wed, Aug 22, 2012 at 9:41 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Wednesday 22 August 2012 18:28:52 Russ Allbery wrote:
>> special exceptions.  Being able to turn off executable stack as at least
>> another easily-accessible option is an interesting idea, and I may raise
>> that on debian-devel.  (Although it can be a little hard to predict which
>> packages need that.
>
> it's trivial to locate:
>         readelf -lW /bin/bash | grep GNU_STACK
> if it's set as RWE, that's bad.  if the ELF lacks a GNU_STACK, that's bad.
I believe there is more to it. The PT_GNU_STACK marking must be
present *and* have a size of 0. See Ian Lance Taylor's blog
http://www.airs.com/blog/archives/120.

Trivia: How does one audit a Gentoo binary for no-exec heap
compliance. Hint: its not readelf because Gentoo did not modify the
utility to dump PaX flags. (I'm asking because it took me some time to
discover the information).

Jeff


From MAILER-DAEMON Thu Aug 23 10:59:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4YsG-0002oI-05
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 10:59:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56384)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4YsD-0002ma-Fh
	for autoconf@gnu.org; Thu, 23 Aug 2012 10:59:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4YsC-0003Sz-F9
	for autoconf@gnu.org; Thu, 23 Aug 2012 10:59:05 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:36516)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <noloader@gmail.com>) id 1T4YsC-0003Ss-AB
	for autoconf@gnu.org; Thu, 23 Aug 2012 10:59:04 -0400
Received: by vbkv13 with SMTP id v13so1030976vbk.0
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 07:59:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=cD21mT/7fWBJMZVxs9O7CSBizCmMEDNhcGhUfpcfJhU=;
	b=y5+ICLGHC7m1WCu0mPrDujoEn8jdovPlXWXE8Pa1vZhCijDW5nDzDxf9e3ZctVFamg
	74OhWhEk+3FQFE8DCZsYlqNVkpTyEp8uw3KVHGokMQe3u9lpLxOqX9y13yPVQct2FofM
	w4s5DLCFvyBtBUkp8PlpWl5GF2R9FPB8dU8Gkl3O+ay9roa4m2iprsM/bGBqP3XFPtO3
	CQ2M3xHtVPSdXEk3LovZuDilQnEaAkDEcCTPWlLckAH1twjcItLIhcQp+kb9HvKidR+L
	IBy00IdkJfewXEIP+AOqyjlFSFL0QEzBsxGNslFLCKWrrR+k+7TrEkc8yx3K95KS4kYR
	S7gg==
MIME-Version: 1.0
Received: by 10.220.152.67 with SMTP id f3mr672917vcw.19.1345733943621; Thu,
	23 Aug 2012 07:59:03 -0700 (PDT)
Received: by 10.220.200.7 with HTTP; Thu, 23 Aug 2012 07:59:03 -0700 (PDT)
In-Reply-To: <CAH8yC8=upcYEkC=mGfbb7yp1J0x5xSk+6qS2O9tAsS9j8AjXTg@mail.gmail.com>
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<CAH8yC8nYs+8X00Rfi4NY+=8dor1MAqA36SEMjMT4vPVY=hcO_w@mail.gmail.com>
	<87ipca36jf.fsf@windlord.stanford.edu>
	<201208222141.01972.vapier@gentoo.org>
	<CAH8yC8=upcYEkC=mGfbb7yp1J0x5xSk+6qS2O9tAsS9j8AjXTg@mail.gmail.com>
Date: Thu, 23 Aug 2012 10:59:03 -0400
Message-ID: <CAH8yC8kJqvYdri-PrYJ8B8em32ynUtTpK++B4Qpo1=sLa=Dpqg@mail.gmail.com>
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce
	executables)
From: Jeffrey Walton <noloader@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: noloader@gmail.com
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 14:59:06 -0000

On Thu, Aug 23, 2012 at 9:13 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> On Wed, Aug 22, 2012 at 9:41 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Wednesday 22 August 2012 18:28:52 Russ Allbery wrote:
>>> special exceptions.  Being able to turn off executable stack as at least
>>> another easily-accessible option is an interesting idea, and I may raise
>>> that on debian-devel.  (Although it can be a little hard to predict which
>>> packages need that.
>>
>> it's trivial to locate:
>>         readelf -lW /bin/bash | grep GNU_STACK
>> if it's set as RWE, that's bad.  if the ELF lacks a GNU_STACK, that's bad.
> I believe there is more to it. The PT_GNU_STACK marking must be
> present *and* have a size of 0. See Ian Lance Taylor's blog
Bad reference (my apologies). Try Ian's blog on Executable Stacks
instead http://www.airs.com/blog/archives/518.

Jeff


From MAILER-DAEMON Thu Aug 23 13:57:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4bf4-000283-R8
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 13:57:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53233)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T4bf2-00027u-6G
	for autoconf@gnu.org; Thu, 23 Aug 2012 13:57:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T4bew-0001xn-JR
	for autoconf@gnu.org; Thu, 23 Aug 2012 13:57:40 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:56142)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <javierjc1982@gmail.com>) id 1T4bew-0001xc-Et
	for autoconf@gnu.org; Thu, 23 Aug 2012 13:57:34 -0400
Received: by vbkv13 with SMTP id v13so1298553vbk.0
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 10:57:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=oC2Pw+0AEm/9CmLAaUpCpQqTFM3ZptLX901XT3A+baI=;
	b=Buzm7kBH2UnYFo5ey+/2me2JZK6yNKealUZOv5R99A7ReJxac9RX6yUtIr6HlBQzVM
	PkCDG677niS9T/Teg2GZ4ag7v4mqep7Qsd247E7DlQOkDfPDHjwBroar1aO6/NUb4mqv
	kv69Qd48VGQyKPTmhNWljR2VrW5X/qY0DdmE0MdDEmI2k3rD7YQhHIsIO16ynHB2fzoc
	LQ9gURRsX/QKPv+whRksmYAKSXcSRL4P1+NzTSh2jJ5sy4wUkJ3zBPTUv22a6xAOxdXe
	YfVV8XReWXIqH3Wg2VYNe44HMnE1Jb8iJJE9qwWyVkLmd1OXJAF1h4ftWHEVzGUvY63x
	HgZQ==
Received: by 10.52.176.194 with SMTP id ck2mr1764878vdc.29.1345744653325; Thu,
	23 Aug 2012 10:57:33 -0700 (PDT)
MIME-Version: 1.0
Sender: javierjc1982@gmail.com
Received: by 10.58.182.98 with HTTP; Thu, 23 Aug 2012 10:57:12 -0700 (PDT)
In-Reply-To: <502D5553.20908@redhat.com>
References: <CAF6QBXFU7TGbUECvt_D7Y7w_n9iY44uz3zwAxKG7XKQf6ULQ6g@mail.gmail.com>
	<502D5553.20908@redhat.com>
From: =?UTF-8?Q?Javier_Jard=C3=B3n?= <jjardon@gnome.org>
Date: Fri, 24 Aug 2012 02:57:12 +0900
X-Google-Sender-Auth: -0Cfd9gDu3KG8lpIz6jc9SX-cQA
Message-ID: <CAF6QBXGY=ASsWwaKKhpYeU0XrXzuFQ5WOZan_gmfx12F5+mfrQ@mail.gmail.com>
Subject: Re: Add more check in autoreconf
To: Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 17:57:41 -0000

On 17 August 2012 05:17, Eric Blake <eblake@redhat.com> wrote:

> If you are willing to write patches to autoreconf to incorporate new
> tools into the common autotools, then we will gladly review them.  But I

Patch to check for gtk-doc sent:

Also, if someone can give some guideance about the best why to fix
this problem with upstream gettext: [2]

Thanks!

[1] http://lists.gnu.org/archive/html/autoconf-patches/2012-08/msg00002.htm=
l
[2] http://lists.gnu.org/archive/html/bug-gettext/2012-08/msg00003.html
--=20
Javier Jard=C3=B3n Cabezas


From MAILER-DAEMON Thu Aug 23 14:12:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4bt6-00064k-Oc
	for mharc-autoconf@gnu.org; Thu, 23 Aug 2012 14:12:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51366)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4bt3-00064D-No
	for autoconf@gnu.org; Thu, 23 Aug 2012 14:12:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4bsy-00015q-0Q
	for autoconf@gnu.org; Thu, 23 Aug 2012 14:12:09 -0400
Received: from smtp3.stanford.edu ([171.67.219.83]:34492
	helo=smtp.stanford.edu) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rra@stanford.edu>) id 1T4bsx-000137-QZ
	for autoconf@gnu.org; Thu, 23 Aug 2012 14:12:03 -0400
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with SMTP id A347545B853
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 11:12:02 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.stanford.edu (Postfix) with ESMTPS id 6918A45C0B7
	for <autoconf@gnu.org>; Thu, 23 Aug 2012 11:12:02 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000)
	id 4244A256B7; Thu, 23 Aug 2012 11:12:01 -0700 (PDT)
From: Russ Allbery <rra@stanford.edu>
To: autoconf@gnu.org
Subject: Re: Problems Configuring (C Compiler cannot produce executables)
In-Reply-To: <5035DD66.1070601@freenet.de> (Ralf Corsepius's message of "Thu, 
	23 Aug 2012 09:36:06 +0200")
Organization: The Eyrie
References: <CAH8yC8kZVs2GGv3r3Y9BQJPG16Kg8_7g9Wzsm6LOh5JZnW1wfg@mail.gmail.com>
	<50343D0A.8030802@hiroshima-u.ac.jp>
	<CAH8yC8mXwotUKSpq=6HQccpO6em8fTwz_Fv7oZaKAH7uTxzg0g@mail.gmail.com>
	<87ipcbtv5s.fsf@windlord.stanford.edu>
	<CAH8yC8=nipmH7Yjv+x2ie_tpeFpWD8Nsx=OZ-Eo_0kqeKEcG4Q@mail.gmail.com>
	<877gsrtu0z.fsf@windlord.stanford.edu>
	<CAH8yC8nEKY4DKdrSvTeMHrzQG7oGncaJbK7vLSyf6QU3YQG+9g@mail.gmail.com>
	<50346B6B.4090401@hiroshima-u.ac.jp>
	<CAH8yC8=0cakhMZ1F5y9_Yv4-yPSAM4Zes3W40ukCwYXL+YwrTg@mail.gmail.com>
	<871uiy94fw.fsf@windlord.stanford.edu>
	<CAH8yC8=FipgGtfS4UpOD9yGDH7AGH03ROKGCCggD+9FcnWTH0w@mail.gmail.com>
	<87boi27m8q.fsf@windlord.stanford.edu> <87txvuuljy.fsf@catnip.gol.com>
	<5035DD66.1070601@freenet.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Date: Thu, 23 Aug 2012 11:12:01 -0700
Message-ID: <87fw7d1nri.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 171.67.219.83
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2012 18:12:11 -0000

Ralf Corsepius <rc040203@freenet.de> writes:

> No idea. The working priciples of standard autoconf checks are based on
> evaluating compiler errors only and to ignore warnings[1], therefore -Wall
> -Wextra must not desturb "by definition".

> However, adding -Werror to CFLAGS is dangerous, because this will raise
> GCC warnings to errors, which will cause autoconf to become confused and
> to produce bogus results.

> Ralf

> [1] There exist (non-standard) autoconf checks which are based on
> evaluating compiler warnings. If properly written, these also should not
> be affected by "-Wall -Wextra", ... if they are, these checks need to be
> considered broken ;)

I've clearly just misremembered, then.  Apologies for the noise.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


From MAILER-DAEMON Fri Aug 24 05:44:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4qQs-00067n-W6
	for mharc-autoconf@gnu.org; Fri, 24 Aug 2012 05:44:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54962)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T4qQj-00064v-Gs
	for Autoconf@gnu.org; Fri, 24 Aug 2012 05:44:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T4qQb-0000We-Vh
	for Autoconf@gnu.org; Fri, 24 Aug 2012 05:43:53 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:38113)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1T4qQV-0000Vb-BS; Fri, 24 Aug 2012 05:43:39 -0400
Received: by bkcjc3 with SMTP id jc3so535885bkc.0
	for <multiple recipients>; Fri, 24 Aug 2012 02:43:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=bhoHVXfuNRf1s3OAqsw5LdjMkjxqoNemOpBzRvRUeUM=;
	b=qjeFF2OJPNCRmbOCD972XrUjsVvR4rJP+mvOf2Jlr4jullxLqUNSxfFGFW4OeEQ0Oc
	sOJXbJ2CD+ymuwEpVA75savGlPyUY92SagbEt6+NC9quT5m8rTHwgxUHj8aDBAmX2oWu
	ULZeYclLErNQihJTn68KMe2E6BcStUILiHoCWfKO1uW2fPvBmCYZW1457o/FjXFCsEj7
	NLp4GG32N+U2oKWjVww286ZrvIwrzYzpNaxvjVCunozyyjTvqD4fJAT4U4dUhq0wyRez
	/mr4ZwxTjdlTAuqsTeRv2xpRnpV1ypPq9reIdyp+v1eDv3b8FyHEL/6UuyJf9l77Q+e9
	d6dg==
Received: by 10.204.156.69 with SMTP id v5mr1624274bkw.97.1345801417776;
	Fri, 24 Aug 2012 02:43:37 -0700 (PDT)
Received: from [192.168.178.21]
	(host166-38-dynamic.56-82-r.retail.telecomitalia.it. [82.56.38.166])
	by mx.google.com with ESMTPS id g6sm6010806bkg.2.2012.08.24.02.43.35
	(version=SSLv3 cipher=OTHER); Fri, 24 Aug 2012 02:43:36 -0700 (PDT)
Message-ID: <50374CC5.4060508@gmail.com>
Date: Fri, 24 Aug 2012 11:43:33 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>, 
	Automake List <automake@gnu.org>, Autoconf <Autoconf@gnu.org>, 
	"automake-patches@gnu.org" <automake-patches@gnu.org>
Subject: [PATCH] {master} AM_INIT_AUTOMAKE: allow obsolescent two-args
	invocation
	once again (was: Re: Dynamic package version numbers with Autoconf and
	Automake)
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com>
In-Reply-To: <502ACE37.60907@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Aug 2012 09:44:01 -0000

Reference:
<http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>

On 08/15/2012 12:16 AM, Stefano Lattarini wrote:
> Hi Bob, I managed to find your old message about "dynamically computing
> package versions for Automake and Autoconf".  Some initial comments
> follows.  I'm adding the Autoconf list in CC:, because I believe this
> is an Autoconf issue more than an Automake one.
> 
> On 05/20/2012 12:59 AM, Bob Friesenhahn wrote:
>> Stefano,
>>
>> This change will cause significant issues for GraphicsMagick unless there is a workaround:
>>
>>   - Support for the two- and three-arguments invocation forms of the
>>     AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
>>     of Automake (1.12.1) and removed in the next major version (1.13).
>>
>> GraphicsMagick invokes it like
>>
>> AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
>>
>> The reason is because it avoids needing to edit configure.ac (a really stupid
>> practice)
>>
> I agree with this; with today's DVCS, it's very tempting (and IMHO useful)
> to base a package's version number on the current revision number/SHA-1; so
> that the version is bound to change with every commit, and forcing a full
> re-autotooling + reconfiguration + rebuild of the package for every commit
> sounds just crazy.
> 
> But then, I believe this is something that should to be fixed at the Autoconf
> level.  I.e., the version number shouldn't be hard-coded in the generated
> configure and config.status scripts, nor put in 'config.h' or other generated
> headers -- or at least, we should be able to tell Autoconf not do that, and
> how to fetch/define/compute the version number at runtime instead.
> 
>> every time a new release tarball will be cut. Instead the version information
>> to apply is computed by a script which is sourced by configure.
>>
>> What is the workaround for this?
>>
> Actually, it depends.  Where and why do you use such dynamically-computed
> version number in exactly?
> 
Since we've not managed to find a proper workaround yet, nor a consensus on
how this should be fixed in Autoconf, I want to revert the removal of support
for two-args (and three-args) AM_INIT_AUTOMAKE invocation in Automake 1.13.

Below is the proposed patch, that I'll push in a couple of days.  Reviews
welcome.

Regards,
  Stefano

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

>From 2abe18335cffce365cbe09bdc1d0315f5ed8f24d Mon Sep 17 00:00:00 2001
Message-Id: <2abe18335cffce365cbe09bdc1d0315f5ed8f24d.1345801379.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Fri, 24 Aug 2012 10:47:17 +0200
Subject: [PATCH] AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once
 again

This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
"init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"

Some users still need to be able to define the version number for
their package dynamically, at configure runtime.

Their user case is that, for development snapshots, they want to be
able to base the complete version of the package on the VCS revision
ID (mostly Git or Mercurial).  They could of course do so by
specifying such version dynamically in their call to AC_INIT, as is
done by several GNU packages.  But then they would need to regenerate
and re-run the configure script before each snapshot, which might be
very time-consuming for complex packages, to the point of slowing
down and even somewhat impeding development.

The situation should truly be solved in Autoconf, by allowing a way
to specify the version dynamically in a way that doesn't force the
configure script to be regenerated and re-run every time the package
version changes.  But until Autoconf has been improved to allow
this, Automake will have to support the obsolescent two-arguments
invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
but working solution for the use case described above.

See also:
<http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>

* NEWS: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
two or three arguments.
* t/aminit-moreargs-no-more.sh: Renamed ...
* t/aminit-moreargs-deprecated.sh: ... like this, and updated.
* t/nodef.sh: Recovered test, with minor adjustments.
* t/backcompat.sh: Likewise.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat6.sh: Likewise.
* t/list-of-tests.mk: Adjust.

Suggested-by: Bob Friesenhahn n<bfriesen@simple.dallas.tx.us>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 NEWS                                               |  15 ++-
 m4/init.m4                                         |  26 +++-
 ...s-no-more.sh => aminit-moreargs-deprecation.sh} |  18 ++-
 t/backcompat.sh                                    |  64 +++++++++
 t/backcompat2.sh                                   |  73 ++++++++++
 t/backcompat3.sh                                   | 147 +++++++++++++++++++++
 t/backcompat6.sh                                   | 104 +++++++++++++++
 t/list-of-tests.mk                                 |   7 +-
 t/nodef.sh                                         |  58 ++++++++
 9 files changed, 489 insertions(+), 23 deletions(-)
 rename t/{aminit-moreargs-no-more.sh => aminit-moreargs-deprecation.sh} (73%)
 create mode 100755 t/backcompat.sh
 create mode 100755 t/backcompat2.sh
 create mode 100755 t/backcompat3.sh
 create mode 100755 t/backcompat6.sh
 create mode 100755 t/nodef.sh

diff --git a/NEWS b/NEWS
index 59b86ea..5490e72 100644
--- a/NEWS
+++ b/NEWS
@@ -7,11 +7,6 @@ New in 1.13:
   - The rules to build PDF and DVI output from Texinfo input now
     requires Texinfo 4.9 or later.

-* Obsolete features removed:
-
-  - Use of the long-deprecated two- and three-arguments invocation forms
-    of the AM_INIT_AUTOMAKE is not supported anymore.
-
   - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
     option) has been removed.  See discussion about automake bug#11034
     for more background.
@@ -44,6 +39,16 @@ New in 1.13:

   - All the "old alias" macros in 'm4/obsolete.m4' have been removed.

+* Obsolescent features:
+
+  - Use of the long-deprecated two- and three-arguments invocation forms
+    of the AM_INIT_AUTOMAKE is not documented anymore.  It's still
+    supported though (albeit with a warning in the 'obsolete' category),
+    to cater for people who want to define the version number for their
+    package dynamically (e.g., from the current VCS revision).  We'll
+    have to continue this support until Autoconf itself is fixed to allow
+    better support for such dynamic version numbers.
+
 * Elisp byte-compilation:

   - The byte compilation of '.el' files into '.elc' files is now done
diff --git a/m4/init.m4 b/m4/init.m4
index 1d5dffd..fc05148 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -9,8 +9,17 @@
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.

+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
-# ---------------------------
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
 [AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
@@ -39,18 +48,21 @@ fi
 AC_SUBST([CYGPATH_W])

 # Define the identity of the package.
-dnl Error out on old-style AM_INIT_AUTOMAKE calls.
-m4_ifval([$2], [m4_fatal(
-[$0: old-style two- and three-arguments forms are now unsupported.  For more info:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])])
-_AM_SET_OPTIONS([$1])dnl
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 m4_if(
   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
   [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl

 _AM_IF_OPTION([no-define],,
 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
diff --git a/t/aminit-moreargs-no-more.sh b/t/aminit-moreargs-deprecation.sh
similarity index 73%
rename from t/aminit-moreargs-no-more.sh
rename to t/aminit-moreargs-deprecation.sh
index ce30c29..a8d4605 100755
--- a/t/aminit-moreargs-no-more.sh
+++ b/t/aminit-moreargs-deprecation.sh
@@ -14,16 +14,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-# Check that automake error out (with an helpful error message) against
-# old-style usages of AM_INIT_AUTOMAKE (i.e., calls with two or three
-# arguments).
+# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
+# (i.e., calls with two or three arguments).

 . ./defs || exit 1

-warn_rx='AM_INIT_AUTOMAKE.* old-style two-.* three-arguments form.*unsupported'
-
-$ACLOCAL
-mv aclocal.m4 aclocal.sav
+warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'

 cat > configure.ac <<'END'
 AC_INIT([Makefile.am])
@@ -31,14 +27,16 @@ AM_INIT_AUTOMAKE([twoargs], [1.0])
 AC_CONFIG_FILES([Makefile])
 END

+$ACLOCAL
+
 do_check()
 {
   rm -rf autom4te*.cache
-  for cmd in "$ACLOCAL" "$AUTOCONF" "$AUTOMAKE"; do
-    cp aclocal.sav aclocal.m4
-    $cmd -Wnone -Wno-error 2>stderr && { cat stderr; exit 1; }
+  for cmd in "$AUTOCONF" "$AUTOMAKE"; do
+    $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; exit 1; }
     cat stderr >&2
     grep "^configure\.ac:2:.*$warn_rx" stderr
+    $cmd -Werror -Wall -Wno-obsolete || exit 1
   done
 }

diff --git a/t/backcompat.sh b/t/backcompat.sh
new file mode 100755
index 0000000..fa83687
--- /dev/null
+++ b/t/backcompat.sh
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
+# backward-compatibility.
+
+. ./defs || exit 1
+
+cat > Makefile.am <<'END'
+.PHONY: test display
+
+## Might be useful for debugging.
+display:
+## The following should be substituted by AM_INIT_AUTOMAKE.
+	@echo PACKAGE = $(PACKAGE)
+	@echo VERSION = $(VERSION)
+## The following should not be substituted, as we used the
+## old form of AC_INIT.
+	@echo PACKAGE_NAME = $(PACKAGE_NAME)
+	@echo PACKAGE_VERSION = $(PACKAGE_VERSION)
+	@echo PACKAGE_TARNAME = $(PACKAGE_TARNAME)
+	@echo PACKAGE_STRING = $(PACKAGE_STRING)
+
+test: display
+	test x'$(PACKAGE)' = x'FooBar'
+	test x'$(VERSION)' = x'0.7.1'
+	test x'$(PACKAGE_NAME)' = x
+	test x'$(PACKAGE_VERSION)' = x
+	test x'$(PACKAGE_TARNAME)' = x
+	test x'$(PACKAGE_STRING)' = x
+END
+
+for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do
+  for am_extra_args in '' ', []' ', [:]' ', [false]'; do
+    rm -rf autom4te*.cache config* Makefile.in Makefile
+    unindent > configure.in <<END
+      $ac_init
+      AM_INIT_AUTOMAKE([FooBar], [0.7.1]$am_extra_args)
+      AC_CONFIG_FILES([Makefile])
+      AC_OUTPUT
+END
+    cat configure.in # For debugging.
+    $ACLOCAL
+    $AUTOCONF
+    $AUTOMAKE -Wno-obsolete
+    ./configure
+    $MAKE test
+  done
+done
+
+:
diff --git a/t/backcompat2.sh b/t/backcompat2.sh
new file mode 100755
index 0000000..109483b
--- /dev/null
+++ b/t/backcompat2.sh
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check that AM_INIT_AUTOMAKE with two or
+# three arguments does AC_DEFINE the symbols PACKAGE and VERSION iff the
+# third argument is empty or non-existent.
+
+am_create_testdir=empty
+. ./defs || exit 1
+
+# A trick to make the test run muuuch faster, by avoiding repeated
+# runs of aclocal (one order of magnitude improvement in speed!).
+echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.ac
+$ACLOCAL
+rm -rf configure.ac autom4te.*
+
+touch install-sh missing
+
+cat > config.h.in <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+for am_arg3 in ':' 'false' '#' ' '; do
+  unindent > configure.ac <<END
+    AC_INIT
+    AC_CONFIG_HEADERS([config.h])
+    AM_INIT_AUTOMAKE([pkgname], [pkgversion], [$am_arg3])
+    AC_OUTPUT
+END
+  cat configure.ac # For debugging.
+  $AUTOCONF
+  ./configure
+  cat config.h # For debugging.
+  # The non-empty third argument should prevent PACKAGE and VERSION
+  # from being AC_DEFINE'd.
+  $EGREP 'pkg(name|version)' config.h && exit 1
+  # This is required because even relatively-recent versions of the
+  # BSD shell wrongly exit when the 'errexit' shell flag is active if
+  # the last command of a compound statement fails, even if it should
+  # be protected by the use of "&&".
+  :
+done
+
+for am_extra_args in '' ',' ', []'; do
+  unindent > configure.ac <<END
+    AC_INIT
+    AC_CONFIG_HEADERS([config.h])
+    AM_INIT_AUTOMAKE([pkgname], [pkgversion]$am_extra_args)
+    AC_OUTPUT
+END
+  cat configure.ac # For debugging.
+  $AUTOCONF
+  ./configure
+  cat config.h # For debugging.
+  grep '^ *# *define  *PACKAGE  *"pkgname" *$' config.h
+  grep '^ *# *define  *VERSION  *"pkgversion" *$' config.h
+done
+
+:
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
new file mode 100755
index 0000000..26ea7d4
--- /dev/null
+++ b/t/backcompat3.sh
@@ -0,0 +1,147 @@
+#! /bin/sh
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check what happens when AC_INIT and
+# AM_INIT_AUTOMAKE are both given two or more arguments.
+
+am_create_testdir=empty
+. ./defs || exit 1
+
+empty=''
+
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+
+cat > Makefile.am <<'END'
+## Leading ':;' here required to work around bugs of (at least) bash 3.2
+got: Makefile
+	@:; { \
+	  echo 'PACKAGE = $(PACKAGE)'; \
+	  echo 'VERSION = $(VERSION)'; \
+	  echo 'PACKAGE_NAME = $(PACKAGE_NAME)'; \
+	  echo 'PACKAGE_VERSION = $(PACKAGE_VERSION)'; \
+	  echo 'PACKAGE_STRING = $(PACKAGE_STRING)'; \
+	  echo 'PACKAGE_TARNAME = $(PACKAGE_TARNAME)'; \
+	  echo 'PACKAGE_BUGREPORT = $(PACKAGE_BUGREPORT)'; \
+	  echo 'PACKAGE_URL = $(PACKAGE_URL)'; \
+	} >$@
+END
+
+
+### Run 1 ###
+
+cat > configure.ac <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 2 ###
+
+cat > configure.ac <<'END'
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+        [ac_url])],
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_tarname
+PACKAGE_BUGREPORT = ac_bugreport
+PACKAGE_URL = ac_url
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 3 ###
+
+cat > configure.ac <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && exit 1
+
+
+### Done ###
+
+:
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
new file mode 100755
index 0000000..9fc4946
--- /dev/null
+++ b/t/backcompat6.sh
@@ -0,0 +1,104 @@
+#! /bin/sh
+# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automake.
+# See also the similar test 'backcompat5.test'.
+
+required=cc
+am_create_testdir=empty
+. ./defs || exit 1
+
+# Anyone doing something like this in a real-life package probably
+# deserves to be killed.
+cat > configure.ac <<'END'
+dnl: Everything here is *deliberately* underquoted!
+AC_INIT(quux.c)
+PACKAGE=nonesuch-zardoz
+VERSION=nonesuch-0.1
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_SUBST(one,1)
+two=2
+AC_SUBST(two, $two)
+three=3
+AC_SUBST(three)
+AC_PROG_CC
+AC_CONFIG_HEADERS(config.h:config.hin)
+AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = yes)
+AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in)
+END
+
+echo @one@ > foo1.in
+echo @two@ > foo2.in
+echo @three@ > foo3.in
+
+cat >config.hin <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = quux.c
+check-local:
+	test x'$(PACKAGE)' = x'nonesuch-zardoz'
+	test x'$(VERSION)' = x'nonesuch-0.1'
+if ! CROSS_COMPILING
+	./foo
+## Do not anchor the regexps w.r.t. the end of line, because on
+## MinGW/MSYS, grep may assume LF line endings only, while our
+## 'foo' program may generate CRLF line endings.
+	./foo | grep '^PACKAGE = nonesuch-zardoz!'
+	./foo | echo '^VERSION = nonesuch-0\.1!'
+endif
+END
+
+cat > quux.c <<'END'
+#include <config.h>
+#include <stdio.h>
+int main (void)
+{
+  printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION);
+  return 0;
+}
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-obsolete --add-missing
+$AUTOCONF
+
+./configure
+
+cat >foo.exp <<'END'
+1
+2
+3
+END
+
+diff foo.exp foo.got
+
+$MAKE
+$MAKE check
+
+distdir=nonesuch-zardoz-nonesuch-0.1
+$MAKE distdir
+test -f $distdir/quux.c
+test ! -f $distdir/foo.got
+
+$MAKE distcheck
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a299262..2706e95 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -124,7 +124,7 @@ t/alpha2.sh \
 t/amhello-cflags.sh \
 t/amhello-cross-compile.sh \
 t/amhello-binpkg.sh \
-t/aminit-moreargs-no-more.sh \
+t/aminit-moreargs-deprecation.sh \
 t/amassign.sh \
 t/am-macro-not-found.sh \
 t/amopt.sh \
@@ -172,6 +172,10 @@ t/auxdir-computed.tap \
 t/auxdir-misplaced.sh \
 t/auxdir-nonexistent.sh \
 t/auxdir-unportable.tap \
+t/backcompat.sh \
+t/backcompat2.sh \
+t/backcompat3.sh \
+t/backcompat6.sh \
 t/backcompat-acout.sh \
 t/backsl.sh \
 t/backsl2.sh \
@@ -688,6 +692,7 @@ t/nobase.sh \
 t/nobase-libtool.sh \
 t/nobase-python.sh \
 t/nobase-nodist.sh \
+t/nodef.sh \
 t/nodef2.sh \
 t/nodep.sh \
 t/nodep2.sh \
diff --git a/t/nodef.sh b/t/nodef.sh
new file mode 100755
index 0000000..979b906
--- /dev/null
+++ b/t/nodef.sh
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
+
+. ./defs || exit 1
+
+# -------------------------------------------------------------------
+# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
+# forms.  The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms
+# are dropped, just erase the file.
+# nodef2.test contains the modern version of this test.
+# -------------------------------------------------------------------
+
+# First, check that PACKAGE and VERSION are output by default.
+
+cat > configure.ac << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN])
+AC_OUTPUT(output)
+END
+
+echo 'DEFS = @DEFS@' > output.in
+
+$ACLOCAL
+$AUTOCONF
+./configure
+
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output
+
+# Then, check that PACKAGE and VERSION are not output if requested.
+
+cat > configure.ac << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN], [no])
+AC_OUTPUT(output)
+END
+
+$ACLOCAL
+$AUTOCONF
+./configure
+
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
+
+:
-- 
1.7.12


From MAILER-DAEMON Sun Aug 26 07:26:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T5azO-0000oD-P7
	for mharc-autoconf@gnu.org; Sun, 26 Aug 2012 07:26:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38848)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T5azK-0000fP-G6
	for Autoconf@gnu.org; Sun, 26 Aug 2012 07:26:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T5azJ-0003le-71
	for Autoconf@gnu.org; Sun, 26 Aug 2012 07:26:42 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:59849)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>)
	id 1T5azF-0003kc-BK; Sun, 26 Aug 2012 07:26:37 -0400
Received: by bkcjc3 with SMTP id jc3so989618bkc.0
	for <multiple recipients>; Sun, 26 Aug 2012 04:26:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=2Z27X5a4as98U3MXmjLj2sqwciyOfpIE4HE7gNYTUSw=;
	b=rJcqNo0WQKdnrbBri/oiJdHvb7xLpSJ5WIQOWQ4mS1gVp80xPclpv6dVOha8r6aHhQ
	fBpJ1chSmBEkUK6OiI/Nr/TsoGFFgW80WviHozkzEOloDkA/MKt/hGSyUBHxi6nii6BA
	u52iX6775A2Nlacjc1irg5ENeJmiDYKg0X+gvupsNtqxw4D1dSUbNZ2a/BZ9ttrFhINd
	gr8jQZgqRF0WNJbEaT5Z6qjfpGtJCBhKzb8UJldCJjFcuHZJa+ll9gkS0WYlZlwSdgyB
	iB6nh2BzaHht749G7SVoGO59I8+J+rbKRQwnRk/s/nWQDvPMkAVKcUQfHpzfFcw4zWCj
	gPig==
Received: by 10.204.154.73 with SMTP id n9mr3093716bkw.113.1345980395828;
	Sun, 26 Aug 2012 04:26:35 -0700 (PDT)
Received: from [192.168.178.21]
	(host166-38-dynamic.56-82-r.retail.telecomitalia.it. [82.56.38.166])
	by mx.google.com with ESMTPS id j9sm8731359bkv.0.2012.08.26.04.26.34
	(version=SSLv3 cipher=OTHER); Sun, 26 Aug 2012 04:26:35 -0700 (PDT)
Message-ID: <503A07E8.7080706@gmail.com>
Date: Sun, 26 Aug 2012 13:26:32 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>, 
	Automake List <automake@gnu.org>, Autoconf <Autoconf@gnu.org>, 
	"automake-patches@gnu.org" <automake-patches@gnu.org>
Subject: Re: [PATCH] {master} AM_INIT_AUTOMAKE: allow obsolescent two-args
	invocation once again
References: <4FB7A52B.5060206@gmail.com>
	<alpine.GSO.2.01.1205191755410.21691@freddy.simplesystems.org>
	<502ACE37.60907@gmail.com> <50374CC5.4060508@gmail.com>
In-Reply-To: <50374CC5.4060508@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Aug 2012 11:26:45 -0000

On 08/24/2012 11:43 AM, Stefano Lattarini wrote:
> Reference:
> <http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>
> 
> On 08/15/2012 12:16 AM, Stefano Lattarini wrote:
>> Hi Bob, I managed to find your old message about "dynamically computing
>> package versions for Automake and Autoconf".  Some initial comments
>> follows.  I'm adding the Autoconf list in CC:, because I believe this
>> is an Autoconf issue more than an Automake one.
>>
>> On 05/20/2012 12:59 AM, Bob Friesenhahn wrote:
>>> Stefano,
>>>
>>> This change will cause significant issues for GraphicsMagick unless there is a workaround:
>>>
>>>   - Support for the two- and three-arguments invocation forms of the
>>>     AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
>>>     of Automake (1.12.1) and removed in the next major version (1.13).
>>>
>>> GraphicsMagick invokes it like
>>>
>>> AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
>>>
>>> The reason is because it avoids needing to edit configure.ac (a really stupid
>>> practice)
>>>
>> I agree with this; with today's DVCS, it's very tempting (and IMHO useful)
>> to base a package's version number on the current revision number/SHA-1; so
>> that the version is bound to change with every commit, and forcing a full
>> re-autotooling + reconfiguration + rebuild of the package for every commit
>> sounds just crazy.
>>
>> But then, I believe this is something that should to be fixed at the Autoconf
>> level.  I.e., the version number shouldn't be hard-coded in the generated
>> configure and config.status scripts, nor put in 'config.h' or other generated
>> headers -- or at least, we should be able to tell Autoconf not do that, and
>> how to fetch/define/compute the version number at runtime instead.
>>
>>> every time a new release tarball will be cut. Instead the version information
>>> to apply is computed by a script which is sourced by configure.
>>>
>>> What is the workaround for this?
>>>
>> Actually, it depends.  Where and why do you use such dynamically-computed
>> version number in exactly?
>>
> Since we've not managed to find a proper workaround yet, nor a consensus on
> how this should be fixed in Autoconf, I want to revert the removal of support
> for two-args (and three-args) AM_INIT_AUTOMAKE invocation in Automake 1.13.
> 
> Below is the proposed patch, that I'll push in a couple of days.  Reviews
> welcome.
> 
> Regards,
>   Stefano
> 
> -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
> 
> From 2abe18335cffce365cbe09bdc1d0315f5ed8f24d Mon Sep 17 00:00:00 2001
> Message-Id: <2abe18335cffce365cbe09bdc1d0315f5ed8f24d.1345801379.git.stefano.lattarini@gmail.com>
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Fri, 24 Aug 2012 10:47:17 +0200
> Subject: [PATCH] AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once
>  again
> 
> This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
> "init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"
> 
> Some users still need to be able to define the version number for
> their package dynamically, at configure runtime.
> 
> Their user case is that, for development snapshots, they want to be
> able to base the complete version of the package on the VCS revision
> ID (mostly Git or Mercurial).  They could of course do so by
> specifying such version dynamically in their call to AC_INIT, as is
> done by several GNU packages.  But then they would need to regenerate
> and re-run the configure script before each snapshot, which might be
> very time-consuming for complex packages, to the point of slowing
> down and even somewhat impeding development.
> 
> The situation should truly be solved in Autoconf, by allowing a way
> to specify the version dynamically in a way that doesn't force the
> configure script to be regenerated and re-run every time the package
> version changes.  But until Autoconf has been improved to allow
> this, Automake will have to support the obsolescent two-arguments
> invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
> but working solution for the use case described above.
> 
> See also:
> <http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>
> 
> * NEWS: Update.
> * m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
> two or three arguments.
> * t/aminit-moreargs-no-more.sh: Renamed ...
> * t/aminit-moreargs-deprecated.sh: ... like this, and updated.
> * t/nodef.sh: Recovered test, with minor adjustments.
> * t/backcompat.sh: Likewise.
> * t/backcompat2.sh: Likewise.
> * t/backcompat3.sh: Likewise.
> * t/backcompat6.sh: Likewise.
> * t/list-of-tests.mk: Adjust.
> 
> Suggested-by: Bob Friesenhahn n<bfriesen@simple.dallas.tx.us>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>
Pushed now.

Regards,
  Stefano


From MAILER-DAEMON Sun Aug 26 13:48:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T5gxG-0001Kz-3y
	for mharc-autoconf@gnu.org; Sun, 26 Aug 2012 13:48:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45003)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T5cFb-0008QP-Gy
	for autoconf@gnu.org; Sun, 26 Aug 2012 08:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T5cFa-0006sw-KH
	for autoconf@gnu.org; Sun, 26 Aug 2012 08:47:35 -0400
Received: from mail-qa0-f41.google.com ([209.85.216.41]:33705)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T5cFa-0006sp-Fi
	for autoconf@gnu.org; Sun, 26 Aug 2012 08:47:34 -0400
Received: by qafk30 with SMTP id k30so1629637qaf.0
	for <autoconf@gnu.org>; Sun, 26 Aug 2012 05:47:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:cc:content-type;
	bh=jQ7QKYTX703CcdZHHZKIKlYXtdjl6hZGzfyPZKovGu4=;
	b=XBTlkkXXhRvRi9Ztt04WZ+BzN1KJTF8VYaepwRE5QknsqAQCGViLL5HIcjvTucZYjA
	g1O4TbOkKZXrABNUWGNseetRAtlgMSVi9r8OXf2g/iLRHUJg4qRRVx+nd1dBHrMzlJ15
	eRvjzn1ogaF+NlzR/etxCWNs+DlKWXLKUckfGtBe1P6yAEX2VB6mCbR/LtA/GAX7Mept
	xjjTO8fdHY+VKbWCBrRebj9P/lX8oXYZ0j5KHPyXuNXInJ3fOwurPg1FCcL6X3lz6Hc/
	a1NdnyS23j/YkBlD8Z5PNNN+zdBKxB99pHq1haPrZhLFq7UQtpuhgPAcdcnMnF79SGcP
	aSNQ==
MIME-Version: 1.0
Received: by 10.224.42.82 with SMTP id r18mr18359577qae.43.1345985253750; Sun,
	26 Aug 2012 05:47:33 -0700 (PDT)
Received: by 10.49.58.208 with HTTP; Sun, 26 Aug 2012 05:47:33 -0700 (PDT)
Date: Sun, 26 Aug 2012 14:47:33 +0200
Message-ID: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
Subject: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.41
X-Mailman-Approved-At: Sun, 26 Aug 2012 13:48:57 -0400
Cc: Dagobert Michelsen <dagobert@familie-michelsen.de>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Aug 2012 12:47:36 -0000

Hello,

A sparc solaris user reported a _Bool-related problem to gnuplot tracker.

Long story short: stdbool.h is absent, _Bool is defined in C, but not
in C++. Current header file in gnuplot sources which is used both in C
and C++ goes like

# if ! HAVE__BOOL
#  ifdef __cplusplus
typedef bool _Bool;
#  else
typedef unsigned char _Bool;
#  endif
# endif

But there is a problem. If
    AC_HEADER_STDBOOL
is called with C compiler, it would figure out that _Bool is defined
and thus skip defining _Bool in C++. If the macro is called with C++
compiler, it would figure out that _Bool is undefined and try to
define it for C as well. In either case compilation fails.

My question is: what is the proper way to test for existence of _Bool
in C and C++ separately? Something like this should work in the header
file:

# ifdef __cplusplus
#  if !HAVE__BOOL_IN_CXX
typedef bool _Bool;
#  endif
# else
#  if !HAVE__BOOL_IN_C
typedef unsigned char _Bool;
#  endif
# endif

but I don't know what would be the proper way to get HAVE__BOOL_IN_CXX
& HAVE__BOOL_IN_C without completely (re)defining AC_HEADER_STDBOOL
macro.

Thank you,
    Mojca


From MAILER-DAEMON Tue Aug 28 13:59:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Q45-0004Ne-23
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 13:59:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54631)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Q42-0004Ml-Dv
	for autoconf@gnu.org; Tue, 28 Aug 2012 13:58:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Q40-0002Rm-Nm
	for autoconf@gnu.org; Tue, 28 Aug 2012 13:58:58 -0400
Received: from mail-qa0-f48.google.com ([209.85.216.48]:64459)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Q40-0002RU-Hp
	for autoconf@gnu.org; Tue, 28 Aug 2012 13:58:56 -0400
Received: by qady1 with SMTP id y1so3532182qad.0
	for <autoconf@gnu.org>; Tue, 28 Aug 2012 10:58:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=akDWIrkBsaqfWHNEsbQ8aHNmNPLiGxzj9qGcyin4PYc=;
	b=gE+8l7JbgjNAMfzolpfKpsq76UzF8XDGDKlr3pF4Q8xDBAUDTZ0efimxrTER1KIxPe
	HQjepsDeHkUlQUSUFy84LafJ2aw6dMtx3g+nytqrJBQ8MWOk/uKvMskbS8Ze0YaI2apB
	GW7iDfmoUTh31CbSKpeIpsXP7Mm2Hle2xFHznIRpoqgKlD/kpEIsGVBeomJHazheckRN
	OWxh0SbMWfv3PBSVwHrj2uaFc4bBb6Nf2FYFJBkQJW4STvAsISInWqHcEwJsLjnfzFdp
	nj7A8hMNBHUY11Zys6rPE6FMmW2dK0T2jy8TMZen5ny5LG2P0IgJn87GbL/9YtHe/lyJ
	v6AQ==
MIME-Version: 1.0
Received: by 10.224.116.210 with SMTP id n18mr23398228qaq.46.1346176735760;
	Tue, 28 Aug 2012 10:58:55 -0700 (PDT)
Received: by 10.49.104.34 with HTTP; Tue, 28 Aug 2012 10:58:55 -0700 (PDT)
In-Reply-To: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
Date: Tue, 28 Aug 2012 19:58:55 +0200
Message-ID: <CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: autoconf@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.48
Cc: "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 17:58:59 -0000

Dear Autoconf developers,

I would like to reparaphrase my question from last time.

Following the advice from Autoconf manual:
    http://www.delorie.com/gnu/docs/autoconf/autoconf_50.html:
The following code in gnuplot breaks compilation on at least two
systems that don't conform to C99 (Sparc Solaris 9 with Sun Studio 12,
Mac OS X 10.6 with Xcode 3.2).

<<<<< (quote)

Macro: AC_HEADER_STDBOOL

If `stdbool.h' exists and is conformant to C99, define HAVE_STDBOOL_H
to 1; if the type _Bool is defined, define HAVE__BOOL to 1. To fulfill
the C99 requirements, your `system.h' should contain the following
code:

#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
# if ! HAVE__BOOL
#  ifdef __cplusplus
    typedef bool _Bool;
#  else
    typedef unsigned char _Bool;
#  endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif

>>>>> (end of quote)

My suggestion would be to change this to

#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
# ifndef __cplusplus
#  if ! HAVE__BOOL
    typedef unsigned char _Bool;
#  endif
#  define bool _Bool
#  define false 0
#  define true 1
# endif
// not really needed except to "conform with C99"
# define __bool_true_false_are_defined 1
#endif

otherwise a common situation in which _Bool is defined in C, but not
in C++, ends up with C++ compiler seeing:

// remember that _Bool is not defined in C++, it's only defined in C
// on the other hand, all of bool/false/true are known to C++, so I
don't see the need to redefine them all
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1

and then any usage of "bool" in C++ breaks with "_Bool is not defined".

I suggested to do this change in gnuplot, but I would like to hear
your feedback as well, and possibly suggest improving the suggestion
in your official manual. I don't have that much experience with
different compilers, so it might be that I overlooked some cases. But
current solution is definitely not satisfactory. One problem with
unrecognized _Bool has been fixed not so long ago (between versions
2.65 and 2.68), with

2010-08-24  Paul Eggert  <eggert@cs.ucla.edu>
  AC_HEADER_STDBOOL: avoid spurious failure with modern xlc
  * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): ...

2010-08-23  Eric Blake  <eblake@redhat.com>
  AC_HEADER_STDBOOL: avoid spurious clang failure
  * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Drop gcc ...

but this problem with weird bool/_Bool (re)definitions still prevents
compiling on some platforms, most notably older Mac OS X and Solaris.

Thank you very much,
    Mojca


On Sun, Aug 26, 2012 at 2:47 PM, Mojca Miklavec wrote:
> Hello,
>
> A sparc solaris user reported a _Bool-related problem to gnuplot tracker.
>
> Long story short: stdbool.h is absent, _Bool is defined in C, but not
> in C++. Current header file in gnuplot sources which is used both in C
> and C++ goes like
>
> # if ! HAVE__BOOL
> #  ifdef __cplusplus
> typedef bool _Bool;
> #  else
> typedef unsigned char _Bool;
> #  endif
> # endif
>
> But there is a problem. If
>     AC_HEADER_STDBOOL
> is called with C compiler, it would figure out that _Bool is defined
> and thus skip defining _Bool in C++. If the macro is called with C++
> compiler, it would figure out that _Bool is undefined and try to
> define it for C as well. In either case compilation fails.
>
> My question is: what is the proper way to test for existence of _Bool
> in C and C++ separately? Something like this should work in the header
> file:
>
> # ifdef __cplusplus
> #  if !HAVE__BOOL_IN_CXX
> typedef bool _Bool;
> #  endif
> # else
> #  if !HAVE__BOOL_IN_C
> typedef unsigned char _Bool;
> #  endif
> # endif
>
> but I don't know what would be the proper way to get HAVE__BOOL_IN_CXX
> & HAVE__BOOL_IN_C without completely (re)defining AC_HEADER_STDBOOL
> macro.
>
> Thank you,
>     Mojca


From MAILER-DAEMON Tue Aug 28 14:34:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Qc3-0005FR-NY
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 14:34:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33802)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6Qc1-0005Co-Cz
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:34:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6Qc0-0005Di-4J
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:34:05 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:59333)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6Qbz-0005DH-VI
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:34:04 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 6B5C539E800E;
	Tue, 28 Aug 2012 11:34:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 1CIGB+0mF9pf; Tue, 28 Aug 2012 11:34:02 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 16A9B39E8007;
	Tue, 28 Aug 2012 11:34:02 -0700 (PDT)
Message-ID: <503D0F19.3050503@cs.ucla.edu>
Date: Tue, 28 Aug 2012 11:34:01 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
	<CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
In-Reply-To: <CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org, "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 18:34:06 -0000

On 08/28/2012 10:58 AM, Mojca Miklavec wrote:
> #if HAVE_STDBOOL_H
> # include <stdbool.h>
> #else
> # ifndef __cplusplus
> #  if ! HAVE__BOOL
>     typedef unsigned char _Bool;
> #  endif
> #  define bool _Bool
> #  define false 0
> #  define true 1
> # endif
> // not really needed except to "conform with C99"
> # define __bool_true_false_are_defined 1
> #endif

This doesn't look right, as it means that older
C++ environments won't have _Bool as they should.
I think we need to fix the real problem, somehow,
though I don't use C++ myself and am not the best
person to advise.


From MAILER-DAEMON Tue Aug 28 14:47:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Qoi-0008Lb-Pj
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 14:47:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53970)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Qog-0008L7-C2
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:47:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Qof-0001Tg-B5
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:47:10 -0400
Received: from mail-qc0-f169.google.com ([209.85.216.169]:33309)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6Qof-0001Tb-6C
	for autoconf@gnu.org; Tue, 28 Aug 2012 14:47:09 -0400
Received: by qcsd16 with SMTP id d16so4533126qcs.0
	for <autoconf@gnu.org>; Tue, 28 Aug 2012 11:47:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=uXXPAF/9ONq+mQzb4dGxN1Edz9AQb0sRYvI5+a/NnIE=;
	b=zr9IkaE9kdDqqBv7Mw5+e+VPX5mK095EgW8Bz2CM05SmUkAgnHIlT8hBkpgAXMzYV5
	q/RhLX8xtCR8oPo/bN0gNnwgLgUrEwZI8sjs8PzDpu6ocYdo/xZNROi0p+IsEdbLUlwK
	SYhaZSXEoDyqZYOvSjDgG7h8taGImufamTYfmCLH3SWzYyC0X7rnT0+rc8P7gS6Dyt1l
	GxZNhOYXaPstB6dtID0L0RsL8pHpH3rsFRqI6azrER68RYjhjlXbpBWOlDiUeCckPWim
	X/Qsx1cJ0/37ZNfxTkcid4hQCBuD+QryoIoOHr8520OFkYo+fIYazZffD1o37CxoqddH
	6asQ==
MIME-Version: 1.0
Received: by 10.224.115.208 with SMTP id j16mr9875068qaq.54.1346179627448;
	Tue, 28 Aug 2012 11:47:07 -0700 (PDT)
Received: by 10.49.104.34 with HTTP; Tue, 28 Aug 2012 11:47:07 -0700 (PDT)
In-Reply-To: <503D0F19.3050503@cs.ucla.edu>
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
	<CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
	<503D0F19.3050503@cs.ucla.edu>
Date: Tue, 28 Aug 2012 20:47:07 +0200
Message-ID: <CALBOmsasjknHA6aq=j7=FWoLGkGQnrGJbACjwscZxRKt78wTgw@mail.gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.169
Cc: autoconf@gnu.org, "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 18:47:11 -0000

On Tue, Aug 28, 2012 at 8:34 PM, Paul Eggert wrote:
> On 08/28/2012 10:58 AM, Mojca Miklavec wrote:
>> #if HAVE_STDBOOL_H
>> # include <stdbool.h>
>> #else
>> # ifndef __cplusplus
>> #  if ! HAVE__BOOL
>>     typedef unsigned char _Bool;
>> #  endif
>> #  define bool _Bool
>> #  define false 0
>> #  define true 1
>> # endif
>> // not really needed except to "conform with C99"
>> # define __bool_true_false_are_defined 1
>> #endif
>
> This doesn't look right, as it means that older
> C++ environments won't have _Bool as they should.

C++ (at least here) doesn't have _Bool defined until stdbool.h is
included. But if that's the intention - would an extra
   #define _Bool bool
suffice?

That's for example:

#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
# ifdef __cplusplus
   // maybe even #if !defined(_Bool)?
#  define _Bool bool
# else
#  if ! HAVE__BOOL
    typedef unsigned char _Bool;
#  endif
#  define bool _Bool
#  define false 0
#  define true 1
# endif
# define __bool_true_false_are_defined 1
#endif

> I think we need to fix the real problem, somehow,
> though I don't use C++ myself and am not the best
> person to advise.

What exactly is "the real problem" here?

Thank you,
    Mojca


From MAILER-DAEMON Tue Aug 28 15:01:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6R2s-0001U8-LN
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 15:01:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35265)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6R2q-0001Ty-Lb
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:01:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6R2p-0007sh-Ot
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:01:48 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:60749)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6R2p-0007sK-Hn
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:01:47 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 270AC39E8007;
	Tue, 28 Aug 2012 12:01:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id rrrfailVnqfu; Tue, 28 Aug 2012 12:01:45 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 92F1939E800A;
	Tue, 28 Aug 2012 12:01:45 -0700 (PDT)
Message-ID: <503D1598.4070104@cs.ucla.edu>
Date: Tue, 28 Aug 2012 12:01:44 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
	<CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
	<503D0F19.3050503@cs.ucla.edu>
	<CALBOmsasjknHA6aq=j7=FWoLGkGQnrGJbACjwscZxRKt78wTgw@mail.gmail.com>
In-Reply-To: <CALBOmsasjknHA6aq=j7=FWoLGkGQnrGJbACjwscZxRKt78wTgw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org, "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 19:01:50 -0000

On 08/28/2012 11:47 AM, Mojca Miklavec wrote:
> What exactly is "the real problem" here?

The real problem is that we're testing whether
stdbool.h works in C, and using that test to configure
both C and C++.  We should use a C++-specific test to test
whether stdbool.h works in C++.


From MAILER-DAEMON Tue Aug 28 15:34:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6RYM-0002Q9-TH
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 15:34:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43933)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6RYK-0002Py-Pb
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:34:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6RYJ-0001St-Mv
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:34:20 -0400
Received: from mail-qa0-f48.google.com ([209.85.216.48]:47995)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mojca.miklavec.lists@gmail.com>) id 1T6RYJ-0001Sn-Hb
	for autoconf@gnu.org; Tue, 28 Aug 2012 15:34:19 -0400
Received: by qady1 with SMTP id y1so3629901qad.0
	for <autoconf@gnu.org>; Tue, 28 Aug 2012 12:34:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=wR53B8duL1GY3Pi7fjuDbgwZxvN2nuTDqx9HZEBJ4os=;
	b=XFtpyJp2YJpz/4haHoLtFj8dVif3pKMJ47gnj6dAuT+4H66dh693xJOEgBaQyACBmS
	AT4DRutLjhb/8Q8Bs5ngqN1eI3DKurblXNzmFo7egkSQNWhVTcOgOmm0JOBEMe7bnkxL
	kXZSe9Zm8DuXc8dGBCxeyuarvTuv0DAEqjh8G8z/LBoSXLe7w3rSElbGuvcGsJefHpVg
	WaNrtckvx99wYPWPZMLlOS7x1FwfLO1CzSPoI7+0lVOnUogXDEW+kx3H/26I9X4Kk79l
	J5iPyfOQs1V7iwfb+JAJjQLjQFwsKMVpRHt8a/l+udPE0NNIENhbTCOO8YqCCOKUiJ/B
	JSRA==
MIME-Version: 1.0
Received: by 10.224.175.19 with SMTP id v19mr32326754qaz.78.1346182459072;
	Tue, 28 Aug 2012 12:34:19 -0700 (PDT)
Received: by 10.49.104.34 with HTTP; Tue, 28 Aug 2012 12:34:19 -0700 (PDT)
In-Reply-To: <503D1598.4070104@cs.ucla.edu>
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
	<CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
	<503D0F19.3050503@cs.ucla.edu>
	<CALBOmsasjknHA6aq=j7=FWoLGkGQnrGJbACjwscZxRKt78wTgw@mail.gmail.com>
	<503D1598.4070104@cs.ucla.edu>
Date: Tue, 28 Aug 2012 21:34:19 +0200
Message-ID: <CALBOmsZQmGSzwaPAJZAkzUp+a+zdjhdeTSaZ3qKKitFKg5JrYw@mail.gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.48
Cc: autoconf@gnu.org, "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 19:34:21 -0000

On Tue, Aug 28, 2012 at 9:01 PM, Paul Eggert wrote:
> On 08/28/2012 11:47 AM, Mojca Miklavec wrote:
>> What exactly is "the real problem" here?
>
> The real problem is that we're testing whether
> stdbool.h works in C, and using that test to configure
> both C and C++.  We should use a C++-specific test to test
> whether stdbool.h works in C++.

OK, I see. There might be exotic situations when users could decide to
use completely different C and C++ compilers. But even before that
change is made, if developers decide to make it (it requires some
overhaul), I would find it very very useful to take care of a much
more common scenario:
- HAVE_STDBOOL_H is false for C compiler (no C99-compliant stdbool.h)
- _Bool is defined in C (HAVE__BOOL is true)
- _Bool is not defined in C++

A serious question: is there any C++ compiler out there which defines
_Bool by default (without including stdbool.h) or where "#define _Bool
bool" would fail to work?

Mojca


From MAILER-DAEMON Tue Aug 28 16:15:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6SCJ-0002tC-Cc
	for mharc-autoconf@gnu.org; Tue, 28 Aug 2012 16:15:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38604)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6SCH-0002sx-CA
	for autoconf@gnu.org; Tue, 28 Aug 2012 16:15:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6SCG-0006R8-Fr
	for autoconf@gnu.org; Tue, 28 Aug 2012 16:15:37 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:36079)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T6SCG-0006Qu-9U
	for autoconf@gnu.org; Tue, 28 Aug 2012 16:15:36 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 144A139E8013;
	Tue, 28 Aug 2012 13:15:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id fLjU5UwADjOf; Tue, 28 Aug 2012 13:15:34 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B509A39E800A;
	Tue, 28 Aug 2012 13:15:34 -0700 (PDT)
Message-ID: <503D26E6.7020006@cs.ucla.edu>
Date: Tue, 28 Aug 2012 13:15:34 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: AC_HEADER_STDBOOL: checking for _Bool separately for C and C++
References: <CALBOmsapoLX54nsPGgCAKk-4UxHMsifBZar1tXjPHkO4taAsUQ@mail.gmail.com>
	<CALBOmsbN33A+kvySzReHwkOCVa_x9n79QcCZuet8Wp_xUQoq-A@mail.gmail.com>
	<503D0F19.3050503@cs.ucla.edu>
	<CALBOmsasjknHA6aq=j7=FWoLGkGQnrGJbACjwscZxRKt78wTgw@mail.gmail.com>
	<503D1598.4070104@cs.ucla.edu>
	<CALBOmsZQmGSzwaPAJZAkzUp+a+zdjhdeTSaZ3qKKitFKg5JrYw@mail.gmail.com>
In-Reply-To: <CALBOmsZQmGSzwaPAJZAkzUp+a+zdjhdeTSaZ3qKKitFKg5JrYw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org, "Sebald, Daniel" <daniel.sebald@ieee.org>
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 20:15:38 -0000

On 08/28/2012 12:34 PM, Mojca Miklavec wrote:
> A serious question: is there any C++ compiler out there which defines
> _Bool by default (without including stdbool.h)

I don't know of any offhand (remember, I don't use C++...)
but it seems quite likely that there would be, no?  It would
be a valid extension to C++, and it would let a C++ compile
more C code without awkward fiddling.



From MAILER-DAEMON Thu Aug 30 07:55:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T73Lf-0003mt-Mg
	for mharc-autoconf@gnu.org; Thu, 30 Aug 2012 07:55:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56107)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T73Ld-0003lc-0d
	for autoconf@gnu.org; Thu, 30 Aug 2012 07:55:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T73Lb-0002E8-Hk
	for autoconf@gnu.org; Thu, 30 Aug 2012 07:55:44 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:43920)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T73Lb-0002D7-5z
	for autoconf@gnu.org; Thu, 30 Aug 2012 07:55:43 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id CF454525C17
	for <autoconf@gnu.org>; Thu, 30 Aug 2012 20:55:37 +0900 (JST)
Received: from [133.41.200.57] (200-057.cup.hiroshima-u.ac.jp [133.41.200.57])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id B58C2525C15
	for <autoconf@gnu.org>; Thu, 30 Aug 2012 20:55:37 +0900 (JST)
Message-ID: <503F54B9.6050902@hiroshima-u.ac.jp>
Date: Thu, 30 Aug 2012 20:55:37 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: autoconf@gnu.org
Subject: Macros for QNX POSIX environment
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19148.006
X-TM-AS-Result: No--9.247-10.0-31-10
X-imss-scan-details: No--9.247-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: 3RAVi5XHW/RITndh1lLRAZ21GZGE81yGu56wFPSkMVEOkJQR4QWbsN9w
	MgmVVNxuXvHgUlVIoTVip5Ou2AKpsr0LBwJblWbCE0Q83A2vD+t+iqFlMGARD08vg1FXaj1o4yX
	KVMbo6LSUYAP3WXIsZ62iNkADWuNxvJLPs+UrGMUNEGOVZ0MgDaJ6BGsfymksPoheSAdQJctOvg
	qOV/5Nd9m3PjiLl3lULZXc2nSL7F1HtiMn7sZRDMJDEqmnCc0rlfGwpNSPVn6+qryzYw2E8JiGx
	nz6bHXwU39t/WedqIoLbigRnpKlKSPzRlrdFGDwSUH6qb+/kSyWxKs+nenj1cTYDYU59Nv66wE7
	5aXzgjg+P6dyzNguJw==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2012 11:55:46 -0000

Hi,

I'm planning to write a small M4 file including the macros for
QNX to enable its POSIX features, and want it to be used by
various packages - is it possible for autoconf package to ask
for the inclusion of the macro file for proprietary platform?

--

Recently a few people tried to build poppler for QNX and
found that the compiling with no flags cannot exploit the
POSIX features of QNX.

http://lists.freedesktop.org/archives/poppler/2012-August/009527.html

Because many basic features (e.g. getpwnam(), stat(), mkstemp(),
etc) are disabled by default, I wish if the macro checking the
flags to use them is included in autoconf. But I'm afraid that
some people may have the objection to inflate autoconf package
by such files for proprietary platforms. If there is more appropriate
software package that I should ask for the inclusion, please let
me know.

# BTW, the macros to use QNX POSIX environment is not QNX specific.
# The standard macros like _XOPEN_SOURCE are used. So the macro
# file itself would not look like the ugly hack specialized for QNX.

Regards,
mpsuzuki


From MAILER-DAEMON Thu Aug 30 10:26:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75h7-0004Yu-Rv
	for mharc-autoconf@gnu.org; Thu, 30 Aug 2012 10:26:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54462)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T75h0-0004Wz-Vw
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:26:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T75gv-0001OD-8z
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:25:58 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:41507)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1T75gv-0001Nz-4Q
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:25:53 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 8432139E800E;
	Thu, 30 Aug 2012 07:25:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id tQo147+l4gGk; Thu, 30 Aug 2012 07:25:50 -0700 (PDT)
Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net
	[108.23.119.2])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B038E39E8007;
	Thu, 30 Aug 2012 07:25:50 -0700 (PDT)
Message-ID: <503F77EE.4070301@cs.ucla.edu>
Date: Thu, 30 Aug 2012 07:25:50 -0700
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version: 1.0
To: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Subject: Re: Macros for QNX POSIX environment
References: <503F54B9.6050902@hiroshima-u.ac.jp>
In-Reply-To: <503F54B9.6050902@hiroshima-u.ac.jp>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.179.128.62
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2012 14:26:04 -0000

Autoconf already has code to mess with _XOPEN_SOURCE
and with the -std option, so it sounds like all you'd
need to do is make some relatively-small changes to
that code.


From MAILER-DAEMON Thu Aug 30 10:32:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75mz-0005tv-Ou
	for mharc-autoconf@gnu.org; Thu, 30 Aug 2012 10:32:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49468)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T75mr-0005t9-18
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:32:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T75mh-0003oP-FP
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:32:00 -0400
Received: from smtp01.hiroshima-u.ac.jp ([133.41.15.116]:51154)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mpsuzuki@hiroshima-u.ac.jp>) id 1T75mh-0003nu-4f
	for autoconf@gnu.org; Thu, 30 Aug 2012 10:31:51 -0400
Received: from smtp01.hiroshima-u.ac.jp (smtp01.hiroshima-u.ac.jp [127.0.0.1])
	by dummy.hiroshima-u.ac.jp (Postfix) with ESMTP id 754F7525C37;
	Thu, 30 Aug 2012 23:31:48 +0900 (JST)
Received: from [121.111.215.253] (KD121111215253.ppp.prin.ne.jp
	[121.111.215.253])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp01.hiroshima-u.ac.jp (Postfix) with ESMTP id 02C4A525C31;
	Thu, 30 Aug 2012 23:31:46 +0900 (JST)
Message-ID: <503F794A.3050103@hiroshima-u.ac.jp>
Date: Thu, 30 Aug 2012 23:31:38 +0900
From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
User-Agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [autoconf] Re: Macros for QNX POSIX environment
References: <503F54B9.6050902@hiroshima-u.ac.jp> <503F77EE.4070301@cs.ucla.edu>
In-Reply-To: <503F77EE.4070301@cs.ucla.edu>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1326-6.8.0.1017-19148.007
X-TM-AS-Result: No--5.916-10.0-31-10
X-imss-scan-details: No--5.916-10.0-31-10
X-TM-AS-User-Approved-Sender: No
X-TM-AS-User-Blocked-Sender: No
X-TMASE-MatchedRID: 0LX8gN8YsWdITndh1lLRAe5i6weAmSDKEtdrY/Wb3fMNcckEPxfz2Iu3
	renu5Y0wroXw7KN6eRFCVRd1SLcbnwW7x3JNh878Yr99ImIZafgLitYSIrUiB16zUsWZ8U6HU9a
	6zfLFA1a36h2hK5rvdrnE2ijtyO+/CkI7cHjdg07P/MyuVlT/C6Dz3uDPb/JuUEhWy9W70AEgBw
	KKRHe+r2/6IkSG+UuQo2Nz3LBrX/S3BE6xRBQzsD2E3QHBIl0ivemN2SOeToM=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 133.41.15.116
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2012 14:32:08 -0000

Thanks! I will try.

Regards,
mpsuzuki

Paul Eggert wrote:
> Autoconf already has code to mess with _XOPEN_SOURCE
> and with the -std option, so it sounds like all you'd
> need to do is make some relatively-small changes to
> that code.
> 
> _______________________________________________
> Autoconf mailing list
> Autoconf@gnu.org
> https://lists.gnu.org/mailman/listinfo/autoconf



From MAILER-DAEMON Thu Aug 30 11:41:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T76s0-00072b-Gl
	for mharc-autoconf@gnu.org; Thu, 30 Aug 2012 11:41:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38172)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T76rt-00071u-V9
	for autoconf@gnu.org; Thu, 30 Aug 2012 11:41:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T76rk-00006b-CN
	for autoconf@gnu.org; Thu, 30 Aug 2012 11:41:17 -0400
Received: from qmta11.emeryville.ca.mail.comcast.net ([76.96.27.211]:53371)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T76rk-00006G-3j
	for autoconf@gnu.org; Thu, 30 Aug 2012 11:41:08 -0400
Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20])
	by qmta11.emeryville.ca.mail.comcast.net with comcast
	id t1nK1j0090S2fkCAB3g5eG; Thu, 30 Aug 2012 15:40:05 +0000
Received: from [10.11.9.184] ([38.96.16.75])
	by omta09.emeryville.ca.mail.comcast.net with comcast
	id t3fu1j00f1dAPSW8V3fxtY; Thu, 30 Aug 2012 15:40:03 +0000
Message-ID: <503F894A.1090808@redhat.com>
Date: Thu, 30 Aug 2012 08:39:54 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Subject: Re: Macros for QNX POSIX environment
References: <503F54B9.6050902@hiroshima-u.ac.jp>
In-Reply-To: <503F54B9.6050902@hiroshima-u.ac.jp>
X-Enigmail-Version: 1.4.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig725B9086BB922789F0054099"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 76.96.27.211
Cc: autoconf@gnu.org
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2012 15:41:23 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig725B9086BB922789F0054099
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 08/30/2012 04:55 AM, suzuki toshiya wrote:
> Hi,
>=20
> I'm planning to write a small M4 file including the macros for
> QNX to enable its POSIX features, and want it to be used by
> various packages - is it possible for autoconf package to ask
> for the inclusion of the macro file for proprietary platform?

Show us the patches, and we'll help you decide whether autoconf, gnulib,
autoconf-archive, or some other place would be the best home for the
various probes in your tests (my current suspicion is that autoconf will
be a great home for enabling things like _XOPEN_SOURCE, since that
already happens as part of AC_USE_SYSTEM_EXTENSIONS, whereas more
specific probes like getting stat() to work may fit better as part of
gnulib's stat module, where the macro can also be paired with the
appropriate replacement code).


>=20
> Because many basic features (e.g. getpwnam(), stat(), mkstemp(),
> etc) are disabled by default, I wish if the macro checking the
> flags to use them is included in autoconf. But I'm afraid that
> some people may have the objection to inflate autoconf package
> by such files for proprietary platforms.

No need to worry - the entire goal of autoconf is to allow compilation
on as many unix-like platforms as possible, and if there is a way to
make QNX more standards compliant, then it is a candidate for fixing
from within Autoconf.  After all, Autoconf already supports other
proprietary platforms; the goal being to make it possible to configure
and compile free software to allow users of such systems to overcome
some of the limitations of their system.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig725B9086BB922789F0054099
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQP4lKAAoJEKeha0olJ0Nq3QoH/AkiULyov6FZCI8VTyNPuYvR
SFLZkI+yVL71wgdhD6ngMpEvtODJKx1i5f/rzOGDRmKOkNqlSl1UzHu5eOzuyuxG
QRKmjGmlcGqXwrXXN+tw6JziNczlecFdlNcQ8cKGrpRMUq6MpxSBFC3v6Q+sP9Mv
oWLLWCdlXz+EHoShQNFghR7kXQlU40Ao2Z62jwME6oma5cMGh5aUJD7arntc010o
M8VD/TOe5Ww1/E0vNnfLBIOdwv0q6mmT2f3qJ9x65xWg1yu8ZoS1EQw8nSrYdlRG
UnpF6hIC00mfKsDN9xDbH9yLjtZChGniAIlZ6+fBaSHDf1pNNyLL40KPBuqXP40=
=zZaV
-----END PGP SIGNATURE-----

--------------enig725B9086BB922789F0054099--


