From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5e286d7d7d00a665 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.84.74 with SMTP id w10mr2398221wiy.4.1352117103190; Mon, 05 Nov 2012 04:05:03 -0800 (PST) Path: q13ni159488wii.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newspeer1.nac.net!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-hub.siol.net!news.mi.ras.ru!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT library directory - how to detect it at build time? Date: Mon, 29 Oct 2012 15:08:24 +0000 Organization: A noiseless patient Spider Message-ID: References: <967e4a44-2eb6-4d4b-b191-0e7a575da911@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="36fd3459bdfc79b1cfb1716bdcdac508"; logging-data="7813"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wtGeinuysGPUPYUClZKRclDtVpHx4ETE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:Qk9oT/B4SyoFHSanMFQepBwGK8Y= sha1:3VVVA3EXtYvwHY0uO5/KExzCM2Y= Content-Type: text/plain Date: 2012-10-29T15:08:24+00:00 List-Id: Maciej Sobczak writes: > Hi, > > I have two Linux systems. On one GNAT keeps its library files in the > following directory: > > /usr/lib/gcc/i486-linux-gnu/4.4 > > but on the other the directory is: > > /usr/lib/gcc/x86_64-linux-gnu/4.6 > > Normally I do not need to name these directories during compilation > and linking, because GNAT is smart enough to use them when > needed. Except for files that are directly in these directories and > can that be needed for linking. GNAT is not smart enough to find these > files automatically and project files have to be carefully crafted to > work around that. > > Is there a way to obtain these paths in the automatic way (say, via > standard GPR variables or something like that) or to abstract them > away with a link that is perhaps installed by GNAT always in the same > place but that I have not yet discovered? Not sure these will help ... $ gnatgcc --print-libgcc-file-name /opt/gcc-4.7.0/lib/gcc/x86_64-apple-darwin11/4.7.0/libgcc.a or $ gnatgcc --print-file-name=libgcc.a /opt/gcc-4.7.0/lib/gcc/x86_64-apple-darwin11/4.7.0/libgcc.a or the surprising $ gnatgcc --print-file-name=adalib/libgnat.a /opt/gcc-4.7.0/lib/gcc/x86_64-apple-darwin11/4.7.0/adalib/libgnat.a