From d10bff0743a777a89530995d8e89a369c8ce735c Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 25 Sep 2019 22:47:41 +0200 Subject: [PATCH] Remove obsolete patches Signed-off-by: David Abdurachmanov --- samba-4.9.0rc5-parallel-builds.patch | 55 ------------- samba-4.9.0rc5-stack-protector.patch | 117 --------------------------- 2 files changed, 172 deletions(-) delete mode 100644 samba-4.9.0rc5-parallel-builds.patch delete mode 100644 samba-4.9.0rc5-stack-protector.patch diff --git a/samba-4.9.0rc5-parallel-builds.patch b/samba-4.9.0rc5-parallel-builds.patch deleted file mode 100644 index 06feaae..0000000 --- a/samba-4.9.0rc5-parallel-builds.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 2f1c716ffef351a56aa5bd0a26c3dd1e34d3283a Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Thu, 6 Sep 2018 12:40:10 +0200 -Subject: [PATCH] wafsamba: Deal with make -j - -Currently only make -j works for parallel builds and make -j4 results in -no parallel jobs at all. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13606 - -Signed-off-by: Andreas Schneider -Reviewed-by: Alexander Bokovoy ---- - buildtools/wafsamba/samba_utils.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py -index 30e99432d1b..fd61b8425d8 100644 ---- a/buildtools/wafsamba/samba_utils.py -+++ b/buildtools/wafsamba/samba_utils.py -@@ -448,6 +448,7 @@ def CHECK_MAKEFLAGS(bld): - if makeflags is None: - return - jobs_set = False -+ jobs = None - # we need to use shlex.split to cope with the escaping of spaces - # in makeflags - for opt in shlex.split(makeflags): -@@ -470,17 +471,21 @@ def CHECK_MAKEFLAGS(bld): - setattr(Options.options, opt[0:loc], opt[loc+1:]) - elif opt[0] != '-': - for v in opt: -- if v == 'j': -+ if re.search(r'j[0-9]*$', v): - jobs_set = True -+ jobs = opt.strip('j') - elif v == 'k': - Options.options.keep = True -- elif opt == '-j': -+ elif re.search(r'-j[0-9]*$', opt): - jobs_set = True -+ jobs = opt.strip('-j') - elif opt == '-k': - Options.options.keep = True - if not jobs_set: - # default to one job - Options.options.jobs = 1 -+ elif jobs_set and jobs: -+ Options.options.jobs = int(jobs) - - Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS - --- -2.18.0 - diff --git a/samba-4.9.0rc5-stack-protector.patch b/samba-4.9.0rc5-stack-protector.patch deleted file mode 100644 index 51bc83a..0000000 --- a/samba-4.9.0rc5-stack-protector.patch +++ /dev/null @@ -1,117 +0,0 @@ -From e2dd47233f467e2ab80564968be4af6da6505161 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 3 Sep 2018 10:35:08 +0200 -Subject: [PATCH 1/2] waf: Check for -fstack-protect-strong support - -The -fstack-protector* flags are compiler only flags, don't pass them to -the linker. - -https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/ - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 38e97f8b52e85bdfcf2d74a4fb3c848fa46ba371) ---- - buildtools/wafsamba/samba_autoconf.py | 36 ++++++++++++++------------- - 1 file changed, 19 insertions(+), 17 deletions(-) - -diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py -index c4391d0c4dc..bfd6f9710db 100644 ---- a/buildtools/wafsamba/samba_autoconf.py -+++ b/buildtools/wafsamba/samba_autoconf.py -@@ -674,23 +674,25 @@ def SAMBA_CONFIG_H(conf, path=None): - return - - # we need to build real code that can't be optimized away to test -- if conf.check(fragment=''' -- #include -- -- int main(void) -- { -- char t[100000]; -- while (fgets(t, sizeof(t), stdin)); -- return 0; -- } -- ''', -- execute=0, -- ccflags='-fstack-protector', -- ldflags='-fstack-protector', -- mandatory=False, -- msg='Checking if toolchain accepts -fstack-protector'): -- conf.ADD_CFLAGS('-fstack-protector') -- conf.ADD_LDFLAGS('-fstack-protector') -+ stack_protect_list = ['-fstack-protector-strong', '-fstack-protector'] -+ for stack_protect_flag in stack_protect_list: -+ flag_supported = conf.check(fragment=''' -+ #include -+ -+ int main(void) -+ { -+ char t[100000]; -+ while (fgets(t, sizeof(t), stdin)); -+ return 0; -+ } -+ ''', -+ execute=0, -+ ccflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag], -+ mandatory=False, -+ msg='Checking if compiler accepts %s' % (stack_protect_flag)) -+ if flag_supported: -+ conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag)) -+ break - - if Options.options.debug: - conf.ADD_CFLAGS('-g', testflags=True) --- -2.18.0 - - -From 09f3acb3497efb9ebb8a0d7d199726a8c318e4f8 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 3 Sep 2018 10:49:52 +0200 -Subject: [PATCH 2/2] waf: Add -fstack-clash-protection - -https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/ - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit fc4df251c88365142515a81bea1120b2b84cc4a0) ---- - buildtools/wafsamba/samba_autoconf.py | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py -index bfd6f9710db..f2b3ec8db8d 100644 ---- a/buildtools/wafsamba/samba_autoconf.py -+++ b/buildtools/wafsamba/samba_autoconf.py -@@ -694,6 +694,23 @@ def SAMBA_CONFIG_H(conf, path=None): - conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag)) - break - -+ flag_supported = conf.check(fragment=''' -+ #include -+ -+ int main(void) -+ { -+ char t[100000]; -+ while (fgets(t, sizeof(t), stdin)); -+ return 0; -+ } -+ ''', -+ execute=0, -+ ccflags=[ '-Werror', '-fstack-clash-protection'], -+ mandatory=False, -+ msg='Checking if compiler accepts -fstack-clash-protection') -+ if flag_supported: -+ conf.ADD_CFLAGS('-fstack-clash-protection') -+ - if Options.options.debug: - conf.ADD_CFLAGS('-g', testflags=True) - --- -2.18.0 -