From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:bd44:0:b0:76c:ab4f:e9a7 with SMTP id n65-20020a37bd44000000b0076cab4fe9a7mr10595qkf.13.1690794477589; Mon, 31 Jul 2023 02:07:57 -0700 (PDT) X-Received: by 2002:a05:6808:158c:b0:3a5:a78c:568 with SMTP id t12-20020a056808158c00b003a5a78c0568mr17559477oiw.9.1690794477225; Mon, 31 Jul 2023 02:07:57 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 31 Jul 2023 02:07:56 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=108.16.14.5; posting-account=oDmVuAoAAAB1y-q7iD-iUFbo80QOjrKV NNTP-Posting-Host: 108.16.14.5 References: <23b32951-0629-4227-bc10-fdf10d3cd7e4n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9ec74936-e79c-4cea-8304-b45237d8e61cn@googlegroups.com> Subject: Re: M1 MAC - libraries From: "Rajagopalan Srinivasan 192/73" Injection-Date: Mon, 31 Jul 2023 09:07:57 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2414 Xref: news.eternal-september.org comp.lang.ada:65470 List-Id: On Monday, July 31, 2023 at 3:59:04=E2=80=AFAM UTC-4, Simon Wright wrote: > "Rajagopalan Srinivasan 192/73" writes:=20 >=20 > > What is the way to specify platform dependent Linker options on a Mac?= =20 > >=20 > > for linux I use something like the following in my gpr file:=20 > >=20 > > case os is=20 > >=20 > > when "GNU/Linux" =3D>=20 > >=20 > > not sure what is equivalent for the M1 Mac? > What is "os" in the above? If it's the environment variable OS then,=20 > indeed, there's no equivalent on macOS (either kind of silicon).=20 >=20 > I don't know whether Windows defines "OS", but if it does you could just= =20 > set Darwin (or whatever) as the default?=20 >=20 > OS :=3D external ("OS", "Darwin");=20 >=20 > If you're using Alire, the generated config/{crate}_config.gpr contains= =20 > on macOS=20 >=20 > Alire_Host_OS :=3D "macOS"; Excellent suggestion. The following worked: package Linker is case audio_config.Alire_Host_OS is when "macos" =3D> for Switches("Ada") use ("-L/opt/homebrew/lib/", "-lsndfile"); when others =3D> for Switches("Ada") use ("-lsndfile"); end case; end Linker;