[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing for unknown flags in different compilers
From: |
Thomas Jahns |
Subject: |
Re: Testing for unknown flags in different compilers |
Date: |
Thu, 20 Feb 2014 11:26:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 |
Hello all,
On 02/19/14 22:05, Dale Visser wrote:
> I have been working on a changes whereby an autoconf user can invoke a macro
> like
>
> AC_WARN_ADD([-Wextra])
>
> to add user-specified flags to the compiler/linker invocations. Ideally we
> would like
I'm unclear what tool(s) you want to affect (is the flag going to be added to
CFLAGS, CXXFLAGS, FCFLAGS? depending on language mode or CFLAGS only? if the
latter shouldn't the name have something like CC in it).
Also this is going to cause all sorts problems for compilers that use -W for
something else entirely, for example on PowerPC xlc has
-W<program>,<options_list>
so simply adding some arbitrary -Wsomecharactersequence might easily cause
catastrophic results later on. I suggest your macro at least try to make sure
your compiler is GNU CC before modifying CFLAGS in any way.
Also users should have an option to deselect this because software tends to get
distributed to systems where system headers cause one warning or another.
In my opinion you are trying to solve a development issue with a tool that has
the explicit purpose of being useful for non-developers.
Regards, Thomas
--
Thomas Jahns
DKRZ GmbH, Department: Application software
Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg
Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <address@hidden>
smime.p7s
Description: S/MIME Cryptographic Signature