* M1 MAC - libraries
@ 2023-07-30 23:34 Rajagopalan Srinivasan 192/73
2023-07-31 7:58 ` Simon Wright
0 siblings, 1 reply; 4+ messages in thread
From: Rajagopalan Srinivasan 192/73 @ 2023-07-30 23:34 UTC (permalink / raw)
What is the way to specify platform dependent Linker options on a Mac?
for linux I use something like the following in my gpr file:
case os is
when "GNU/Linux" =>
not sure what is equivalent for the M1 Mac?
thanks, Srini
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: M1 MAC - libraries
2023-07-30 23:34 M1 MAC - libraries Rajagopalan Srinivasan 192/73
@ 2023-07-31 7:58 ` Simon Wright
2023-07-31 9:07 ` Rajagopalan Srinivasan 192/73
2023-07-31 16:25 ` Dennis Lee Bieber
0 siblings, 2 replies; 4+ messages in thread
From: Simon Wright @ 2023-07-31 7:58 UTC (permalink / raw)
"Rajagopalan Srinivasan 192/73" <rsrinivasan@alumni.iitm.ac.in> writes:
> What is the way to specify platform dependent Linker options on a Mac?
>
> for linux I use something like the following in my gpr file:
>
> case os is
>
> when "GNU/Linux" =>
>
> not sure what is equivalent for the M1 Mac?
What is "os" in the above? If it's the environment variable OS then,
indeed, there's no equivalent on macOS (either kind of silicon).
I don't know whether Windows defines "OS", but if it does you could just
set Darwin (or whatever) as the default?
OS := external ("OS", "Darwin");
If you're using Alire, the generated config/{crate}_config.gpr contains
on macOS
Alire_Host_OS := "macos";
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: M1 MAC - libraries
2023-07-31 7:58 ` Simon Wright
@ 2023-07-31 9:07 ` Rajagopalan Srinivasan 192/73
2023-07-31 16:25 ` Dennis Lee Bieber
1 sibling, 0 replies; 4+ messages in thread
From: Rajagopalan Srinivasan 192/73 @ 2023-07-31 9:07 UTC (permalink / raw)
On Monday, July 31, 2023 at 3:59:04 AM UTC-4, Simon Wright wrote:
> "Rajagopalan Srinivasan 192/73" <rsrin...@alumni.iitm.ac.in> writes:
>
> > What is the way to specify platform dependent Linker options on a Mac?
> >
> > for linux I use something like the following in my gpr file:
> >
> > case os is
> >
> > when "GNU/Linux" =>
> >
> > not sure what is equivalent for the M1 Mac?
> What is "os" in the above? If it's the environment variable OS then,
> indeed, there's no equivalent on macOS (either kind of silicon).
>
> I don't know whether Windows defines "OS", but if it does you could just
> set Darwin (or whatever) as the default?
>
> OS := external ("OS", "Darwin");
>
> If you're using Alire, the generated config/{crate}_config.gpr contains
> on macOS
>
> Alire_Host_OS := "macOS";
Excellent suggestion. The following worked:
package Linker is
case audio_config.Alire_Host_OS is
when "macos" =>
for Switches("Ada") use ("-L/opt/homebrew/lib/", "-lsndfile");
when others =>
for Switches("Ada") use ("-lsndfile");
end case;
end Linker;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: M1 MAC - libraries
2023-07-31 7:58 ` Simon Wright
2023-07-31 9:07 ` Rajagopalan Srinivasan 192/73
@ 2023-07-31 16:25 ` Dennis Lee Bieber
1 sibling, 0 replies; 4+ messages in thread
From: Dennis Lee Bieber @ 2023-07-31 16:25 UTC (permalink / raw)
On Mon, 31 Jul 2023 08:58:59 +0100, Simon Wright <simon@pushface.org>
declaimed the following:
>I don't know whether Windows defines "OS", but if it does you could just
>set Darwin (or whatever) as the default?
>
Window 10 Pro:
C:\Users\Owner>echo %os%
Windows_NT
C:\Users\Owner>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-31 16:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-30 23:34 M1 MAC - libraries Rajagopalan Srinivasan 192/73
2023-07-31 7:58 ` Simon Wright
2023-07-31 9:07 ` Rajagopalan Srinivasan 192/73
2023-07-31 16:25 ` Dennis Lee Bieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox