@@ -69,6 +69,8 @@ Options: [defaults in brackets after descriptions]
6969 --libdevdir=PATH install development libraries in PATH [$libdevdir ]
7070 --mandir=PATH install man pages in PATH [$mandir ]
7171 --datadir=PATH install shared data in PATH [$datadir ]
72+ --cc=CMD use CMD as the C compiler
73+ --cxx=CMD use CMD as the C++ compiler
7274EOF
7375exit 0
7476fi
@@ -191,6 +193,37 @@ print_and_output_mak "relativelibdir" "$relativelibdir"
191193print_and_output_mak " mandir" " $mandir "
192194print_and_output_mak " datadir" " $datadir "
193195
196+ # #########################################
197+ # check for compiler -Wstringop-overflow
198+ stringop_overflow=" no"
199+ cat > $TMPC << EOF
200+ #include <linux/fs.h>
201+ int main(int argc, char **argv)
202+ {
203+ return 0;
204+ }
205+ EOF
206+ if compile_prog " -Werror -Wstringop-overflow=0" " " " stringop_overflow" ; then
207+ stringop_overflow=" yes"
208+ fi
209+ print_config " stringop_overflow" " $stringop_overflow "
210+
211+ # #########################################
212+ # check for compiler -Warryr-bounds
213+ array_bounds=" no"
214+ cat > $TMPC << EOF
215+ #include <linux/fs.h>
216+ int main(int argc, char **argv)
217+ {
218+ return 0;
219+ }
220+ EOF
221+ if compile_prog " -Werror -Warray-bounds=0" " " " array_bounds" ; then
222+ array_bounds=" yes"
223+ fi
224+ print_config " array_bounds" " $array_bounds "
225+
226+
194227# #########################################
195228# check for __kernel_rwf_t
196229__kernel_rwf_t=" no"
@@ -296,6 +329,7 @@ int main(int argc, char **argv)
296329{
297330 ucontext_t ctx;
298331 getcontext(&ctx);
332+ makecontext(&ctx, 0, 0);
299333 return 0;
300334}
301335EOF
325359if test " $has_ucontext " = " yes" ; then
326360 output_sym " CONFIG_HAVE_UCONTEXT"
327361fi
362+ if test " $stringop_overflow " = " yes" ; then
363+ output_sym " CONFIG_HAVE_STRINGOP_OVERFLOW"
364+ fi
365+ if test " $array_bounds " = " yes" ; then
366+ output_sym " CONFIG_HAVE_ARRAY_BOUNDS"
367+ fi
328368
329369echo " CC=$cc " >> $config_host_mak
330370print_config " CC" " $cc "
0 commit comments