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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Gprbuild - Setting the earliest version of MacOS X that an executable will run on. Date: Mon, 27 Mar 2017 08:26:00 +0100 Organization: A noiseless patient Spider Message-ID: References: <6f8cefdc-9f22-43ef-97fc-5835d9376bc1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="2c4d1ae3dfa75454e139cc23729edbbe"; logging-data="3548"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19onAz4iMwxjtbnHBBdlCvUBL0arD8BHA8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:x5hgO5W2ZXzEkrZkaitCXkk3Klg= sha1:fnD93fENDLxCIQ/CEQUD3nOhafY= Xref: news.eternal-september.org comp.lang.ada:46485 Date: 2017-03-27T08:26:00+01:00 List-Id: ahlan.marriott@gmail.com writes: > However I don't understand you proposed workaround to the linker. > "-Wl,-macosx_version_min,'sw_vers -productVersion'" > When I try this Gnat says > -macosx_version_min value malformed: 'sw_vers -productVersion' Those were *backticks*, and the workround would need to be applied on the command line (since gprbuild can't execute arbitrary shell commands internally). If you say gprbuild -P foo -largs -Wl,-macosx_version_min,`sw_vers -productVersion` under a Unix-type sh-like shell (e.g. bash), the shell will execute the part in backticks and substitute the result (in this case, 10.12.3) in the command line actually passed to gprbuild. I suppose you could set up an environment variable export OS_VER=`sw_vers -productVersion` and use 'case' magic inside your GPR.