• M1 MAC - libraries

    From Rajagopalan Srinivasan 192/73@21:1/5 to All on Sun Jul 30 16:34:36 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to rsrinivasan@alumni.iitm.ac.in on Mon Jul 31 08:58:59 2023
    "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";

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rajagopalan Srinivasan 192/73@21:1/5 to Simon Wright on Mon Jul 31 02:07:56 2023
    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;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Lee Bieber@21:1/5 to All on Mon Jul 31 12:25:27 2023
    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>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)