Giter Club home page Giter Club logo

rra-c-util's People

Contributors

adeason avatar dependabot[bot] avatar ewxrjk avatar jhutz avatar julien-elie avatar kraai avatar nwf avatar rra avatar yumkam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rra-c-util's Issues

Documentation of m4 substitution variables with optional library support

The comment is not right in three m4 macros (bdb.m4, sasl.m4, zlib.m4). For instance:

dnl Provides the RRA_LIB_BDB_OPTIONAL macro, which should be used if Berkeley
dnl DB support is optional.  This macro will still always set the substitution
dnl variables, but they'll be empty unless --with-bdb is given.

It should rather be they'll be empty unless Berkeley DB libraries are found and --without-bdb is not given.

The comment in libevent.m4, openssl.m4, pcre.m4, remctl.m4 and sqlite3.m4 could be homogenized in a similar way. It currently merely says If it isn't found, the substitution variables will be empty or a variation with unless the library is found without mentioning the --without-xxx flag.

Also, there's a typo in "ecurrent" in kadm5clnt.m4.

Probing existing Clang warnings

m4/cc-flags.m4 checks for supported warning flags but it seems that Clang always reports them as available because unknown options are not an error by default, but only a warning.
It defeats the purpose of m4/cc-flags.m4...

configure:31771: checking if clang supports -Wformat-overflow=2
configure:31796: clang -c -g -O2 -Wformat-overflow=2  conftest.c >&5
warning: unknown warning option '-Wformat-overflow=2'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option]
1 warning generated.
configure:31796: $? = 0
configure:31805: result: yes

Besides, even for real Clang flags, the check should only report them as available when using a release supporting it (some warning options are not present in all versions).

I don't know whether you wish to do something in rra-c-util about that. You could for instance check for $CLANG in RRA_PROG_CC_FLAG and then add -Werror=unknown-warning-option for the check, or add a new parameter to RRA_PROG_CC_FLAG for additional flags to use during the probe.

For INN, I've added that quick work-around (which works).
If the compiler recognizes -Werror=unknown-warning-option, add it to $CFLAGS:

RRA_PROG_CC_FLAG([-Werror=unknown-warning-option],
                 [CFLAGS="$CFLAGS -Werror=unknown-warning-option"], [])

Then run all the RRA_PROG_CC_FLAG probes for compiler warnings, hardening flags etc.
And afterwards, remove that flag from $CFLAGS:

CFLAGS=`AS_ECHO(["${CFLAGS}"]) | sed 's/ -Werror=unknown-warning-option//'`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.