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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Trying to install the latest GtkAda for Mac on Mojave using Community 2018 Date: Mon, 04 Feb 2019 15:44:35 +0000 Organization: A noiseless patient Spider Message-ID: References: <91fd8c43-e858-4e16-9113-daa049924adf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="bae8230a0c8e36b68d67e46d2603ee86"; logging-data="32242"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hDst1ywSjvnE0P6nS4qg1OrhKmEkyIc4=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:c+mtAdGsKyMgcMbaMRPMENSEFU4= sha1:Bmqi49jEDkSxXrmcLTGYLr4yKSg= Xref: reader01.eternal-september.org comp.lang.ada:55440 Date: 2019-02-04T15:44:35+00:00 List-Id: ahlan@marriott.org writes: > When I type Make I now get > > ld: unknown option: -Wl > collect2: error: ld returned 1 exit status This is odd. gprbuild (or gnatmake) calls gnatlink which calls gcc (or maybe g++) which eventually calls the system ld with appropriate arguments. -Wl starts an instruction to gcc to pass an argument through to the system linker: if you say -Wl,-foo,bar then ld sees ld ... -foo bar ... (see https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html). Ah! the first comma is important: I just tried this, $ gnatmake raiser.adb -largs -Wl gcc -c raiser.adb gnatbind -x raiser.ali gnatlink raiser.ali -Wl gcc: error: unrecognized command line option '-Wl'; did you mean '-W'? gnatlink: error when calling /opt/gcc-8.1.0/bin/gcc gnatmake: *** link failed. Maybe there's a problem in the Makefile.