[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing for compiler capabilities

From: David Fang
Subject: Re: Testing for compiler capabilities
Date: Tue, 22 Aug 2006 14:11:28 -0400 (EDT)

On Tue, 22 Aug 2006, Jan Engelhardt wrote:

> Hi David,
> I am afraid using -Werror does not work, it really needs -fvis.. on the
> command line:
> $ cat x.c
> int __attribute__((visibility("hidden"))) mx(void) { return 1337; }
> $ cc -c x.c -Wall -Werror
> (No error)
> $ cc -c x.c -Wall -Werror -fvisibility=hidden
> cc1: error: unrecognized option `-fvisibility=hidden'

Then the test is even simpler: compile an empty or trivial source file
with the same m4 test and replace -Werror with -fvisibility=hidden.
This is how I test for individual command-line options, where no
sophisticated diagnosis of the outcome is required (just success/fail).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]