X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:mime-version
	:content-type:content-transfer-encoding; q=dns; s=default; b=pBJ
	krg4H16qiqynOYeT/rTSmpS8vQ1GtoMhsb+CYj7Wo7g4BNbKEdPSVVC8AZIm/SPQ
	dawgELhEMHdW33VRxAkWRciFd1hAqhYvubov8RmAxzvD5jvN+XsyD8TBmoRDCU+5
	ROzCnkp9xx+GG2Y5ZKoYhDbPjKCbbhe6U571BJjI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:mime-version
	:content-type:content-transfer-encoding; s=default; bh=pdP4rcbsg
	ww75TSOyw4ey1Qw0sw=; b=H4DpO+ylX6pYEphK4Pr3txBRpqVfDtXtU0PohQ55l
	KCCItGaop8tyL6M87KfL9OgKufvDh+BLAXltg0gt4xp2VZbIFoOADFA9WS5GEnZq
	He02p43XmdvL/jeIyZBxze5DhUxzwuuJ8A7mp3YJ4sA4wFRROseQcHaO1qEnU1g5
	UU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=pmc, PMC, H*F:D*us, Member
X-HELO: mail.pdinc.us
From: "Jason Pyeron" <jpyeron@pdinc.us>
To: <cygwin@cygwin.com>
Subject: 32 bit lib dirs on cygwin64, advice sought
Date: Sun, 29 May 2016 20:30:49 -0400
Message-ID: <942E9B22984F4DA8BBC52814E9069B43@black7>
MIME-Version: 1.0
Content-Type: text/plain;	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

I feel I am making things way too complicated.

I have a Makefile, which is building a static library [1] in both 32 and 64
bit. The current issue is it creates a static lib (.a file) and installs
both the 32 and 64 to /usr/lib/, which is not working because the 64 and 32
bit lib overwrite each other.

I found the following gcc queries give me the correct target install dir on
cygwin64 [2]:

$ gcc -m64 -print-search-dirs | grep ^libraries | sed 's/^libraries: =//;
s/:/\n/g;' | grep -v ^/usr/lib/gcc | grep -v "^/usr/lib/$(gcc
-dumpmachine)/" | head -n 1
/usr/lib/../lib/

$ gcc -m32 -print-search-dirs | grep ^libraries | sed 's/^libraries: =//;
s/:/\n/g;' | grep -v ^/usr/lib/gcc | grep -v "^/usr/lib/$(gcc
-dumpmachine)/" | head -n 1
/usr/lib/../lib32/

My Google fu has failed to identify a more simple method for identifying the
"32 bit" lib dir with regards to the 64 bit gcc.

For now I am going to hard code the /usr/lib32/ in the Makefile on target
ia32 for cygwin64.

Obviously the ability for compiling 64 bin on cygwin 32 bit is a non-issue
because of the following gcc [3] error: "sorry, unimplemented: 64-bit mode
not compiled in"

Thanks!

Jason Pyeron

1: GNU EFI - https://github.com/pdinc-oss/gnu-efi/tree/cygwin-fixes

2: $ cygcheck -cd  | egrep '^(Cygwin|Package|cygwin |gcc-core)'
Cygwin Package Information
Package                  Version
cygwin                   2.5.1-1
gcc-core                 5.3.0-5

3: $ cygcheck -cd  | egrep '^(Cygwin|Package|cygwin |gcc-core)'
Cygwin Package Information
Package                                  Version
cygwin                                   2.4.1-1
gcc-core                                 4.9.3-1

--
410-424-5524
Jason Pyeron
PMC Member
CipherShed
www.ciphershed.org


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

