ports/net/samba416/files/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch
Timur I. Bakeyev 2daf87ac19 net/samba416: New port for Samba 4.16
This is an initial attempt to add Samba to the FreeBSD after major
rewrite of the VFS code in the upstream.

Most of the port development is now carried in:

     https://gitlab.com/samba-freebsd

Due to the way how new Samba VFS code is written there is a constrain
that Samba 4.14+ can run only on FreeBSD 13.1+, as it requires support
of the `nodup` option for the `fdesc` file system, as well as it's
presence in the system in general.

    https://gitlab.com/samba-freebsd/-/wikis/The-New-VFS

I'd like to thank CyberSecure Pty Ltd. company for their supoort of
the port development and Andrew Walker from iXsystems Inc. for the
patches he created and made available for the Samba4 on TrueNAS.

PR:		263874
2022-10-17 01:23:12 +02:00

39 lines
1.7 KiB
Diff

From 3189d57e9c6cf8d5d25566f2760cfa4f822d7a2c Mon Sep 17 00:00:00 2001
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
Date: Sun, 30 May 2021 03:21:19 +0200
Subject: [PATCH 09/28] Make sure that config checks fail if the warning is
raised, by adding -Werror flag to the CFLAGS(WERROR_CFLAGS)
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
---
buildtools/wafsamba/samba_autoconf.py | 2 +-
lib/replace/wscript | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 78927d85193..cf87c8bb9ff 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -987,5 +987,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
if (conf.env.undefined_ignore_ldflags == [] and
- conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])):
+ conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)):
conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 0db93d8caf1..1f9806f1dd7 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -122,7 +122,7 @@ def configure(conf):
conf.CHECK_HEADERS('sys/atomic.h stdatomic.h')
conf.CHECK_HEADERS('libgen.h')
- if conf.CHECK_CFLAGS('-Wno-format-truncation'):
+ if conf.CHECK_CFLAGS(['-Wno-format-truncation'] + conf.env.WERROR_CFLAGS):
conf.define('HAVE_WNO_FORMAT_TRUNCATION', '1')
if conf.CHECK_CFLAGS('-Wno-unused-function'):
--
2.37.1