3 # The olsr.org Optimized Link-State Routing daemon (olsrd)
5 # (c) by the OLSR project
7 # See our Git repository to find out who worked on this file
8 # and thus is a copyright holder on it.
10 # All rights reserved.
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
16 # * Redistributions of source code must retain the above copyright
17 # notice, this list of conditions and the following disclaimer.
18 # * Redistributions in binary form must reproduce the above copyright
19 # notice, this list of conditions and the following disclaimer in
20 # the documentation and/or other materials provided with the
22 # * Neither the name of olsr.org, olsrd nor the names of its
23 # contributors may be used to endorse or promote products derived
24 # from this software without specific prior written permission.
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
29 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
30 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
32 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 # POSSIBILITY OF SUCH DAMAGE.
39 # Visit http://www.olsr.org for more information.
41 # If you find this software useful feel free to make a donation
42 # to the project. For more information see the website or contact
43 # the copyright holders.
47 # We expect warning options for gcc as arguments and return the ones which are
48 # accepted by the given gcc.
54 # make sure we do not use some locale ....
55 export LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_NUMERIC=C
60 -[fWm]?*) OPTS="$OPTS $param";;
61 *) echo "Ignoring $param" >&2
66 $CC $OPTS -x c -o /dev/null - 2>&1 <<- EOF
76 *ld:\ unrecognized\ *option\ \'*)
83 # if we come here, we have in $opt the option to remove. and
84 # we remove all instances. And we save agoinst leading "-"
88 -Wl,$opt) : echo "Removed $o" >&2;;
89 *) NEW_OPTS="$NEW_OPTS $o";;
97 testcompile | parsetest