--- buildtools/wafsamba/samba_autoconf.py.orig 2019-02-26 16:44:21.000000000 +1000 +++ buildtools/wafsamba/samba_autoconf.py 2022-01-03 12:06:26.781461000 +1000 @@ -700,6 +700,7 @@ cflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag], mandatory=False, msg='Checking if compiler accepts %s' % (stack_protect_flag)) + break if flag_supported: conf.ADD_CFLAGS('%s' % (stack_protect_flag)) break