From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2113 Path: news.gmane.org!not-for-mail From: idunham@lavabit.com Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC] pcc support for configure Date: Tue, 16 Oct 2012 11:55:36 -0700 (PDT) Message-ID: <11994.132.241.155.248.1350413736.squirrel@lavabit.com> References: <20121015211231.08cbd071.idunham@lavabit.com> <20121016101743.GM24157@port70.net> <20121016132120.GR254@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20121016115535_91213" X-Trace: ger.gmane.org 1350413751 16365 80.91.229.3 (16 Oct 2012 18:55:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2012 18:55:51 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2114-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 16 20:55:59 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TOCJ1-0005bE-V0 for gllmg-musl@plane.gmane.org; Tue, 16 Oct 2012 20:55:56 +0200 Original-Received: (qmail 29706 invoked by uid 550); 16 Oct 2012 18:55:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 29698 invoked from network); 16 Oct 2012 18:55:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=ubzpZFKPJz/CwnDgrKc1d5pKi5IqXe+MERScuay3r6OE7iDyvqwGVG98N7vOg15fkB+JBUeOc8L5MWMU/S18m4gO7n9OpATe3h9hae5lKNCUKZc1hOM+gzsduww73tn++5SyFvOoq+zF6D//HoJOP8HdTkhBdcY6xjFvuxoBNLg=; h=Message-ID:In-Reply-To:References:Date:Subject:From:To:User-Agent:MIME-Version:Content-Type; In-Reply-To: <20121016132120.GR254@brightrain.aerifal.cx> User-Agent: SquirrelMail/1.4.13 Xref: news.gmane.org gmane.linux.lib.musl.general:2113 Archived-At: ------=_20121016115535_91213 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit > On Tue, Oct 16, 2012 at 12:17:43PM +0200, Szabolcs Nagy wrote: >> * Isaac Dunham [2012-10-15 21:12:31 -0700]: >> > +# Older PCC versions don't define __PIC__ with -fPIC >> > +# >> > +tryflag CFLAG_TEST "-x c" >> > +printf '#ifndef __PIC__\n__PIC__=0\n#endif\n' | \ >> > +$CC -E $CFLAG_TEST -fPIC - | grep __PIC__ && \ >> > +CFLAGS_SHARED_ALL="$CFLAGS_SHARED_ALL -D__PIC__=1" >> > + >> >> i don't think it's worth adding such checks >> > Agreed. I don't think there's a point in supporting old compiler > versions except when there are possibly-compelling reasons to use > them. Dropping that. ------=_20121016115535_91213 Content-Type: text/plain; name="pcc.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="pcc.diff" diff --git a/configure b/configure index 9b06d2b..f45b87a 100755 --- a/configure +++ b/configure @@ -162,6 +162,7 @@ printf "checking for C compiler... " trycc ${CROSS_COMPILE}gcc trycc ${CROSS_COMPILE}c99 trycc ${CROSS_COMPILE}cc +trycc ${CROSS_COMPILE}pcc printf "%s\n" "$CC" test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; } @@ -269,8 +270,8 @@ tryflag CFLAGS_AUTO -falign-jumps=1 # work anyway (issues with atomic ops). # if test "$ARCH" = "i386" ; then -fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryflag CFLAGS_AUTO -march=i486 -fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryflag CFLAGS_AUTO -mtune=generic +fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486 +fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic fi if test "x$warnings" = xyes ; then @@ -299,6 +300,7 @@ shared=no # Find compiler runtime library test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt +test -z "$LIBCC" && tryldflag LIBCC `$CC -print-file-name=libpcc.a || true` printf "using compiler runtime libraries: %s\n" "$LIBCC" ------=_20121016115535_91213--