Add -Wformat explicitly wherever -Wformat-security appears
[barrelfish] / usr / openssh / src / Hakefile
1 --------------------------------------------------------------------------
2 -- Copyright (c) 2012, ETH Zurich
3 -- All rights reserved.
4 --
5 -- This file is distributed under the terms in the attached LICENSE file.
6 -- If you do not find this file, copies can be found by writing to:
7 -- ETH Zurich D-INFK, CAB F.78, Universitaetstr. 6, CH-8092 Zurich,
8 -- Attn: Systems Group.
9 --
10 -- Hakefile for usr/openssh/src
11 --
12 --------------------------------------------------------------------------
13
14 [
15     build library { target = "ssh",
16                     addCFlags = [ "-Wpointer-arith",
17                                   "-Wuninitialized",
18                                   "-Wsign-compare",
19                                   "-Wformat",
20                                   "-Wformat-security",
21                                   "-Wno-pointer-sign",
22                                   "-Wno-unused-result",
23                                   "-fno-strict-aliasing",
24                                   "-D_FORTIFY_SOURCE=2",
25                                   "-DHAVE_CONFIG_H" ],
26                     omitCFlags = [ "-Wredundant-decls",
27                                    "-Werror" ],
28                     cFiles = [ "acss.c",
29                                "addrmatch.c",
30                                "atomicio.c",
31                                "authfd.c",
32                                "authfile.c",
33                                "bufaux.c",
34                                "bufbn.c",
35                                "bufec.c",
36                                "buffer.c",
37                                "canohost.c",
38                                "channels.c",
39                                "cipher-3des1.c",
40                                "cipher-acss.c",
41                                "cipher-aes.c",
42                                "cipher-bf1.c",
43                                "cipher.c",
44                                "cipher-ctr.c",
45                                "cleanup.c",
46                                "compat.c",
47                                "compress.c",
48                                "crc32.c",
49                                "deattack.c",
50                                "dh.c",
51                                "dispatch.c",
52                                "dns.c",
53                                "entropy.c",
54                                "fatal.c",
55                                "gss-genr.c",
56                                "hostfile.c",
57                                "jpake.c",
58                                "kex.c",
59                                "kexdh.c",
60                                "kexdhc.c",
61                                "kexecdh.c",
62                                "kexecdhc.c",
63                                "kexgex.c",
64                                "kexgexc.c",
65                                "key.c",
66                                "log.c",
67                                "mac.c",
68                                "match.c",
69                                "md-sha256.c",
70                                "misc.c",
71                                "moduli.c",
72                                "monitor_fdpass.c",
73                                "msg.c",
74                                "nchan.c",
75                                "packet.c",
76                                "progressmeter.c",
77                                "readpass.c",
78                                "rijndael.c",
79                                "rsa.c",
80                                "schnorr.c",
81                                "ssh-dss.c",
82                                "ssh-ecdsa.c",
83                                "ssh-pkcs11.c",
84                                "ssh-rsa.c",
85                                "ttymodes.c",
86                                "uidswap.c",
87                                "umac.c",
88                                "uuencode.c",
89                                "xmalloc.c"
90                              ],
91                     addIncludes = [ "../" ] -- for config.h
92                   },
93
94     build application { target = "sshd",
95                         addCFlags = [ "-Wpointer-arith",
96                                       "-Wuninitialized",
97                                       "-Wsign-compare",
98                                       "-Wformat",
99                                       "-Wformat-security",
100                                       "-Wno-pointer-sign",
101                                       "-Wno-unused-result",
102                                       "-fno-strict-aliasing",
103                                       "-D_FORTIFY_SOURCE=2",
104                                       "-DHAVE_CONFIG_H" ],
105                         omitCFlags = [ "-Wredundant-decls",
106                                        "-Werror" ],
107                         cFiles = [ "audit-bsm.c",
108                                    "audit.c",
109                                    "audit-linux.c",
110                                    "auth1.c",
111                                    "auth2.c",
112                                    "auth2-chall.c",
113                                    "auth2-gss.c",
114                                    "auth2-hostbased.c",
115                                    "auth2-jpake.c",
116                                    "auth2-kbdint.c",
117                                    "auth2-none.c",
118                                    "auth2-passwd.c",
119                                    "auth2-pubkey.c",
120                                    "auth-bsdauth.c",
121                                    "auth.c",
122                                    "auth-chall.c",
123                                    "auth-krb5.c",
124                                    "auth-options.c",
125                                    "auth-pam.c",
126                                    "auth-passwd.c",
127                                    "auth-rhosts.c",
128                                    "auth-rh-rsa.c",
129                                    "auth-rsa.c",
130                                    "auth-shadow.c",
131                                    "auth-sia.c",
132                                    "auth-skey.c",
133                                    "groupaccess.c",
134                                    "gss-serv.c",
135                                    "gss-serv-krb5.c",
136                                    "kexdhs.c",
137                                    "kexecdhs.c",
138                                    "kexgexs.c",
139                                    "loginrec.c",
140                                    "md5crypt.c",
141                                    "monitor.c",
142                                    "monitor_mm.c",
143                                    "monitor_wrap.c",
144                                    "platform.c",
145                                    "roaming_common.c",
146                                    "roaming_serv.c",
147                                    "sandbox-darwin.c",
148                                    "sandbox-null.c",
149                                    "sandbox-rlimit.c",
150                                    "sandbox-seccomp-filter.c",
151                                    "sandbox-systrace.c",
152                                    "servconf.c",
153                                    "serverloop.c",
154                                    "session.c",
155                                    "sftp-common.c",
156                                    "sftp-server.c",
157                                    "sshd.c",
158                                    "sshlogin.c",
159                                    "sshpty.c"
160                                  ],
161                         addLibraries = libDeps [ "angler",
162                                                  "crypto",
163                                                  "lwip",
164                                                  "openbsdcompat",
165                                                  "posixcompat",
166                                                  "ssh",
167                                                  "vfs"
168                                                ],
169                         -- The library lwip is directly used for lwip_init_auto.
170                         -- The library vfs is directly used for vfs_init.
171                         addIncludes = [ "../" ] -- for config.h
172                       },
173
174     build application { target = "ssh-keygen",
175                         addCFlags = [ "-Wpointer-arith",
176                                       "-Wuninitialized",
177                                       "-Wsign-compare",
178                                       "-Wformat-security",
179                                       "-Wno-pointer-sign",
180                                       "-Wno-unused-result",
181                                       "-fno-strict-aliasing",
182                                       "-D_FORTIFY_SOURCE=2",
183                                       "-DHAVE_CONFIG_H" ],
184                         omitCFlags = [ "-Werror" ],
185                         cFiles = [ "ssh-keygen.c" ],
186                         addLibraries = libDeps [ "crypto",
187                                                  "posixcompat",
188                                                  "openbsdcompat",
189                                                  "ssh"
190                                                ],
191                         addIncludes = [ "../" ] -- for config.h
192                       }
193 ]