Merge branch '3729-drop-RHEL-7-and-clones-support' into 'main'

Drop RHEL / CentOS / Oracle Linux 7 support

Closes #3729

See merge request isc-projects/bind9!7346
This commit is contained in:
Ondřej Surý 2023-02-08 20:34:01 +00:00
commit 4ebf27bc19
12 changed files with 58 additions and 314 deletions

View file

@ -111,10 +111,6 @@ stages:
# Oracle Linux
.oraclelinux-7-amd64: &oraclelinux_7_amd64_image
image: "$CI_REGISTRY_IMAGE:oraclelinux-7-amd64"
<<: *linux_amd64
.oraclelinux-8-amd64: &oraclelinux_8_amd64_image
image: "$CI_REGISTRY_IMAGE:oraclelinux-8-amd64"
<<: *linux_amd64
@ -591,30 +587,6 @@ unit:gcc:alpine3.16:amd64:
- job: gcc:alpine3.16:amd64
artifacts: true
# Jobs for regular GCC builds on Oracle Linux 7 (amd64)
gcc:oraclelinux7:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *oraclelinux_7_amd64_image
<<: *build_job
system:gcc:oraclelinux7:amd64:
<<: *oraclelinux_7_amd64_image
<<: *system_test_job
needs:
- job: gcc:oraclelinux7:amd64
artifacts: true
unit:gcc:oraclelinux7:amd64:
<<: *oraclelinux_7_amd64_image
<<: *unit_test_job
needs:
- job: gcc:oraclelinux7:amd64
artifacts: true
# Jobs for regular GCC builds on Oracle Linux 8 (amd64)
gcc:oraclelinux8:amd64:

View file

@ -1,3 +1,5 @@
6091. [cleanup] Drop RHEL 7 and clones support. [GL #3729]
6090. [bug] Fix a bug in resolver's resume_dslookup() function by
making sure that dns_resolver_createfetch() is called
with valid parameters, as required by the function.

View file

@ -309,12 +309,47 @@ AC_CHECK_HEADERS([fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sy
])
#
# Check for thread local storage
# Check for C11 thread local storage
#
# NOTE: OpenBSD doesn't ship <threads.h>, so we can't require it (yet).
#
AC_CHECK_HEADERS([threads.h])
AX_TLS([AS_IF([test "$ac_cv_tls" != "thread_local"],
[AC_DEFINE_UNQUOTED([thread_local], [$ac_cv_tls], [Define if the compiler uses a different keyword than thread_local for TLS variables])])],
[AC_MSG_ERROR([Thread Local Storage support required, update your toolchain to build BIND 9])])
#
# C11 Atomic Operations
#
AC_CHECK_HEADERS([stdatomic.h],
[],
[AC_MSG_ERROR([C11 Atomic Operations required, update your toolchain to build BIND 9])])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_CHECKING([whether -latomic is needed for 64-bit stdatomic.h functions])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_RESULT([no])],
[LIBS="$LIBS -latomic"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, please fix your toolchain.])])
])
],
[AC_MSG_FAILURE([stdatomic.h header found, but compilation failed, please fix your toolchain.])])
AC_CHECK_HEADERS([stdalign.h stdnoreturn.h],
[],
[AC_MSG_ERROR([C11 standard headers not found, update your toolchain.])])
AC_C_CONST
AC_C_INLINE
@ -1100,73 +1135,6 @@ AC_COMPILE_IFELSE(
#
AC_CHECK_FUNCS([if_nametoindex])
ISC_ATOMIC_LIBS=""
AC_CHECK_HEADERS(
[stdatomic.h],
[AC_MSG_CHECKING([for memory model aware atomic operations])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_RESULT([stdatomic.h])
AC_MSG_CHECKING([whether -latomic is needed for 64-bit stdatomic.h functions])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_RESULT([no])],
[ISC_ATOMIC_LIBS="-latomic"
AX_SAVE_FLAGS([atomic])
LIBS="$LIBS $ISC_ATOMIC_LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdatomic.h>]],
[[atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);]]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, please fix your toolchain.])])
AX_RESTORE_FLAGS([atomic])
])
],
[AC_MSG_FAILURE([stdatomic.h header found, but compilation failed, please fix your toolchain.])]
)],
[AC_MSG_CHECKING([for memory model aware atomic operations])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <inttypes.h>]],
[[int32_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED);]]
)],
[AC_MSG_RESULT([__atomic builtins])
AC_DEFINE([HAVE___ATOMIC], [1], [define if __atomic builtins are not available])
AC_MSG_CHECKING([whether -latomic is needed for 64-bit __atomic builtins])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <inttypes.h>]],
[[int64_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED);]]
)],
[AC_MSG_RESULT([no])],
[ISC_ATOMIC_LIBS="-latomic"
AX_SAVE_FLAGS([atomic])
LIBS="$LIBS $ISC_ATOMIC_LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <inttypes.h>]],
[[int64_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED);]]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, please fix your toolchain.])])
AX_RESTORE_FLAGS([atomic])
])
],
[AC_MSG_FAILURE([not found])
])
])
LIBS="$LIBS $ISC_ATOMIC_LIBS"
AC_CHECK_HEADERS([stdalign.h stdnoreturn.h])
AC_CHECK_HEADERS([uchar.h])
#

View file

@ -20,20 +20,18 @@ found in the ISC Knowledgebase:
https://kb.isc.org/docs/supported-platforms
In general, this version of BIND will build and run on any
POSIX-compliant system with a C11-compliant C compiler, BSD-style
POSIX-compliant system with a modern C11 (or better) compiler, BSD-style
sockets with RFC-compliant IPv6 support, POSIX-compliant threads, and
the :ref:`required libraries <build_dependencies>`.
The following C11 features are used in BIND 9:
The following C11 features are required to compile BIND 9:
- Atomic operations support, either in the form of C11 atomics or
**__atomic** builtin operations.
- Atomic operations support defined in <stdatomic.h>
- Thread Local Storage support, either in the form of C11
**_Thread_local**/**thread_local**, or the **__thread** GCC
extension.
- Thread Local Storage support defined in <threads.h>
The C11 variants are preferred.
Where it makes sense, BIND 9 uses C-standard fixes introduced by C17 update
of the C11 standard.
ISC regularly tests BIND on many operating systems and architectures,
but lacks the resources to test all of them. Consequently, ISC is only
@ -48,7 +46,7 @@ following systems:
- Debian 11
- Ubuntu LTS 20.04, 22.04
- Fedora 37
- Red Hat Enterprise Linux / CentOS / Oracle Linux 7, 8, 9
- Red Hat Enterprise Linux / CentOS / Oracle Linux 8, 9
- FreeBSD 12.3, 13.1
- OpenBSD 7.2
- Alpine Linux 3.16
@ -70,7 +68,7 @@ regularly by ISC.
- NetBSD
- Other Linux distributions still supported by their vendors, such as:
- Ubuntu 20.10+
- Ubuntu 22.10+
- Gentoo
- Arch Linux
@ -91,7 +89,7 @@ supported platforms.
- Platforms past or close to their respective EOL dates, such as:
- Ubuntu 14.04, 16.04, 18.04 (Ubuntu ESM releases are not supported)
- CentOS 6
- Red Hat Enterprise Linux / CentOS / Oracle Linux 6, 7
- Debian 8 Jessie, 9 Stretch, 10 Buster
- FreeBSD 10.x, 11.x

View file

@ -25,7 +25,9 @@ New Features
Removed Features
~~~~~~~~~~~~~~~~
- None.
- Support for Red Hat Enterprise Linux version 7 (and clones) has been dropped.
A C11 compliant compiler (or better) is now required to compile BIND 9.
:gl:`#3729`
Feature Changes
~~~~~~~~~~~~~~~

View file

@ -86,7 +86,6 @@ libisc_la_HEADERS = \
include/isc/sockaddr.h \
include/isc/stat.h \
include/isc/stats.h \
include/isc/stdatomic.h \
include/isc/stdio.h \
include/isc/stdtime.h \
include/isc/strerr.h \

View file

@ -13,11 +13,7 @@
#pragma once
#if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
#include <stdatomic.h>
#else
#include <isc/stdatomic.h>
#endif
#include <isc/util.h>

View file

@ -1,125 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#if HAVE_UCHAR_H
#include <uchar.h>
#endif /* HAVE_UCHAR_H */
/* GCC 4.7.0 introduced __atomic builtins, but not the __GNUC_ATOMICS define */
#if !defined(__GNUC_ATOMICS) && __GNUC__ == 4 && __GNUC_MINOR__ >= 7
#define __GNUC_ATOMICS
#endif
#if !defined(__GNUC_ATOMICS)
#error "isc/stdatomic.h does not support your compiler"
#endif /* if !defined(__GNUC_ATOMICS) */
typedef enum memory_order {
memory_order_relaxed = __ATOMIC_RELAXED,
memory_order_consume = __ATOMIC_CONSUME,
memory_order_acquire = __ATOMIC_ACQUIRE,
memory_order_release = __ATOMIC_RELEASE,
memory_order_acq_rel = __ATOMIC_ACQ_REL,
memory_order_seq_cst = __ATOMIC_SEQ_CST
} memory_order;
#ifndef HAVE_UCHAR_H
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#endif /* HAVE_UCHAR_H */
typedef bool atomic_bool;
typedef char atomic_char;
typedef signed char atomic_schar;
typedef unsigned char atomic_uchar;
typedef short atomic_short;
typedef unsigned short atomic_ushort;
typedef int atomic_int;
typedef unsigned int atomic_uint;
typedef long atomic_long;
typedef unsigned long atomic_ulong;
typedef long long atomic_llong;
typedef unsigned long long atomic_ullong;
typedef char16_t atomic_char16_t;
typedef char32_t atomic_char32_t;
typedef wchar_t atomic_wchar_t;
typedef int_least8_t atomic_int_least8_t;
typedef uint_least8_t atomic_uint_least8_t;
typedef int_least16_t atomic_int_least16_t;
typedef uint_least16_t atomic_uint_least16_t;
typedef int_least32_t atomic_int_least32_t;
typedef uint_least32_t atomic_uint_least32_t;
typedef int_least64_t atomic_int_least64_t;
typedef uint_least64_t atomic_uint_least64_t;
typedef int_fast8_t atomic_int_fast8_t;
typedef uint_fast8_t atomic_uint_fast8_t;
typedef int_fast16_t atomic_int_fast16_t;
typedef uint_fast16_t atomic_uint_fast16_t;
typedef int_fast32_t atomic_int_fast32_t;
typedef uint_fast32_t atomic_uint_fast32_t;
typedef int_fast64_t atomic_int_fast64_t;
typedef uint_fast64_t atomic_uint_fast64_t;
typedef intptr_t atomic_intptr_t;
typedef uintptr_t atomic_uintptr_t;
typedef size_t atomic_size_t;
typedef ptrdiff_t atomic_ptrdiff_t;
typedef intmax_t atomic_intmax_t;
typedef uintmax_t atomic_uintmax_t;
#define atomic_init(obj, desired) (*obj = desired)
#define atomic_load_explicit(obj, order) __atomic_load_n(obj, order)
#define atomic_store_explicit(obj, desired, order) \
__atomic_store_n(obj, desired, order)
#define atomic_fetch_add_explicit(obj, arg, order) \
__atomic_fetch_add(obj, arg, order)
#define atomic_fetch_sub_explicit(obj, arg, order) \
__atomic_fetch_sub(obj, arg, order)
#define atomic_fetch_and_explicit(obj, arg, order) \
__atomic_fetch_and(obj, arg, order)
#define atomic_fetch_or_explicit(obj, arg, order) \
__atomic_fetch_or(obj, arg, order)
#define atomic_compare_exchange_strong_explicit(obj, expected, desired, succ, \
fail) \
__atomic_compare_exchange_n(obj, expected, desired, 0, succ, fail)
#define atomic_compare_exchange_weak_explicit(obj, expected, desired, succ, \
fail) \
__atomic_compare_exchange_n(obj, expected, desired, 1, succ, fail)
#define atomic_exchange_explicit(obj, desired, order) \
__atomic_exchange_n(obj, desired, order)
#define atomic_load(obj) atomic_load_explicit(obj, memory_order_seq_cst)
#define atomic_store(obj, arg) \
atomic_store_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_add(obj, arg) \
atomic_fetch_add_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_sub(obj, arg) \
atomic_fetch_sub_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_and(obj, arg) \
atomic_fetch_and_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_or(obj, arg) \
atomic_fetch_or_explicit(obj, arg, memory_order_seq_cst)
#define atomic_compare_exchange_strong(obj, expected, desired) \
atomic_compare_exchange_strong_explicit(obj, expected, desired, \
memory_order_seq_cst, \
memory_order_seq_cst)
#define atomic_compare_exchange_weak(obj, expected, desired) \
atomic_compare_exchange_weak_explicit(obj, expected, desired, \
memory_order_seq_cst, \
memory_order_seq_cst)
#define atomic_exchange(obj, desired) \
atomic_exchange_explicit(obj, desired, memory_order_seq_cst)

View file

@ -16,8 +16,11 @@
/*! \file */
#include <pthread.h>
#if HAVE_THREADS_H
#include <threads.h>
#else
#define thread_local _Thread_local
#endif
#if defined(HAVE_PTHREAD_NP_H)

View file

@ -17,6 +17,7 @@
#include <openssl/opensslv.h>
#include <isc/iterated_hash.h>
#include <isc/thread.h>
#include <isc/util.h>
#if OPENSSL_VERSION_NUMBER < 0x30000000L || OPENSSL_API_LEVEL < 30000

View file

@ -16,6 +16,7 @@
#include <unistd.h>
#include <isc/lang.h>
#include <isc/thread.h>
#include <isc/tid.h>
#include <isc/util.h>

View file

@ -1,73 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-3.0
#
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_tls.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_TLS([action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
# Provides a test for the compiler support of thread local storage (TLS)
# extensions. Defines TLS if it is found. Currently knows about C++11,
# GCC/ICC, and MSVC. I think SunPro uses the same as GCC, and Borland
# apparently supports either.
#
# LICENSE
#
# Copyright (c) 2008 Alan Woodland <ajw05@aber.ac.uk>
# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 15
AC_DEFUN([AX_TLS], [
AC_MSG_CHECKING([for thread local storage (TLS) class])
AC_CACHE_VAL([ac_cv_tls],
[for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do
AS_CASE([$ax_tls_keyword],
[none], [ac_cv_tls=none ; break],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <stdlib.h>],
[static $ax_tls_keyword int bar;]
)],
[ac_cv_tls=$ax_tls_keyword ; break],
[ac_cv_tls=none]
)]
)
done ]
)
AC_MSG_RESULT([$ac_cv_tls])
AS_IF([test "$ac_cv_tls" != "none"],
[AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class, define it to that here])
m4_ifnblank([$1],[$1],[[:]])],
[m4_ifnblank([$2],[$2],[[:]])])
])