From a301dc364c336bee58950f88e040f825df840b60 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Fri, 31 May 2024 15:11:00 -0700 Subject: [PATCH 001/151] ZTS: Fix redacted_send failures on FreeBSD We're seeing failures for redacted_deleted and redacted_mount on FreeBSD 13-15: 09:58:34.74 diff: /dev/fd/3: No such file or directory 09:58:34.74 ERROR: diff /dev/fd/3 /dev/fd/4 exited 2 The test was trying to diff the file listings between two directories to see if they are the same. The workaround is to do a string comparison of the directory listings instead of using `diff`. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #16224 --- .../tests/functional/redacted_send/redacted_deleted.ksh | 2 +- .../tests/functional/redacted_send/redacted_mounts.ksh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh b/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh index 3e2aeb733546..ec11610742fb 100755 --- a/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh +++ b/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh @@ -96,7 +96,7 @@ log_must zfs destroy -R $clone2 log_must eval "zfs send -i $sendfs#book2 --redact book3 $sendfs@snap2 >$stream" log_must eval "zfs recv $recvfs <$stream" log_must mount_redacted -f $recvfs -log_must diff <(ls $send_mnt) <(ls $recv_mnt) +log_must [ "$(ls $send_mnt)" == "$(ls $recv_mnt)" ] log_must zfs destroy -R $recvfs log_must zfs rollback -R $sendfs@snap diff --git a/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh b/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh index 0bc4bf461747..c041469163c5 100755 --- a/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh +++ b/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh @@ -71,8 +71,7 @@ log_must ismounted $recvfs # deleted. contents=$(log_must find $recv_mnt) contents_orig=$(log_must find $send_mnt) -log_must diff <(echo ${contents//$recv_mnt/}) \ - <(echo ${contents_orig//$send_mnt/}) +log_must [ "${contents//$recv_mnt/}" == "${contents_orig//$send_mnt/}" ] log_must zfs redact $sendvol@snap book2 $clonevol@snap log_must eval "zfs send --redact book2 $sendvol@snap >$stream" log_must eval "zfs receive $recvvol <$stream" @@ -103,7 +102,6 @@ log_must mount_redacted -f $recvfs log_must ismounted $recvfs contents=$(log_must find $recv_mnt) contents_orig=$(log_must find $send_mnt) -log_must diff <(echo ${contents//$recv_mnt/}) \ - <(echo ${contents_orig//$send_mnt/}) +log_must [ "${contents//$recv_mnt/}" == "${contents_orig//$send_mnt/}" ] log_pass "Received redacted streams can be mounted." From 4185179190f3dd8e4ee467452a54f1eb2ee360b9 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 18 May 2024 21:05:20 +1000 Subject: [PATCH 002/151] icp: remove unused blowfish_ctx and des_ctx Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- module/icp/include/modes/modes.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/module/icp/include/modes/modes.h b/module/icp/include/modes/modes.h index 23bf46ab51a0..950c1115f3e0 100644 --- a/module/icp/include/modes/modes.h +++ b/module/icp/include/modes/modes.h @@ -269,34 +269,6 @@ typedef struct aes_ctx { #define ac_processed_data_len acu.acu_ccm.ccm_processed_data_len #define ac_tag_len acu.acu_gcm.gcm_tag_len -typedef struct blowfish_ctx { - union { - ecb_ctx_t bcu_ecb; - cbc_ctx_t bcu_cbc; - } bcu; -} blowfish_ctx_t; - -#define bc_flags bcu.bcu_ecb.ecb_common.cc_flags -#define bc_remainder_len bcu.bcu_ecb.ecb_common.cc_remainder_len -#define bc_keysched bcu.bcu_ecb.ecb_common.cc_keysched -#define bc_keysched_len bcu.bcu_ecb.ecb_common.cc_keysched_len -#define bc_iv bcu.bcu_ecb.ecb_common.cc_iv -#define bc_lastp bcu.bcu_ecb.ecb_common.cc_lastp - -typedef struct des_ctx { - union { - ecb_ctx_t dcu_ecb; - cbc_ctx_t dcu_cbc; - } dcu; -} des_ctx_t; - -#define dc_flags dcu.dcu_ecb.ecb_common.cc_flags -#define dc_remainder_len dcu.dcu_ecb.ecb_common.cc_remainder_len -#define dc_keysched dcu.dcu_ecb.ecb_common.cc_keysched -#define dc_keysched_len dcu.dcu_ecb.ecb_common.cc_keysched_len -#define dc_iv dcu.dcu_ecb.ecb_common.cc_iv -#define dc_lastp dcu.dcu_ecb.ecb_common.cc_lastp - extern int ecb_cipher_contiguous_blocks(ecb_ctx_t *, char *, size_t, crypto_data_t *, size_t, int (*cipher)(const void *, const uint8_t *, uint8_t *)); From 57249bcddc0d743d64777d79344d03d22c1233d4 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 18 May 2024 21:57:36 +1000 Subject: [PATCH 003/151] icp: brutally remove unused AES modes Still retaining the struture, for now. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- include/sys/crypto/common.h | 17 -- lib/libicp/Makefile.am | 3 - module/Kbuild.in | 3 - module/icp/algs/aes/aes_modes.c | 37 +-- module/icp/algs/modes/cbc.c | 264 -------------------- module/icp/algs/modes/ctr.c | 227 ------------------ module/icp/algs/modes/ecb.c | 127 ---------- module/icp/algs/modes/gcm.c | 79 +----- module/icp/algs/modes/modes.c | 20 +- module/icp/include/aes/aes_impl.h | 5 - module/icp/include/modes/modes.h | 114 +-------- module/icp/io/aes.c | 384 ++---------------------------- 12 files changed, 57 insertions(+), 1223 deletions(-) delete mode 100644 module/icp/algs/modes/cbc.c delete mode 100644 module/icp/algs/modes/ctr.c delete mode 100644 module/icp/algs/modes/ecb.c diff --git a/include/sys/crypto/common.h b/include/sys/crypto/common.h index 261e88eceeea..743805650057 100644 --- a/include/sys/crypto/common.h +++ b/include/sys/crypto/common.h @@ -51,12 +51,6 @@ typedef struct crypto_mechanism { size_t cm_param_len; /* mech. parameter len */ } crypto_mechanism_t; -/* CK_AES_CTR_PARAMS provides parameters to the CKM_AES_CTR mechanism */ -typedef struct CK_AES_CTR_PARAMS { - ulong_t ulCounterBits; - uint8_t cb[16]; -} CK_AES_CTR_PARAMS; - /* CK_AES_CCM_PARAMS provides parameters to the CKM_AES_CCM mechanism */ typedef struct CK_AES_CCM_PARAMS { ulong_t ulMACSize; @@ -77,13 +71,6 @@ typedef struct CK_AES_GCM_PARAMS { ulong_t ulTagBits; } CK_AES_GCM_PARAMS; -/* CK_AES_GMAC_PARAMS provides parameters to the CKM_AES_GMAC mechanism */ -typedef struct CK_AES_GMAC_PARAMS { - uchar_t *pIv; - uchar_t *pAAD; - ulong_t ulAADLen; -} CK_AES_GMAC_PARAMS; - /* * The measurement unit bit flag for a mechanism's minimum or maximum key size. * The unit are mechanism dependent. It can be in bits or in bytes. @@ -103,12 +90,8 @@ typedef uint32_t crypto_keysize_unit_t; #define SUN_CKM_SHA512_HMAC_GENERAL "CKM_SHA512_HMAC_GENERAL" #define SUN_CKM_SHA512_224 "CKM_SHA512_224" #define SUN_CKM_SHA512_256 "CKM_SHA512_256" -#define SUN_CKM_AES_CBC "CKM_AES_CBC" -#define SUN_CKM_AES_ECB "CKM_AES_ECB" -#define SUN_CKM_AES_CTR "CKM_AES_CTR" #define SUN_CKM_AES_CCM "CKM_AES_CCM" #define SUN_CKM_AES_GCM "CKM_AES_GCM" -#define SUN_CKM_AES_GMAC "CKM_AES_GMAC" /* Data arguments of cryptographic operations */ diff --git a/lib/libicp/Makefile.am b/lib/libicp/Makefile.am index 4ba55b2158bc..f40512bec9c7 100644 --- a/lib/libicp/Makefile.am +++ b/lib/libicp/Makefile.am @@ -18,13 +18,10 @@ nodist_libicp_la_SOURCES = \ module/icp/algs/blake3/blake3_impl.c \ module/icp/algs/edonr/edonr.c \ module/icp/algs/modes/modes.c \ - module/icp/algs/modes/cbc.c \ module/icp/algs/modes/gcm_generic.c \ module/icp/algs/modes/gcm_pclmulqdq.c \ module/icp/algs/modes/gcm.c \ - module/icp/algs/modes/ctr.c \ module/icp/algs/modes/ccm.c \ - module/icp/algs/modes/ecb.c \ module/icp/algs/sha2/sha2_generic.c \ module/icp/algs/sha2/sha256_impl.c \ module/icp/algs/sha2/sha512_impl.c \ diff --git a/module/Kbuild.in b/module/Kbuild.in index 7e08374fa2b9..6e2eab22588b 100644 --- a/module/Kbuild.in +++ b/module/Kbuild.in @@ -101,10 +101,7 @@ ICP_OBJS := \ algs/blake3/blake3_generic.o \ algs/blake3/blake3_impl.o \ algs/edonr/edonr.o \ - algs/modes/cbc.o \ algs/modes/ccm.o \ - algs/modes/ctr.o \ - algs/modes/ecb.o \ algs/modes/gcm.o \ algs/modes/gcm_generic.o \ algs/modes/modes.o \ diff --git a/module/icp/algs/aes/aes_modes.c b/module/icp/algs/aes/aes_modes.c index 6a25496d050e..631e92f3542e 100644 --- a/module/icp/algs/aes/aes_modes.c +++ b/module/icp/algs/aes/aes_modes.c @@ -75,25 +75,17 @@ aes_encrypt_contiguous_blocks(void *ctx, char *data, size_t length, aes_ctx_t *aes_ctx = ctx; int rv; - if (aes_ctx->ac_flags & CTR_MODE) { - rv = ctr_mode_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CCM_MODE) { + if (aes_ctx->ac_flags & CCM_MODE) { rv = ccm_mode_encrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { rv = gcm_mode_encrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CBC_MODE) { - rv = cbc_encrypt_contiguous_blocks(ctx, - data, length, out, AES_BLOCK_LEN, aes_encrypt_block, - aes_copy_block, aes_xor_block); - } else { - rv = ecb_cipher_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block); } + else + __builtin_unreachable(); return (rv); } @@ -108,28 +100,15 @@ aes_decrypt_contiguous_blocks(void *ctx, char *data, size_t length, aes_ctx_t *aes_ctx = ctx; int rv; - if (aes_ctx->ac_flags & CTR_MODE) { - rv = ctr_mode_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (rv == CRYPTO_DATA_LEN_RANGE) - rv = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } else if (aes_ctx->ac_flags & CCM_MODE) { + if (aes_ctx->ac_flags & CCM_MODE) { rv = ccm_mode_decrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { rv = gcm_mode_decrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CBC_MODE) { - rv = cbc_decrypt_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_decrypt_block, aes_copy_block, - aes_xor_block); - } else { - rv = ecb_cipher_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_decrypt_block); - if (rv == CRYPTO_DATA_LEN_RANGE) - rv = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } + } else + __builtin_unreachable(); return (rv); } diff --git a/module/icp/algs/modes/cbc.c b/module/icp/algs/modes/cbc.c deleted file mode 100644 index d0219fb24c49..000000000000 --- a/module/icp/algs/modes/cbc.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include - -/* - * Algorithm independent CBC functions. - */ -int -cbc_encrypt_contiguous_blocks(cbc_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*encrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->cbc_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->cbc_remainder + ctx->cbc_remainder_len, - datap, - length); - ctx->cbc_remainder_len += length; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = (uint8_t *)ctx->cbc_iv; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->cbc_remainder_len > 0) { - need = block_size - ctx->cbc_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->cbc_remainder) - [ctx->cbc_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->cbc_remainder; - } else { - blockp = datap; - } - - /* - * XOR the previous cipher block or IV with the - * current clear block. - */ - xor_block(blockp, lastp); - encrypt(ctx->cbc_keysched, lastp, lastp); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - if (out_data_1_len == block_size) { - copy_block(lastp, out_data_1); - } else { - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, - lastp + out_data_1_len, - block_size - out_data_1_len); - } - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->cbc_remainder_len != 0) { - datap += need; - ctx->cbc_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->cbc_remainder, datap, remainder); - ctx->cbc_remainder_len = remainder; - ctx->cbc_copy_to = datap; - goto out; - } - ctx->cbc_copy_to = NULL; - - } while (remainder > 0); - -out: - /* - * Save the last encrypted block in the context. - */ - if (ctx->cbc_lastp != NULL) { - copy_block((uint8_t *)ctx->cbc_lastp, (uint8_t *)ctx->cbc_iv); - ctx->cbc_lastp = (uint8_t *)ctx->cbc_iv; - } - - return (CRYPTO_SUCCESS); -} - -#define OTHER(a, ctx) \ - (((a) == (ctx)->cbc_lastblock) ? (ctx)->cbc_iv : (ctx)->cbc_lastblock) - -int -cbc_decrypt_contiguous_blocks(cbc_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*decrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->cbc_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->cbc_remainder + ctx->cbc_remainder_len, - datap, - length); - ctx->cbc_remainder_len += length; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = ctx->cbc_lastp; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->cbc_remainder_len > 0) { - need = block_size - ctx->cbc_remainder_len; - - if (need > remainder) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->cbc_remainder) - [ctx->cbc_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->cbc_remainder; - } else { - blockp = datap; - } - - /* LINTED: pointer alignment */ - copy_block(blockp, (uint8_t *)OTHER((uint64_t *)lastp, ctx)); - - decrypt(ctx->cbc_keysched, blockp, - (uint8_t *)ctx->cbc_remainder); - blockp = (uint8_t *)ctx->cbc_remainder; - - /* - * XOR the previous cipher block or IV with the - * currently decrypted block. - */ - xor_block(lastp, blockp); - - /* LINTED: pointer alignment */ - lastp = (uint8_t *)OTHER((uint64_t *)lastp, ctx); - - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - memcpy(out_data_1, blockp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, blockp + out_data_1_len, - block_size - out_data_1_len); - } - - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->cbc_remainder_len != 0) { - datap += need; - ctx->cbc_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->cbc_remainder, datap, remainder); - ctx->cbc_remainder_len = remainder; - ctx->cbc_lastp = lastp; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - ctx->cbc_copy_to = NULL; - - } while (remainder > 0); - - ctx->cbc_lastp = lastp; - return (CRYPTO_SUCCESS); -} - -int -cbc_init_ctx(cbc_ctx_t *cbc_ctx, char *param, size_t param_len, - size_t block_size, void (*copy_block)(uint8_t *, uint64_t *)) -{ - /* Copy IV into context. */ - ASSERT3P(param, !=, NULL); - ASSERT3U(param_len, ==, block_size); - - copy_block((uchar_t *)param, cbc_ctx->cbc_iv); - - return (CRYPTO_SUCCESS); -} - -void * -cbc_alloc_ctx(int kmflag) -{ - cbc_ctx_t *cbc_ctx; - - if ((cbc_ctx = kmem_zalloc(sizeof (cbc_ctx_t), kmflag)) == NULL) - return (NULL); - - cbc_ctx->cbc_flags = CBC_MODE; - return (cbc_ctx); -} diff --git a/module/icp/algs/modes/ctr.c b/module/icp/algs/modes/ctr.c deleted file mode 100644 index db6b1c71d5cd..000000000000 --- a/module/icp/algs/modes/ctr.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include -#include - -/* - * Encrypt and decrypt multiple blocks of data in counter mode. - */ -int -ctr_mode_contiguous_blocks(ctr_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*cipher)(const void *ks, const uint8_t *pt, uint8_t *ct), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - uint64_t lower_counter, upper_counter; - - if (length + ctx->ctr_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->ctr_remainder + ctx->ctr_remainder_len, - datap, - length); - ctx->ctr_remainder_len += length; - ctx->ctr_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->ctr_remainder_len > 0) { - need = block_size - ctx->ctr_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->ctr_remainder) - [ctx->ctr_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->ctr_remainder; - } else { - blockp = datap; - } - - /* ctr_cb is the counter block */ - cipher(ctx->ctr_keysched, (uint8_t *)ctx->ctr_cb, - (uint8_t *)ctx->ctr_tmp); - - lastp = (uint8_t *)ctx->ctr_tmp; - - /* - * Increment Counter. - */ - lower_counter = ntohll(ctx->ctr_cb[1] & ctx->ctr_lower_mask); - lower_counter = htonll(lower_counter + 1); - lower_counter &= ctx->ctr_lower_mask; - ctx->ctr_cb[1] = (ctx->ctr_cb[1] & ~(ctx->ctr_lower_mask)) | - lower_counter; - - /* wrap around */ - if (lower_counter == 0) { - upper_counter = - ntohll(ctx->ctr_cb[0] & ctx->ctr_upper_mask); - upper_counter = htonll(upper_counter + 1); - upper_counter &= ctx->ctr_upper_mask; - ctx->ctr_cb[0] = - (ctx->ctr_cb[0] & ~(ctx->ctr_upper_mask)) | - upper_counter; - } - - /* - * XOR encrypted counter block with the current clear block. - */ - xor_block(blockp, lastp); - - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, lastp + out_data_1_len, - block_size - out_data_1_len); - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->ctr_remainder_len != 0) { - datap += need; - ctx->ctr_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->ctr_remainder, datap, remainder); - ctx->ctr_remainder_len = remainder; - ctx->ctr_copy_to = datap; - goto out; - } - ctx->ctr_copy_to = NULL; - - } while (remainder > 0); - -out: - return (CRYPTO_SUCCESS); -} - -int -ctr_mode_final(ctr_ctx_t *ctx, crypto_data_t *out, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)) -{ - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - uint8_t *p; - int i; - - if (out->cd_length < ctx->ctr_remainder_len) - return (CRYPTO_DATA_LEN_RANGE); - - encrypt_block(ctx->ctr_keysched, (uint8_t *)ctx->ctr_cb, - (uint8_t *)ctx->ctr_tmp); - - lastp = (uint8_t *)ctx->ctr_tmp; - p = (uint8_t *)ctx->ctr_remainder; - for (i = 0; i < ctx->ctr_remainder_len; i++) { - p[i] ^= lastp[i]; - } - - crypto_init_ptrs(out, &iov_or_mp, &offset); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, ctx->ctr_remainder_len); - - memcpy(out_data_1, p, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, - (uint8_t *)p + out_data_1_len, - ctx->ctr_remainder_len - out_data_1_len); - } - out->cd_offset += ctx->ctr_remainder_len; - ctx->ctr_remainder_len = 0; - return (CRYPTO_SUCCESS); -} - -int -ctr_init_ctx(ctr_ctx_t *ctr_ctx, ulong_t count, uint8_t *cb, - void (*copy_block)(uint8_t *, uint8_t *)) -{ - uint64_t upper_mask = 0; - uint64_t lower_mask = 0; - - if (count == 0 || count > 128) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - /* upper 64 bits of the mask */ - if (count >= 64) { - count -= 64; - upper_mask = (count == 64) ? UINT64_MAX : (1ULL << count) - 1; - lower_mask = UINT64_MAX; - } else { - /* now the lower 63 bits */ - lower_mask = (1ULL << count) - 1; - } - ctr_ctx->ctr_lower_mask = htonll(lower_mask); - ctr_ctx->ctr_upper_mask = htonll(upper_mask); - - copy_block(cb, (uchar_t *)ctr_ctx->ctr_cb); - ctr_ctx->ctr_lastp = (uint8_t *)&ctr_ctx->ctr_cb[0]; - ctr_ctx->ctr_flags |= CTR_MODE; - return (CRYPTO_SUCCESS); -} - -void * -ctr_alloc_ctx(int kmflag) -{ - ctr_ctx_t *ctr_ctx; - - if ((ctr_ctx = kmem_zalloc(sizeof (ctr_ctx_t), kmflag)) == NULL) - return (NULL); - - ctr_ctx->ctr_flags = CTR_MODE; - return (ctr_ctx); -} diff --git a/module/icp/algs/modes/ecb.c b/module/icp/algs/modes/ecb.c deleted file mode 100644 index e2d8e71c161c..000000000000 --- a/module/icp/algs/modes/ecb.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include - -/* - * Algorithm independent ECB functions. - */ -int -ecb_cipher_contiguous_blocks(ecb_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*cipher)(const void *ks, const uint8_t *pt, uint8_t *ct)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->ecb_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->ecb_remainder + ctx->ecb_remainder_len, - datap, - length); - ctx->ecb_remainder_len += length; - ctx->ecb_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = (uint8_t *)ctx->ecb_iv; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->ecb_remainder_len > 0) { - need = block_size - ctx->ecb_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->ecb_remainder) - [ctx->ecb_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->ecb_remainder; - } else { - blockp = datap; - } - - cipher(ctx->ecb_keysched, blockp, lastp); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, lastp + out_data_1_len, - block_size - out_data_1_len); - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->ecb_remainder_len != 0) { - datap += need; - ctx->ecb_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->ecb_remainder, datap, remainder); - ctx->ecb_remainder_len = remainder; - ctx->ecb_copy_to = datap; - goto out; - } - ctx->ecb_copy_to = NULL; - - } while (remainder > 0); - -out: - return (CRYPTO_SUCCESS); -} - -void * -ecb_alloc_ctx(int kmflag) -{ - ecb_ctx_t *ecb_ctx; - - if ((ecb_ctx = kmem_zalloc(sizeof (ecb_ctx_t), kmflag)) == NULL) - return (NULL); - - ecb_ctx->ecb_flags = ECB_MODE; - return (ecb_ctx); -} diff --git a/module/icp/algs/modes/gcm.c b/module/icp/algs/modes/gcm.c index dd8db6f97460..21f4301d584d 100644 --- a/module/icp/algs/modes/gcm.c +++ b/module/icp/algs/modes/gcm.c @@ -50,11 +50,6 @@ static uint32_t icp_gcm_impl = IMPL_FASTEST; static uint32_t user_sel_impl = IMPL_FASTEST; -static inline int gcm_init_ctx_impl(boolean_t, gcm_ctx_t *, char *, size_t, - int (*)(const void *, const uint8_t *, uint8_t *), - void (*)(uint8_t *, uint8_t *), - void (*)(uint8_t *, uint8_t *)); - #ifdef CAN_USE_GCM_ASM /* Does the architecture we run on support the MOVBE instruction? */ boolean_t gcm_avx_can_use_movbe = B_FALSE; @@ -590,40 +585,11 @@ gcm_init(gcm_ctx_t *ctx, const uint8_t *iv, size_t iv_len, return (CRYPTO_SUCCESS); } -/* - * The following function is called at encrypt or decrypt init time - * for AES GCM mode. - */ -int -gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - return (gcm_init_ctx_impl(B_FALSE, gcm_ctx, param, block_size, - encrypt_block, copy_block, xor_block)); -} - -/* - * The following function is called at encrypt or decrypt init time - * for AES GMAC mode. - */ -int -gmac_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - return (gcm_init_ctx_impl(B_TRUE, gcm_ctx, param, block_size, - encrypt_block, copy_block, xor_block)); -} - /* * Init the GCM context struct. Handle the cycle and avx implementations here. - * Initialization of a GMAC context differs slightly from a GCM context. */ -static inline int -gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, +int +gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)) @@ -635,22 +601,16 @@ gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, if (param != NULL) { gcm_param = (CK_AES_GCM_PARAMS *)(void *)param; - if (gmac_mode == B_FALSE) { - /* GCM mode. */ - if ((rv = gcm_validate_args(gcm_param)) != 0) { - return (rv); - } - gcm_ctx->gcm_flags |= GCM_MODE; - - size_t tbits = gcm_param->ulTagBits; - tag_len = CRYPTO_BITS2BYTES(tbits); - iv_len = gcm_param->ulIvLen; - } else { - /* GMAC mode. */ - gcm_ctx->gcm_flags |= GMAC_MODE; - tag_len = CRYPTO_BITS2BYTES(AES_GMAC_TAG_BITS); - iv_len = AES_GMAC_IV_LEN; + /* GCM mode. */ + if ((rv = gcm_validate_args(gcm_param)) != 0) { + return (rv); } + gcm_ctx->gcm_flags |= GCM_MODE; + + size_t tbits = gcm_param->ulTagBits; + tag_len = CRYPTO_BITS2BYTES(tbits); + iv_len = gcm_param->ulIvLen; + gcm_ctx->gcm_tag_len = tag_len; gcm_ctx->gcm_processed_data_len = 0; @@ -684,10 +644,9 @@ gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, } /* * If this is a GCM context, use the MOVBE and the BSWAP - * variants alternately. GMAC contexts code paths do not - * use the MOVBE instruction. + * variants alternately. */ - if (gcm_ctx->gcm_use_avx == B_TRUE && gmac_mode == B_FALSE && + if (gcm_ctx->gcm_use_avx == B_TRUE && zfs_movbe_available() == B_TRUE) { (void) atomic_toggle_boolean_nv( (volatile boolean_t *)&gcm_avx_can_use_movbe); @@ -758,18 +717,6 @@ gcm_alloc_ctx(int kmflag) return (gcm_ctx); } -void * -gmac_alloc_ctx(int kmflag) -{ - gcm_ctx_t *gcm_ctx; - - if ((gcm_ctx = kmem_zalloc(sizeof (gcm_ctx_t), kmflag)) == NULL) - return (NULL); - - gcm_ctx->gcm_flags = GMAC_MODE; - return (gcm_ctx); -} - /* GCM implementation that contains the fastest methods */ static gcm_impl_ops_t gcm_fastest_impl = { .name = "fastest" diff --git a/module/icp/algs/modes/modes.c b/module/icp/algs/modes/modes.c index 6f6649b3b58b..786a89f10c90 100644 --- a/module/icp/algs/modes/modes.c +++ b/module/icp/algs/modes/modes.c @@ -126,20 +126,7 @@ crypto_free_mode_ctx(void *ctx) { common_ctx_t *common_ctx = (common_ctx_t *)ctx; - switch (common_ctx->cc_flags & - (ECB_MODE|CBC_MODE|CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) { - case ECB_MODE: - kmem_free(common_ctx, sizeof (ecb_ctx_t)); - break; - - case CBC_MODE: - kmem_free(common_ctx, sizeof (cbc_ctx_t)); - break; - - case CTR_MODE: - kmem_free(common_ctx, sizeof (ctr_ctx_t)); - break; - + switch (common_ctx->cc_flags & (CCM_MODE|GCM_MODE)) { case CCM_MODE: if (((ccm_ctx_t *)ctx)->ccm_pt_buf != NULL) vmem_free(((ccm_ctx_t *)ctx)->ccm_pt_buf, @@ -149,9 +136,12 @@ crypto_free_mode_ctx(void *ctx) break; case GCM_MODE: - case GMAC_MODE: gcm_clear_ctx((gcm_ctx_t *)ctx); kmem_free(ctx, sizeof (gcm_ctx_t)); + break; + + default: + __builtin_unreachable(); } } diff --git a/module/icp/include/aes/aes_impl.h b/module/icp/include/aes/aes_impl.h index 66eb4a6c8fb6..d26ced58ff1e 100644 --- a/module/icp/include/aes/aes_impl.h +++ b/module/icp/include/aes/aes_impl.h @@ -149,13 +149,8 @@ extern int aes_decrypt_contiguous_blocks(void *ctx, char *data, size_t length, #ifdef _AES_IMPL typedef enum aes_mech_type { - AES_ECB_MECH_INFO_TYPE, /* SUN_CKM_AES_ECB */ - AES_CBC_MECH_INFO_TYPE, /* SUN_CKM_AES_CBC */ - AES_CBC_PAD_MECH_INFO_TYPE, /* SUN_CKM_AES_CBC_PAD */ - AES_CTR_MECH_INFO_TYPE, /* SUN_CKM_AES_CTR */ AES_CCM_MECH_INFO_TYPE, /* SUN_CKM_AES_CCM */ AES_GCM_MECH_INFO_TYPE, /* SUN_CKM_AES_GCM */ - AES_GMAC_MECH_INFO_TYPE /* SUN_CKM_AES_GMAC */ } aes_mech_type_t; #endif /* _AES_IMPL */ diff --git a/module/icp/include/modes/modes.h b/module/icp/include/modes/modes.h index 950c1115f3e0..daa0335b5c3b 100644 --- a/module/icp/include/modes/modes.h +++ b/module/icp/include/modes/modes.h @@ -45,12 +45,8 @@ extern "C" { extern boolean_t gcm_avx_can_use_movbe; #endif -#define ECB_MODE 0x00000002 -#define CBC_MODE 0x00000004 -#define CTR_MODE 0x00000008 #define CCM_MODE 0x00000010 #define GCM_MODE 0x00000020 -#define GMAC_MODE 0x00000040 /* * cc_keysched: Pointer to key schedule. @@ -76,7 +72,7 @@ extern boolean_t gcm_avx_can_use_movbe; * by the caller, or internally, e.g. an init routine. * If allocated by the latter, then it needs to be freed. * - * ECB_MODE, CBC_MODE, CTR_MODE, or CCM_MODE + * CCM_MODE */ struct common_ctx { void *cc_keysched; @@ -91,57 +87,6 @@ struct common_ctx { typedef struct common_ctx common_ctx_t; -typedef struct ecb_ctx { - struct common_ctx ecb_common; - uint64_t ecb_lastblock[2]; -} ecb_ctx_t; - -#define ecb_keysched ecb_common.cc_keysched -#define ecb_keysched_len ecb_common.cc_keysched_len -#define ecb_iv ecb_common.cc_iv -#define ecb_remainder ecb_common.cc_remainder -#define ecb_remainder_len ecb_common.cc_remainder_len -#define ecb_lastp ecb_common.cc_lastp -#define ecb_copy_to ecb_common.cc_copy_to -#define ecb_flags ecb_common.cc_flags - -typedef struct cbc_ctx { - struct common_ctx cbc_common; - uint64_t cbc_lastblock[2]; -} cbc_ctx_t; - -#define cbc_keysched cbc_common.cc_keysched -#define cbc_keysched_len cbc_common.cc_keysched_len -#define cbc_iv cbc_common.cc_iv -#define cbc_remainder cbc_common.cc_remainder -#define cbc_remainder_len cbc_common.cc_remainder_len -#define cbc_lastp cbc_common.cc_lastp -#define cbc_copy_to cbc_common.cc_copy_to -#define cbc_flags cbc_common.cc_flags - -/* - * ctr_lower_mask Bit-mask for lower 8 bytes of counter block. - * ctr_upper_mask Bit-mask for upper 8 bytes of counter block. - */ -typedef struct ctr_ctx { - struct common_ctx ctr_common; - uint64_t ctr_lower_mask; - uint64_t ctr_upper_mask; - uint32_t ctr_tmp[4]; -} ctr_ctx_t; - -/* - * ctr_cb Counter block. - */ -#define ctr_keysched ctr_common.cc_keysched -#define ctr_keysched_len ctr_common.cc_keysched_len -#define ctr_cb ctr_common.cc_iv -#define ctr_remainder ctr_common.cc_remainder -#define ctr_remainder_len ctr_common.cc_remainder_len -#define ctr_lastp ctr_common.cc_lastp -#define ctr_copy_to ctr_common.cc_copy_to -#define ctr_flags ctr_common.cc_flags - /* * * ccm_mac_len: Stores length of the MAC in CCM mode. @@ -241,27 +186,21 @@ typedef struct gcm_ctx { #define gcm_copy_to gcm_common.cc_copy_to #define gcm_flags gcm_common.cc_flags -#define AES_GMAC_IV_LEN 12 -#define AES_GMAC_TAG_BITS 128 - void gcm_clear_ctx(gcm_ctx_t *ctx); typedef struct aes_ctx { union { - ecb_ctx_t acu_ecb; - cbc_ctx_t acu_cbc; - ctr_ctx_t acu_ctr; ccm_ctx_t acu_ccm; gcm_ctx_t acu_gcm; } acu; } aes_ctx_t; -#define ac_flags acu.acu_ecb.ecb_common.cc_flags -#define ac_remainder_len acu.acu_ecb.ecb_common.cc_remainder_len -#define ac_keysched acu.acu_ecb.ecb_common.cc_keysched -#define ac_keysched_len acu.acu_ecb.ecb_common.cc_keysched_len -#define ac_iv acu.acu_ecb.ecb_common.cc_iv -#define ac_lastp acu.acu_ecb.ecb_common.cc_lastp +#define ac_flags acu.acu_ccm.ccm_common.cc_flags +#define ac_remainder_len acu.acu_ccm.ccm_common.cc_remainder_len +#define ac_keysched acu.acu_ccm.ccm_common.cc_keysched +#define ac_keysched_len acu.acu_ccm.ccm_common.cc_keysched_len +#define ac_iv acu.acu_ccm.ccm_common.cc_iv +#define ac_lastp acu.acu_ccm.ccm_common.cc_lastp #define ac_pt_buf acu.acu_ccm.ccm_pt_buf #define ac_mac_len acu.acu_ccm.ccm_mac_len #define ac_data_len acu.acu_ccm.ccm_data_len @@ -269,27 +208,6 @@ typedef struct aes_ctx { #define ac_processed_data_len acu.acu_ccm.ccm_processed_data_len #define ac_tag_len acu.acu_gcm.gcm_tag_len -extern int ecb_cipher_contiguous_blocks(ecb_ctx_t *, char *, size_t, - crypto_data_t *, size_t, int (*cipher)(const void *, const uint8_t *, - uint8_t *)); - -extern int cbc_encrypt_contiguous_blocks(cbc_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*encrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - -extern int cbc_decrypt_contiguous_blocks(cbc_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*decrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - -extern int ctr_mode_contiguous_blocks(ctr_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*cipher)(const void *, const uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - extern int ccm_mode_encrypt_contiguous_blocks(ccm_ctx_t *, char *, size_t, crypto_data_t *, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), @@ -332,15 +250,6 @@ extern int gcm_decrypt_final(gcm_ctx_t *, crypto_data_t *, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); -extern int ctr_mode_final(ctr_ctx_t *, crypto_data_t *, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)); - -extern int cbc_init_ctx(cbc_ctx_t *, char *, size_t, size_t, - void (*copy_block)(uint8_t *, uint64_t *)); - -extern int ctr_init_ctx(ctr_ctx_t *, ulong_t, uint8_t *, - void (*copy_block)(uint8_t *, uint8_t *)); - extern int ccm_init_ctx(ccm_ctx_t *, char *, int, boolean_t, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); @@ -350,11 +259,6 @@ extern int gcm_init_ctx(gcm_ctx_t *, char *, size_t, void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); -extern int gmac_init_ctx(gcm_ctx_t *, char *, size_t, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - extern void calculate_ccm_mac(ccm_ctx_t *, uint8_t *, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)); @@ -364,12 +268,8 @@ extern void crypto_init_ptrs(crypto_data_t *, void **, offset_t *); extern void crypto_get_ptrs(crypto_data_t *, void **, offset_t *, uint8_t **, size_t *, uint8_t **, size_t); -extern void *ecb_alloc_ctx(int); -extern void *cbc_alloc_ctx(int); -extern void *ctr_alloc_ctx(int); extern void *ccm_alloc_ctx(int); extern void *gcm_alloc_ctx(int); -extern void *gmac_alloc_ctx(int); extern void crypto_free_mode_ctx(void *); #ifdef __cplusplus diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index 522c436497bc..a4ef1716710e 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -40,18 +40,6 @@ * Mechanism info structure passed to KCF during registration. */ static const crypto_mech_info_t aes_mech_info_tab[] = { - /* AES_ECB */ - {SUN_CKM_AES_ECB, AES_ECB_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_CBC */ - {SUN_CKM_AES_CBC, AES_CBC_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_CTR */ - {SUN_CKM_AES_CTR, AES_CTR_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, /* AES_CCM */ {SUN_CKM_AES_CCM, AES_CCM_MECH_INFO_TYPE, CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | @@ -60,11 +48,6 @@ static const crypto_mech_info_t aes_mech_info_tab[] = { {SUN_CKM_AES_GCM, AES_GCM_MECH_INFO_TYPE, CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_GMAC */ - {SUN_CKM_AES_GMAC, AES_GMAC_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC | - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, }; static int aes_encrypt_init(crypto_ctx_t *, crypto_mechanism_t *, @@ -103,20 +86,6 @@ static const crypto_cipher_ops_t aes_cipher_ops = { .decrypt_atomic = aes_decrypt_atomic }; -static int aes_mac_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, - crypto_data_t *, crypto_spi_ctx_template_t); -static int aes_mac_verify_atomic(crypto_mechanism_t *, crypto_key_t *, - crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - -static const crypto_mac_ops_t aes_mac_ops = { - .mac_init = NULL, - .mac = NULL, - .mac_update = NULL, - .mac_final = NULL, - .mac_atomic = aes_mac_atomic, - .mac_verify_atomic = aes_mac_verify_atomic -}; - static int aes_create_ctx_template(crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t *, size_t *); static int aes_free_context(crypto_ctx_t *); @@ -129,7 +98,7 @@ static const crypto_ctx_ops_t aes_ctx_ops = { static const crypto_ops_t aes_crypto_ops = { NULL, &aes_cipher_ops, - &aes_mac_ops, + NULL, &aes_ctx_ops, }; @@ -141,7 +110,6 @@ static const crypto_provider_info_t aes_prov_info = { }; static crypto_kcf_provider_handle_t aes_prov_handle = 0; -static crypto_data_t null_crypto_data = { CRYPTO_DATA_RAW }; int aes_mod_init(void) @@ -181,18 +149,6 @@ aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx) int rv = CRYPTO_SUCCESS; switch (mechanism->cm_type) { - case AES_ECB_MECH_INFO_TYPE: - param_required = B_FALSE; - alloc_fun = ecb_alloc_ctx; - break; - case AES_CBC_MECH_INFO_TYPE: - param_len = AES_BLOCK_LEN; - alloc_fun = cbc_alloc_ctx; - break; - case AES_CTR_MECH_INFO_TYPE: - param_len = sizeof (CK_AES_CTR_PARAMS); - alloc_fun = ctr_alloc_ctx; - break; case AES_CCM_MECH_INFO_TYPE: param_len = sizeof (CK_AES_CCM_PARAMS); alloc_fun = ccm_alloc_ctx; @@ -201,13 +157,8 @@ aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx) param_len = sizeof (CK_AES_GCM_PARAMS); alloc_fun = gcm_alloc_ctx; break; - case AES_GMAC_MECH_INFO_TYPE: - param_len = sizeof (CK_AES_GMAC_PARAMS); - alloc_fun = gmac_alloc_ctx; - break; default: - rv = CRYPTO_MECHANISM_INVALID; - return (rv); + __builtin_unreachable(); } if (param_required && mechanism->cm_param != NULL && mechanism->cm_param_len != param_len) { @@ -282,22 +233,6 @@ aes_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, return (CRYPTO_SUCCESS); } -static void -aes_copy_block64(uint8_t *in, uint64_t *out) -{ - if (IS_P2ALIGNED(in, sizeof (uint64_t))) { - /* LINTED: pointer alignment */ - out[0] = *(uint64_t *)&in[0]; - /* LINTED: pointer alignment */ - out[1] = *(uint64_t *)&in[8]; - } else { - uint8_t *iv8 = (uint8_t *)&out[0]; - - AES_COPY_BLOCK(in, iv8); - } -} - - static int aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, crypto_data_t *ciphertext) @@ -310,35 +245,21 @@ aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, ASSERT(ctx->cc_provider_private != NULL); aes_ctx = ctx->cc_provider_private; - /* - * For block ciphers, plaintext must be a multiple of AES block size. - * This test is only valid for ciphers whose blocksize is a power of 2. - */ - if (((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) - == 0) && (plaintext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_DATA_LEN_RANGE); - ASSERT(ciphertext != NULL); /* * We need to just return the length needed to store the output. * We should not destroy the context for the following case. */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) { + switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE)) { case CCM_MODE: length_needed = plaintext->cd_length + aes_ctx->ac_mac_len; break; case GCM_MODE: length_needed = plaintext->cd_length + aes_ctx->ac_tag_len; break; - case GMAC_MODE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - - length_needed = aes_ctx->ac_tag_len; - break; default: - length_needed = plaintext->cd_length; + __builtin_unreachable(); } if (ciphertext->cd_length < length_needed) { @@ -382,7 +303,7 @@ aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, ciphertext->cd_offset - saved_offset; } ciphertext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { /* * gcm_encrypt_final() will compute the MAC and append * it to existing ciphertext. So, need to adjust the left over @@ -426,15 +347,6 @@ aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, ASSERT(ctx->cc_provider_private != NULL); aes_ctx = ctx->cc_provider_private; - /* - * For block ciphers, plaintext must be a multiple of AES block size. - * This test is only valid for ciphers whose blocksize is a power of 2. - */ - if (((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) - == 0) && (ciphertext->cd_length & (AES_BLOCK_LEN - 1)) != 0) { - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - } - ASSERT(plaintext != NULL); /* @@ -443,23 +355,16 @@ aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, * * CCM: plaintext is MAC len smaller than cipher text * GCM: plaintext is TAG len smaller than cipher text - * GMAC: plaintext length must be zero */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) { + switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE)) { case CCM_MODE: length_needed = aes_ctx->ac_processed_data_len; break; case GCM_MODE: length_needed = ciphertext->cd_length - aes_ctx->ac_tag_len; break; - case GMAC_MODE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - - length_needed = 0; - break; default: - length_needed = ciphertext->cd_length; + __builtin_unreachable(); } if (plaintext->cd_length < length_needed) { @@ -499,7 +404,7 @@ aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, } plaintext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { /* order of following 2 lines MUST not be reversed */ plaintext->cd_offset = plaintext->cd_length; plaintext->cd_length = saved_length - plaintext->cd_length; @@ -571,17 +476,6 @@ aes_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext, ret = CRYPTO_ARGUMENTS_BAD; } - /* - * Since AES counter mode is a stream cipher, we call - * ctr_mode_final() to pick up any remaining bytes. - * It is an internal function that does not destroy - * the context like *normal* final routines. - */ - if ((aes_ctx->ac_flags & CTR_MODE) && (aes_ctx->ac_remainder_len > 0)) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, - ciphertext, aes_encrypt_block); - } - if (ret == CRYPTO_SUCCESS) { if (plaintext != ciphertext) ciphertext->cd_length = @@ -600,32 +494,13 @@ aes_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, crypto_data_t *plaintext) { off_t saved_offset; - size_t saved_length, out_len; + size_t saved_length; int ret = CRYPTO_SUCCESS; - aes_ctx_t *aes_ctx; ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; ASSERT(plaintext != NULL); - /* - * Compute number of bytes that will hold the plaintext. - * This is not necessary for CCM, GCM, and GMAC since these - * mechanisms never return plaintext for update operations. - */ - if ((aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) == 0) { - out_len = aes_ctx->ac_remainder_len; - out_len += ciphertext->cd_length; - out_len &= ~(AES_BLOCK_LEN - 1); - - /* return length needed to store the output */ - if (plaintext->cd_length < out_len) { - plaintext->cd_length = out_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - } - saved_offset = plaintext->cd_offset; saved_length = plaintext->cd_length; @@ -645,19 +520,6 @@ aes_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, ret = CRYPTO_ARGUMENTS_BAD; } - /* - * Since AES counter mode is a stream cipher, we call - * ctr_mode_final() to pick up any remaining bytes. - * It is an internal function that does not destroy - * the context like *normal* final routines. - */ - if ((aes_ctx->ac_flags & CTR_MODE) && (aes_ctx->ac_remainder_len > 0)) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, plaintext, - aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } - if (ret == CRYPTO_SUCCESS) { if (ciphertext != plaintext) plaintext->cd_length = @@ -685,20 +547,13 @@ aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) return (CRYPTO_ARGUMENTS_BAD); } - if (aes_ctx->ac_flags & CTR_MODE) { - if (aes_ctx->ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, data, - aes_encrypt_block); - if (ret != CRYPTO_SUCCESS) - return (ret); - } - } else if (aes_ctx->ac_flags & CCM_MODE) { + if (aes_ctx->ac_flags & CCM_MODE) { ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, data, AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); if (ret != CRYPTO_SUCCESS) { return (ret); } - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { size_t saved_offset = data->cd_offset; ret = gcm_encrypt_final((gcm_ctx_t *)aes_ctx, data, @@ -709,16 +564,6 @@ aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) } data->cd_length = data->cd_offset - saved_offset; data->cd_offset = saved_offset; - } else { - /* - * There must be no unprocessed plaintext. - * This happens if the length of the last data is - * not a multiple of the AES block length. - */ - if (aes_ctx->ac_remainder_len > 0) { - return (CRYPTO_DATA_LEN_RANGE); - } - data->cd_length = 0; } (void) aes_free_context(ctx); @@ -747,18 +592,8 @@ aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) * This happens if the length of the last ciphertext is * not a multiple of the AES block length. */ - if (aes_ctx->ac_remainder_len > 0) { - if ((aes_ctx->ac_flags & CTR_MODE) == 0) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - else { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, data, - aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - if (ret != CRYPTO_SUCCESS) - return (ret); - } - } + if (aes_ctx->ac_remainder_len > 0) + return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); if (aes_ctx->ac_flags & CCM_MODE) { /* @@ -788,7 +623,7 @@ aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) if (ret != CRYPTO_SUCCESS) { return (ret); } - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { /* * This is where all the plaintext is returned, make sure * the plaintext buffer is big enough @@ -818,10 +653,6 @@ aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) } - if ((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) == 0) { - data->cd_length = 0; - } - (void) aes_free_context(ctx); return (CRYPTO_SUCCESS); @@ -842,21 +673,6 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, ASSERT(ciphertext != NULL); - /* - * CTR, CCM, GCM, and GMAC modes do not require that plaintext - * be a multiple of AES block size. - */ - switch (mechanism->cm_type) { - case AES_CTR_MECH_INFO_TYPE: - case AES_CCM_MECH_INFO_TYPE: - case AES_GCM_MECH_INFO_TYPE: - case AES_GMAC_MECH_INFO_TYPE: - break; - default: - if ((plaintext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_DATA_LEN_RANGE); - } - if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS) return (ret); @@ -869,15 +685,11 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, case AES_CCM_MECH_INFO_TYPE: length_needed = plaintext->cd_length + aes_ctx.ac_mac_len; break; - case AES_GMAC_MECH_INFO_TYPE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - zfs_fallthrough; case AES_GCM_MECH_INFO_TYPE: length_needed = plaintext->cd_length + aes_ctx.ac_tag_len; break; default: - length_needed = plaintext->cd_length; + __builtin_unreachable(); } /* return size of buffer needed to store output */ @@ -914,21 +726,13 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, if (ret != CRYPTO_SUCCESS) goto out; ASSERT(aes_ctx.ac_remainder_len == 0); - } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE || - mechanism->cm_type == AES_GMAC_MECH_INFO_TYPE) { + } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) { ret = gcm_encrypt_final((gcm_ctx_t *)&aes_ctx, ciphertext, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); if (ret != CRYPTO_SUCCESS) goto out; ASSERT(aes_ctx.ac_remainder_len == 0); - } else if (mechanism->cm_type == AES_CTR_MECH_INFO_TYPE) { - if (aes_ctx.ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)&aes_ctx, - ciphertext, aes_encrypt_block); - if (ret != CRYPTO_SUCCESS) - goto out; - } } else { ASSERT(aes_ctx.ac_remainder_len == 0); } @@ -947,7 +751,7 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, memset(aes_ctx.ac_keysched, 0, aes_ctx.ac_keysched_len); kmem_free(aes_ctx.ac_keysched, aes_ctx.ac_keysched_len); } - if (aes_ctx.ac_flags & (GCM_MODE|GMAC_MODE)) { + if (aes_ctx.ac_flags & GCM_MODE) { gcm_clear_ctx((gcm_ctx_t *)&aes_ctx); } return (ret); @@ -968,21 +772,6 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, ASSERT(plaintext != NULL); - /* - * CCM, GCM, CTR, and GMAC modes do not require that ciphertext - * be a multiple of AES block size. - */ - switch (mechanism->cm_type) { - case AES_CTR_MECH_INFO_TYPE: - case AES_CCM_MECH_INFO_TYPE: - case AES_GCM_MECH_INFO_TYPE: - case AES_GMAC_MECH_INFO_TYPE: - break; - default: - if ((ciphertext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - } - if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS) return (ret); @@ -998,13 +787,8 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, case AES_GCM_MECH_INFO_TYPE: length_needed = ciphertext->cd_length - aes_ctx.ac_tag_len; break; - case AES_GMAC_MECH_INFO_TYPE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - length_needed = 0; - break; default: - length_needed = ciphertext->cd_length; + __builtin_unreachable(); } /* return size of buffer needed to store output */ @@ -1050,8 +834,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, } else { plaintext->cd_length = saved_length; } - } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE || - mechanism->cm_type == AES_GMAC_MECH_INFO_TYPE) { + } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) { ret = gcm_decrypt_final((gcm_ctx_t *)&aes_ctx, plaintext, AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); @@ -1063,24 +846,8 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, } else { plaintext->cd_length = saved_length; } - } else if (mechanism->cm_type != AES_CTR_MECH_INFO_TYPE) { - ASSERT(aes_ctx.ac_remainder_len == 0); - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } else { - if (aes_ctx.ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)&aes_ctx, - plaintext, aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - if (ret != CRYPTO_SUCCESS) - goto out; - } - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } + } else + __builtin_unreachable(); } else { plaintext->cd_length = saved_length; } @@ -1096,7 +863,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, if (aes_ctx.ac_pt_buf != NULL) { vmem_free(aes_ctx.ac_pt_buf, aes_ctx.ac_data_len); } - } else if (aes_ctx.ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx.ac_flags & GCM_MODE) { gcm_clear_ctx((gcm_ctx_t *)&aes_ctx); } @@ -1114,12 +881,8 @@ aes_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, size_t size; int rv; - if (mechanism->cm_type != AES_ECB_MECH_INFO_TYPE && - mechanism->cm_type != AES_CBC_MECH_INFO_TYPE && - mechanism->cm_type != AES_CTR_MECH_INFO_TYPE && - mechanism->cm_type != AES_CCM_MECH_INFO_TYPE && - mechanism->cm_type != AES_GCM_MECH_INFO_TYPE && - mechanism->cm_type != AES_GMAC_MECH_INFO_TYPE) + if (mechanism->cm_type != AES_CCM_MECH_INFO_TYPE && + mechanism->cm_type != AES_GCM_MECH_INFO_TYPE) return (CRYPTO_MECHANISM_INVALID); if ((keysched = aes_alloc_keysched(&size, KM_SLEEP)) == NULL) { @@ -1193,22 +956,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, aes_ctx->ac_keysched = keysched; switch (mechanism->cm_type) { - case AES_CBC_MECH_INFO_TYPE: - rv = cbc_init_ctx((cbc_ctx_t *)aes_ctx, mechanism->cm_param, - mechanism->cm_param_len, AES_BLOCK_LEN, aes_copy_block64); - break; - case AES_CTR_MECH_INFO_TYPE: { - CK_AES_CTR_PARAMS *pp; - - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (CK_AES_CTR_PARAMS)) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - pp = (CK_AES_CTR_PARAMS *)(void *)mechanism->cm_param; - rv = ctr_init_ctx((ctr_ctx_t *)aes_ctx, pp->ulCounterBits, - pp->cb, aes_copy_block); - break; - } case AES_CCM_MECH_INFO_TYPE: if (mechanism->cm_param == NULL || mechanism->cm_param_len != sizeof (CK_AES_CCM_PARAMS)) { @@ -1227,17 +974,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); break; - case AES_GMAC_MECH_INFO_TYPE: - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (CK_AES_GMAC_PARAMS)) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - rv = gmac_init_ctx((gcm_ctx_t *)aes_ctx, mechanism->cm_param, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - break; - case AES_ECB_MECH_INFO_TYPE: - aes_ctx->ac_flags |= ECB_MODE; } if (rv != CRYPTO_SUCCESS) { @@ -1249,75 +985,3 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, return (rv); } - -static int -process_gmac_mech(crypto_mechanism_t *mech, crypto_data_t *data, - CK_AES_GCM_PARAMS *gcm_params) -{ - /* LINTED: pointer alignment */ - CK_AES_GMAC_PARAMS *params = (CK_AES_GMAC_PARAMS *)mech->cm_param; - - if (mech->cm_type != AES_GMAC_MECH_INFO_TYPE) - return (CRYPTO_MECHANISM_INVALID); - - if (mech->cm_param_len != sizeof (CK_AES_GMAC_PARAMS)) - return (CRYPTO_MECHANISM_PARAM_INVALID); - - if (params->pIv == NULL) - return (CRYPTO_MECHANISM_PARAM_INVALID); - - gcm_params->pIv = params->pIv; - gcm_params->ulIvLen = AES_GMAC_IV_LEN; - gcm_params->ulTagBits = AES_GMAC_TAG_BITS; - - if (data == NULL) - return (CRYPTO_SUCCESS); - - if (data->cd_format != CRYPTO_DATA_RAW) - return (CRYPTO_ARGUMENTS_BAD); - - gcm_params->pAAD = (uchar_t *)data->cd_raw.iov_base; - gcm_params->ulAADLen = data->cd_length; - return (CRYPTO_SUCCESS); -} - -static int -aes_mac_atomic(crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, - crypto_spi_ctx_template_t template) -{ - CK_AES_GCM_PARAMS gcm_params; - crypto_mechanism_t gcm_mech; - int rv; - - if ((rv = process_gmac_mech(mechanism, data, &gcm_params)) - != CRYPTO_SUCCESS) - return (rv); - - gcm_mech.cm_type = AES_GCM_MECH_INFO_TYPE; - gcm_mech.cm_param_len = sizeof (CK_AES_GCM_PARAMS); - gcm_mech.cm_param = (char *)&gcm_params; - - return (aes_encrypt_atomic(&gcm_mech, - key, &null_crypto_data, mac, template)); -} - -static int -aes_mac_verify_atomic(crypto_mechanism_t *mechanism, crypto_key_t *key, - crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t template) -{ - CK_AES_GCM_PARAMS gcm_params; - crypto_mechanism_t gcm_mech; - int rv; - - if ((rv = process_gmac_mech(mechanism, data, &gcm_params)) - != CRYPTO_SUCCESS) - return (rv); - - gcm_mech.cm_type = AES_GCM_MECH_INFO_TYPE; - gcm_mech.cm_param_len = sizeof (CK_AES_GCM_PARAMS); - gcm_mech.cm_param = (char *)&gcm_params; - - return (aes_decrypt_atomic(&gcm_mech, - key, mac, &null_crypto_data, template)); -} From 4ed91dc26e63cd18817f7bd91d1590dd6514394b Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 18 May 2024 22:17:36 +1000 Subject: [PATCH 004/151] icp: remove unusued incremental cipher methods Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- module/icp/core/kcf_mech_tabs.c | 3 +- module/icp/include/sys/crypto/spi.h | 21 -- module/icp/io/aes.c | 493 +--------------------------- 3 files changed, 3 insertions(+), 514 deletions(-) diff --git a/module/icp/core/kcf_mech_tabs.c b/module/icp/core/kcf_mech_tabs.c index 41705e84bc4b..b6e693769804 100644 --- a/module/icp/core/kcf_mech_tabs.c +++ b/module/icp/core/kcf_mech_tabs.c @@ -222,8 +222,7 @@ kcf_add_mech_provider(short mech_indx, if (fg & CRYPTO_FG_DIGEST || fg & CRYPTO_FG_DIGEST_ATOMIC) class = KCF_DIGEST_CLASS; - else if (fg & CRYPTO_FG_ENCRYPT || fg & CRYPTO_FG_DECRYPT || - fg & CRYPTO_FG_ENCRYPT_ATOMIC || + else if (fg & CRYPTO_FG_ENCRYPT_ATOMIC || fg & CRYPTO_FG_DECRYPT_ATOMIC) class = KCF_CIPHER_CLASS; else if (fg & CRYPTO_FG_MAC || fg & CRYPTO_FG_MAC_ATOMIC) diff --git a/module/icp/include/sys/crypto/spi.h b/module/icp/include/sys/crypto/spi.h index 63dfce7957a8..9bcb62ac5290 100644 --- a/module/icp/include/sys/crypto/spi.h +++ b/module/icp/include/sys/crypto/spi.h @@ -89,27 +89,8 @@ typedef struct crypto_digest_ops { * with the kernel using crypto_register_provider(9F). */ typedef struct crypto_cipher_ops { - int (*encrypt_init)(crypto_ctx_t *, - crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); - int (*encrypt)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*encrypt_update)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*encrypt_final)(crypto_ctx_t *, - crypto_data_t *); int (*encrypt_atomic)(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - - int (*decrypt_init)(crypto_ctx_t *, - crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); - int (*decrypt)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*decrypt_update)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*decrypt_final)(crypto_ctx_t *, - crypto_data_t *); int (*decrypt_atomic)(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); } __no_const crypto_cipher_ops_t; @@ -172,8 +153,6 @@ typedef struct crypto_ops { typedef uint32_t crypto_func_group_t; -#define CRYPTO_FG_ENCRYPT 0x00000001 /* encrypt_init() */ -#define CRYPTO_FG_DECRYPT 0x00000002 /* decrypt_init() */ #define CRYPTO_FG_DIGEST 0x00000004 /* digest_init() */ #define CRYPTO_FG_MAC 0x00001000 /* mac_init() */ #define CRYPTO_FG_ENCRYPT_ATOMIC 0x00008000 /* encrypt_atomic() */ diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index a4ef1716710e..a68a878b6ab2 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -42,47 +42,23 @@ static const crypto_mech_info_t aes_mech_info_tab[] = { /* AES_CCM */ {SUN_CKM_AES_CCM, AES_CCM_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, + CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT_ATOMIC}, /* AES_GCM */ {SUN_CKM_AES_GCM, AES_GCM_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, + CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT_ATOMIC}, }; -static int aes_encrypt_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t); -static int aes_decrypt_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t); -static int aes_common_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t, boolean_t); static int aes_common_init_ctx(aes_ctx_t *, crypto_spi_ctx_template_t *, crypto_mechanism_t *, crypto_key_t *, int, boolean_t); -static int aes_encrypt_final(crypto_ctx_t *, crypto_data_t *); -static int aes_decrypt_final(crypto_ctx_t *, crypto_data_t *); -static int aes_encrypt(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int aes_encrypt_update(crypto_ctx_t *, crypto_data_t *, - crypto_data_t *); static int aes_encrypt_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); -static int aes_decrypt(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int aes_decrypt_update(crypto_ctx_t *, crypto_data_t *, - crypto_data_t *); static int aes_decrypt_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); static const crypto_cipher_ops_t aes_cipher_ops = { - .encrypt_init = aes_encrypt_init, - .encrypt = aes_encrypt, - .encrypt_update = aes_encrypt_update, - .encrypt_final = aes_encrypt_final, .encrypt_atomic = aes_encrypt_atomic, - .decrypt_init = aes_decrypt_init, - .decrypt = aes_decrypt, - .decrypt_update = aes_decrypt_update, - .decrypt_final = aes_decrypt_final, .decrypt_atomic = aes_decrypt_atomic }; @@ -190,474 +166,9 @@ init_keysched(crypto_key_t *key, void *newbie) return (CRYPTO_SUCCESS); } -static int -aes_encrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template) -{ - return (aes_common_init(ctx, mechanism, key, template, B_TRUE)); -} - -static int -aes_decrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template) -{ - return (aes_common_init(ctx, mechanism, key, template, B_FALSE)); -} - - - /* * KCF software provider encrypt entry points. */ -static int -aes_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template, - boolean_t is_encrypt_init) -{ - aes_ctx_t *aes_ctx; - int rv; - - if ((rv = aes_check_mech_param(mechanism, &aes_ctx)) - != CRYPTO_SUCCESS) - return (rv); - - rv = aes_common_init_ctx(aes_ctx, template, mechanism, key, KM_SLEEP, - is_encrypt_init); - if (rv != CRYPTO_SUCCESS) { - crypto_free_mode_ctx(aes_ctx); - return (rv); - } - - ctx->cc_provider_private = aes_ctx; - - return (CRYPTO_SUCCESS); -} - -static int -aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, - crypto_data_t *ciphertext) -{ - int ret = CRYPTO_FAILED; - - aes_ctx_t *aes_ctx; - size_t saved_length, saved_offset, length_needed; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - ASSERT(ciphertext != NULL); - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following case. - */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE)) { - case CCM_MODE: - length_needed = plaintext->cd_length + aes_ctx->ac_mac_len; - break; - case GCM_MODE: - length_needed = plaintext->cd_length + aes_ctx->ac_tag_len; - break; - default: - __builtin_unreachable(); - } - - if (ciphertext->cd_length < length_needed) { - ciphertext->cd_length = length_needed; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_length = ciphertext->cd_length; - saved_offset = ciphertext->cd_offset; - - /* - * Do an update on the specified input data. - */ - ret = aes_encrypt_update(ctx, plaintext, ciphertext); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - /* - * For CCM mode, aes_ccm_encrypt_final() will take care of any - * left-over unprocessed data, and compute the MAC - */ - if (aes_ctx->ac_flags & CCM_MODE) { - /* - * ccm_encrypt_final() will compute the MAC and append - * it to existing ciphertext. So, need to adjust the left over - * length value accordingly - */ - - /* order of following 2 lines MUST not be reversed */ - ciphertext->cd_offset = ciphertext->cd_length; - ciphertext->cd_length = saved_length - ciphertext->cd_length; - ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, ciphertext, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - if (plaintext != ciphertext) { - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } - ciphertext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & GCM_MODE) { - /* - * gcm_encrypt_final() will compute the MAC and append - * it to existing ciphertext. So, need to adjust the left over - * length value accordingly - */ - - /* order of following 2 lines MUST not be reversed */ - ciphertext->cd_offset = ciphertext->cd_length; - ciphertext->cd_length = saved_length - ciphertext->cd_length; - ret = gcm_encrypt_final((gcm_ctx_t *)aes_ctx, ciphertext, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - if (plaintext != ciphertext) { - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } - ciphertext->cd_offset = saved_offset; - } - - ASSERT(aes_ctx->ac_remainder_len == 0); - (void) aes_free_context(ctx); - - return (ret); -} - - -static int -aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, - crypto_data_t *plaintext) -{ - int ret = CRYPTO_FAILED; - - aes_ctx_t *aes_ctx; - off_t saved_offset; - size_t saved_length, length_needed; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - ASSERT(plaintext != NULL); - - /* - * Return length needed to store the output. - * Do not destroy context when plaintext buffer is too small. - * - * CCM: plaintext is MAC len smaller than cipher text - * GCM: plaintext is TAG len smaller than cipher text - */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE)) { - case CCM_MODE: - length_needed = aes_ctx->ac_processed_data_len; - break; - case GCM_MODE: - length_needed = ciphertext->cd_length - aes_ctx->ac_tag_len; - break; - default: - __builtin_unreachable(); - } - - if (plaintext->cd_length < length_needed) { - plaintext->cd_length = length_needed; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = plaintext->cd_offset; - saved_length = plaintext->cd_length; - - /* - * Do an update on the specified input data. - */ - ret = aes_decrypt_update(ctx, ciphertext, plaintext); - if (ret != CRYPTO_SUCCESS) { - goto cleanup; - } - - if (aes_ctx->ac_flags & CCM_MODE) { - ASSERT(aes_ctx->ac_processed_data_len == aes_ctx->ac_data_len); - ASSERT(aes_ctx->ac_processed_mac_len == aes_ctx->ac_mac_len); - - /* order of following 2 lines MUST not be reversed */ - plaintext->cd_offset = plaintext->cd_length; - plaintext->cd_length = saved_length - plaintext->cd_length; - - ret = ccm_decrypt_final((ccm_ctx_t *)aes_ctx, plaintext, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) { - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } - } else { - plaintext->cd_length = saved_length; - } - - plaintext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & GCM_MODE) { - /* order of following 2 lines MUST not be reversed */ - plaintext->cd_offset = plaintext->cd_length; - plaintext->cd_length = saved_length - plaintext->cd_length; - - ret = gcm_decrypt_final((gcm_ctx_t *)aes_ctx, plaintext, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) { - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } - } else { - plaintext->cd_length = saved_length; - } - - plaintext->cd_offset = saved_offset; - } - - ASSERT(aes_ctx->ac_remainder_len == 0); - -cleanup: - (void) aes_free_context(ctx); - - return (ret); -} - - -static int -aes_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext, - crypto_data_t *ciphertext) -{ - off_t saved_offset; - size_t saved_length, out_len; - int ret = CRYPTO_SUCCESS; - aes_ctx_t *aes_ctx; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - ASSERT(ciphertext != NULL); - - /* compute number of bytes that will hold the ciphertext */ - out_len = aes_ctx->ac_remainder_len; - out_len += plaintext->cd_length; - out_len &= ~(AES_BLOCK_LEN - 1); - - /* return length needed to store the output */ - if (ciphertext->cd_length < out_len) { - ciphertext->cd_length = out_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = ciphertext->cd_offset; - saved_length = ciphertext->cd_length; - - /* - * Do the AES update on the specified input data. - */ - switch (plaintext->cd_format) { - case CRYPTO_DATA_RAW: - ret = crypto_update_iov(ctx->cc_provider_private, - plaintext, ciphertext, aes_encrypt_contiguous_blocks); - break; - case CRYPTO_DATA_UIO: - ret = crypto_update_uio(ctx->cc_provider_private, - plaintext, ciphertext, aes_encrypt_contiguous_blocks); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } else { - ciphertext->cd_length = saved_length; - } - ciphertext->cd_offset = saved_offset; - - return (ret); -} - - -static int -aes_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, - crypto_data_t *plaintext) -{ - off_t saved_offset; - size_t saved_length; - int ret = CRYPTO_SUCCESS; - - ASSERT(ctx->cc_provider_private != NULL); - - ASSERT(plaintext != NULL); - - saved_offset = plaintext->cd_offset; - saved_length = plaintext->cd_length; - - /* - * Do the AES update on the specified input data. - */ - switch (ciphertext->cd_format) { - case CRYPTO_DATA_RAW: - ret = crypto_update_iov(ctx->cc_provider_private, - ciphertext, plaintext, aes_decrypt_contiguous_blocks); - break; - case CRYPTO_DATA_UIO: - ret = crypto_update_uio(ctx->cc_provider_private, - ciphertext, plaintext, aes_decrypt_contiguous_blocks); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret == CRYPTO_SUCCESS) { - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } else { - plaintext->cd_length = saved_length; - } - plaintext->cd_offset = saved_offset; - - - return (ret); -} - -static int -aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) -{ - aes_ctx_t *aes_ctx; - int ret; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - if (data->cd_format != CRYPTO_DATA_RAW && - data->cd_format != CRYPTO_DATA_UIO) { - return (CRYPTO_ARGUMENTS_BAD); - } - - if (aes_ctx->ac_flags & CCM_MODE) { - ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } else if (aes_ctx->ac_flags & GCM_MODE) { - size_t saved_offset = data->cd_offset; - - ret = gcm_encrypt_final((gcm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - data->cd_length = data->cd_offset - saved_offset; - data->cd_offset = saved_offset; - } - - (void) aes_free_context(ctx); - - return (CRYPTO_SUCCESS); -} - -static int -aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) -{ - aes_ctx_t *aes_ctx; - int ret; - off_t saved_offset; - size_t saved_length; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - if (data->cd_format != CRYPTO_DATA_RAW && - data->cd_format != CRYPTO_DATA_UIO) { - return (CRYPTO_ARGUMENTS_BAD); - } - - /* - * There must be no unprocessed ciphertext. - * This happens if the length of the last ciphertext is - * not a multiple of the AES block length. - */ - if (aes_ctx->ac_remainder_len > 0) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - - if (aes_ctx->ac_flags & CCM_MODE) { - /* - * This is where all the plaintext is returned, make sure - * the plaintext buffer is big enough - */ - size_t pt_len = aes_ctx->ac_data_len; - if (data->cd_length < pt_len) { - data->cd_length = pt_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - ASSERT(aes_ctx->ac_processed_data_len == pt_len); - ASSERT(aes_ctx->ac_processed_mac_len == aes_ctx->ac_mac_len); - saved_offset = data->cd_offset; - saved_length = data->cd_length; - ret = ccm_decrypt_final((ccm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - data->cd_length = data->cd_offset - saved_offset; - } else { - data->cd_length = saved_length; - } - - data->cd_offset = saved_offset; - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } else if (aes_ctx->ac_flags & GCM_MODE) { - /* - * This is where all the plaintext is returned, make sure - * the plaintext buffer is big enough - */ - gcm_ctx_t *ctx = (gcm_ctx_t *)aes_ctx; - size_t pt_len = ctx->gcm_processed_data_len - ctx->gcm_tag_len; - - if (data->cd_length < pt_len) { - data->cd_length = pt_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = data->cd_offset; - saved_length = data->cd_length; - ret = gcm_decrypt_final((gcm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - data->cd_length = data->cd_offset - saved_offset; - } else { - data->cd_length = saved_length; - } - - data->cd_offset = saved_offset; - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } - - - (void) aes_free_context(ctx); - - return (CRYPTO_SUCCESS); -} - static int aes_encrypt_atomic(crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, From 94f1e56e412909cf76b9acf799f5154a08d50a2f Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 12:24:35 +1000 Subject: [PATCH 005/151] icp: remove unused KCF_ macros Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- module/icp/include/sys/crypto/impl.h | 37 ---------------------------- 1 file changed, 37 deletions(-) diff --git a/module/icp/include/sys/crypto/impl.h b/module/icp/include/sys/crypto/impl.h index 4d17221ea9a3..f6b2e519f0a2 100644 --- a/module/icp/include/sys/crypto/impl.h +++ b/module/icp/include/sys/crypto/impl.h @@ -187,28 +187,6 @@ typedef struct kcf_mech_entry { avl_node_t me_node; } kcf_mech_entry_t; -/* - * If a component has a reference to a kcf_policy_desc_t, - * it REFHOLD()s. A new policy descriptor which is referenced only - * by the policy table has a reference count of one. - */ -#define KCF_POLICY_REFHOLD(desc) { \ - int newval = atomic_add_32_nv(&(desc)->pd_refcnt, 1); \ - ASSERT(newval != 0); \ -} - -/* - * Releases a reference to a policy descriptor. When the last - * reference is released, the descriptor is freed. - */ -#define KCF_POLICY_REFRELE(desc) { \ - membar_producer(); \ - int newval = atomic_add_32_nv(&(desc)->pd_refcnt, -1); \ - ASSERT(newval != -1); \ - if (newval == 0) \ - kcf_policy_free_desc(desc); \ -} - /* * Global tables. The sizes are from the predefined PKCS#11 v2.20 mechanisms, * with a margin of few extra empty entry points @@ -275,29 +253,14 @@ extern const kcf_mech_entry_tab_t kcf_mech_tabs_tab[]; * of type kcf_prov_desc_t. */ -#define KCF_PROV_DIGEST_OPS(pd) ((pd)->pd_ops_vector->co_digest_ops) #define KCF_PROV_CIPHER_OPS(pd) ((pd)->pd_ops_vector->co_cipher_ops) #define KCF_PROV_MAC_OPS(pd) ((pd)->pd_ops_vector->co_mac_ops) #define KCF_PROV_CTX_OPS(pd) ((pd)->pd_ops_vector->co_ctx_ops) -/* - * Wrappers for crypto_digest_ops(9S) entry points. - */ - -#define KCF_PROV_DIGEST_INIT(pd, ctx, mech) ( \ - (KCF_PROV_DIGEST_OPS(pd) && KCF_PROV_DIGEST_OPS(pd)->digest_init) ? \ - KCF_PROV_DIGEST_OPS(pd)->digest_init(ctx, mech) : \ - CRYPTO_NOT_SUPPORTED) - /* * Wrappers for crypto_cipher_ops(9S) entry points. */ -#define KCF_PROV_ENCRYPT_INIT(pd, ctx, mech, key, template) ( \ - (KCF_PROV_CIPHER_OPS(pd) && KCF_PROV_CIPHER_OPS(pd)->encrypt_init) ? \ - KCF_PROV_CIPHER_OPS(pd)->encrypt_init(ctx, mech, key, template) : \ - CRYPTO_NOT_SUPPORTED) - #define KCF_PROV_ENCRYPT_ATOMIC(pd, mech, key, plaintext, ciphertext, \ template) ( \ (KCF_PROV_CIPHER_OPS(pd) && KCF_PROV_CIPHER_OPS(pd)->encrypt_atomic) ? \ From 1291c46ea4baf3f8807cf533edbdbd4999f6759e Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 12:58:56 +1000 Subject: [PATCH 006/151] icp: remove digest entry points For whatever reason, we call digest mechanisms directly, not through the KCF digest provider. So we can remove those entry points entirely. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- include/sys/skein.h | 9 - module/icp/core/kcf_mech_tabs.c | 7 +- module/icp/include/sys/crypto/impl.h | 7 +- module/icp/include/sys/crypto/spi.h | 19 -- module/icp/io/aes.c | 1 - module/icp/io/sha2_mod.c | 286 +-------------------------- module/icp/io/skein_mod.c | 143 +------------- 7 files changed, 8 insertions(+), 464 deletions(-) diff --git a/include/sys/skein.h b/include/sys/skein.h index 2f649d6b269a..3359d48af795 100644 --- a/include/sys/skein.h +++ b/include/sys/skein.h @@ -152,25 +152,16 @@ typedef struct skein_param { /* Module definitions */ #ifdef SKEIN_MODULE_IMPL -#define CKM_SKEIN_256 "CKM_SKEIN_256" -#define CKM_SKEIN_512 "CKM_SKEIN_512" -#define CKM_SKEIN1024 "CKM_SKEIN1024" #define CKM_SKEIN_256_MAC "CKM_SKEIN_256_MAC" #define CKM_SKEIN_512_MAC "CKM_SKEIN_512_MAC" #define CKM_SKEIN1024_MAC "CKM_SKEIN1024_MAC" typedef enum skein_mech_type { - SKEIN_256_MECH_INFO_TYPE, - SKEIN_512_MECH_INFO_TYPE, - SKEIN1024_MECH_INFO_TYPE, SKEIN_256_MAC_MECH_INFO_TYPE, SKEIN_512_MAC_MECH_INFO_TYPE, SKEIN1024_MAC_MECH_INFO_TYPE } skein_mech_type_t; -#define VALID_SKEIN_DIGEST_MECH(__mech) \ - ((int)(__mech) >= SKEIN_256_MECH_INFO_TYPE && \ - (__mech) <= SKEIN1024_MECH_INFO_TYPE) #define VALID_SKEIN_MAC_MECH(__mech) \ ((int)(__mech) >= SKEIN_256_MAC_MECH_INFO_TYPE && \ (__mech) <= SKEIN1024_MAC_MECH_INFO_TYPE) diff --git a/module/icp/core/kcf_mech_tabs.c b/module/icp/core/kcf_mech_tabs.c index b6e693769804..a1e95847d066 100644 --- a/module/icp/core/kcf_mech_tabs.c +++ b/module/icp/core/kcf_mech_tabs.c @@ -41,7 +41,6 @@ * mech_index is the index for that mechanism in the table. * A mechanism belongs to exactly 1 table. * The tables are: - * . digest_mechs_tab[] for the msg digest mechs. * . cipher_mechs_tab[] for encrypt/decrypt and wrap/unwrap mechs. * . mac_mechs_tab[] for MAC mechs. * . sign_mechs_tab[] for sign & verify mechs. @@ -75,13 +74,11 @@ /* RFE 4687834 Will deal with the extensibility of these tables later */ -static kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST]; static kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER]; static kcf_mech_entry_t kcf_mac_mechs_tab[KCF_MAXMAC]; const kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = { {0, NULL}, /* No class zero */ - {KCF_MAXDIGEST, kcf_digest_mechs_tab}, {KCF_MAXCIPHER, kcf_cipher_mechs_tab}, {KCF_MAXMAC, kcf_mac_mechs_tab}, }; @@ -220,9 +217,7 @@ kcf_add_mech_provider(short mech_indx, crypto_func_group_t fg = mech_info->cm_func_group_mask; kcf_ops_class_t class; - if (fg & CRYPTO_FG_DIGEST || fg & CRYPTO_FG_DIGEST_ATOMIC) - class = KCF_DIGEST_CLASS; - else if (fg & CRYPTO_FG_ENCRYPT_ATOMIC || + if (fg & CRYPTO_FG_ENCRYPT_ATOMIC || fg & CRYPTO_FG_DECRYPT_ATOMIC) class = KCF_CIPHER_CLASS; else if (fg & CRYPTO_FG_MAC || fg & CRYPTO_FG_MAC_ATOMIC) diff --git a/module/icp/include/sys/crypto/impl.h b/module/icp/include/sys/crypto/impl.h index f6b2e519f0a2..0f5ef58ac009 100644 --- a/module/icp/include/sys/crypto/impl.h +++ b/module/icp/include/sys/crypto/impl.h @@ -55,7 +55,7 @@ extern "C" { * When impl.h is broken up (bug# 4703218), this will be done. For now, * we hardcode these values. */ -#define KCF_OPS_CLASSSIZE 4 +#define KCF_OPS_CLASSSIZE 3 #define KCF_MAXMECHTAB 32 /* @@ -200,12 +200,11 @@ _Static_assert(KCF_MAXCIPHER == KCF_MAXMECHTAB, "KCF_MAXCIPHER != KCF_MAXMECHTAB"); /* See KCF_MAXMECHTAB comment */ typedef enum { - KCF_DIGEST_CLASS = 1, - KCF_CIPHER_CLASS, + KCF_CIPHER_CLASS = 1, KCF_MAC_CLASS, } kcf_ops_class_t; -#define KCF_FIRST_OPSCLASS KCF_DIGEST_CLASS +#define KCF_FIRST_OPSCLASS KCF_CIPHER_CLASS #define KCF_LAST_OPSCLASS KCF_MAC_CLASS _Static_assert( KCF_OPS_CLASSSIZE == (KCF_LAST_OPSCLASS - KCF_FIRST_OPSCLASS + 2), diff --git a/module/icp/include/sys/crypto/spi.h b/module/icp/include/sys/crypto/spi.h index 9bcb62ac5290..e9be7e0c54d8 100644 --- a/module/icp/include/sys/crypto/spi.h +++ b/module/icp/include/sys/crypto/spi.h @@ -66,22 +66,6 @@ typedef struct crypto_ctx { void *cc_framework_private; /* owned by framework */ } crypto_ctx_t; -/* - * The crypto_digest_ops structure contains pointers to digest - * operations for cryptographic providers. It is passed through - * the crypto_ops(9S) structure when providers register with the - * kernel using crypto_register_provider(9F). - */ -typedef struct crypto_digest_ops { - int (*digest_init)(crypto_ctx_t *, crypto_mechanism_t *); - int (*digest)(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); - int (*digest_update)(crypto_ctx_t *, crypto_data_t *); - int (*digest_key)(crypto_ctx_t *, crypto_key_t *); - int (*digest_final)(crypto_ctx_t *, crypto_data_t *); - int (*digest_atomic)(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); -} __no_const crypto_digest_ops_t; - /* * The crypto_cipher_ops structure contains pointers to encryption * and decryption operations for cryptographic providers. It is @@ -137,7 +121,6 @@ typedef struct crypto_ctx_ops { * by calling crypto_register_provider(9F). */ typedef struct crypto_ops { - const crypto_digest_ops_t *co_digest_ops; const crypto_cipher_ops_t *co_cipher_ops; const crypto_mac_ops_t *co_mac_ops; const crypto_ctx_ops_t *co_ctx_ops; @@ -153,12 +136,10 @@ typedef struct crypto_ops { typedef uint32_t crypto_func_group_t; -#define CRYPTO_FG_DIGEST 0x00000004 /* digest_init() */ #define CRYPTO_FG_MAC 0x00001000 /* mac_init() */ #define CRYPTO_FG_ENCRYPT_ATOMIC 0x00008000 /* encrypt_atomic() */ #define CRYPTO_FG_DECRYPT_ATOMIC 0x00010000 /* decrypt_atomic() */ #define CRYPTO_FG_MAC_ATOMIC 0x00020000 /* mac_atomic() */ -#define CRYPTO_FG_DIGEST_ATOMIC 0x00040000 /* digest_atomic() */ /* * Maximum length of the pi_provider_description field of the diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index a68a878b6ab2..8ee2d036c1e0 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -72,7 +72,6 @@ static const crypto_ctx_ops_t aes_ctx_ops = { }; static const crypto_ops_t aes_crypto_ops = { - NULL, &aes_cipher_ops, NULL, &aes_ctx_ops, diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c index f068951b07f5..c8e3b4fccdd1 100644 --- a/module/icp/io/sha2_mod.c +++ b/module/icp/io/sha2_mod.c @@ -61,8 +61,7 @@ */ static const crypto_mech_info_t sha2_mech_info_tab[] = { /* SHA256 */ - {SUN_CKM_SHA256, SHA256_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, + {SUN_CKM_SHA256, SHA256_MECH_INFO_TYPE, 0}, /* SHA256-HMAC */ {SUN_CKM_SHA256_HMAC, SHA256_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, @@ -70,8 +69,7 @@ static const crypto_mech_info_t sha2_mech_info_tab[] = { {SUN_CKM_SHA256_HMAC_GENERAL, SHA256_HMAC_GEN_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, /* SHA384 */ - {SUN_CKM_SHA384, SHA384_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, + {SUN_CKM_SHA384, SHA384_MECH_INFO_TYPE, 0}, /* SHA384-HMAC */ {SUN_CKM_SHA384_HMAC, SHA384_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, @@ -79,8 +77,7 @@ static const crypto_mech_info_t sha2_mech_info_tab[] = { {SUN_CKM_SHA384_HMAC_GENERAL, SHA384_HMAC_GEN_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, /* SHA512 */ - {SUN_CKM_SHA512, SHA512_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, + {SUN_CKM_SHA512, SHA512_MECH_INFO_TYPE, 0}, /* SHA512-HMAC */ {SUN_CKM_SHA512_HMAC, SHA512_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, @@ -89,21 +86,6 @@ static const crypto_mech_info_t sha2_mech_info_tab[] = { CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, }; -static int sha2_digest_init(crypto_ctx_t *, crypto_mechanism_t *); -static int sha2_digest(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int sha2_digest_update(crypto_ctx_t *, crypto_data_t *); -static int sha2_digest_final(crypto_ctx_t *, crypto_data_t *); -static int sha2_digest_atomic(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); - -static const crypto_digest_ops_t sha2_digest_ops = { - .digest_init = sha2_digest_init, - .digest = sha2_digest, - .digest_update = sha2_digest_update, - .digest_final = sha2_digest_final, - .digest_atomic = sha2_digest_atomic -}; - static int sha2_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t); static int sha2_mac_update(crypto_ctx_t *, crypto_data_t *); @@ -132,7 +114,6 @@ static const crypto_ctx_ops_t sha2_ctx_ops = { }; static const crypto_ops_t sha2_crypto_ops = { - &sha2_digest_ops, NULL, &sha2_mac_ops, &sha2_ctx_ops, @@ -184,27 +165,6 @@ sha2_mod_fini(void) return (ret); } -/* - * KCF software provider digest entry points. - */ - -static int -sha2_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism) -{ - - /* - * Allocate and initialize SHA2 context. - */ - ctx->cc_provider_private = kmem_alloc(sizeof (sha2_ctx_t), KM_SLEEP); - if (ctx->cc_provider_private == NULL) - return (CRYPTO_HOST_MEMORY); - - PROV_SHA2_CTX(ctx)->sc_mech_type = mechanism->cm_type; - SHA2Init(mechanism->cm_type, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - - return (CRYPTO_SUCCESS); -} - /* * Helper SHA2 digest update function for uio data. */ @@ -360,246 +320,6 @@ sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, return (CRYPTO_SUCCESS); } -static int -sha2_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - uint_t sha_digest_len; - - ASSERT(ctx->cc_provider_private != NULL); - - switch (PROV_SHA2_CTX(ctx)->sc_mech_type) { - case SHA256_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_MECH_INFO_TYPE: - sha_digest_len = SHA384_DIGEST_LENGTH; - break; - case SHA512_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following cases. - */ - if ((digest->cd_length == 0) || - (digest->cd_length < sha_digest_len)) { - digest->cd_length = sha_digest_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - /* - * Do the SHA2 update on the specified input data. - */ - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret != CRYPTO_SUCCESS) { - /* the update failed, free context and bail */ - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - digest->cd_length = 0; - return (ret); - } - - /* - * Do a SHA2 final, must be done separately since the digest - * type can be different than the input data type. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - digest, sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* all done, free context and return */ - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - return (ret); -} - -static int -sha2_digest_update(crypto_ctx_t *ctx, crypto_data_t *data) -{ - int ret = CRYPTO_SUCCESS; - - ASSERT(ctx->cc_provider_private != NULL); - - /* - * Do the SHA2 update on the specified input data. - */ - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - return (ret); -} - -static int -sha2_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - uint_t sha_digest_len; - - ASSERT(ctx->cc_provider_private != NULL); - - switch (PROV_SHA2_CTX(ctx)->sc_mech_type) { - case SHA256_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_MECH_INFO_TYPE: - sha_digest_len = SHA384_DIGEST_LENGTH; - break; - case SHA512_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following cases. - */ - if ((digest->cd_length == 0) || - (digest->cd_length < sha_digest_len)) { - digest->cd_length = sha_digest_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - /* - * Do a SHA2 final. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - digest, sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* all done, free context and return */ - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - - return (ret); -} - -static int -sha2_digest_atomic(crypto_mechanism_t *mechanism, crypto_data_t *data, - crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - SHA2_CTX sha2_ctx; - uint32_t sha_digest_len; - - /* - * Do the SHA inits. - */ - - SHA2Init(mechanism->cm_type, &sha2_ctx); - - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&sha2_ctx, (uint8_t *)data-> - cd_raw.iov_base + data->cd_offset, data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&sha2_ctx, data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* - * Do the SHA updates on the specified input data. - */ - - if (ret != CRYPTO_SUCCESS) { - /* the update failed, bail */ - digest->cd_length = 0; - return (ret); - } - - if (mechanism->cm_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) - sha_digest_len = SHA256_DIGEST_LENGTH; - else - sha_digest_len = SHA512_DIGEST_LENGTH; - - /* - * Do a SHA2 final, must be done separately since the digest - * type can be different than the input data type. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&sha2_ctx, digest, - sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - return (ret); -} - /* * KCF software provider mac entry points. * diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c index 221e1debd45b..3e969513be6e 100644 --- a/module/icp/io/skein_mod.c +++ b/module/icp/io/skein_mod.c @@ -31,34 +31,16 @@ #include static const crypto_mech_info_t skein_mech_info_tab[] = { - {CKM_SKEIN_256, SKEIN_256_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, {CKM_SKEIN_256_MAC, SKEIN_256_MAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN_512, SKEIN_512_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, {CKM_SKEIN_512_MAC, SKEIN_512_MAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN1024, SKEIN1024_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, {CKM_SKEIN1024_MAC, SKEIN1024_MAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, }; -static int skein_digest_init(crypto_ctx_t *, crypto_mechanism_t *); -static int skein_digest(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); static int skein_update(crypto_ctx_t *, crypto_data_t *); static int skein_final(crypto_ctx_t *, crypto_data_t *); -static int skein_digest_atomic(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); - -static const crypto_digest_ops_t skein_digest_ops = { - .digest_init = skein_digest_init, - .digest = skein_digest, - .digest_update = skein_update, - .digest_final = skein_final, - .digest_atomic = skein_digest_atomic -}; static int skein_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t); @@ -84,7 +66,6 @@ static const crypto_ctx_ops_t skein_ctx_ops = { }; static const crypto_ops_t skein_crypto_ops = { - &skein_digest_ops, NULL, &skein_mac_ops, &skein_ctx_ops, @@ -115,15 +96,12 @@ typedef struct skein_ctx { do { \ skein_ctx_t *sc = (_skein_ctx); \ switch (sc->sc_mech_type) { \ - case SKEIN_256_MECH_INFO_TYPE: \ case SKEIN_256_MAC_MECH_INFO_TYPE: \ (void) Skein_256_ ## _op(&sc->sc_256, __VA_ARGS__);\ break; \ - case SKEIN_512_MECH_INFO_TYPE: \ case SKEIN_512_MAC_MECH_INFO_TYPE: \ (void) Skein_512_ ## _op(&sc->sc_512, __VA_ARGS__);\ break; \ - case SKEIN1024_MECH_INFO_TYPE: \ case SKEIN1024_MAC_MECH_INFO_TYPE: \ (void) Skein1024_ ## _op(&sc->sc_1024, __VA_ARGS__);\ break; \ @@ -143,19 +121,7 @@ skein_get_digest_bitlen(const crypto_mechanism_t *mechanism, size_t *result) } *result = param->sp_digest_bitlen; } else { - switch (mechanism->cm_type) { - case SKEIN_256_MECH_INFO_TYPE: - *result = 256; - break; - case SKEIN_512_MECH_INFO_TYPE: - *result = 512; - break; - case SKEIN1024_MECH_INFO_TYPE: - *result = 1024; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } + return (CRYPTO_MECHANISM_INVALID); } return (CRYPTO_SUCCESS); } @@ -320,73 +286,6 @@ skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest) * KCF software provider digest entry points. */ -/* - * Initializes a skein digest context to the configuration in `mechanism'. - * The mechanism cm_type must be one of SKEIN_*_MECH_INFO_TYPE. The cm_param - * field may contain a skein_param_t structure indicating the length of the - * digest the algorithm should produce. Otherwise the default output lengths - * are applied (32 bytes for Skein-256, 64 bytes for Skein-512 and 128 bytes - * for Skein-1024). - */ -static int -skein_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism) -{ - int error = CRYPTO_SUCCESS; - - if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - - SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), KM_SLEEP); - if (SKEIN_CTX(ctx) == NULL) - return (CRYPTO_HOST_MEMORY); - - SKEIN_CTX(ctx)->sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, - &SKEIN_CTX(ctx)->sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - goto errout; - SKEIN_OP(SKEIN_CTX(ctx), Init, SKEIN_CTX(ctx)->sc_digest_bitlen); - - return (CRYPTO_SUCCESS); -errout: - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - return (error); -} - -/* - * Executes a skein_update and skein_digest on a pre-initialized crypto - * context in a single step. See the documentation to these functions to - * see what to pass here. - */ -static int -skein_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - if (digest->cd_length < - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - return (CRYPTO_BUFFER_TOO_SMALL); - } - - error = skein_update(ctx, data); - if (error != CRYPTO_SUCCESS) { - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - digest->cd_length = 0; - return (error); - } - error = skein_final(ctx, digest); - - return (error); -} - /* * Performs a skein Update with the input message in `data' (successive calls * can push more data). This is used both for digest and MAC operation. @@ -470,46 +369,6 @@ skein_final(crypto_ctx_t *ctx, crypto_data_t *digest) return (error); } -/* - * Performs a full skein digest computation in a single call, configuring the - * algorithm according to `mechanism', reading the input to be digested from - * `data' and writing the output to `digest'. - * Supported input/output formats are raw, uio and mblk. - */ -static int -skein_digest_atomic(crypto_mechanism_t *mechanism, crypto_data_t *data, - crypto_data_t *digest) -{ - int error; - skein_ctx_t skein_ctx; - crypto_ctx_t ctx; - SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; - - /* Init */ - if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - skein_ctx.sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, &skein_ctx.sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - goto out; - SKEIN_OP(&skein_ctx, Init, skein_ctx.sc_digest_bitlen); - - if ((error = skein_update(&ctx, data)) != CRYPTO_SUCCESS) - goto out; - if ((error = skein_final_nofree(&ctx, data)) != CRYPTO_SUCCESS) - goto out; - -out: - if (error == CRYPTO_SUCCESS) - digest->cd_length = - CRYPTO_BITS2BYTES(skein_ctx.sc_digest_bitlen); - else - digest->cd_length = 0; - memset(&skein_ctx, 0, sizeof (skein_ctx)); - - return (error); -} - /* * Helper function that builds a Skein MAC context from the provided * mechanism and key. From 10de12e9ed2fee85adc2b9b4efac64f8655062bc Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 13:18:42 +1000 Subject: [PATCH 007/151] icp: reorganise SHA2 digest mechanisms sha2_mech_type_t serves double-duty, as the list of MAC providers and also the algo type for direct callers to SHA2Init. Until we disentangle that, reorganise it to make the separation more clear. While we're there, remove the digest mechs we don't use. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- include/sys/crypto/common.h | 5 -- include/sys/sha2.h | 22 ++------ module/icp/algs/sha2/sha2_generic.c | 44 ++++----------- module/icp/io/sha2_mod.c | 6 -- tests/zfs-tests/cmd/checksum/sha2_test.c | 70 ++++-------------------- 5 files changed, 26 insertions(+), 121 deletions(-) diff --git a/include/sys/crypto/common.h b/include/sys/crypto/common.h index 743805650057..a73804f916b6 100644 --- a/include/sys/crypto/common.h +++ b/include/sys/crypto/common.h @@ -79,17 +79,12 @@ typedef uint32_t crypto_keysize_unit_t; /* Mechanisms supported out-of-the-box */ -#define SUN_CKM_SHA256 "CKM_SHA256" #define SUN_CKM_SHA256_HMAC "CKM_SHA256_HMAC" #define SUN_CKM_SHA256_HMAC_GENERAL "CKM_SHA256_HMAC_GENERAL" -#define SUN_CKM_SHA384 "CKM_SHA384" #define SUN_CKM_SHA384_HMAC "CKM_SHA384_HMAC" #define SUN_CKM_SHA384_HMAC_GENERAL "CKM_SHA384_HMAC_GENERAL" -#define SUN_CKM_SHA512 "CKM_SHA512" #define SUN_CKM_SHA512_HMAC "CKM_SHA512_HMAC" #define SUN_CKM_SHA512_HMAC_GENERAL "CKM_SHA512_HMAC_GENERAL" -#define SUN_CKM_SHA512_224 "CKM_SHA512_224" -#define SUN_CKM_SHA512_256 "CKM_SHA512_256" #define SUN_CKM_AES_CCM "CKM_AES_CCM" #define SUN_CKM_AES_GCM "CKM_AES_GCM" diff --git a/include/sys/sha2.h b/include/sys/sha2.h index 81dfbbb8cea9..2d38885bd966 100644 --- a/include/sys/sha2.h +++ b/include/sys/sha2.h @@ -86,30 +86,18 @@ typedef struct { /* SHA2 algorithm types */ typedef enum sha2_mech_type { - SHA256_MECH_INFO_TYPE, /* SUN_CKM_SHA256 */ SHA256_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC */ SHA256_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC_GENERAL */ - SHA384_MECH_INFO_TYPE, /* SUN_CKM_SHA384 */ SHA384_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC */ SHA384_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC_GENERAL */ - SHA512_MECH_INFO_TYPE, /* SUN_CKM_SHA512 */ SHA512_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC */ SHA512_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC_GENERAL */ - SHA512_224_MECH_INFO_TYPE, /* SUN_CKM_SHA512_224 */ - SHA512_256_MECH_INFO_TYPE /* SUN_CKM_SHA512_256 */ -} sha2_mech_type_t; -#define SHA256 0 -#define SHA256_HMAC 1 -#define SHA256_HMAC_GEN 2 -#define SHA384 3 -#define SHA384_HMAC 4 -#define SHA384_HMAC_GEN 5 -#define SHA512 6 -#define SHA512_HMAC 7 -#define SHA512_HMAC_GEN 8 -#define SHA512_224 9 -#define SHA512_256 10 + /* Not true KCF mech types; used by direct callers to SHA2Init */ + SHA256, + SHA512, + SHA512_256, +} sha2_mech_type_t; /* SHA2 Init function */ extern void SHA2Init(int algotype, SHA2_CTX *ctx); diff --git a/module/icp/algs/sha2/sha2_generic.c b/module/icp/algs/sha2/sha2_generic.c index 60d7ad9a1dfa..ab361b9d59f4 100644 --- a/module/icp/algs/sha2/sha2_generic.c +++ b/module/icp/algs/sha2/sha2_generic.c @@ -400,13 +400,13 @@ SHA2Init(int algotype, SHA2_CTX *ctx) sha256_ctx *ctx256 = &ctx->sha256; sha512_ctx *ctx512 = &ctx->sha512; - ASSERT3S(algotype, >=, SHA256_MECH_INFO_TYPE); - ASSERT3S(algotype, <=, SHA512_256_MECH_INFO_TYPE); + ASSERT3S(algotype, >=, SHA256_HMAC_MECH_INFO_TYPE); + ASSERT3S(algotype, <=, SHA512_256); memset(ctx, 0, sizeof (*ctx)); ctx->algotype = algotype; switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: + case SHA256: case SHA256_HMAC_MECH_INFO_TYPE: case SHA256_HMAC_GEN_MECH_INFO_TYPE: ctx256->state[0] = 0x6a09e667; @@ -420,7 +420,6 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx256->count[0] = 0; ctx256->ops = sha256_get_ops(); break; - case SHA384_MECH_INFO_TYPE: case SHA384_HMAC_MECH_INFO_TYPE: case SHA384_HMAC_GEN_MECH_INFO_TYPE: ctx512->state[0] = 0xcbbb9d5dc1059ed8ULL; @@ -435,7 +434,7 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx512->count[1] = 0; ctx512->ops = sha512_get_ops(); break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: case SHA512_HMAC_GEN_MECH_INFO_TYPE: ctx512->state[0] = 0x6a09e667f3bcc908ULL; @@ -450,20 +449,7 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx512->count[1] = 0; ctx512->ops = sha512_get_ops(); break; - case SHA512_224_MECH_INFO_TYPE: - ctx512->state[0] = 0x8c3d37c819544da2ULL; - ctx512->state[1] = 0x73e1996689dcd4d6ULL; - ctx512->state[2] = 0x1dfab7ae32ff9c82ULL; - ctx512->state[3] = 0x679dd514582f9fcfULL; - ctx512->state[4] = 0x0f6d2b697bd44da8ULL; - ctx512->state[5] = 0x77e36f7304c48942ULL; - ctx512->state[6] = 0x3f9d85a86a1d36c8ULL; - ctx512->state[7] = 0x1112e6ad91d692a1ULL; - ctx512->count[0] = 0; - ctx512->count[1] = 0; - ctx512->ops = sha512_get_ops(); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: ctx512->state[0] = 0x22312194fc2bf72cULL; ctx512->state[1] = 0x9f555fa3c84c64c2ULL; ctx512->state[2] = 0x2393b86b6f53b151ULL; @@ -490,25 +476,21 @@ SHA2Update(SHA2_CTX *ctx, const void *data, size_t len) ASSERT3P(data, !=, NULL); switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: + case SHA256: case SHA256_HMAC_MECH_INFO_TYPE: case SHA256_HMAC_GEN_MECH_INFO_TYPE: sha256_update(&ctx->sha256, data, len); break; - case SHA384_MECH_INFO_TYPE: case SHA384_HMAC_MECH_INFO_TYPE: case SHA384_HMAC_GEN_MECH_INFO_TYPE: sha512_update(&ctx->sha512, data, len); break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_update(&ctx->sha512, data, len); break; - case SHA512_224_MECH_INFO_TYPE: - sha512_update(&ctx->sha512, data, len); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: sha512_update(&ctx->sha512, data, len); break; } @@ -519,25 +501,21 @@ void SHA2Final(void *digest, SHA2_CTX *ctx) { switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: + case SHA256: case SHA256_HMAC_MECH_INFO_TYPE: case SHA256_HMAC_GEN_MECH_INFO_TYPE: sha256_final(&ctx->sha256, digest, 256); break; - case SHA384_MECH_INFO_TYPE: case SHA384_HMAC_MECH_INFO_TYPE: case SHA384_HMAC_GEN_MECH_INFO_TYPE: sha512_final(&ctx->sha512, digest, 384); break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_final(&ctx->sha512, digest, 512); break; - case SHA512_224_MECH_INFO_TYPE: - sha512_final(&ctx->sha512, digest, 224); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: sha512_final(&ctx->sha512, digest, 256); break; } diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c index c8e3b4fccdd1..d80ea1e677b1 100644 --- a/module/icp/io/sha2_mod.c +++ b/module/icp/io/sha2_mod.c @@ -60,24 +60,18 @@ * Mechanism info structure passed to KCF during registration. */ static const crypto_mech_info_t sha2_mech_info_tab[] = { - /* SHA256 */ - {SUN_CKM_SHA256, SHA256_MECH_INFO_TYPE, 0}, /* SHA256-HMAC */ {SUN_CKM_SHA256_HMAC, SHA256_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, /* SHA256-HMAC GENERAL */ {SUN_CKM_SHA256_HMAC_GENERAL, SHA256_HMAC_GEN_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA384 */ - {SUN_CKM_SHA384, SHA384_MECH_INFO_TYPE, 0}, /* SHA384-HMAC */ {SUN_CKM_SHA384_HMAC, SHA384_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, /* SHA384-HMAC GENERAL */ {SUN_CKM_SHA384_HMAC_GENERAL, SHA384_HMAC_GEN_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA512 */ - {SUN_CKM_SHA512, SHA512_MECH_INFO_TYPE, 0}, /* SHA512-HMAC */ {SUN_CKM_SHA512_HMAC, SHA512_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, diff --git a/tests/zfs-tests/cmd/checksum/sha2_test.c b/tests/zfs-tests/cmd/checksum/sha2_test.c index efcf812d7749..d36b670db8ba 100644 --- a/tests/zfs-tests/cmd/checksum/sha2_test.c +++ b/tests/zfs-tests/cmd/checksum/sha2_test.c @@ -72,31 +72,6 @@ static const uint8_t sha256_test_digests[][32] = { /* no test vector for test_msg2 */ }; -static const uint8_t sha384_test_digests[][48] = { - { - /* for test_msg0 */ - 0xCB, 0x00, 0x75, 0x3F, 0x45, 0xA3, 0x5E, 0x8B, - 0xB5, 0xA0, 0x3D, 0x69, 0x9A, 0xC6, 0x50, 0x07, - 0x27, 0x2C, 0x32, 0xAB, 0x0E, 0xDE, 0xD1, 0x63, - 0x1A, 0x8B, 0x60, 0x5A, 0x43, 0xFF, 0x5B, 0xED, - 0x80, 0x86, 0x07, 0x2B, 0xA1, 0xE7, 0xCC, 0x23, - 0x58, 0xBA, 0xEC, 0xA1, 0x34, 0xC8, 0x25, 0xA7 - }, - { - /* no test vector for test_msg1 */ - 0 - }, - { - /* for test_msg2 */ - 0x09, 0x33, 0x0C, 0x33, 0xF7, 0x11, 0x47, 0xE8, - 0x3D, 0x19, 0x2F, 0xC7, 0x82, 0xCD, 0x1B, 0x47, - 0x53, 0x11, 0x1B, 0x17, 0x3B, 0x3B, 0x05, 0xD2, - 0x2F, 0xA0, 0x80, 0x86, 0xE3, 0xB0, 0xF7, 0x12, - 0xFC, 0xC7, 0xC7, 0x1A, 0x55, 0x7E, 0x2D, 0xB9, - 0x66, 0xC3, 0xE9, 0xFA, 0x91, 0x74, 0x60, 0x39 - } -}; - static const uint8_t sha512_test_digests[][64] = { { /* for test_msg0 */ @@ -126,27 +101,6 @@ static const uint8_t sha512_test_digests[][64] = { } }; -static const uint8_t sha512_224_test_digests[][28] = { - { - /* for test_msg0 */ - 0x46, 0x34, 0x27, 0x0F, 0x70, 0x7B, 0x6A, 0x54, - 0xDA, 0xAE, 0x75, 0x30, 0x46, 0x08, 0x42, 0xE2, - 0x0E, 0x37, 0xED, 0x26, 0x5C, 0xEE, 0xE9, 0xA4, - 0x3E, 0x89, 0x24, 0xAA - }, - { - /* no test vector for test_msg1 */ - 0 - }, - { - /* for test_msg2 */ - 0x23, 0xFE, 0xC5, 0xBB, 0x94, 0xD6, 0x0B, 0x23, - 0x30, 0x81, 0x92, 0x64, 0x0B, 0x0C, 0x45, 0x33, - 0x35, 0xD6, 0x64, 0x73, 0x4F, 0xE4, 0x0E, 0x72, - 0x68, 0x67, 0x4A, 0xF9 - } -}; - static const uint8_t sha512_256_test_digests[][32] = { { /* for test_msg0 */ @@ -191,7 +145,7 @@ main(int argc, char *argv[]) do { \ SHA2_CTX ctx; \ uint8_t digest[diglen / 8]; \ - SHA2Init(SHA ## mode ## _MECH_INFO_TYPE, &ctx); \ + SHA2Init(mode, &ctx); \ SHA2Update(&ctx, _m, strlen(_m)); \ SHA2Final(digest, &ctx); \ (void) printf("SHA%-9sMessage: " #_m \ @@ -215,7 +169,7 @@ main(int argc, char *argv[]) struct timeval start, end; \ memset(block, 0, sizeof (block)); \ (void) gettimeofday(&start, NULL); \ - SHA2Init(SHA ## mode ## _MECH_INFO_TYPE, &ctx); \ + SHA2Init(mode, &ctx); \ for (i = 0; i < 8192; i++) \ SHA2Update(&ctx, block, sizeof (block)); \ SHA2Final(digest, &ctx); \ @@ -231,16 +185,12 @@ main(int argc, char *argv[]) } while (0) (void) printf("Running algorithm correctness tests:\n"); - SHA2_ALGO_TEST(test_msg0, 256, 256, sha256_test_digests[0]); - SHA2_ALGO_TEST(test_msg1, 256, 256, sha256_test_digests[1]); - SHA2_ALGO_TEST(test_msg0, 384, 384, sha384_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 384, 384, sha384_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512, 512, sha512_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512, 512, sha512_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512_224, 224, sha512_224_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512_224, 224, sha512_224_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512_256, 256, sha512_256_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512_256, 256, sha512_256_test_digests[2]); + SHA2_ALGO_TEST(test_msg0, SHA256, 256, sha256_test_digests[0]); + SHA2_ALGO_TEST(test_msg1, SHA256, 256, sha256_test_digests[1]); + SHA2_ALGO_TEST(test_msg0, SHA512, 512, sha512_test_digests[0]); + SHA2_ALGO_TEST(test_msg2, SHA512, 512, sha512_test_digests[2]); + SHA2_ALGO_TEST(test_msg0, SHA512_256, 256, sha512_256_test_digests[0]); + SHA2_ALGO_TEST(test_msg2, SHA512_256, 256, sha512_256_test_digests[2]); if (failed) return (1); @@ -251,13 +201,13 @@ main(int argc, char *argv[]) for (id = 0; id < sha256->getcnt(); id++) { sha256->setid(id); const char *name = sha256->getname(); - SHA2_PERF_TEST(256, 256, name); + SHA2_PERF_TEST(SHA256, 256, name); } for (id = 0; id < sha512->getcnt(); id++) { sha512->setid(id); const char *name = sha512->getname(); - SHA2_PERF_TEST(512, 512, name); + SHA2_PERF_TEST(SHA512, 512, name); } return (0); From f39241aeb333027a4dfb3f716e80d475042a348d Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 15:00:44 +1000 Subject: [PATCH 008/151] icp: remove unused SHA2 HMAC mechanisms Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- include/sys/crypto/common.h | 5 - include/sys/sha2.h | 5 - module/icp/algs/sha2/sha2_generic.c | 33 +----- module/icp/io/sha2_mod.c | 158 +++------------------------- 4 files changed, 13 insertions(+), 188 deletions(-) diff --git a/include/sys/crypto/common.h b/include/sys/crypto/common.h index a73804f916b6..c9ef3b367e08 100644 --- a/include/sys/crypto/common.h +++ b/include/sys/crypto/common.h @@ -79,12 +79,7 @@ typedef uint32_t crypto_keysize_unit_t; /* Mechanisms supported out-of-the-box */ -#define SUN_CKM_SHA256_HMAC "CKM_SHA256_HMAC" -#define SUN_CKM_SHA256_HMAC_GENERAL "CKM_SHA256_HMAC_GENERAL" -#define SUN_CKM_SHA384_HMAC "CKM_SHA384_HMAC" -#define SUN_CKM_SHA384_HMAC_GENERAL "CKM_SHA384_HMAC_GENERAL" #define SUN_CKM_SHA512_HMAC "CKM_SHA512_HMAC" -#define SUN_CKM_SHA512_HMAC_GENERAL "CKM_SHA512_HMAC_GENERAL" #define SUN_CKM_AES_CCM "CKM_AES_CCM" #define SUN_CKM_AES_GCM "CKM_AES_GCM" diff --git a/include/sys/sha2.h b/include/sys/sha2.h index 2d38885bd966..b344eb9d5ff2 100644 --- a/include/sys/sha2.h +++ b/include/sys/sha2.h @@ -86,12 +86,7 @@ typedef struct { /* SHA2 algorithm types */ typedef enum sha2_mech_type { - SHA256_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC */ - SHA256_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC_GENERAL */ - SHA384_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC */ - SHA384_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC_GENERAL */ SHA512_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC */ - SHA512_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC_GENERAL */ /* Not true KCF mech types; used by direct callers to SHA2Init */ SHA256, diff --git a/module/icp/algs/sha2/sha2_generic.c b/module/icp/algs/sha2/sha2_generic.c index ab361b9d59f4..d53f4b69990a 100644 --- a/module/icp/algs/sha2/sha2_generic.c +++ b/module/icp/algs/sha2/sha2_generic.c @@ -400,15 +400,13 @@ SHA2Init(int algotype, SHA2_CTX *ctx) sha256_ctx *ctx256 = &ctx->sha256; sha512_ctx *ctx512 = &ctx->sha512; - ASSERT3S(algotype, >=, SHA256_HMAC_MECH_INFO_TYPE); + ASSERT3S(algotype, >=, SHA512_HMAC_MECH_INFO_TYPE); ASSERT3S(algotype, <=, SHA512_256); memset(ctx, 0, sizeof (*ctx)); ctx->algotype = algotype; switch (ctx->algotype) { case SHA256: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: ctx256->state[0] = 0x6a09e667; ctx256->state[1] = 0xbb67ae85; ctx256->state[2] = 0x3c6ef372; @@ -420,23 +418,8 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx256->count[0] = 0; ctx256->ops = sha256_get_ops(); break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - ctx512->state[0] = 0xcbbb9d5dc1059ed8ULL; - ctx512->state[1] = 0x629a292a367cd507ULL; - ctx512->state[2] = 0x9159015a3070dd17ULL; - ctx512->state[3] = 0x152fecd8f70e5939ULL; - ctx512->state[4] = 0x67332667ffc00b31ULL; - ctx512->state[5] = 0x8eb44a8768581511ULL; - ctx512->state[6] = 0xdb0c2e0d64f98fa7ULL; - ctx512->state[7] = 0x47b5481dbefa4fa4ULL; - ctx512->count[0] = 0; - ctx512->count[1] = 0; - ctx512->ops = sha512_get_ops(); - break; case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: ctx512->state[0] = 0x6a09e667f3bcc908ULL; ctx512->state[1] = 0xbb67ae8584caa73bULL; ctx512->state[2] = 0x3c6ef372fe94f82bULL; @@ -477,17 +460,10 @@ SHA2Update(SHA2_CTX *ctx, const void *data, size_t len) switch (ctx->algotype) { case SHA256: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: sha256_update(&ctx->sha256, data, len); break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - sha512_update(&ctx->sha512, data, len); - break; case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_update(&ctx->sha512, data, len); break; case SHA512_256: @@ -502,17 +478,10 @@ SHA2Final(void *digest, SHA2_CTX *ctx) { switch (ctx->algotype) { case SHA256: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: sha256_final(&ctx->sha256, digest, 256); break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - sha512_final(&ctx->sha512, digest, 384); - break; case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_final(&ctx->sha512, digest, 512); break; case SHA512_256: diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c index d80ea1e677b1..e515dabc9dda 100644 --- a/module/icp/io/sha2_mod.c +++ b/module/icp/io/sha2_mod.c @@ -60,24 +60,9 @@ * Mechanism info structure passed to KCF during registration. */ static const crypto_mech_info_t sha2_mech_info_tab[] = { - /* SHA256-HMAC */ - {SUN_CKM_SHA256_HMAC, SHA256_HMAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA256-HMAC GENERAL */ - {SUN_CKM_SHA256_HMAC_GENERAL, SHA256_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA384-HMAC */ - {SUN_CKM_SHA384_HMAC, SHA384_HMAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA384-HMAC GENERAL */ - {SUN_CKM_SHA384_HMAC_GENERAL, SHA384_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, /* SHA512-HMAC */ {SUN_CKM_SHA512_HMAC, SHA512_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA512-HMAC GENERAL */ - {SUN_CKM_SHA512_HMAC_GENERAL, SHA512_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, }; static int sha2_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, @@ -251,10 +236,8 @@ sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, * The computed SHA2 digest will fit in the current * iovec. */ - if (((sha2_ctx->algotype <= SHA256_HMAC_GEN_MECH_INFO_TYPE) && - (digest_len != SHA256_DIGEST_LENGTH)) || - ((sha2_ctx->algotype > SHA256_HMAC_GEN_MECH_INFO_TYPE) && - (digest_len != SHA512_DIGEST_LENGTH))) { + ASSERT3U(sha2_ctx->algotype, ==, SHA512_HMAC_MECH_INFO_TYPE); + if (digest_len != SHA512_DIGEST_LENGTH) { /* * The caller requested a short digest. Digest * into a scratch buffer and return to @@ -349,13 +332,9 @@ sha2_mac_init_ctx(sha2_hmac_ctx_t *ctx, void *keyval, uint_t length_in_bytes) int i, block_size, blocks_per_int64; /* Determine the block size */ - if (ctx->hc_mech_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) { - block_size = SHA256_HMAC_BLOCK_SIZE; - blocks_per_int64 = SHA256_HMAC_BLOCK_SIZE / sizeof (uint64_t); - } else { - block_size = SHA512_HMAC_BLOCK_SIZE; - blocks_per_int64 = SHA512_HMAC_BLOCK_SIZE / sizeof (uint64_t); - } + ASSERT3U(ctx->hc_mech_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + block_size = SHA512_HMAC_BLOCK_SIZE; + blocks_per_int64 = SHA512_HMAC_BLOCK_SIZE / sizeof (uint64_t); (void) memset(ipad, 0, block_size); (void) memset(opad, 0, block_size); @@ -397,15 +376,7 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -445,22 +416,6 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, } } - /* - * Get the mechanism parameters, if applicable. - */ - if (mechanism->cm_type % 3 == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - } else { - PROV_SHA2_GET_DIGEST_LEN(mechanism, - PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len); - if (PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len > - sha_digest_len) - ret = CRYPTO_MECHANISM_PARAM_INVALID; - } - } - if (ret != CRYPTO_SUCCESS) { memset(ctx->cc_provider_private, 0, sizeof (sha2_hmac_ctx_t)); kmem_free(ctx->cc_provider_private, sizeof (sha2_hmac_ctx_t)); @@ -509,24 +464,9 @@ sha2_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac) /* Set the digest lengths to values appropriate to the mechanism */ switch (PROV_SHA2_HMAC_CTX(ctx)->hc_mech_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA384_DIGEST_LENGTH; - break; case SHA512_HMAC_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; break; - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - digest_len = PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len; - break; - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - digest_len = PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len; - break; default: return (CRYPTO_ARGUMENTS_BAD); } @@ -626,15 +566,7 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -665,20 +597,6 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, } } - /* get the mechanism parameters, if applicable */ - if ((mechanism->cm_type % 3) == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - PROV_SHA2_GET_DIGEST_LEN(mechanism, digest_len); - if (digest_len > sha_digest_len) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - } - /* do a SHA2 update of the inner context using the specified data */ SHA2_MAC_UPDATE(data, sha2_hmac_ctx, ret); if (ret != CRYPTO_SUCCESS) @@ -693,16 +611,9 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, /* * Do an SHA2 update on the outer context, feeding the inner * digest as data. - * - * HMAC-SHA384 needs special handling as the outer hash needs only 48 - * bytes of the inner hash value. */ - if (mechanism->cm_type == SHA384_HMAC_MECH_INFO_TYPE || - mechanism->cm_type == SHA384_HMAC_GEN_MECH_INFO_TYPE) - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, - SHA384_DIGEST_LENGTH); - else - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); + ASSERT3U(mechanism->cm_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); /* * Do a SHA2 final on the outer context, storing the computed @@ -758,15 +669,7 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -797,20 +700,6 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, } } - /* get the mechanism parameters, if applicable */ - if (mechanism->cm_type % 3 == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - PROV_SHA2_GET_DIGEST_LEN(mechanism, digest_len); - if (digest_len > sha_digest_len) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - } - if (mac->cd_length != digest_len) { ret = CRYPTO_INVALID_MAC; goto bail; @@ -828,16 +717,9 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, /* * Do an SHA2 update on the outer context, feeding the inner * digest as data. - * - * HMAC-SHA384 needs special handling as the outer hash needs only 48 - * bytes of the inner hash value. */ - if (mechanism->cm_type == SHA384_HMAC_MECH_INFO_TYPE || - mechanism->cm_type == SHA384_HMAC_GEN_MECH_INFO_TYPE) - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, - SHA384_DIGEST_LENGTH); - else - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); + ASSERT3U(mechanism->cm_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); /* * Do a SHA2 final on the outer context, storing the computed @@ -929,15 +811,7 @@ sha2_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -986,17 +860,9 @@ sha2_free_context(crypto_ctx_t *ctx) if (ctx->cc_provider_private == NULL) return (CRYPTO_SUCCESS); - /* - * We have to free either SHA2 or SHA2-HMAC contexts, which - * have different lengths. - * - * Note: Below is dependent on the mechanism ordering. - */ - - if (PROV_SHA2_CTX(ctx)->sc_mech_type % 3 == 0) - ctx_len = sizeof (sha2_ctx_t); - else - ctx_len = sizeof (sha2_hmac_ctx_t); + ASSERT3U(PROV_SHA2_CTX(ctx)->sc_mech_type, ==, + SHA512_HMAC_MECH_INFO_TYPE); + ctx_len = sizeof (sha2_hmac_ctx_t); memset(ctx->cc_provider_private, 0, ctx_len); kmem_free(ctx->cc_provider_private, ctx_len); From ae512620d0c372d83180204f3149d9a5df814931 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 15:00:00 +1000 Subject: [PATCH 009/151] icp: remove skein module Nothing calls it through the KCF interface, so this is all unused. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- include/sys/crypto/icp.h | 3 - lib/libicp/Makefile.am | 1 - module/Kbuild.in | 1 - module/icp/illumos-crypto.c | 2 - module/icp/io/skein_mod.c | 515 ------------------------------------ 5 files changed, 522 deletions(-) delete mode 100644 module/icp/io/skein_mod.c diff --git a/include/sys/crypto/icp.h b/include/sys/crypto/icp.h index 8c3f19886fd8..efe283fa928a 100644 --- a/include/sys/crypto/icp.h +++ b/include/sys/crypto/icp.h @@ -32,9 +32,6 @@ int aes_mod_fini(void); int sha2_mod_init(void); int sha2_mod_fini(void); -int skein_mod_init(void); -int skein_mod_fini(void); - int icp_init(void); void icp_fini(void); diff --git a/lib/libicp/Makefile.am b/lib/libicp/Makefile.am index f40512bec9c7..ce24d13a760f 100644 --- a/lib/libicp/Makefile.am +++ b/lib/libicp/Makefile.am @@ -31,7 +31,6 @@ nodist_libicp_la_SOURCES = \ module/icp/illumos-crypto.c \ module/icp/io/aes.c \ module/icp/io/sha2_mod.c \ - module/icp/io/skein_mod.c \ module/icp/core/kcf_sched.c \ module/icp/core/kcf_prov_lib.c \ module/icp/core/kcf_callprov.c \ diff --git a/module/Kbuild.in b/module/Kbuild.in index 6e2eab22588b..9e44364b7584 100644 --- a/module/Kbuild.in +++ b/module/Kbuild.in @@ -122,7 +122,6 @@ ICP_OBJS := \ illumos-crypto.o \ io/aes.o \ io/sha2_mod.o \ - io/skein_mod.o \ spi/kcf_spi.o ICP_OBJS_X86_64 := \ diff --git a/module/icp/illumos-crypto.c b/module/icp/illumos-crypto.c index 13f05c06ed5c..f5ed3e13facc 100644 --- a/module/icp/illumos-crypto.c +++ b/module/icp/illumos-crypto.c @@ -107,7 +107,6 @@ void icp_fini(void) { - skein_mod_fini(); sha2_mod_fini(); aes_mod_fini(); kcf_sched_destroy(); @@ -134,7 +133,6 @@ icp_init(void) /* initialize algorithms */ aes_mod_init(); sha2_mod_init(); - skein_mod_init(); return (0); } diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c deleted file mode 100644 index 3e969513be6e..000000000000 --- a/module/icp/io/skein_mod.c +++ /dev/null @@ -1,515 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2013 Saso Kiselkov. All rights reserved. - */ - -#include -#include -#include -#include -#define SKEIN_MODULE_IMPL -#include - -static const crypto_mech_info_t skein_mech_info_tab[] = { - {CKM_SKEIN_256_MAC, SKEIN_256_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN_512_MAC, SKEIN_512_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN1024_MAC, SKEIN1024_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, -}; - -static int skein_update(crypto_ctx_t *, crypto_data_t *); -static int skein_final(crypto_ctx_t *, crypto_data_t *); - -static int skein_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); -static int skein_mac_atomic(crypto_mechanism_t *, crypto_key_t *, - crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - -static const crypto_mac_ops_t skein_mac_ops = { - .mac_init = skein_mac_init, - .mac = NULL, - .mac_update = skein_update, /* using regular digest update is OK here */ - .mac_final = skein_final, /* using regular digest final is OK here */ - .mac_atomic = skein_mac_atomic, - .mac_verify_atomic = NULL -}; - -static int skein_create_ctx_template(crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t *, size_t *); -static int skein_free_context(crypto_ctx_t *); - -static const crypto_ctx_ops_t skein_ctx_ops = { - .create_ctx_template = skein_create_ctx_template, - .free_context = skein_free_context -}; - -static const crypto_ops_t skein_crypto_ops = { - NULL, - &skein_mac_ops, - &skein_ctx_ops, -}; - -static const crypto_provider_info_t skein_prov_info = { - "Skein Software Provider", - &skein_crypto_ops, - sizeof (skein_mech_info_tab) / sizeof (crypto_mech_info_t), - skein_mech_info_tab -}; - -static crypto_kcf_provider_handle_t skein_prov_handle = 0; - -typedef struct skein_ctx { - skein_mech_type_t sc_mech_type; - size_t sc_digest_bitlen; - /*LINTED(E_ANONYMOUS_UNION_DECL)*/ - union { - Skein_256_Ctxt_t sc_256; - Skein_512_Ctxt_t sc_512; - Skein1024_Ctxt_t sc_1024; - }; -} skein_ctx_t; -#define SKEIN_CTX(_ctx_) ((skein_ctx_t *)((_ctx_)->cc_provider_private)) -#define SKEIN_CTX_LVALUE(_ctx_) (_ctx_)->cc_provider_private -#define SKEIN_OP(_skein_ctx, _op, ...) \ - do { \ - skein_ctx_t *sc = (_skein_ctx); \ - switch (sc->sc_mech_type) { \ - case SKEIN_256_MAC_MECH_INFO_TYPE: \ - (void) Skein_256_ ## _op(&sc->sc_256, __VA_ARGS__);\ - break; \ - case SKEIN_512_MAC_MECH_INFO_TYPE: \ - (void) Skein_512_ ## _op(&sc->sc_512, __VA_ARGS__);\ - break; \ - case SKEIN1024_MAC_MECH_INFO_TYPE: \ - (void) Skein1024_ ## _op(&sc->sc_1024, __VA_ARGS__);\ - break; \ - } \ - } while (0) - -static int -skein_get_digest_bitlen(const crypto_mechanism_t *mechanism, size_t *result) -{ - if (mechanism->cm_param != NULL) { - /*LINTED(E_BAD_PTR_CAST_ALIGN)*/ - skein_param_t *param = (skein_param_t *)mechanism->cm_param; - - if (mechanism->cm_param_len != sizeof (*param) || - param->sp_digest_bitlen == 0) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - *result = param->sp_digest_bitlen; - } else { - return (CRYPTO_MECHANISM_INVALID); - } - return (CRYPTO_SUCCESS); -} - -int -skein_mod_init(void) -{ - /* - * Try to register with KCF - failure shouldn't unload us, since we - * still may want to continue providing misc/skein functionality. - */ - (void) crypto_register_provider(&skein_prov_info, &skein_prov_handle); - - return (0); -} - -int -skein_mod_fini(void) -{ - int ret = 0; - - if (skein_prov_handle != 0) { - if ((ret = crypto_unregister_provider(skein_prov_handle)) != - CRYPTO_SUCCESS) { - cmn_err(CE_WARN, - "skein _fini: crypto_unregister_provider() " - "failed (0x%x)", ret); - return (EBUSY); - } - skein_prov_handle = 0; - } - - return (0); -} - -/* - * General Skein hashing helper functions. - */ - -/* - * Performs an Update on a context with uio input data. - */ -static int -skein_digest_update_uio(skein_ctx_t *ctx, const crypto_data_t *data) -{ - off_t offset = data->cd_offset; - size_t length = data->cd_length; - uint_t vec_idx = 0; - size_t cur_len; - zfs_uio_t *uio = data->cd_uio; - - /* we support only kernel buffer */ - if (zfs_uio_segflg(uio) != UIO_SYSSPACE) - return (CRYPTO_ARGUMENTS_BAD); - - /* - * Jump to the first iovec containing data to be - * digested. - */ - offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == zfs_uio_iovcnt(uio)) { - /* - * The caller specified an offset that is larger than the - * total size of the buffers it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - - /* - * Now do the digesting on the iovecs. - */ - while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { - cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, length); - SKEIN_OP(ctx, Update, (uint8_t *)zfs_uio_iovbase(uio, vec_idx) - + offset, cur_len); - length -= cur_len; - vec_idx++; - offset = 0; - } - - if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { - /* - * The end of the specified iovec's was reached but - * the length requested could not be processed, i.e. - * The caller requested to digest more data than it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - - return (CRYPTO_SUCCESS); -} - -/* - * Performs a Final on a context and writes to a uio digest output. - */ -static int -skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest) -{ - off_t offset = digest->cd_offset; - uint_t vec_idx = 0; - zfs_uio_t *uio = digest->cd_uio; - - /* we support only kernel buffer */ - if (zfs_uio_segflg(uio) != UIO_SYSSPACE) - return (CRYPTO_ARGUMENTS_BAD); - - /* - * Jump to the first iovec containing ptr to the digest to be returned. - */ - offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == zfs_uio_iovcnt(uio)) { - /* - * The caller specified an offset that is larger than the - * total size of the buffers it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - if (offset + CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen) <= - zfs_uio_iovlen(uio, vec_idx)) { - /* The computed digest will fit in the current iovec. */ - SKEIN_OP(ctx, Final, - (uchar_t *)zfs_uio_iovbase(uio, vec_idx) + offset); - } else { - uint8_t *digest_tmp; - off_t scratch_offset = 0; - size_t length = CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen); - size_t cur_len; - - digest_tmp = kmem_alloc(CRYPTO_BITS2BYTES( - ctx->sc_digest_bitlen), KM_SLEEP); - if (digest_tmp == NULL) - return (CRYPTO_HOST_MEMORY); - SKEIN_OP(ctx, Final, digest_tmp); - while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { - cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, - length); - memcpy(zfs_uio_iovbase(uio, vec_idx) + offset, - digest_tmp + scratch_offset, cur_len); - - length -= cur_len; - vec_idx++; - scratch_offset += cur_len; - offset = 0; - } - kmem_free(digest_tmp, CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen)); - - if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { - /* - * The end of the specified iovec's was reached but - * the length requested could not be processed, i.e. - * The caller requested to digest more data than it - * provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - } - - return (CRYPTO_SUCCESS); -} - -/* - * KCF software provider digest entry points. - */ - -/* - * Performs a skein Update with the input message in `data' (successive calls - * can push more data). This is used both for digest and MAC operation. - * Supported input data formats are raw, uio and mblk. - */ -static int -skein_update(crypto_ctx_t *ctx, crypto_data_t *data) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SKEIN_OP(SKEIN_CTX(ctx), Update, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - error = skein_digest_update_uio(SKEIN_CTX(ctx), data); - break; - default: - error = CRYPTO_ARGUMENTS_BAD; - } - - return (error); -} - -/* - * Performs a skein Final, writing the output to `digest'. This is used both - * for digest and MAC operation. - * Supported output digest formats are raw, uio and mblk. - */ -static int -skein_final_nofree(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - if (digest->cd_length < - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - return (CRYPTO_BUFFER_TOO_SMALL); - } - - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SKEIN_OP(SKEIN_CTX(ctx), Final, - (uint8_t *)digest->cd_raw.iov_base + digest->cd_offset); - break; - case CRYPTO_DATA_UIO: - error = skein_digest_final_uio(SKEIN_CTX(ctx), digest); - break; - default: - error = CRYPTO_ARGUMENTS_BAD; - } - - if (error == CRYPTO_SUCCESS) - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - else - digest->cd_length = 0; - - return (error); -} - -static int -skein_final(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int error = skein_final_nofree(ctx, digest); - - if (error == CRYPTO_BUFFER_TOO_SMALL) - return (error); - - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*(SKEIN_CTX(ctx)))); - SKEIN_CTX_LVALUE(ctx) = NULL; - - return (error); -} - -/* - * Helper function that builds a Skein MAC context from the provided - * mechanism and key. - */ -static int -skein_mac_ctx_build(skein_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key) -{ - int error; - - if (!VALID_SKEIN_MAC_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - ctx->sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, &ctx->sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - return (error); - SKEIN_OP(ctx, InitExt, ctx->sc_digest_bitlen, 0, key->ck_data, - CRYPTO_BITS2BYTES(key->ck_length)); - - return (CRYPTO_SUCCESS); -} - -/* - * KCF software provide mac entry points. - */ -/* - * Initializes a skein MAC context. You may pass a ctx_template, in which - * case the template will be reused to make initialization more efficient. - * Otherwise a new context will be constructed. The mechanism cm_type must - * be one of SKEIN_*_MAC_MECH_INFO_TYPE. Same as in skein_digest_init, you - * may pass a skein_param_t in cm_param to configure the length of the - * digest. The key must be in raw format. - */ -static int -skein_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t ctx_template) -{ - int error; - - SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), KM_SLEEP); - if (SKEIN_CTX(ctx) == NULL) - return (CRYPTO_HOST_MEMORY); - - if (ctx_template != NULL) { - memcpy(SKEIN_CTX(ctx), ctx_template, - sizeof (*SKEIN_CTX(ctx))); - } else { - error = skein_mac_ctx_build(SKEIN_CTX(ctx), mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - } - - return (CRYPTO_SUCCESS); -errout: - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - return (error); -} - -/* - * The MAC update and final calls are reused from the regular digest code. - */ - -/* - * Same as skein_digest_atomic, performs an atomic Skein MAC operation in - * one step. All the same properties apply to the arguments of this - * function as to those of the partial operations above. - */ -static int -skein_mac_atomic(crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, - crypto_spi_ctx_template_t ctx_template) -{ - /* faux crypto context just for skein_digest_{update,final} */ - int error; - crypto_ctx_t ctx; - skein_ctx_t skein_ctx; - SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; - - if (ctx_template != NULL) { - memcpy(&skein_ctx, ctx_template, sizeof (skein_ctx)); - } else { - error = skein_mac_ctx_build(&skein_ctx, mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - } - - if ((error = skein_update(&ctx, data)) != CRYPTO_SUCCESS) - goto errout; - if ((error = skein_final_nofree(&ctx, mac)) != CRYPTO_SUCCESS) - goto errout; - - return (CRYPTO_SUCCESS); -errout: - memset(&skein_ctx, 0, sizeof (skein_ctx)); - return (error); -} - -/* - * KCF software provider context management entry points. - */ - -/* - * Constructs a context template for the Skein MAC algorithm. The same - * properties apply to the arguments of this function as to those of - * skein_mac_init. - */ -static int -skein_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, - crypto_spi_ctx_template_t *ctx_template, size_t *ctx_template_size) -{ - int error; - skein_ctx_t *ctx_tmpl; - - ctx_tmpl = kmem_alloc(sizeof (*ctx_tmpl), KM_SLEEP); - if (ctx_tmpl == NULL) - return (CRYPTO_HOST_MEMORY); - error = skein_mac_ctx_build(ctx_tmpl, mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - *ctx_template = ctx_tmpl; - *ctx_template_size = sizeof (*ctx_tmpl); - - return (CRYPTO_SUCCESS); -errout: - memset(ctx_tmpl, 0, sizeof (*ctx_tmpl)); - kmem_free(ctx_tmpl, sizeof (*ctx_tmpl)); - return (error); -} - -/* - * Frees a skein context in a parent crypto context. - */ -static int -skein_free_context(crypto_ctx_t *ctx) -{ - if (SKEIN_CTX(ctx) != NULL) { - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - } - - return (CRYPTO_SUCCESS); -} From 4e714c0be10f53eea2d87e6af67bf46d67e94db2 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 21:40:59 +1000 Subject: [PATCH 010/151] icp: remove unused headers Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- module/icp/include/sys/stack.h | 36 ---------------------------------- module/icp/include/sys/trap.h | 36 ---------------------------------- 2 files changed, 72 deletions(-) delete mode 100644 module/icp/include/sys/stack.h delete mode 100644 module/icp/include/sys/trap.h diff --git a/module/icp/include/sys/stack.h b/module/icp/include/sys/stack.h deleted file mode 100644 index 0bace018b5ab..000000000000 --- a/module/icp/include/sys/stack.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_STACK_H -#define _SYS_STACK_H - -#if defined(__i386) || defined(__amd64) - -#include /* XX64 x86/sys/stack.h */ - -#endif - -#endif /* _SYS_STACK_H */ diff --git a/module/icp/include/sys/trap.h b/module/icp/include/sys/trap.h deleted file mode 100644 index 2f47d43939c1..000000000000 --- a/module/icp/include/sys/trap.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_TRAP_H -#define _SYS_TRAP_H - -#if defined(__i386) || defined(__amd64) - -#include /* XX64 x86/sys/trap.h */ - -#endif - -#endif /* _SYS_TRAP_H */ From a72751a34265492efc115bb6a773e961bb9be82d Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 May 2024 21:49:19 +1000 Subject: [PATCH 011/151] icp: remove redundant FreeBSD check We don't build illumos-crypto for FreeBSD. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #16209 --- module/icp/illumos-crypto.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/module/icp/illumos-crypto.c b/module/icp/illumos-crypto.c index f5ed3e13facc..89736a61bc89 100644 --- a/module/icp/illumos-crypto.c +++ b/module/icp/illumos-crypto.c @@ -136,8 +136,3 @@ icp_init(void) return (0); } - -#if defined(_KERNEL) && defined(__FreeBSD__) -module_exit(icp_fini); -module_init(icp_init); -#endif From 23a489a41167890cdd227366a5f950170df8cc9b Mon Sep 17 00:00:00 2001 From: Ameer Hamza Date: Tue, 4 Jun 2024 04:28:43 +0500 Subject: [PATCH 012/151] zdb: detect cachefile automatically otherwise force import If a pool is created with the cache file located in a non-default path /etc/default/zpool.cache, removed, or the cachefile property is set to none, zdb fails to show the pool unless we specify the cache file or use the -e option. This PR automates this process. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Reviewed-by: Akash B Signed-off-by: Ameer Hamza Closes #16071 --- cmd/zdb/zdb.c | 66 ++++++++++++++++++++++++++++++--- include/libzfs_core.h | 1 + lib/libzfs_core/libzfs_core.abi | 6 +++ lib/libzfs_core/libzfs_core.c | 6 +++ 4 files changed, 74 insertions(+), 5 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 704fcf4422d4..2a3d58d77e04 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -89,6 +89,7 @@ #include #include +#include #include @@ -8924,6 +8925,9 @@ main(int argc, char **argv) boolean_t target_is_spa = B_TRUE, dataset_lookup = B_FALSE; nvlist_t *cfg = NULL; struct sigaction action; + boolean_t force_import = B_FALSE; + boolean_t config_path_console = B_FALSE; + char pbuf[MAXPATHLEN]; dprintf_setup(&argc, argv); @@ -9094,6 +9098,7 @@ main(int argc, char **argv) } break; case 'U': + config_path_console = B_TRUE; spa_config_path = optarg; if (spa_config_path[0] != '/') { (void) fprintf(stderr, @@ -9153,9 +9158,6 @@ main(int argc, char **argv) */ spa_mode_readable_spacemaps = B_TRUE; - kernel_init(SPA_MODE_READ); - kernel_init_done = B_TRUE; - if (dump_all) verbose = MAX(verbose, 1); @@ -9174,6 +9176,53 @@ main(int argc, char **argv) if (argc < 2 && dump_opt['R']) usage(); + target = argv[0]; + + /* + * Automate cachefile + */ + if (!spa_config_path_env && !config_path_console && target && + libzfs_core_init() == 0) { + char *pname = strdup(target); + const char *value; + nvlist_t *pnvl; + nvlist_t *vnvl; + + if (strpbrk(pname, "/@") != NULL) + *strpbrk(pname, "/@") = '\0'; + + if (pname && lzc_get_props(pname, &pnvl) == 0) { + if (nvlist_lookup_nvlist(pnvl, "cachefile", + &vnvl) == 0) { + value = fnvlist_lookup_string(vnvl, + ZPROP_VALUE); + } else { + value = "-"; + } + strlcpy(pbuf, value, sizeof (pbuf)); + if (pbuf[0] != '\0') { + if (pbuf[0] == '/') { + if (access(pbuf, F_OK) == 0) + spa_config_path = pbuf; + else + force_import = B_TRUE; + } else if ((strcmp(pbuf, "-") == 0 && + access(ZPOOL_CACHE, F_OK) != 0) || + strcmp(pbuf, "none") == 0) { + force_import = B_TRUE; + } + } + nvlist_free(vnvl); + } + + free(pname); + nvlist_free(pnvl); + libzfs_core_fini(); + } + + kernel_init(SPA_MODE_READ); + kernel_init_done = B_TRUE; + if (dump_opt['E']) { if (argc != 1) usage(); @@ -9210,7 +9259,6 @@ main(int argc, char **argv) fatal("internal error: %s", strerror(ENOMEM)); error = 0; - target = argv[0]; if (strpbrk(target, "/@") != NULL) { size_t targetlen; @@ -9256,9 +9304,17 @@ main(int argc, char **argv) target_pool = target; } - if (dump_opt['e']) { + if (dump_opt['e'] || force_import) { importargs_t args = { 0 }; + /* + * If path is not provided, search in /dev + */ + if (searchdirs == NULL) { + searchdirs = umem_alloc(sizeof (char *), UMEM_NOFAIL); + searchdirs[nsearch++] = (char *)ZFS_DEVDIR; + } + args.paths = nsearch; args.path = searchdirs; args.can_be_active = B_TRUE; diff --git a/include/libzfs_core.h b/include/libzfs_core.h index 867c18b9c226..b2fd97372cd4 100644 --- a/include/libzfs_core.h +++ b/include/libzfs_core.h @@ -77,6 +77,7 @@ _LIBZFS_CORE_H int lzc_snaprange_space(const char *, const char *, uint64_t *); _LIBZFS_CORE_H int lzc_hold(nvlist_t *, int, nvlist_t **); _LIBZFS_CORE_H int lzc_release(nvlist_t *, nvlist_t **); _LIBZFS_CORE_H int lzc_get_holds(const char *, nvlist_t **); +_LIBZFS_CORE_H int lzc_get_props(const char *, nvlist_t **); enum lzc_send_flags { LZC_SEND_FLAG_EMBED_DATA = 1 << 0, diff --git a/lib/libzfs_core/libzfs_core.abi b/lib/libzfs_core/libzfs_core.abi index cf9d6bddc9fc..c20698580ee7 100644 --- a/lib/libzfs_core/libzfs_core.abi +++ b/lib/libzfs_core/libzfs_core.abi @@ -168,6 +168,7 @@ + @@ -2694,6 +2695,11 @@ + + + + + diff --git a/lib/libzfs_core/libzfs_core.c b/lib/libzfs_core/libzfs_core.c index 01d803e21db0..070f8c1be678 100644 --- a/lib/libzfs_core/libzfs_core.c +++ b/lib/libzfs_core/libzfs_core.c @@ -596,6 +596,12 @@ lzc_get_holds(const char *snapname, nvlist_t **holdsp) return (lzc_ioctl(ZFS_IOC_GET_HOLDS, snapname, NULL, holdsp)); } +int +lzc_get_props(const char *poolname, nvlist_t **props) +{ + return (lzc_ioctl(ZFS_IOC_POOL_GET_PROPS, poolname, NULL, props)); +} + static unsigned int max_pipe_buffer(int infd) { From b558f0a9d65c3bdb8310504184a82e9802551168 Mon Sep 17 00:00:00 2001 From: Ameer Hamza Date: Fri, 7 Jun 2024 05:01:26 +0500 Subject: [PATCH 013/151] zdb: fix FreeBSD build failure This fixes FreeBSD build failure with clang-18 after 23a489a got merged. Reviewed-by: Alexander Motin Reviewed-by: Rob Norris Reviewed-by: Brian Behlendorf Signed-off-by: Ameer Hamza Closes #16252 --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 2a3d58d77e04..3a7ef11612d9 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -9185,7 +9185,7 @@ main(int argc, char **argv) libzfs_core_init() == 0) { char *pname = strdup(target); const char *value; - nvlist_t *pnvl; + nvlist_t *pnvl = NULL; nvlist_t *vnvl; if (strpbrk(pname, "/@") != NULL) From 4de260efe3375fe62b9d80452b9203c89ab0c045 Mon Sep 17 00:00:00 2001 From: Derek Schrock Date: Thu, 6 Jun 2024 20:37:26 -0400 Subject: [PATCH 014/151] contrib/bash_completion.d: squelch FreeBSD seq when first < last With seq x -1 z and x is less than z FreeBSD seq will print the error: $ seq 1 -1 2 seq: needs positive increment Hide this error. Alternatively $COMP_CWORD could be checked for < 2. Reviewed-by: Brian Behlendorf Signed-off-by: Derek Schrock Closes #16234 --- contrib/bash_completion.d/zfs.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bash_completion.d/zfs.in b/contrib/bash_completion.d/zfs.in index c5cfd8e8efb2..dbeb10d8994b 100644 --- a/contrib/bash_completion.d/zfs.in +++ b/contrib/bash_completion.d/zfs.in @@ -155,7 +155,7 @@ __zfs_list_volumes() __zfs_argument_chosen() { local word property - for word in $(seq $((COMP_CWORD-1)) -1 2) + for word in $(seq $((COMP_CWORD-1)) -1 2 2>/dev/null) do local prev="${COMP_WORDS[$word]}" if [[ ${COMP_WORDS[$word-1]} != -[tos] ]] From 20c8bdd85ef4716d5e59d9f6f61347c0e4566750 Mon Sep 17 00:00:00 2001 From: bnovkov <72801811+bnovkov@users.noreply.github.com> Date: Fri, 7 Jun 2024 03:11:00 +0200 Subject: [PATCH 015/151] FreeBSD: Update use of UMA-related symbols in arc_available_memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent UMA changes repurposed the use of UMA_MD_SMALL_ALLOC in a way that breaks arc_available_memory on -CURRENT. This change ensures that arc_available_memory uses the new symbol while maintaining compatibility with older FreeBSD releases. Reviewed-by: Brian Behlendorf Signed-off-by: Bojan Novković Closes #16230 --- module/os/freebsd/zfs/arc_os.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/module/os/freebsd/zfs/arc_os.c b/module/os/freebsd/zfs/arc_os.c index 92696c0bf1ae..e271d3bf98a0 100644 --- a/module/os/freebsd/zfs/arc_os.c +++ b/module/os/freebsd/zfs/arc_os.c @@ -89,17 +89,17 @@ arc_available_memory(void) if (n < lowest) { lowest = n; } -#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) +#if !defined(UMA_MD_SMALL_ALLOC) && !defined(UMA_USE_DMAP) /* - * If we're on an i386 platform, it's possible that we'll exhaust the - * kernel heap space before we ever run out of available physical - * memory. Most checks of the size of the heap_area compare against - * tune.t_minarmem, which is the minimum available real memory that we - * can have in the system. However, this is generally fixed at 25 pages - * which is so low that it's useless. In this comparison, we seek to - * calculate the total heap-size, and reclaim if more than 3/4ths of the - * heap is allocated. (Or, in the calculation, if less than 1/4th is - * free) + * If we're on a platform without a direct map, it's possible that we'll + * exhaust the kernel heap space before we ever run out of available + * physical memory. Most checks of the size of the heap_area compare + * against tune.t_minarmem, which is the minimum available real memory + * that we can have in the system. However, this is generally fixed at + * 25 pages which is so low that it's useless. In this comparison, we + * seek to calculate the total heap-size, and reclaim if more than + * 3/4ths of the heap is allocated. (Or, in the calculation, if less + * than 1/4th is free) */ n = uma_avail() - (long)(uma_limit() / 4); if (n < lowest) { From 121a2d335414fe294c948795ee9406bab966588f Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Fri, 14 Jun 2024 02:49:50 +0200 Subject: [PATCH 016/151] FreeBSD: unregister mountroot eventhandler on unload Otherwise if zfs is unloaded and reroot is being used it trips over a stale pointer. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Sponsored by: Rubicon Communications, LLC ("Netgate") Signed-off-by: Mateusz Guzik Closes #16242 --- module/os/freebsd/zfs/kmod_core.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/module/os/freebsd/zfs/kmod_core.c b/module/os/freebsd/zfs/kmod_core.c index 2bced9ab6446..9bd0c9ed81af 100644 --- a/module/os/freebsd/zfs/kmod_core.c +++ b/module/os/freebsd/zfs/kmod_core.c @@ -111,6 +111,7 @@ static int zfs__fini(void); static void zfs_shutdown(void *, int); static eventhandler_tag zfs_shutdown_event_tag; +static eventhandler_tag zfs_mountroot_event_tag; #define ZFS_MIN_KSTACK_PAGES 4 @@ -305,16 +306,25 @@ zfs_modevent(module_t mod, int type, void *unused __unused) switch (type) { case MOD_LOAD: err = zfs__init(); - if (err == 0) + if (err == 0) { zfs_shutdown_event_tag = EVENTHANDLER_REGISTER( shutdown_post_sync, zfs_shutdown, NULL, SHUTDOWN_PRI_FIRST); + zfs_mountroot_event_tag = EVENTHANDLER_REGISTER( + mountroot, spa_boot_init, NULL, + SI_ORDER_ANY); + } return (err); case MOD_UNLOAD: err = zfs__fini(); - if (err == 0 && zfs_shutdown_event_tag != NULL) - EVENTHANDLER_DEREGISTER(shutdown_post_sync, - zfs_shutdown_event_tag); + if (err == 0) { + if (zfs_shutdown_event_tag != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, + zfs_shutdown_event_tag); + if (zfs_mountroot_event_tag != NULL) + EVENTHANDLER_DEREGISTER(mountroot, + zfs_mountroot_event_tag); + } return (err); case MOD_SHUTDOWN: return (0); @@ -330,9 +340,6 @@ static moduledata_t zfs_mod = { 0 }; -#ifdef _KERNEL -EVENTHANDLER_DEFINE(mountroot, spa_boot_init, NULL, 0); -#endif FEATURE(zfs, "OpenZFS support"); From c98295eed2687cee704ef5f8f3218d3d44a6a1d8 Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Fri, 14 Jun 2024 03:08:49 +0200 Subject: [PATCH 017/151] disable automatic dependency tracking for dkms builds Previously the dkms build left some unwanted files in `/usr/lib/modules` which could cause package managers to not properly clean up old kernels. Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Martin Wagner Closes #16221 Closes #16241 --- scripts/dkms.mkconf | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf index 0bd383420435..046ce9edcefe 100755 --- a/scripts/dkms.mkconf +++ b/scripts/dkms.mkconf @@ -26,6 +26,7 @@ PACKAGE_VERSION="${pkgver}" PACKAGE_CONFIG="${pkgcfg}" NO_WEAK_MODULES="yes" PRE_BUILD="configure + --disable-dependency-tracking --prefix=/usr --with-config=kernel --with-linux=\$( From 49f3ce338587410cabc078646b76152685ae102d Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Fri, 28 Jun 2024 09:52:03 -0700 Subject: [PATCH 018/151] Linux 6.9: Call add_disk() from workqueue to fix zfs_allow_010_pos (#16282) The 6.9 kernel behaves differently in how it releases block devices. In the common case it will async release the device only after the return to userspace. This is different from the 6.8 and older kernels which release the block devices synchronously. To get around this, call add_disk() from a workqueue so that the kernel uses a different codepath to release our zvols in the way we expect. This stops zfs_allow_010_pos from hanging. Fixes: #16089 Signed-off-by: Tony Hutter Reviewed-by: Tino Reichardt Reviewed-by: Rob Norris --- module/os/linux/zfs/zvol_os.c | 102 ++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 3e020e532263..acb42c3b4a3e 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -41,6 +41,7 @@ #include #include +#include #ifdef HAVE_BLK_MQ #include @@ -1338,6 +1339,101 @@ zvol_wait_close(zvol_state_t *zv) { } +struct add_disk_work { + struct delayed_work work; + struct gendisk *disk; + int error; +}; + +static int +__zvol_os_add_disk(struct gendisk *disk) +{ + int error = 0; +#ifdef HAVE_ADD_DISK_RET + error = add_disk(disk); +#else + add_disk(disk); +#endif + return (error); +} + +#if defined(HAVE_BDEV_FILE_OPEN_BY_PATH) +static void +zvol_os_add_disk_work(struct work_struct *work) +{ + struct add_disk_work *add_disk_work; + add_disk_work = container_of(work, struct add_disk_work, work.work); + add_disk_work->error = __zvol_os_add_disk(add_disk_work->disk); +} +#endif + +/* + * SPECIAL CASE: + * + * This function basically calls add_disk() from a workqueue. You may be + * thinking: why not just call add_disk() directly? + * + * When you call add_disk(), the zvol appears to the world. When this happens, + * the kernel calls disk_scan_partitions() on the zvol, which behaves + * differently on the 6.9+ kernels: + * + * - 6.8 and older kernels - + * disk_scan_partitions() + * handle = bdev_open_by_dev( + * zvol_open() + * bdev_release(handle); + * zvol_release() + * + * + * - 6.9+ kernels - + * disk_scan_partitions() + * file = bdev_file_open_by_dev() + * zvol_open() + * fput(file) + * < wait for return to userspace > + * zvol_release() + * + * The difference is that the bdev_release() from the 6.8 kernel is synchronous + * while the fput() from the 6.9 kernel is async. Or more specifically it's + * async that has to wait until we return to userspace (since it adds the fput + * into the caller's work queue with the TWA_RESUME flag set). This is not the + * behavior we want, since we want do things like create+destroy a zvol within + * a single ZFS_IOC_CREATE ioctl, and the "create" part needs to release the + * reference to the zvol while we're in the IOCTL, which can't wait until we + * return to userspace. + * + * We can get around this since fput() has a special codepath for when it's + * running in a kernel thread or interrupt. In those cases, it just puts the + * fput into the system workqueue, which we can force to run with + * __flush_workqueue(). That is why we call add_disk() from a workqueue - so it + * run from a kernel thread and "tricks" the fput() codepaths. + * + * Note that __flush_workqueue() is slowly getting deprecated. This may be ok + * though, since our IOCTL will spin on EBUSY waiting for the zvol release (via + * fput) to happen, which it eventually, naturally, will from the system_wq + * without us explicitly calling __flush_workqueue(). + */ +static int +zvol_os_add_disk(struct gendisk *disk) +{ +#if defined(HAVE_BDEV_FILE_OPEN_BY_PATH) /* 6.9+ kernel */ + struct add_disk_work add_disk_work; + + INIT_DELAYED_WORK(&add_disk_work.work, zvol_os_add_disk_work); + add_disk_work.disk = disk; + add_disk_work.error = 0; + + /* Use *_delayed_work functions since they're not GPL'd */ + schedule_delayed_work(&add_disk_work.work, 0); + flush_delayed_work(&add_disk_work.work); + + __flush_workqueue(system_wq); + return (add_disk_work.error); +#else /* <= 6.8 kernel */ + return (__zvol_os_add_disk(disk)); +#endif +} + /* * Create a block device minor node and setup the linkage between it * and the specified volume. Once this function returns the block @@ -1549,11 +1645,7 @@ zvol_os_create_minor(const char *name) rw_enter(&zvol_state_lock, RW_WRITER); zvol_insert(zv); rw_exit(&zvol_state_lock); -#ifdef HAVE_ADD_DISK_RET - error = add_disk(zv->zv_zso->zvo_disk); -#else - add_disk(zv->zv_zso->zvo_disk); -#endif + error = zvol_os_add_disk(zv->zv_zso->zvo_disk); } else { ida_simple_remove(&zvol_ida, idx); } From 5f220c62e1c24d9fdb2e9beb7d2796eaf4ef6a74 Mon Sep 17 00:00:00 2001 From: Allan Jude Date: Fri, 28 Jun 2024 13:38:22 -0400 Subject: [PATCH 019/151] Fix a mis-merge in the zdb man page (#16304) Sponsored-by: Klara, Inc. Sponsored-By: Wasabi Technology, Inc. Signed-off-by: Allan Jude Reviewed-by: Paul Dagnelie Reviewed-by: Tony Hutter --- man/man8/zdb.8 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/man/man8/zdb.8 b/man/man8/zdb.8 index d7f66d917ac7..08f5a3f70040 100644 --- a/man/man8/zdb.8 +++ b/man/man8/zdb.8 @@ -314,7 +314,6 @@ fragmentation, and free space histogram, as well as overall pool fragmentation and histogram. .It Fl MM "Special" vdevs are added to -M's normal output. -.It Fl O , -object-lookups Ns = Ns Ar dataset path Also display information about the maximum contiguous free space and the percentage of free space in each space map. .It Fl MMM @@ -327,7 +326,7 @@ but force zdb to interpret the in .Op Ar poolname Ns Op / Ns Ar dataset Ns | Ns Ar objset-ID as a numeric objset ID. -.It Fl O Ar dataset path +.It Fl O , -object-lookups Ns = Ns Ar dataset path Look up the specified .Ar path inside of the From fd51786f86e4e39ce3aa0a4ab8c44935496ff7c2 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 28 Jun 2024 20:21:08 +0200 Subject: [PATCH 020/151] zfs.4: Document the actual default for zfs_txg_history (#16305) Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Mateusz Piotrowski <0mp@FreeBSD.org> Reviewed-by: Tony Hutter --- man/man4/zfs.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man4/zfs.4 b/man/man4/zfs.4 index f1d14b4d01a4..3f7485fa78ca 100644 --- a/man/man4/zfs.4 +++ b/man/man4/zfs.4 @@ -16,7 +16,7 @@ .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] .\" -.Dd February 14, 2024 +.Dd June 27, 2024 .Dt ZFS 4 .Os . @@ -2113,7 +2113,7 @@ The default of .Sy 32 was determined to be a reasonable compromise. . -.It Sy zfs_txg_history Ns = Ns Sy 0 Pq uint +.It Sy zfs_txg_history Ns = Ns Sy 100 Pq uint Historical statistics for this many latest TXGs will be available in .Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /TXGs . . From f72e081fbf3897cda90cf10463a1e4f25d52e257 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 8 Jul 2024 19:59:08 -0500 Subject: [PATCH 021/151] FreeBSD: Use a statement expression to implement SET_ERROR() (#16284) This way we can avoid making assumptions about the SDT probe implementation. No functional change intended. Signed-off-by: Mark Johnston Reviewed-by: Alexander Motin Reviewed-by: Allan Jude Reviewed-by: Rob Norris Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- include/os/freebsd/spl/sys/sdt.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/os/freebsd/spl/sys/sdt.h b/include/os/freebsd/spl/sys/sdt.h index 2daa6de1af08..e2c4830cb964 100644 --- a/include/os/freebsd/spl/sys/sdt.h +++ b/include/os/freebsd/spl/sys/sdt.h @@ -31,13 +31,14 @@ #include_next #ifdef KDTRACE_HOOKS -/* CSTYLED */ +/* BEGIN CSTYLED */ SDT_PROBE_DECLARE(sdt, , , set__error); -#define SET_ERROR(err) \ - ((sdt_sdt___set__error->id ? \ - (*sdt_probe_func)(sdt_sdt___set__error->id, \ - (uintptr_t)err, 0, 0, 0, 0) : 0), err) +#define SET_ERROR(err) ({ \ + SDT_PROBE1(sdt, , , set__error, (uintptr_t)err); \ + err; \ +}) +/* END CSTYLED */ #else #define SET_ERROR(err) (err) #endif From 9ffe4413610ea81731462d45f81a30e709fef011 Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Tue, 9 Jul 2024 18:36:17 +0200 Subject: [PATCH 022/151] Fix zdb "Memory fault" found on FreeBSD ZTS (#16332) Reason: nvlist_free() tries to free sth. which isn't allocted Solution: init this variable with NULL Closes #16311 Signed-off-by: Tino Reichardt Reviewed-by: Alexander Motin Reviewed-by: Ameer Hamza Reviewed-by: Tony Hutter --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 3a7ef11612d9..0d2f0b1da5ff 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -9186,7 +9186,7 @@ main(int argc, char **argv) char *pname = strdup(target); const char *value; nvlist_t *pnvl = NULL; - nvlist_t *vnvl; + nvlist_t *vnvl = NULL; if (strpbrk(pname, "/@") != NULL) *strpbrk(pname, "/@") = '\0'; From 326040b285251598e84c7269ba26898832744b29 Mon Sep 17 00:00:00 2001 From: Peter Doherty Date: Tue, 9 Jul 2024 12:59:55 -0400 Subject: [PATCH 023/151] Fix the name of the zfs_prefetch_disable parameter (#16319) The ZFS module parameter name is zfs_prefetch_disable, not zfs_disable_prefetch. Signed-off-by: Peter Doherty Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- man/man7/zfsprops.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man7/zfsprops.7 b/man/man7/zfsprops.7 index 9ff0236f4d74..429369bd2e9e 100644 --- a/man/man7/zfsprops.7 +++ b/man/man7/zfsprops.7 @@ -1639,7 +1639,7 @@ then only metadata are prefetched. The default value is .Sy all . .Pp -Please note that the module parameter zfs_disable_prefetch=1 can +Please note that the module parameter zfs_prefetch_disable=1 can be used to totally disable speculative prefetch, bypassing anything this property does. .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off From 4367312760612cb755acfc218ffeda8eb35ce509 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 10 Jul 2024 16:27:44 -0500 Subject: [PATCH 024/151] zvol: Fix suspend lock leaks (#16270) In several functions, we use a flag variable to track whether zv_suspend_lock is held. This flag was not getting reset in a particular case where we need to retry the underlying operation, resulting in a lock leak. Make sure to update the flag where necessary. Signed-off-by: Mark Johnston Reviewed-by: Allan Jude Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- module/os/freebsd/zfs/zvol_os.c | 2 ++ module/os/linux/zfs/zvol_os.c | 1 + 2 files changed, 3 insertions(+) diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c index 712ff1b837d7..38e9debbe877 100644 --- a/module/os/freebsd/zfs/zvol_os.c +++ b/module/os/freebsd/zfs/zvol_os.c @@ -292,6 +292,7 @@ zvol_geom_open(struct g_provider *pp, int flag, int count) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; kern_yield(PRI_USER); goto retry; } else { @@ -983,6 +984,7 @@ zvol_cdev_open(struct cdev *dev, int flags, int fmt, struct thread *td) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; kern_yield(PRI_USER); goto retry; } else { diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index acb42c3b4a3e..1d5d54b80ea1 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -791,6 +791,7 @@ zvol_open(struct block_device *bdev, fmode_t flag) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; #ifdef HAVE_BLKDEV_GET_ERESTARTSYS schedule(); From 156a64161b4f9da35f2e0484106173344cf78317 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Thu, 11 Jul 2024 16:41:26 -0700 Subject: [PATCH 025/151] Linux 6.9: Fix UBSAN errors in zap_micro.c You can use the UBSAN_SANITIZE_* Kbuild options to exclude certain kernel objects from the UBSAN checks. We previously excluded zap_micro.o with: UBSAN_SANITIZE_zap_micro.o := n For some reason that didn't work for the 6.9 kernel, which wants us to use: UBSAN_SANITIZE_zfs/zap_micro.o := n Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #16278 Closes #16330 --- module/Kbuild.in | 1 + 1 file changed, 1 insertion(+) diff --git a/module/Kbuild.in b/module/Kbuild.in index 9e44364b7584..4707452711f7 100644 --- a/module/Kbuild.in +++ b/module/Kbuild.in @@ -490,6 +490,7 @@ zfs-$(CONFIG_PPC64) += $(addprefix zfs/,$(ZFS_OBJS_PPC_PPC64)) UBSAN_SANITIZE_zap_leaf.o := n UBSAN_SANITIZE_zap_micro.o := n UBSAN_SANITIZE_sa.o := n +UBSAN_SANITIZE_zfs/zap_micro.o := n # Suppress incorrect warnings from versions of objtool which are not # aware of x86 EVEX prefix instructions used for AVX512. From a10faf5ce6fe0cb07012d9f2d118fa326a09d267 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 11 Jul 2024 18:52:51 -0500 Subject: [PATCH 026/151] FreeBSD: Use the new freeuio() helper to free dynamically allocated UIOs (#16300) This freeuio() interface was introduced to FreeBSD recently. For now it simply calls free(), so this change has no effect. However, this may not always be true, and in CheriBSD this change is required. Signed-off-by: Mark Johnston Reviewed-by: Alexander Motin Reviewed-by: Brooks Davis Reviewed-by: Tony Hutter --- module/os/freebsd/spl/spl_uio.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/os/freebsd/spl/spl_uio.c b/module/os/freebsd/spl/spl_uio.c index ffccb6f2594e..17886cbeb501 100644 --- a/module/os/freebsd/spl/spl_uio.c +++ b/module/os/freebsd/spl/spl_uio.c @@ -45,6 +45,16 @@ #include #include +static void +zfs_freeuio(struct uio *uio) +{ +#if __FreeBSD_version > 1500013 + freeuio(uio); +#else + free(uio, M_IOV); +#endif +} + int zfs_uiomove(void *cp, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio) { @@ -77,7 +87,7 @@ zfs_uiocopy(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, size_t *cbytes) error = vn_io_fault_uiomove(p, n, uio_clone); *cbytes = zfs_uio_resid(uio) - uio_clone->uio_resid; if (uio_clone != &small_uio_clone) - free(uio_clone, M_IOV); + zfs_freeuio(uio_clone); return (error); } From cbd95a950aa52d94aca05a621c8e7778b49a957e Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 13 Jul 2024 03:58:03 +1000 Subject: [PATCH 027/151] ZTS: handle FreeBSD version numbers correctly (#16340) FreeBSD patchlevel versions are optional and, if present, in a different location in the version string. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- tests/zfs-tests/include/libtest.shlib | 30 ++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index dfab48d2cdaf..a2f42999a31e 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -62,11 +62,39 @@ function compare_version_gte } # Helper function used by linux_version() and freebsd_version() +# $1, if provided, should be a MAJOR, MAJOR.MINOR or MAJOR.MINOR.PATCH +# version number function kernel_version { typeset ver="$1" - [ -z "$ver" ] && ver=$(uname -r | grep -Eo "^[0-9]+\.[0-9]+\.[0-9]+") + [ -z "$ver" ] && case "$UNAME" in + Linux) + # Linux version numbers are X.Y.Z followed by optional + # vendor/distro specific stuff + # RHEL7: 3.10.0-1160.108.1.el7.x86_64 + # Fedora 37: 6.5.12-100.fc37.x86_64 + # Debian 12.6: 6.1.0-22-amd64 + ver=$(uname -r | grep -Eo "^[0-9]+\.[0-9]+\.[0-9]+") + ;; + FreeBSD) + # FreeBSD version numbers are X.Y-BRANCH-pZ. Depending on + # branch, -pZ may not be present, but this is typically only + # on pre-release or true .0 releases, so can be assumed 0 + # if not present. + # eg: + # 13.2-RELEASE-p4 + # 14.1-RELEASE + # 15.0-CURRENT + ver=$(uname -r | \ + grep -Eo "[0-9]+\.[0-9]+(-[A-Z0-9]+-p[0-9]+)?" | \ + sed -E "s/-[^-]+-p/./") + ;; + *) + # Unknown system + log_fail "Don't know how to get kernel version for '$UNAME'" + ;; + esac typeset version major minor _ IFS='.' read -r version major minor _ <<<"$ver" From 398e675f5839bdddf44682ea5390e49fa963ea1b Mon Sep 17 00:00:00 2001 From: a1ea321 Date: Sat, 13 Jul 2024 01:27:12 +0200 Subject: [PATCH 028/151] one-word manpage correction: snapshot->rollback (#16294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes what is probably a copy-paste mistake. The `dracut.zfs` manpage claims that the `bootfs.rollback` option executes `zfs snapshot -Rf`. `zfs snapshot` does not have a `-R` option. `zfs rollback` does. Signed-off-by: Alphan Yılmaz Reviewed-by: Rob Norris Reviewed-by: George Melikov Reviewed-by: Tony Hutter --- man/man7/dracut.zfs.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man7/dracut.zfs.7 b/man/man7/dracut.zfs.7 index c1475c695e83..b67e1cecb240 100644 --- a/man/man7/dracut.zfs.7 +++ b/man/man7/dracut.zfs.7 @@ -154,7 +154,7 @@ defaults to the current kernel release. . .It Sy bootfs.rollback Ns Op Sy = Ns Ar snapshot-name Execute -.Nm zfs Cm snapshot Fl Rf Ar boot-dataset Ns Sy @ Ns Ar snapshot-name +.Nm zfs Cm rollback Fl Rf Ar boot-dataset Ns Sy @ Ns Ar snapshot-name before pivoting to the real root. .Ar snapshot-name defaults to the current kernel release. From f7d8b1333699957de59d72fc57c9a771951f6582 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Fri, 12 Jul 2024 20:44:10 -0400 Subject: [PATCH 029/151] Fix missing semicolon in trace_dbuf.h (#16281) On fedora 40, on the 6.9.4 kernel (in updates-testing), assign_str expands to a "do { } while(0)" loop. Without this semicolon, the while(0) is unterminated, causing a cascade of useless errors. With this semicolon, it compiles fine. It also compiles fine on 6.8.11 (the previous kernel). I have not tested earlier kernels than that, but at worst it should add a pointless semicolon. All other instances in the source tree are already terminated with semicolons. Signed-off-by: Daniel Berlin Reviewed-by: Alexander Motin Reviewed-by: Tony Hutter --- include/os/linux/zfs/sys/trace_dbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/os/linux/zfs/sys/trace_dbuf.h b/include/os/linux/zfs/sys/trace_dbuf.h index 0f6a98b47d60..0e9cbdd725b4 100644 --- a/include/os/linux/zfs/sys/trace_dbuf.h +++ b/include/os/linux/zfs/sys/trace_dbuf.h @@ -80,7 +80,7 @@ snprintf(__get_str(msg), TRACE_DBUF_MSG_MAX, \ DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS); \ } else { \ - __assign_str(os_spa, "NULL") \ + __assign_str(os_spa, "NULL"); \ __entry->ds_object = 0; \ __entry->db_object = 0; \ __entry->db_level = 0; \ From 41c233dec6c15c543d3042c06833c1623456743c Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:09 -0500 Subject: [PATCH 030/151] Prepare some build fixes in advance of more _FORTIFY_SOURCE ZFS' libspl needs to be made aware that we have strlcat(3) and strlcpy(3) to avoid some more complicated declaration duplication, so go ahead and define these HAVE_ macros now. libprocstat has to define `_KERNEL` and include kernel headers in order to get what it wants, but this results in sys/cdefs.h being included too late and we pick up the build breaking version of the __RENAME definition. Just explicitly include sys/cdefs.h earlier rather than disabling _FORTIFY_SOURCE. The zfs/ subdir only builds an object that holds some structures and sizes, so just disable _FORTIFY_SOURCE there entirely rather than trying to move #define _KERNEL into the file.. While we're here, make sure that we disable _FORTIFY_SOURCE in the bootloader because we don't have the symbol renaming support today to do it as cleanly as we'd like. ssp/ssp.h needs to be pulled into the libsa environment so that other bits can understand that ssp is disabled in the consistent __SSP_FORTIFY_LEVEL way that we try to do. Reviewed by: allanjude (previous version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45676 --- cddl/Makefile.inc | 1 + lib/libbe/Makefile | 2 +- lib/libproc/Makefile | 2 +- lib/libprocstat/zfs.c | 2 ++ lib/libprocstat/zfs/Makefile | 1 + sbin/bectl/Makefile | 2 +- stand/defs.mk | 2 ++ stand/libsa/Makefile | 3 ++- 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cddl/Makefile.inc b/cddl/Makefile.inc index b306a28b5c84..f07baf295b89 100644 --- a/cddl/Makefile.inc +++ b/cddl/Makefile.inc @@ -5,6 +5,7 @@ OPENSOLARIS_SYS_DISTDIR= ${.CURDIR}/../../../sys/cddl/contrib/opensolaris IGNORE_PRAGMA= YES CFLAGS+= -DNEED_SOLARIS_BOOLEAN +CFLAGS+= -DHAVE_STRLCAT -DHAVE_STRLCPY # Do not lint the CDDL stuff. It is all externally maintained and # lint output is wasteful noise here. diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index 87c032ae3a0c..099efed52d9f 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -61,7 +61,7 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_ISSETUGID -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS.be.c= -Wno-cast-qual CFLAGS.be_access.c= -Wno-cast-qual CFLAGS.be_error.c= -Wno-cast-qual diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile index 67c4e642ea00..ae00bdc4ba90 100644 --- a/lib/libproc/Makefile +++ b/lib/libproc/Makefile @@ -24,7 +24,7 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -DHAVE_ISSETUGID -DHAVE_BOOLEAN +CFLAGS+= -DHAVE_ISSETUGID -DHAVE_BOOLEAN -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common \ -I${SRCTOP}/sys/cddl/compat/opensolaris diff --git a/lib/libprocstat/zfs.c b/lib/libprocstat/zfs.c index 422f923ac15c..665b1e5abe24 100644 --- a/lib/libprocstat/zfs.c +++ b/lib/libprocstat/zfs.c @@ -26,6 +26,8 @@ * SUCH DAMAGE. */ +#include /* __RENAME */ + #include #include diff --git a/lib/libprocstat/zfs/Makefile b/lib/libprocstat/zfs/Makefile index da689fdd3e81..3fa6f985c694 100644 --- a/lib/libprocstat/zfs/Makefile +++ b/lib/libprocstat/zfs/Makefile @@ -5,6 +5,7 @@ SRCS= zfs_defs.c OBJS= zfs_defs.o WARNS?= 1 +FORTIFY_SOURCE= 0 CFLAGS+= -DIN_BASE -D__KERNEL__ -D_KERNEL -I. -I${.CURDIR} CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include diff --git a/sbin/bectl/Makefile b/sbin/bectl/Makefile index d640de33bf72..531f54cca18d 100644 --- a/sbin/bectl/Makefile +++ b/sbin/bectl/Makefile @@ -22,7 +22,7 @@ CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -DHAVE_ISSETUGID -DHAVE_STRLCAT -DHAVE_STRLCPY CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h HAS_TESTS= yes diff --git a/stand/defs.mk b/stand/defs.mk index 3624b9311161..452ba060c504 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -2,6 +2,8 @@ .if !defined(__BOOT_DEFS_MK__) __BOOT_DEFS_MK__=${MFILE} +FORTIFY_SOURCE= 0 + # We need to define all the MK_ options before including src.opts.mk # because it includes bsd.own.mk which needs the right MK_ values, # espeically MK_CTF. diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index bc85a3dcb0de..c5de2c9b8e13 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -195,7 +195,7 @@ MAN=libsa.3 # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in -FAKE_DIRS=xlocale arpa +FAKE_DIRS=xlocale arpa ssp SAFE_INCS=a.out.h assert.h elf.h inttypes.h limits.h nlist.h setjmp.h stddef.h stdbool.h string.h strings.h time.h unistd.h uuid.h STAND_H_INC=ctype.h fcntl.h signal.h stdio.h stdlib.h OTHER_INC=stdarg.h errno.h stdint.h @@ -210,6 +210,7 @@ beforedepend: ln -sf ${SYSDIR}/sys/stdint.h stdint.h; \ ln -sf ${SRCTOP}/include/arpa/inet.h arpa/inet.h; \ ln -sf ${SRCTOP}/include/arpa/tftp.h arpa/tftp.h; \ + ln -sf ${SRCTOP}/include/ssp/ssp.h ssp/ssp.h; \ for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || :> xlocale/$$i; \ done; \ From 4719366192d306a76e8e86bf926387f1c4122fd3 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:09 -0500 Subject: [PATCH 031/151] libc: move __ssp_overlap back out into We'll be using it in some upcoming definitions in headers, so move it back now but slap a warning on it. Our upcoming uses will all be inside of inline functions, so we're not overly concerned about double evaluation immediately. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45677 --- include/ssp/ssp.h | 7 +++++++ lib/libc/secure/memcpy_chk.c | 2 -- lib/libc/secure/ssp_internal.h | 37 ---------------------------------- lib/libc/secure/stpcpy_chk.c | 2 -- lib/libc/secure/stpncpy_chk.c | 2 -- lib/libc/secure/strcpy_chk.c | 2 -- lib/libc/secure/strncpy_chk.c | 2 -- 7 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 lib/libc/secure/ssp_internal.h diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index 35a9aeee02df..622e9e901ba6 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -83,6 +83,13 @@ __ssp_inline rtype fun args { \ #define __ssp_redirect0(rtype, fun, args, call) \ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0) +/* + * Take caution when using __ssp_overlap! Don't use it in contexts where we + * can end up with double-evaluation of a statement with some side-effects. + */ +#define __ssp_overlap(a, b, l) \ + (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l))) + __BEGIN_DECLS void __stack_chk_fail(void) __dead2; void __chk_fail(void) __dead2; diff --git a/lib/libc/secure/memcpy_chk.c b/lib/libc/secure/memcpy_chk.c index 99cf2d5f13ff..2a269cb475ab 100644 --- a/lib/libc/secure/memcpy_chk.c +++ b/lib/libc/secure/memcpy_chk.c @@ -37,8 +37,6 @@ __RCSID("$NetBSD: memcpy_chk.c,v 1.7 2015/05/13 19:57:16 joerg Exp $"); #include #undef memcpy -#include "ssp_internal.h" - void * __memcpy_chk(void * __restrict dst, const void * __restrict src, size_t len, size_t slen) diff --git a/lib/libc/secure/ssp_internal.h b/lib/libc/secure/ssp_internal.h deleted file mode 100644 index 34e5981ba0ca..000000000000 --- a/lib/libc/secure/ssp_internal.h +++ /dev/null @@ -1,37 +0,0 @@ -/* $NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $ */ - -/*- - * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _SECURE_SSP_INTERNAL_H_ -#define _SECURE_SSP_INTERNAL_H_ - -#define __ssp_overlap(a, b, l) \ - (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l))) - -#endif /* _SECURE_SSP_INTERNAL_H_ */ diff --git a/lib/libc/secure/stpcpy_chk.c b/lib/libc/secure/stpcpy_chk.c index 72a4bfb8017a..fd4849099675 100644 --- a/lib/libc/secure/stpcpy_chk.c +++ b/lib/libc/secure/stpcpy_chk.c @@ -37,8 +37,6 @@ __RCSID("$NetBSD: stpcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $"); #include #undef memcpy -#include "ssp_internal.h" - char * __stpcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen) { diff --git a/lib/libc/secure/stpncpy_chk.c b/lib/libc/secure/stpncpy_chk.c index dfd26133feed..d76f0eb62fcd 100644 --- a/lib/libc/secure/stpncpy_chk.c +++ b/lib/libc/secure/stpncpy_chk.c @@ -37,8 +37,6 @@ __RCSID("$NetBSD: stpncpy_chk.c,v 1.3 2015/05/09 15:42:21 christos Exp $"); #include #undef stpncpy -#include "ssp_internal.h" - char * __stpncpy_chk(char * __restrict dst, const char * __restrict src, size_t len, size_t slen) diff --git a/lib/libc/secure/strcpy_chk.c b/lib/libc/secure/strcpy_chk.c index b89be466240d..14403bd74469 100644 --- a/lib/libc/secure/strcpy_chk.c +++ b/lib/libc/secure/strcpy_chk.c @@ -37,8 +37,6 @@ __RCSID("$NetBSD: strcpy_chk.c,v 1.8 2015/05/09 15:42:21 christos Exp $"); #include #undef memcpy -#include "ssp_internal.h" - char * __strcpy_chk(char * __restrict dst, const char * __restrict src, size_t slen) { diff --git a/lib/libc/secure/strncpy_chk.c b/lib/libc/secure/strncpy_chk.c index 3a2c19796a39..c8d411638862 100644 --- a/lib/libc/secure/strncpy_chk.c +++ b/lib/libc/secure/strncpy_chk.c @@ -37,8 +37,6 @@ __RCSID("$NetBSD: strncpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $"); #include #undef strncpy -#include "ssp_internal.h" - char * __strncpy_chk(char * __restrict dst, const char * __restrict src, size_t len, size_t slen) From 020d003c86367bb5751b6d58fb58611242802c7f Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:10 -0500 Subject: [PATCH 032/151] libc: tests: add testing infrastructure for _FORTIFY_SOURCE The _FORTIFY_SOURCE tests will be generated by a lua script to avoid a lot of redundancy in writing these tests. For each function that we're fortifying, the plan is to test at least the following three scenarios: - Writing up to one byte before the end of the buffer, - Writing up to the end of the buffer, - Writing one byte past the end of the buffer The buffer is shoved into a struct on the stack to guarantee a stack layout in which we have a valid byte after the buffer so that level 2 fortification will trip and we can have confidence that it wasn't some other stack/memory protection instead. The generated tests are divided roughly into which header we're attributing them to so that we can parallelize the build -- the full set is a bit over 9000 lines of C and takes 11s to build on the hardware that I'm testing on if it's a single monolothic file. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45678 --- etc/mtree/BSD.tests.dist | 2 + lib/libc/tests/Makefile | 1 + lib/libc/tests/secure/Makefile | 20 + lib/libc/tests/secure/fortify_stdio_test.c | 383 +++++ lib/libc/tests/secure/fortify_string_test.c | 1415 +++++++++++++++++ lib/libc/tests/secure/fortify_strings_test.c | 354 +++++ lib/libc/tests/secure/fortify_unistd_test.c | 505 ++++++ .../tests/secure/generate-fortify-tests.lua | 706 ++++++++ 8 files changed, 3386 insertions(+) create mode 100644 lib/libc/tests/secure/Makefile create mode 100644 lib/libc/tests/secure/fortify_stdio_test.c create mode 100644 lib/libc/tests/secure/fortify_string_test.c create mode 100644 lib/libc/tests/secure/fortify_strings_test.c create mode 100644 lib/libc/tests/secure/fortify_unistd_test.c create mode 100755 lib/libc/tests/secure/generate-fortify-tests.lua diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 375e4900b5d5..bd9edc786f17 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -372,6 +372,8 @@ .. rpc .. + secure + .. setjmp .. ssp diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile index 7b262ea646fb..7f72fb619004 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -13,6 +13,7 @@ TESTS_SUBDIRS+= nss TESTS_SUBDIRS+= regex TESTS_SUBDIRS+= resolv TESTS_SUBDIRS+= rpc +TESTS_SUBDIRS+= secure TESTS_SUBDIRS+= setjmp TESTS_SUBDIRS+= stdio TESTS_SUBDIRS+= stdlib diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile new file mode 100644 index 000000000000..d809f7cadd74 --- /dev/null +++ b/lib/libc/tests/secure/Makefile @@ -0,0 +1,20 @@ +.include + +TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} + +FORTIFY_TCATS+= stdio +FORTIFY_TCATS+= string +FORTIFY_TCATS+= strings +FORTIFY_TCATS+= unistd + +# Manually run after updating the test generator. +generate-tests: .PHONY +.for tcat in ${FORTIFY_TCATS} +ATF_TESTS_C+= fortify_${tcat}_test + +generate-tests: generate-tests-${tcat} +generate-tests-${tcat}: .PHONY + ${.CURDIR}/generate-fortify-tests.lua ${tcat} > ${.CURDIR}/fortify_${tcat}_test.c +.endfor + +.include diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c new file mode 100644 index 000000000000..20ecdab89a8b --- /dev/null +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -0,0 +1,383 @@ +/* @generated by `generate-fortify-tests.lua "stdio"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +ATF_TC_WITHOUT_HEAD(sprintf_before_end); +ATF_TC_BODY(sprintf_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + sprintf(__stack.__buf, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(sprintf_end); +ATF_TC_BODY(sprintf_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + sprintf(__stack.__buf, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(sprintf_heap_before_end); +ATF_TC_BODY(sprintf_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + sprintf(__stack.__buf, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(sprintf_heap_end); +ATF_TC_BODY(sprintf_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + sprintf(__stack.__buf, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(sprintf_heap_after_end); +ATF_TC_BODY(sprintf_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char srcvar[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + sprintf(__stack.__buf, "%.*s", (int)__len - 1, srcvar); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(snprintf_before_end); +ATF_TC_BODY(snprintf_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + snprintf(__stack.__buf, __len, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(snprintf_end); +ATF_TC_BODY(snprintf_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + snprintf(__stack.__buf, __len, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(snprintf_heap_before_end); +ATF_TC_BODY(snprintf_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + snprintf(__stack.__buf, __len, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(snprintf_heap_end); +ATF_TC_BODY(snprintf_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char srcvar[__len + 10]; + + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + snprintf(__stack.__buf, __len, "%.*s", (int)__len - 1, srcvar); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(snprintf_heap_after_end); +ATF_TC_BODY(snprintf_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char srcvar[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; + + snprintf(__stack.__buf, __len, "%.*s", (int)__len - 1, srcvar); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, sprintf_before_end); + ATF_TP_ADD_TC(tp, sprintf_end); + ATF_TP_ADD_TC(tp, sprintf_heap_before_end); + ATF_TP_ADD_TC(tp, sprintf_heap_end); + ATF_TP_ADD_TC(tp, sprintf_heap_after_end); + ATF_TP_ADD_TC(tp, snprintf_before_end); + ATF_TP_ADD_TC(tp, snprintf_end); + ATF_TP_ADD_TC(tp, snprintf_heap_before_end); + ATF_TP_ADD_TC(tp, snprintf_heap_end); + ATF_TP_ADD_TC(tp, snprintf_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c new file mode 100644 index 000000000000..109ef40fd62d --- /dev/null +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -0,0 +1,1415 @@ +/* @generated by `generate-fortify-tests.lua "string"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +ATF_TC_WITHOUT_HEAD(memcpy_before_end); +ATF_TC_BODY(memcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + memcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memcpy_end); +ATF_TC_BODY(memcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + memcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memcpy_heap_before_end); +ATF_TC_BODY(memcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + memcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memcpy_heap_end); +ATF_TC_BODY(memcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + memcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memcpy_heap_after_end); +ATF_TC_BODY(memcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + memcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memmove_before_end); +ATF_TC_BODY(memmove_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + memmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memmove_end); +ATF_TC_BODY(memmove_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + memmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memmove_heap_before_end); +ATF_TC_BODY(memmove_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + memmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memmove_heap_end); +ATF_TC_BODY(memmove_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + memmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memmove_heap_after_end); +ATF_TC_BODY(memmove_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + memmove(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_before_end); +ATF_TC_BODY(memset_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + memset(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_end); +ATF_TC_BODY(memset_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + memset(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_heap_before_end); +ATF_TC_BODY(memset_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + memset(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_heap_end); +ATF_TC_BODY(memset_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + memset(__stack.__buf, 0, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(memset_heap_after_end); +ATF_TC_BODY(memset_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + memset(__stack.__buf, 0, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpcpy_before_end); +ATF_TC_BODY(stpcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpcpy_end); +ATF_TC_BODY(stpcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpcpy_heap_before_end); +ATF_TC_BODY(stpcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpcpy_heap_end); +ATF_TC_BODY(stpcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpcpy_heap_after_end); +ATF_TC_BODY(stpcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpcpy(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpncpy_before_end); +ATF_TC_BODY(stpncpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpncpy_end); +ATF_TC_BODY(stpncpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpncpy_heap_before_end); +ATF_TC_BODY(stpncpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpncpy_heap_end); +ATF_TC_BODY(stpncpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(stpncpy_heap_after_end); +ATF_TC_BODY(stpncpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + stpncpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcat_before_end); +ATF_TC_BODY(strcat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcat_end); +ATF_TC_BODY(strcat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcat_heap_before_end); +ATF_TC_BODY(strcat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcat_heap_end); +ATF_TC_BODY(strcat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcat_heap_after_end); +ATF_TC_BODY(strcat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcat(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncat_before_end); +ATF_TC_BODY(strncat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncat_end); +ATF_TC_BODY(strncat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncat_heap_before_end); +ATF_TC_BODY(strncat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncat_heap_end); +ATF_TC_BODY(strncat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncat_heap_after_end); +ATF_TC_BODY(strncat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncat(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcpy_before_end); +ATF_TC_BODY(strcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcpy_end); +ATF_TC_BODY(strcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcpy_heap_before_end); +ATF_TC_BODY(strcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcpy_heap_end); +ATF_TC_BODY(strcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strcpy_heap_after_end); +ATF_TC_BODY(strcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strcpy(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncpy_before_end); +ATF_TC_BODY(strncpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncpy_end); +ATF_TC_BODY(strncpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncpy_heap_before_end); +ATF_TC_BODY(strncpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncpy_heap_end); +ATF_TC_BODY(strncpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strncpy_heap_after_end); +ATF_TC_BODY(strncpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strncpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, memcpy_before_end); + ATF_TP_ADD_TC(tp, memcpy_end); + ATF_TP_ADD_TC(tp, memcpy_heap_before_end); + ATF_TP_ADD_TC(tp, memcpy_heap_end); + ATF_TP_ADD_TC(tp, memcpy_heap_after_end); + ATF_TP_ADD_TC(tp, memmove_before_end); + ATF_TP_ADD_TC(tp, memmove_end); + ATF_TP_ADD_TC(tp, memmove_heap_before_end); + ATF_TP_ADD_TC(tp, memmove_heap_end); + ATF_TP_ADD_TC(tp, memmove_heap_after_end); + ATF_TP_ADD_TC(tp, memset_before_end); + ATF_TP_ADD_TC(tp, memset_end); + ATF_TP_ADD_TC(tp, memset_heap_before_end); + ATF_TP_ADD_TC(tp, memset_heap_end); + ATF_TP_ADD_TC(tp, memset_heap_after_end); + ATF_TP_ADD_TC(tp, stpcpy_before_end); + ATF_TP_ADD_TC(tp, stpcpy_end); + ATF_TP_ADD_TC(tp, stpcpy_heap_before_end); + ATF_TP_ADD_TC(tp, stpcpy_heap_end); + ATF_TP_ADD_TC(tp, stpcpy_heap_after_end); + ATF_TP_ADD_TC(tp, stpncpy_before_end); + ATF_TP_ADD_TC(tp, stpncpy_end); + ATF_TP_ADD_TC(tp, stpncpy_heap_before_end); + ATF_TP_ADD_TC(tp, stpncpy_heap_end); + ATF_TP_ADD_TC(tp, stpncpy_heap_after_end); + ATF_TP_ADD_TC(tp, strcat_before_end); + ATF_TP_ADD_TC(tp, strcat_end); + ATF_TP_ADD_TC(tp, strcat_heap_before_end); + ATF_TP_ADD_TC(tp, strcat_heap_end); + ATF_TP_ADD_TC(tp, strcat_heap_after_end); + ATF_TP_ADD_TC(tp, strncat_before_end); + ATF_TP_ADD_TC(tp, strncat_end); + ATF_TP_ADD_TC(tp, strncat_heap_before_end); + ATF_TP_ADD_TC(tp, strncat_heap_end); + ATF_TP_ADD_TC(tp, strncat_heap_after_end); + ATF_TP_ADD_TC(tp, strcpy_before_end); + ATF_TP_ADD_TC(tp, strcpy_end); + ATF_TP_ADD_TC(tp, strcpy_heap_before_end); + ATF_TP_ADD_TC(tp, strcpy_heap_end); + ATF_TP_ADD_TC(tp, strcpy_heap_after_end); + ATF_TP_ADD_TC(tp, strncpy_before_end); + ATF_TP_ADD_TC(tp, strncpy_end); + ATF_TP_ADD_TC(tp, strncpy_heap_before_end); + ATF_TP_ADD_TC(tp, strncpy_heap_end); + ATF_TP_ADD_TC(tp, strncpy_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c new file mode 100644 index 000000000000..f9e628bbcd38 --- /dev/null +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -0,0 +1,354 @@ +/* @generated by `generate-fortify-tests.lua "strings"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +ATF_TC_WITHOUT_HEAD(bcopy_before_end); +ATF_TC_BODY(bcopy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + bcopy(src, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bcopy_end); +ATF_TC_BODY(bcopy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + bcopy(src, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bcopy_heap_before_end); +ATF_TC_BODY(bcopy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + bcopy(src, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bcopy_heap_end); +ATF_TC_BODY(bcopy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + bcopy(src, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bcopy_heap_after_end); +ATF_TC_BODY(bcopy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + bcopy(src, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bzero_before_end); +ATF_TC_BODY(bzero_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bzero_end); +ATF_TC_BODY(bzero_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bzero_heap_before_end); +ATF_TC_BODY(bzero_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bzero_heap_end); +ATF_TC_BODY(bzero_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(bzero_heap_after_end); +ATF_TC_BODY(bzero_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + bzero(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, bcopy_before_end); + ATF_TP_ADD_TC(tp, bcopy_end); + ATF_TP_ADD_TC(tp, bcopy_heap_before_end); + ATF_TP_ADD_TC(tp, bcopy_heap_end); + ATF_TP_ADD_TC(tp, bcopy_heap_after_end); + ATF_TP_ADD_TC(tp, bzero_before_end); + ATF_TP_ADD_TC(tp, bzero_end); + ATF_TP_ADD_TC(tp, bzero_heap_before_end); + ATF_TP_ADD_TC(tp, bzero_heap_end); + ATF_TP_ADD_TC(tp, bzero_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c new file mode 100644 index 000000000000..69e70124ca5f --- /dev/null +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -0,0 +1,505 @@ +/* @generated by `generate-fortify-tests.lua "unistd"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +ATF_TC_WITHOUT_HEAD(getcwd_before_end); +ATF_TC_BODY(getcwd_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[8]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 8 - 1; + const size_t __idx __unused = __len - 1; + + getcwd(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getcwd_end); +ATF_TC_BODY(getcwd_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[8]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 8; + const size_t __idx __unused = __len - 1; + + getcwd(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getcwd_heap_before_end); +ATF_TC_BODY(getcwd_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (8); + const size_t __len = 8 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getcwd(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getcwd_heap_end); +ATF_TC_BODY(getcwd_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (8); + const size_t __len = 8; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getcwd(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getcwd_heap_after_end); +ATF_TC_BODY(getcwd_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (8); + const size_t __len = 8 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getcwd(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_before_end); +ATF_TC_BODY(read_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_end); +ATF_TC_BODY(read_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_before_end); +ATF_TC_BODY(read_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_end); +ATF_TC_BODY(read_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_after_end); +ATF_TC_BODY(read_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int fd; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_before_end); +ATF_TC_BODY(readlink_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_end); +ATF_TC_BODY(readlink_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_before_end); +ATF_TC_BODY(readlink_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_end); +ATF_TC_BODY(readlink_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_after_end); +ATF_TC_BODY(readlink_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + const char *path; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, getcwd_before_end); + ATF_TP_ADD_TC(tp, getcwd_end); + ATF_TP_ADD_TC(tp, getcwd_heap_before_end); + ATF_TP_ADD_TC(tp, getcwd_heap_end); + ATF_TP_ADD_TC(tp, getcwd_heap_after_end); + ATF_TP_ADD_TC(tp, read_before_end); + ATF_TP_ADD_TC(tp, read_end); + ATF_TP_ADD_TC(tp, read_heap_before_end); + ATF_TP_ADD_TC(tp, read_heap_end); + ATF_TP_ADD_TC(tp, read_heap_after_end); + ATF_TP_ADD_TC(tp, readlink_before_end); + ATF_TP_ADD_TC(tp, readlink_end); + ATF_TP_ADD_TC(tp, readlink_heap_before_end); + ATF_TP_ADD_TC(tp, readlink_heap_end); + ATF_TP_ADD_TC(tp, readlink_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua new file mode 100755 index 000000000000..8734fcfa4e2e --- /dev/null +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -0,0 +1,706 @@ +#!/usr/libexec/flua +-- +-- SPDX-License-Identifier: BSD-2-Clause +-- +-- Copyright (c) 2024, Klara, Inc. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- +-- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-- SUCH DAMAGE. +-- + +-- THEORY OF OPERATION +-- +-- generate-fortify-tests.lua is intended to test fortified functions as found +-- mostly in the various headers in /usr/include/ssp. Each fortified function +-- gets three basic tests: +-- +-- 1. Write just before the end of the buffer, +-- 2. Write right at the end of the buffer, +-- 3. Write just after the end of the buffer. +-- +-- Each test is actually generated twice: once with a buffer on the stack, and +-- again with a buffer on the heap, to confirm that __builtin_object_size(3) can +-- deduce the buffer size in both scenarios. The tests work by setting up the +-- stack with our buffer (and some padding on either side to avoid tripping any +-- other stack or memory protection), doing any initialization as described by +-- the test definition, then calling the fortified function with the buffer as +-- outlined by the test definition. +-- +-- For the 'before' and 'at' the end tests, we're ensuring that valid writes +-- that are on the verge of being invalid aren't accidentally being detected as +-- invalid. +-- +-- The 'after' test is the one that actually tests the functional benefit of +-- _FORTIFY_SOURCE by violating a boundary that should trigger an abort. As +-- such, this test differs more from the other two in that it has to fork() off +-- the fortified function call so that we can monitor for a SIGABRT and +-- pass/fail the test at function end appropriately. + +-- Some tests, like the FD_*() macros, may define these differently. For +-- instance, for fd sets we're varying the index we pass and not using arbitrary +-- buffers. Other tests that don't use the length in any way may physically +-- vary the buffer size for each test case when we'd typically vary the length +-- we're requesting a write for. + +local includes = { + "sys/param.h", + "sys/resource.h", + "sys/time.h", + "sys/wait.h", + "dirent.h", + "errno.h", + "fcntl.h", + "limits.h", + "signal.h", + "stdio.h", + "stdlib.h", + "string.h", + "strings.h", + "sysexits.h", + "unistd.h", + "atf-c.h", +} + +local tests_added = {} + +-- Some of these will need to be excluded because clang sees the wrong size when +-- an array is embedded inside a struct, we'll get something that looks more +-- like __builtin_object_size(ptr, 0) than it does the correct +-- __builtin_object_size(ptr, 1) (i.e., includes the padding after). This is +-- almost certainly a bug in llvm. +local function excludes_stack_overflow(disposition, is_heap) + return (not is_heap) and disposition > 0 +end + +local printf_stackvars = "\tchar srcvar[__len + 10];\n" +local printf_init = [[ + memset(srcvar, 'A', sizeof(srcvar) - 1); + srcvar[sizeof(srcvar) - 1] = '\0'; +]] + +local string_stackvars = "\tchar src[__len];\n" +local string_init = [[ + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; +]] + +-- Each test entry describes how to test a given function. We need to know how +-- to construct the buffer, we need to know the argument set we're dealing with, +-- and we need to know what we're passing to each argument. We could be passing +-- fixed values, or we could be passing the __buf under test. +-- +-- definition: +-- func: name of the function under test to call +-- bufsize: size of buffer to generate, defaults to 42 +-- buftype: type of buffer to generate, defaults to unsigned char[] +-- arguments: __buf, __len, or the name of a variable placed on the stack +-- exclude: a function(disposition, is_heap) that returns true if this combo +-- should be excluded. +-- stackvars: extra variables to be placed on the stack, should be a string +-- optionally formatted with tabs and newlines +-- init: extra code to inject just before the function call for initialization +-- of the buffer or any of the above-added stackvars; also a string +-- uses_len: bool-ish, necessary if arguments doesn't include either __idx or +-- or __len so that the test generator doesn't try to vary the size of the +-- buffer instead of just manipulating __idx/__len to try and induce an +-- overflow. +-- +-- Most tests will just use the default bufsize/buftype, but under some +-- circumstances it's useful to use a different type (e.g., for alignment +-- requirements). +local all_tests = { + stdio = { + -- + { + func = "sprintf", + arguments = { + "__buf", + "\"%.*s\"", + "(int)__len - 1", -- - 1 for NUL terminator + "srcvar", + }, + exclude = excludes_stack_overflow, + stackvars = printf_stackvars, + init = printf_init, + }, + { + func = "snprintf", + arguments = { + "__buf", + "__len", + "\"%.*s\"", + "(int)__len - 1", -- - 1 for NUL terminator + "srcvar", + }, + exclude = excludes_stack_overflow, + stackvars = printf_stackvars, + init = printf_init, + }, + }, + string = { + -- + { + func = "memcpy", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tchar src[__len + 10];\n", + }, + { + func = "memmove", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tchar src[__len + 10];\n", + }, + { + func = "memset", + arguments = { + "__buf", + "0", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "stpcpy", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + uses_len = true, + }, + { + func = "stpncpy", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + }, + { + func = "strcat", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + uses_len = true, + }, + { + func = "strncat", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + }, + { + func = "strcpy", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + uses_len = true, + }, + { + func = "strncpy", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + }, + }, + strings = { + -- + { + func = "bcopy", + arguments = { + "src", + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tchar src[__len + 10];\n", + }, + { + func = "bzero", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + }, + unistd = { + -- + { + func = "getcwd", + bufsize = "8", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "read", + bufsize = "41", + arguments = { + "fd", + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tint fd;\n", + init = [[ + fd = new_tmpfile(); /* Cannot fail */ +]], + }, + { + func = "readlink", + arguments = { + "path", + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tconst char *path;\n", + init = [[ + path = new_symlink(__len); /* Cannot fail */ +]], + }, + }, +} + +local function write_test_boilerplate(fh, name, body) + fh:write("ATF_TC_WITHOUT_HEAD(" .. name .. ");\n") + fh:write("ATF_TC_BODY(" .. name .. ", tc)\n") + fh:write("{\n" .. body .. "\n}\n\n") + return name +end + +local function generate_test_name(func, variant, disposition, heap) + local basename = func + if variant then + basename = basename .. "_" .. variant + end + if heap then + basename = basename .. "_heap" + end + if disposition < 0 then + return basename .. "_before_end" + elseif disposition == 0 then + return basename .. "_end" + else + return basename .. "_after_end" + end +end + +local function array_type(buftype) + if not buftype:match("%[%]") then + return nil + end + + return buftype:gsub("%[%]", "") +end + +local function configurable(def, idx) + local cfgitem = def[idx] + + if not cfgitem then + return nil + end + + if type(cfgitem) == "function" then + return cfgitem() + end + + return cfgitem +end + +local function generate_stackframe(buftype, bufsize, disposition, heap, def) + local function len_offset(inverted, disposition) + -- Tests that don't use __len in their arguments may use an + -- inverted sense because we can't just specify a length that + -- would induce an access just after the end. Instead, we have + -- to manipulate the buffer size to be too short so that the + -- function under test would write one too many. + if disposition < 0 then + return ((inverted and " + ") or " - ") .. "1" + elseif disposition == 0 then + return "" + else + return ((inverted and " - ") or " + ") .. "1" + end + end + + local function test_uses_len(def) + if def.uses_len then + return true + end + + for _, arg in ipairs(def.arguments) do + if arg:match("__len") or arg:match("__idx") then + return true + end + end + + return false + end + + + -- This is perhaps a little convoluted, but we toss the buffer into a + -- struct on the stack to guarantee that we have at least one valid + -- byte on either side of the buffer -- a measure to make sure that + -- we're tripping _FORTIFY_SOURCE specifically in the buffer + 1 case, + -- rather than some other stack or memory protection. + local vars = "\tstruct {\n" + vars = vars .. "\t\tuint8_t padding_l;\n" + + local uses_len = test_uses_len(def) + local bufsize_offset = len_offset(not uses_len, disposition) + local buftype_elem = array_type(buftype) + local size_expr = bufsize + + if not uses_len then + -- If the length isn't in use, we have to vary the buffer size + -- since the fortified function likely has some internal size + -- constraint that it's supposed to be checking. + size_expr = size_expr .. bufsize_offset + end + + if not heap and buftype_elem then + -- Array type: size goes after identifier + vars = vars .. "\t\t" .. buftype_elem .. + " __buf[" .. size_expr .. "];\n" + else + local basic_type = buftype_elem or buftype + + -- Heap tests obviously just put a pointer on the stack that + -- points to our new allocation, but we leave it in the padded + -- struct just to simplify our generator. + if heap then + basic_type = basic_type .. " *" + end + vars = vars .. "\t\t" .. basic_type .. " __buf;\n" + end + + -- padding_r is our just-past-the-end padding that we use to make sure + -- that there's a valid portion after the buffer that isn't being + -- included in our function calls. If we didn't have it, then we'd have + -- a hard time feeling confident that an abort on the just-after tests + -- isn't maybe from some other memory or stack protection. + vars = vars .. "\t\tuint8_t padding_r;\n" + vars = vars .. "\t} __stack;\n" + + -- Not all tests will use __bufsz, but some do for, e.g., clearing + -- memory.. + vars = vars .. "\tconst size_t __bufsz __unused = " + if heap then + local scalar = 1 + if buftype_elem then + scalar = size_expr + end + + vars = vars .. "sizeof(*__stack.__buf) * (" .. scalar .. ");\n" + else + vars = vars .. "sizeof(__stack.__buf);\n" + end + + vars = vars .. "\tconst size_t __len = " .. bufsize .. + bufsize_offset .. ";\n" + vars = vars .. "\tconst size_t __idx __unused = __len - 1;\n" + + -- For overflow testing, we need to fork() because we're expecting the + -- test to ultimately abort()/_exit(). Then we can collect the exit + -- status and report appropriately. + if disposition > 0 then + vars = vars .. "\tpid_t __child;\n" + vars = vars .. "\tint __status;\n" + end + + -- Any other stackvars defined by the test get placed after everything + -- else. + vars = vars .. (configurable(def, "stackvars") or "") + + return vars +end + +local function write_test(fh, func, disposition, heap, def) + local testname = generate_test_name(func, def.variant, disposition, heap) + local buftype = def.buftype or "unsigned char[]" + local bufsize = def.bufsize or 42 + local body = "" + + if def.exclude and def.exclude(disposition, heap) then + return + end + + local function need_addr(buftype) + return not (buftype:match("%[%]") or buftype:match("%*")) + end + + if heap then + body = body .. "#define BUF __stack.__buf\n" + else + body = body .. "#define BUF &__stack.__buf\n" + end + + -- Setup the buffer + body = body .. generate_stackframe(buftype, bufsize, disposition, heap, def) .. + "\n" + + -- Any early initialization goes before we would fork for the just-after + -- tests, because they may want to skip the test based on some criteria + -- and we can't propagate that up very easily once we're forked. + local early_init = configurable(def, "early_init") + body = body .. (early_init or "") + if early_init then + body = body .. "\n" + end + + -- Fork off, iff we're testing some access past the end of the buffer. + if disposition > 0 then + body = body .. [[ + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); +]] + end + + local bufvar = "__stack.__buf" + if heap then + -- Buffer needs to be initialized because it's a heap allocation. + body = body .. "\t" .. bufvar .. " = malloc(__bufsz);\n" + end + + -- Non-early init happens just after the fork in the child, not the + -- monitor. This is used to setup any other buffers we may need, for + -- instance. + local extra_init = configurable(def, "init") + body = body .. (extra_init or "") + + if heap or extra_init then + body = body .. "\n" + end + + -- Setup the function call with arguments as described in the test + -- definition. + body = body .. "\t" .. func .. "(" + + for idx, arg in ipairs(def.arguments) do + if idx > 1 then + body = body .. ", " + end + + if arg == "__buf" then + if not heap and need_addr(buftype) then + body = body .. "&" + end + + body = body .. bufvar + else + local argname = arg + + if def.value_of then + argname = argname or def.value_of(arg) + end + + body = body .. argname + end + end + + body = body .. ");\n" + + -- Monitor stuff follows, for OOB access. + if disposition <= 0 then + goto skip + end + + body = body .. [[ + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +]] + +::skip:: + body = body .. "#undef BUF\n" + return write_test_boilerplate(fh, testname, body) +end + +-- main() +local tests +local tcat = assert(arg[1], "usage: generate-fortify-tests.lua ") +for k, defs in pairs(all_tests) do + if k == tcat then + tests = defs + break + end +end + +assert(tests, "category " .. tcat .. " not found") + +local fh = io.stdout +fh:write("/* @" .. "generated" .. " by `generate-fortify-tests.lua \"" .. + tcat .. "\"` */\n\n") +fh:write("#define _FORTIFY_SOURCE 2\n") +fh:write("#define TMPFILE_SIZE (1024 * 32)\n") + +fh:write("\n") +for _, inc in ipairs(includes) do + fh:write("#include <" .. inc .. ">\n") +end + +fh:write([[ + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +]]) + +for _, def in pairs(tests) do + local func = def.func + local function write_tests(heap) + -- Dispositions here are relative to the buffer size prescribed + -- by the test definition. + local dispositions = def.dispositions or { -1, 0, 1 } + + for _, disposition in ipairs(dispositions) do + tests_added[#tests_added + 1] = write_test(fh, func, disposition, heap, def) + end + end + + write_tests(false) + write_tests(true) +end + +fh:write("ATF_TP_ADD_TCS(tp)\n") +fh:write("{\n") +for idx = 1, #tests_added do + fh:write("\tATF_TP_ADD_TC(tp, " .. tests_added[idx] .. ");\n") +end +fh:write("\treturn (atf_no_error());\n") +fh:write("}\n") From c10d567ea022de8705fb23f8563c4726f2d09ca0 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:10 -0500 Subject: [PATCH 033/151] include: de-macro __ssp_overlap(), improve semantics and checking Switch away from pointer arithmetic to provide more obvious semantics for checking overlap on pointer ranges. This lets us remove some casts that need not exist and removes some possible fragility in its use. While we're here, check for overflow just in case; sometimes we use a caller-supplied size if __builtin_object_size(3) can't deduce the buffer size, and we should fail the check if the size is nonsensical for the provided buffers. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield --- include/ssp/ssp.h | 19 +++++++++++++------ lib/libc/secure/memcpy_chk.c | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index 622e9e901ba6..de109da4959e 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -83,12 +83,19 @@ __ssp_inline rtype fun args { \ #define __ssp_redirect0(rtype, fun, args, call) \ __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0) -/* - * Take caution when using __ssp_overlap! Don't use it in contexts where we - * can end up with double-evaluation of a statement with some side-effects. - */ -#define __ssp_overlap(a, b, l) \ - (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l))) +#include + +static inline int +__ssp_overlap(const void *leftp, const void *rightp, __size_t sz) +{ + __uintptr_t left = (__uintptr_t)leftp; + __uintptr_t right = (__uintptr_t)rightp; + + if (left <= right) + return (SIZE_MAX - sz < left || right < left + sz); + + return (SIZE_MAX - sz < right || left < right + sz); +} __BEGIN_DECLS void __stack_chk_fail(void) __dead2; diff --git a/lib/libc/secure/memcpy_chk.c b/lib/libc/secure/memcpy_chk.c index 2a269cb475ab..ac995d00ee8c 100644 --- a/lib/libc/secure/memcpy_chk.c +++ b/lib/libc/secure/memcpy_chk.c @@ -44,7 +44,7 @@ __memcpy_chk(void * __restrict dst, const void * __restrict src, size_t len, if (len > slen) __chk_fail(); - if (__ssp_overlap((const char *)src, (const char *)dst, len)) + if (__ssp_overlap(src, dst, len)) __chk_fail(); return (memcpy(dst, src, len)); From cf8e5289a110954600f135024d1515a77d0ae34d Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:10 -0500 Subject: [PATCH 034/151] include: ssp: round out fortification of current set of headers ssp/ssp.h needed some improvements: - `len` isn't always a size_t, it may need casted - In some cases we may want to use a len that isn't specified as a parameter (e.g., L_ctermid), so __ssp_redirect() should be more flexible. - In other cases we may want additional checking, so pull all of the declaration bits out of __ssp_redirect_raw() so that some functions can implement the body themselves. strlcat/strlcpy should be the last of the fortified functions that get their own __*_chk symbols, and these cases are only done to be consistent with the rest of the str*() set. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45679 --- include/ssp/ssp.h | 16 +- include/ssp/stdio.h | 18 + include/ssp/string.h | 22 + include/ssp/strings.h | 5 + include/ssp/unistd.h | 36 +- include/stdio.h | 37 +- include/string.h | 29 +- include/strings.h | 11 +- lib/libc/amd64/string/strlcat.c | 2 + lib/libc/gen/ctermid.c | 5 +- lib/libc/gen/getdomainname.c | 3 +- lib/libc/gen/getentropy.c | 3 +- lib/libc/gen/getgrouplist.c | 3 +- lib/libc/gen/gethostname.c | 3 +- lib/libc/gen/getlogin.c | 3 +- lib/libc/gen/ttyname.c | 3 +- lib/libc/secure/Makefile.inc | 4 +- lib/libc/secure/Symbol.map | 2 + lib/libc/secure/strlcat_chk.c | 70 + lib/libc/secure/strlcpy_chk.c | 43 + lib/libc/stdio/fread.c | 4 +- lib/libc/stdio/gets_s.c | 3 +- lib/libc/stdio/tmpnam.c | 3 +- lib/libc/string/mempcpy.c | 4 +- lib/libc/string/strerror.c | 4 +- lib/libc/string/strlcat.c | 2 + lib/libc/string/strlcpy.c | 2 + lib/libc/string/strncpy.c | 2 + lib/libc/tests/secure/fortify_stdio_test.c | 1024 ++++++++++- lib/libc/tests/secure/fortify_string_test.c | 478 +++++ lib/libc/tests/secure/fortify_strings_test.c | 165 ++ lib/libc/tests/secure/fortify_unistd_test.c | 1592 ++++++++++++++++- .../tests/secure/generate-fortify-tests.lua | 271 +++ lib/libutil/tests/trimdomain-nodomain_test.c | 4 +- lib/libutil/tests/trimdomain_test.c | 4 +- sys/libkern/explicit_bzero.c | 3 +- sys/sys/libkern.h | 6 + 37 files changed, 3745 insertions(+), 144 deletions(-) create mode 100644 lib/libc/secure/strlcat_chk.c create mode 100644 lib/libc/secure/strlcpy_chk.c diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index de109da4959e..6ebc23288391 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -67,21 +67,25 @@ #define __ssp_bos0(ptr) __builtin_object_size(ptr, 0) #define __ssp_check(buf, len, bos) \ - if (bos(buf) != (size_t)-1 && len > bos(buf)) \ + if (bos(buf) != (size_t)-1 && (size_t)len > bos(buf)) \ __chk_fail() -#define __ssp_redirect_raw(rtype, fun, symbol, args, call, cond, bos) \ + +#define __ssp_redirect_raw_impl(rtype, fun, symbol, args) \ rtype __ssp_real_(fun) args __RENAME(symbol); \ __ssp_inline rtype fun args __RENAME(__ssp_protected_ ## fun); \ -__ssp_inline rtype fun args { \ +__ssp_inline rtype fun args + +#define __ssp_redirect_raw(rtype, fun, symbol, args, call, cond, bos, len) \ +__ssp_redirect_raw_impl(rtype, fun, symbol, args) { \ if (cond) \ - __ssp_check(__buf, __len, bos); \ + __ssp_check(__buf, len, bos); \ return __ssp_real_(fun) call; \ } #define __ssp_redirect(rtype, fun, args, call) \ - __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos) + __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos, __len) #define __ssp_redirect0(rtype, fun, args, call) \ - __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0) + __ssp_redirect_raw(rtype, fun, fun, args, call, 1, __ssp_bos0, __len) #include diff --git a/include/ssp/stdio.h b/include/ssp/stdio.h index 4bca1de7d4f9..f7a390f315a4 100644 --- a/include/ssp/stdio.h +++ b/include/ssp/stdio.h @@ -37,6 +37,24 @@ #include __BEGIN_DECLS +#if __SSP_FORTIFY_LEVEL > 0 +#if __POSIX_VISIBLE +__ssp_redirect_raw(char *, ctermid, ctermid, (char *__buf), (__buf), + __buf != NULL, __ssp_bos, L_ctermid); +#if __BSD_VISIBLE +__ssp_redirect_raw(char *, ctermid_r, ctermid_r, (char *__buf), (__buf), + __buf != NULL, __ssp_bos, L_ctermid); +#endif /* __BSD_VISIBLE */ +#endif /* __POSIX_VISIBLE */ +__ssp_redirect(size_t, fread, (void *__restrict __buf, size_t __len, + size_t __nmemb, FILE *__restrict __fp), (__buf, __len, __nmemb, __fp)); +__ssp_redirect(size_t, fread_unlocked, (void *__restrict __buf, size_t __len, + size_t __nmemb, FILE *__restrict __fp), (__buf, __len, __nmemb, __fp)); +__ssp_redirect(char *, gets_s, (char *__buf, rsize_t __len), (__buf, __len)); +__ssp_redirect_raw(char *, tmpnam, tmpnam, (char *__buf), (__buf), 1, + __ssp_bos, L_tmpnam); +#endif + int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ...) __printflike(4, 5); int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict, diff --git a/include/ssp/string.h b/include/ssp/string.h index ceb4ba2a2174..b9f2dceb1df5 100644 --- a/include/ssp/string.h +++ b/include/ssp/string.h @@ -45,7 +45,9 @@ char *__stpncpy_chk(char *, const char *, size_t, size_t); char *__strcat_chk(char *, const char *, size_t); char *__strcpy_chk(char *, const char *, size_t); char *__strncat_chk(char *, const char *, size_t, size_t); +size_t __strlcat_chk(char *, const char *, size_t, size_t); char *__strncpy_chk(char *, const char *, size_t, size_t); +size_t __strlcpy_chk(char *, const char *, size_t, size_t); __END_DECLS #if __SSP_FORTIFY_LEVEL > 0 @@ -110,8 +112,24 @@ __ssp_bos_icheck2_restrict(stpcpy, char *, const char *) __ssp_bos_icheck3_restrict(stpncpy, char *, const char *) __ssp_bos_icheck2_restrict(strcpy, char *, const char *) __ssp_bos_icheck2_restrict(strcat, char *, const char *) +__ssp_redirect0(int, strerror_r, (int __errnum, char *__buf, size_t __len), + (__errnum, __buf, __len)); __ssp_bos_icheck3_restrict(strncpy, char *, const char *) __ssp_bos_icheck3_restrict(strncat, char *, const char *) + +__ssp_redirect_raw_impl(void *, mempcpy, mempcpy, + (void *__restrict buf, const void *__restrict src, size_t len)) +{ + const size_t slen = __ssp_bos(buf); + + if (len > slen) + __chk_fail(); + + if (__ssp_overlap(src, buf, len)) + __chk_fail(); + + return (__ssp_real(mempcpy)(buf, src, len)); +} __END_DECLS #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len) @@ -122,7 +140,11 @@ __END_DECLS #define stpncpy(dst, src, len) __ssp_bos_check3(stpncpy, dst, src, len) #define strcpy(dst, src) __ssp_bos_check2(strcpy, dst, src) #define strcat(dst, src) __ssp_bos_check2(strcat, dst, src) +#define strlcpy(dst, src, dstlen) \ + __strlcpy_chk(dst, src, dstlen, __ssp_bos(dst)) #define strncpy(dst, src, len) __ssp_bos_check3(strncpy, dst, src, len) +#define strlcat(dst, src, dstlen) \ + __strlcat_chk(dst, src, dstlen, __ssp_bos(dst)) #define strncat(dst, src, len) __ssp_bos_check3(strncat, dst, src, len) #endif /* __SSP_FORTIFY_LEVEL > 0 */ diff --git a/include/ssp/strings.h b/include/ssp/strings.h index 51b11a14ee87..79b70eba1c5c 100644 --- a/include/ssp/strings.h +++ b/include/ssp/strings.h @@ -63,5 +63,10 @@ #define bzero(dst, len) _ssp_bzero(__ssp_var(dstv), dst, __ssp_var(lenv), len) +__BEGIN_DECLS +__ssp_redirect(void, explicit_bzero, (void *__buf, size_t __len), + (__buf, __len)); +__END_DECLS + #endif /* __SSP_FORTIFY_LEVEL > 0 */ #endif /* _SSP_STRINGS_H_ */ diff --git a/include/ssp/unistd.h b/include/ssp/unistd.h index bcd3664116cc..7e9d72343dde 100644 --- a/include/ssp/unistd.h +++ b/include/ssp/unistd.h @@ -43,14 +43,46 @@ __BEGIN_DECLS #define _FORTIFY_SOURCE_read read #endif -__ssp_redirect0(ssize_t, _FORTIFY_SOURCE_read, (int __fd, void *__buf, +__ssp_inline size_t +__ssp_gid_bos(const void *ptr) +{ + size_t ptrsize = __ssp_bos(ptr); + + if (ptrsize == (size_t)-1) + return (ptrsize); + + return (ptrsize / sizeof(gid_t)); +} + +__ssp_redirect_raw(int, getgrouplist, getgrouplist, + (const char *__name, gid_t __base, gid_t *__buf, int *__lenp), + (__name, __base, __buf, __lenp), 1, __ssp_gid_bos, *__lenp); + +__ssp_redirect_raw(int, getgroups, getgroups, (int __len, gid_t *__buf), + (__len, __buf), 1, __ssp_gid_bos, __len); + +__ssp_redirect(int, getloginclass, (char *__buf, size_t __len), + (__buf, __len)); + +__ssp_redirect(ssize_t, _FORTIFY_SOURCE_read, (int __fd, void *__buf, size_t __len), (__fd, __buf, __len)); +__ssp_redirect(ssize_t, pread, (int __fd, void *__buf, size_t __len, + off_t __offset), (__fd, __buf, __len, __offset)); __ssp_redirect(ssize_t, readlink, (const char *__restrict __path, \ char *__restrict __buf, size_t __len), (__path, __buf, __len)); +__ssp_redirect(ssize_t, readlinkat, (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len), (__fd, __path, __buf, __len)); __ssp_redirect_raw(char *, getcwd, getcwd, (char *__buf, size_t __len), - (__buf, __len), __buf != 0, __ssp_bos); + (__buf, __len), __buf != 0, __ssp_bos, __len); + +__ssp_redirect(int, getdomainname, (char *__buf, int __len), (__buf, __len)); +__ssp_redirect(int, getentropy, (void *__buf, size_t __len), (__buf, __len)); +__ssp_redirect(int, gethostname, (char *__buf, size_t __len), (__buf, __len)); +__ssp_redirect(int, getlogin_r, (char *__buf, size_t __len), (__buf, __len)); +__ssp_redirect(int, ttyname_r, (int __fd, char *__buf, size_t __len), + (__fd, __buf, __len)); __END_DECLS diff --git a/include/stdio.h b/include/stdio.h index ea53816cf1d4..b0190d25eb4f 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -238,6 +238,21 @@ __END_DECLS #define stdout __stdoutp #define stderr __stderrp +/* + * Functions defined in all versions of POSIX 1003.1. + */ +#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) +#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ +#endif + +#if __POSIX_VISIBLE +#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ +#endif /* __POSIX_VISIBLE */ + +#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS #ifdef _XLOCALE_H_ #include @@ -252,7 +267,7 @@ int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE * __restrict, fpos_t * __restrict); -char *fgets(char * __restrict, int, FILE * __restrict); +char *(fgets)(char * __restrict, int, FILE * __restrict); FILE *fopen(const char * __restrict, const char * __restrict); int fprintf(FILE * __restrict, const char * __restrict, ...); int fputc(int, FILE *); @@ -280,7 +295,7 @@ void rewind(FILE *); int scanf(const char * __restrict, ...); void setbuf(FILE * __restrict, char * __restrict); int setvbuf(FILE * __restrict, char * __restrict, int, size_t); -int sprintf(char * __restrict, const char * __restrict, ...); +int (sprintf)(char * __restrict, const char * __restrict, ...); int sscanf(const char * __restrict, const char * __restrict, ...); FILE *tmpfile(void); char *tmpnam(char *); @@ -288,13 +303,13 @@ int ungetc(int, FILE *); int vfprintf(FILE * __restrict, const char * __restrict, __va_list); int vprintf(const char * __restrict, __va_list); -int vsprintf(char * __restrict, const char * __restrict, +int (vsprintf)(char * __restrict, const char * __restrict, __va_list); #if __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE >= 199506 -int snprintf(char * __restrict, size_t, const char * __restrict, +int (snprintf)(char * __restrict, size_t, const char * __restrict, ...) __printflike(3, 4); -int vsnprintf(char * __restrict, size_t, const char * __restrict, +int (vsnprintf)(char * __restrict, size_t, const char * __restrict, __va_list) __printflike(3, 0); #endif #if __ISO_C_VISIBLE >= 1999 @@ -305,16 +320,7 @@ int vsscanf(const char * __restrict, const char * __restrict, __va_list) __scanflike(2, 0); #endif -/* - * Functions defined in all versions of POSIX 1003.1. - */ -#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) -#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ -#endif - #if __POSIX_VISIBLE -#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */ - char *ctermid(char *); FILE *fdopen(int, const char *); int fileno(FILE *); @@ -530,7 +536,4 @@ extern int __isthreaded; __END_DECLS __NULLABILITY_PRAGMA_POP -#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 -#include -#endif #endif /* !_STDIO_H_ */ diff --git a/include/string.h b/include/string.h index ce605117daa6..c9d3e1add1a1 100644 --- a/include/string.h +++ b/include/string.h @@ -49,6 +49,10 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif +#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS #if __XSI_VISIBLE >= 600 void *memccpy(void * __restrict, const void * __restrict, int, size_t); @@ -58,23 +62,23 @@ void *memchr(const void *, int, size_t) __pure; void *memrchr(const void *, int, size_t) __pure; #endif int memcmp(const void *, const void *, size_t) __pure; -void *memcpy(void * __restrict, const void * __restrict, size_t); +void *(memcpy)(void * __restrict, const void * __restrict, size_t); #if __BSD_VISIBLE void *memmem(const void *, size_t, const void *, size_t) __pure; #endif -void *memmove(void *, const void *, size_t); +void *(memmove)(void *, const void *, size_t); #if __BSD_VISIBLE void *mempcpy(void * __restrict, const void * __restrict, size_t); #endif -void *memset(void *, int, size_t); +void *(memset)(void *, int, size_t); #if __POSIX_VISIBLE >= 200809 -char *stpcpy(char * __restrict, const char * __restrict); -char *stpncpy(char * __restrict, const char * __restrict, size_t); +char *(stpcpy)(char * __restrict, const char * __restrict); +char *(stpncpy)(char * __restrict, const char * __restrict, size_t); #endif #if __BSD_VISIBLE char *strcasestr(const char *, const char *) __pure; #endif -char *strcat(char * __restrict, const char * __restrict); +char *(strcat)(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; #if __BSD_VISIBLE char *strchrnul(const char*, int) __pure; @@ -82,7 +86,7 @@ int strverscmp(const char *, const char *) __pure; #endif int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); -char *strcpy(char * __restrict, const char * __restrict); +char *(strcpy)(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *) __pure; #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE char *strdup(const char *) __malloc_like; @@ -92,8 +96,8 @@ char *strerror(int); int strerror_r(int, char *, size_t); #endif #if __BSD_VISIBLE -size_t strlcat(char * __restrict, const char * __restrict, size_t); -size_t strlcpy(char * __restrict, const char * __restrict, size_t); +size_t (strlcat)(char * __restrict, const char * __restrict, size_t); +size_t (strlcpy)(char * __restrict, const char * __restrict, size_t); #endif size_t strlen(const char *) __pure; #if __BSD_VISIBLE @@ -105,9 +109,9 @@ typedef __mode_t mode_t; void strmode(mode_t, char *); #endif -char *strncat(char * __restrict, const char * __restrict, size_t); +char *(strncat)(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; -char *strncpy(char * __restrict, const char * __restrict, size_t); +char *(strncpy)(char * __restrict, const char * __restrict, size_t); #if __POSIX_VISIBLE >= 200809 char *strndup(const char *, size_t) __malloc_like; size_t strnlen(const char *, size_t) __pure; @@ -168,7 +172,4 @@ errno_t memset_s(void *, rsize_t, int, rsize_t); #endif /* __EXT1_VISIBLE */ __END_DECLS -#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 -#include -#endif #endif /* _STRING_H_ */ diff --git a/include/strings.h b/include/strings.h index 511f7c03cb3c..889f43bd2311 100644 --- a/include/strings.h +++ b/include/strings.h @@ -37,11 +37,15 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif +#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS #if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112 int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ -void bcopy(const void *, void *, size_t); /* LEGACY */ -void bzero(void *, size_t); /* LEGACY */ +void (bcopy)(const void *, void *, size_t); /* LEGACY */ +void (bzero)(void *, size_t); /* LEGACY */ #endif #if __BSD_VISIBLE void explicit_bzero(void *, size_t); @@ -68,7 +72,4 @@ int strncasecmp(const char *, const char *, size_t) __pure; #endif __END_DECLS -#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 -#include -#endif #endif /* _STRINGS_H_ */ diff --git a/lib/libc/amd64/string/strlcat.c b/lib/libc/amd64/string/strlcat.c index 0c1e1c5d05f7..94fdc0963dc3 100644 --- a/lib/libc/amd64/string/strlcat.c +++ b/lib/libc/amd64/string/strlcat.c @@ -8,6 +8,8 @@ #include +#undef strlcat /* FORTIFY_SOURCE */ + void *__memchr(const void *, int, size_t); size_t __strlcpy(char *restrict, const char *restrict, size_t); diff --git a/lib/libc/gen/ctermid.c b/lib/libc/gen/ctermid.c index 9265d402930c..fb117b3c8ded 100644 --- a/lib/libc/gen/ctermid.c +++ b/lib/libc/gen/ctermid.c @@ -34,11 +34,12 @@ #include #include #include +#include #define LEN_PATH_DEV (sizeof(_PATH_DEV) - 1) char * -ctermid(char *s) +__ssp_real(ctermid)(char *s) { static char def[sizeof(_PATH_DEV) + SPECNAMELEN]; struct stat sb; @@ -62,7 +63,7 @@ ctermid(char *s) } char * -ctermid_r(char *s) +__ssp_real(ctermid_r)(char *s) { return (s != NULL ? ctermid(s) : NULL); diff --git a/lib/libc/gen/getdomainname.c b/lib/libc/gen/getdomainname.c index a9527b36a247..c0be7465f967 100644 --- a/lib/libc/gen/getdomainname.c +++ b/lib/libc/gen/getdomainname.c @@ -33,9 +33,10 @@ #include #include +#include int -getdomainname(char *name, int namelen) +__ssp_real(getdomainname)(char *name, int namelen) { int mib[2]; size_t size; diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 38cd515e74d7..40b84af65f83 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "libc_private.h" @@ -105,7 +106,7 @@ getentropy_fallback(void *buf, size_t buflen) } int -getentropy(void *buf, size_t buflen) +__ssp_real(getentropy)(void *buf, size_t buflen) { ssize_t rd; bool have_getrandom; diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 1c29b249f8c4..5bd06bc5121f 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -37,11 +37,12 @@ #include #include #include +#include extern int __getgroupmembership(const char *, gid_t, gid_t *, int, int *); int -getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) +__ssp_real(getgrouplist)(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) { return __getgroupmembership(uname, agroup, groups, *grpcnt, grpcnt); } diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c index 36e988c91ecc..66d401fad846 100644 --- a/lib/libc/gen/gethostname.c +++ b/lib/libc/gen/gethostname.c @@ -34,9 +34,10 @@ #include #include +#include int -gethostname(char *name, size_t namelen) +__ssp_real(gethostname)(char *name, size_t namelen) { int mib[2]; diff --git a/lib/libc/gen/getlogin.c b/lib/libc/gen/getlogin.c index 55ed83795f7d..f8a3fb079067 100644 --- a/lib/libc/gen/getlogin.c +++ b/lib/libc/gen/getlogin.c @@ -37,6 +37,7 @@ #include #include "namespace.h" #include +#include #include "un-namespace.h" #include "libc_private.h" @@ -54,7 +55,7 @@ getlogin(void) } int -getlogin_r(char *logname, size_t namelen) +__ssp_real(getlogin_r)(char *logname, size_t namelen) { char tmpname[MAXLOGNAME]; int len; diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c index 268b2e0f7b65..f1e2f401fe5d 100644 --- a/lib/libc/gen/ttyname.c +++ b/lib/libc/gen/ttyname.c @@ -42,6 +42,7 @@ #include #include #include "reentrant.h" +#include #include "un-namespace.h" #include "libc_private.h" @@ -53,7 +54,7 @@ static thread_key_t ttyname_key; static int ttyname_keycreated = 0; int -ttyname_r(int fd, char *buf, size_t len) +__ssp_real(ttyname_r)(int fd, char *buf, size_t len) { size_t used; diff --git a/lib/libc/secure/Makefile.inc b/lib/libc/secure/Makefile.inc index 28289127c7a6..5d10612e67a8 100644 --- a/lib/libc/secure/Makefile.inc +++ b/lib/libc/secure/Makefile.inc @@ -6,8 +6,8 @@ # _FORTIFY_SOURCE SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \ snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \ - strcat_chk.c strcpy_chk.c strncat_chk.c strncpy_chk.c \ - vsnprintf_chk.c vsprintf_chk.c + strcat_chk.c strcpy_chk.c strlcat_chk.c strncat_chk.c strlcpy_chk.c \ + strncpy_chk.c vsnprintf_chk.c vsprintf_chk.c CFLAGS.snprintf_chk.c+= -Wno-unused-parameter CFLAGS.sprintf_chk.c+= -Wno-unused-parameter diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map index 0d854039955f..1f12fe059367 100644 --- a/lib/libc/secure/Symbol.map +++ b/lib/libc/secure/Symbol.map @@ -15,7 +15,9 @@ FBSD_1.8 { __stpncpy_chk; __strcat_chk; __strcpy_chk; + __strlcat_chk; __strncat_chk; + __strlcpy_chk; __strncpy_chk; __vsnprintf_chk; __vsprintf_chk; diff --git a/lib/libc/secure/strlcat_chk.c b/lib/libc/secure/strlcat_chk.c new file mode 100644 index 000000000000..26448bd37af0 --- /dev/null +++ b/lib/libc/secure/strlcat_chk.c @@ -0,0 +1,70 @@ +/* $OpenBSD: strlcat.c,v 1.15 2015/03/02 21:41:08 millert Exp $ */ + +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 1998, 2015 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +#include + +/* + * Appends src to string dst of size dsize (unlike strncat, dsize is the + * full size of dst, not space left). At most dsize-1 characters + * will be copied. Always NUL terminates (unless dsize <= strlen(dst)). + * Returns strlen(src) + MIN(dsize, strlen(initial dst)). + * If retval >= dsize, truncation occurred. + */ +size_t +__strlcat_chk(char * __restrict dst, const char * __restrict src, size_t dsize, + size_t dbufsize) +{ + const char *odst = dst; + const char *osrc = src; + size_t n = dsize; + size_t dlen; + + if (dsize > dbufsize) + __chk_fail(); + + /* Find the end of dst and adjust bytes left but don't go past end. */ + while (n-- != 0 && *dst != '\0') { + dst++; + } + + dlen = dst - odst; + n = dsize - dlen; + + if (n-- == 0) + return (dlen + strlen(src)); + while (*src != '\0') { + if (n != 0) { + if (dbufsize-- == 0) + __chk_fail(); + *dst++ = *src; + n--; + } + + src++; + } + + if (dbufsize-- == 0) + __chk_fail(); + *dst = '\0'; + return (dlen + (src - osrc)); /* count does not include NUL */ +} diff --git a/lib/libc/secure/strlcpy_chk.c b/lib/libc/secure/strlcpy_chk.c new file mode 100644 index 000000000000..8c11ee3e07eb --- /dev/null +++ b/lib/libc/secure/strlcpy_chk.c @@ -0,0 +1,43 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include +#undef strlcpy + +size_t +__strlcpy_chk(char * __restrict dst, const char * __restrict src, size_t dsize, + size_t dbufsize) +{ + + if (dsize > dbufsize) + __chk_fail(); + + return (strlcpy(dst, src, dsize)); +} diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c index bf943fdd1d0d..65d9ecf94366 100644 --- a/lib/libc/stdio/fread.c +++ b/lib/libc/stdio/fread.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "un-namespace.h" #include "local.h" #include "libc_private.h" @@ -46,7 +47,8 @@ */ size_t -fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp) +__ssp_real(fread)(void * __restrict buf, size_t size, size_t count, + FILE * __restrict fp) { size_t ret; diff --git a/lib/libc/stdio/gets_s.c b/lib/libc/stdio/gets_s.c index 9a8cf34916fb..41e379507483 100644 --- a/lib/libc/stdio/gets_s.c +++ b/lib/libc/stdio/gets_s.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "un-namespace.h" #include "libc_private.h" #include "local.h" @@ -77,7 +78,7 @@ _gets_s(char *buf, rsize_t n) /* ISO/IEC 9899:2011 K.3.7.4.1 */ char * -gets_s(char *buf, rsize_t n) +__ssp_real(gets_s)(char *buf, rsize_t n) { char *ret; if (buf == NULL) { diff --git a/lib/libc/stdio/tmpnam.c b/lib/libc/stdio/tmpnam.c index d7c436928cd7..fab4253e2834 100644 --- a/lib/libc/stdio/tmpnam.c +++ b/lib/libc/stdio/tmpnam.c @@ -36,6 +36,7 @@ #include #include +#include __warn_references(tmpnam, "warning: tmpnam() possibly used unsafely; consider using mkstemp()"); @@ -43,7 +44,7 @@ __warn_references(tmpnam, extern char *_mktemp(char *); char * -tmpnam(char *s) +__ssp_real(tmpnam)(char *s) { static u_long tmpcount; static char buf[L_tmpnam]; diff --git a/lib/libc/string/mempcpy.c b/lib/libc/string/mempcpy.c index 619371632922..86e44cdebb85 100644 --- a/lib/libc/string/mempcpy.c +++ b/lib/libc/string/mempcpy.c @@ -29,9 +29,11 @@ */ #include +#include void * -mempcpy(void *__restrict dst, const void *__restrict src, size_t len) +__ssp_real(mempcpy)(void *__restrict dst, const void *__restrict src, + size_t len) { return ((char *)memcpy(dst, src, len) + len); } diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index ecad55caa673..922bb0284497 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -38,6 +38,8 @@ #include #include +#include + #include "errlst.h" #include "../locale/xlocale_private.h" #include "libc_private.h" @@ -114,7 +116,7 @@ __strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) } int -strerror_r(int errnum, char *strerrbuf, size_t buflen) +__ssp_real(strerror_r)(int errnum, char *strerrbuf, size_t buflen) { return (__strerror_rl(errnum, strerrbuf, buflen, __get_locale())); } diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c index bdb302def7b0..fc18fad179db 100644 --- a/lib/libc/string/strlcat.c +++ b/lib/libc/string/strlcat.c @@ -19,6 +19,8 @@ #include #include +#undef strlcat /* FORTIFY_SOURCE */ + /* * Appends src to string dst of size dsize (unlike strncat, dsize is the * full size of dst, not space left). At most dsize-1 characters diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c index 58a42e321f6a..79f7ab19cdfd 100644 --- a/lib/libc/string/strlcpy.c +++ b/lib/libc/string/strlcpy.c @@ -19,6 +19,8 @@ #include #include +#undef strlcpy /* FORTIFY_SOURCE */ + /* * Copy string src to buffer dst of size dsize. At most dsize-1 * chars will be copied. Always NUL terminates (unless dsize == 0). diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c index b1df82a2dbf8..67240a855196 100644 --- a/lib/libc/string/strncpy.c +++ b/lib/libc/string/strncpy.c @@ -34,6 +34,8 @@ #include +#undef strncpy /* FORTIFY_SOURCE */ + /* * Copy src to dst, truncating or null-padding to always copy n bytes. * Return dst. diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index 20ecdab89a8b..fe0f14acd988 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -20,6 +20,23 @@ #include #include +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + /* * Create a new symlink to use for readlink(2) style tests, we'll just use a * random target name to have something interesting to look at. @@ -55,28 +72,700 @@ new_tmpfile(void) size_t written; int fd; - fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); - ATF_REQUIRE(fd >= 0); + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(ctermid_before_end); +ATF_TC_BODY(ctermid_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_ctermid + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_ctermid + 1; + const size_t __idx __unused = __len - 1; + + ctermid(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_end); +ATF_TC_BODY(ctermid_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_ctermid]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_ctermid; + const size_t __idx __unused = __len - 1; + + ctermid(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_heap_before_end); +ATF_TC_BODY(ctermid_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid + 1); + const size_t __len = L_ctermid + 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + ctermid(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_heap_end); +ATF_TC_BODY(ctermid_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid); + const size_t __len = L_ctermid; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + ctermid(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_heap_after_end); +ATF_TC_BODY(ctermid_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid - 1); + const size_t __len = L_ctermid - 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + ctermid(__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_r_before_end); +ATF_TC_BODY(ctermid_r_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_ctermid + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_ctermid + 1; + const size_t __idx __unused = __len - 1; + + ctermid_r(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_r_end); +ATF_TC_BODY(ctermid_r_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_ctermid]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_ctermid; + const size_t __idx __unused = __len - 1; + + ctermid_r(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_r_heap_before_end); +ATF_TC_BODY(ctermid_r_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid + 1); + const size_t __len = L_ctermid + 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + ctermid_r(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_r_heap_end); +ATF_TC_BODY(ctermid_r_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid); + const size_t __len = L_ctermid; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + ctermid_r(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ctermid_r_heap_after_end); +ATF_TC_BODY(ctermid_r_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_ctermid - 1); + const size_t __len = L_ctermid - 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + ctermid_r(__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_before_end); +ATF_TC_BODY(fread_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + fread(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_end); +ATF_TC_BODY(fread_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + fread(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_heap_before_end); +ATF_TC_BODY(fread_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_heap_end); +ATF_TC_BODY(fread_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_heap_after_end); +ATF_TC_BODY(fread_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread(__stack.__buf, __len, 1, stdin); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_unlocked_before_end); +ATF_TC_BODY(fread_unlocked_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + fread_unlocked(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_unlocked_end); +ATF_TC_BODY(fread_unlocked_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + fread_unlocked(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_unlocked_heap_before_end); +ATF_TC_BODY(fread_unlocked_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread_unlocked(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_unlocked_heap_end); +ATF_TC_BODY(fread_unlocked_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread_unlocked(__stack.__buf, __len, 1, stdin); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fread_unlocked_heap_after_end); +ATF_TC_BODY(fread_unlocked_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + fread_unlocked(__stack.__buf, __len, 1, stdin); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gets_s_before_end); +ATF_TC_BODY(gets_s_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + gets_s(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gets_s_end); +ATF_TC_BODY(gets_s_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + replace_stdin(); + + gets_s(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gets_s_heap_before_end); +ATF_TC_BODY(gets_s_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + gets_s(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gets_s_heap_end); +ATF_TC_BODY(gets_s_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + replace_stdin(); + + gets_s(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gets_s_heap_after_end); +ATF_TC_BODY(gets_s_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + replace_stdin(); - written = 0; - while (written < TMPFILE_SIZE) { - rv = write(fd, buf, sizeof(buf)); - ATF_REQUIRE(rv > 0); + gets_s(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ - written += rv; +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); } - ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); - return (fd); -} - -static void -disable_coredumps(void) -{ - struct rlimit rl = { 0 }; + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF - if (setrlimit(RLIMIT_CORE, &rl) == -1) - _exit(EX_OSERR); } ATF_TC_WITHOUT_HEAD(sprintf_before_end); @@ -367,8 +1056,299 @@ ATF_TC_BODY(snprintf_heap_after_end, tc) } +ATF_TC_WITHOUT_HEAD(tmpnam_before_end); +ATF_TC_BODY(tmpnam_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_tmpnam + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_tmpnam + 1; + const size_t __idx __unused = __len - 1; + + tmpnam(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(tmpnam_end); +ATF_TC_BODY(tmpnam_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[L_tmpnam]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = L_tmpnam; + const size_t __idx __unused = __len - 1; + + tmpnam(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(tmpnam_heap_before_end); +ATF_TC_BODY(tmpnam_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_tmpnam + 1); + const size_t __len = L_tmpnam + 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + tmpnam(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(tmpnam_heap_end); +ATF_TC_BODY(tmpnam_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_tmpnam); + const size_t __len = L_tmpnam; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + tmpnam(__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(tmpnam_heap_after_end); +ATF_TC_BODY(tmpnam_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (L_tmpnam - 1); + const size_t __len = L_tmpnam - 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + tmpnam(__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fgets_before_end); +ATF_TC_BODY(fgets_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + FILE *fp; + + fp = new_fp(__len); + + fgets(__stack.__buf, __len, fp); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fgets_end); +ATF_TC_BODY(fgets_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + FILE *fp; + + fp = new_fp(__len); + + fgets(__stack.__buf, __len, fp); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fgets_heap_before_end); +ATF_TC_BODY(fgets_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + FILE *fp; + + __stack.__buf = malloc(__bufsz); + fp = new_fp(__len); + + fgets(__stack.__buf, __len, fp); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fgets_heap_end); +ATF_TC_BODY(fgets_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + FILE *fp; + + __stack.__buf = malloc(__bufsz); + fp = new_fp(__len); + + fgets(__stack.__buf, __len, fp); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(fgets_heap_after_end); +ATF_TC_BODY(fgets_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + FILE *fp; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + fp = new_fp(__len); + + fgets(__stack.__buf, __len, fp); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, ctermid_before_end); + ATF_TP_ADD_TC(tp, ctermid_end); + ATF_TP_ADD_TC(tp, ctermid_heap_before_end); + ATF_TP_ADD_TC(tp, ctermid_heap_end); + ATF_TP_ADD_TC(tp, ctermid_heap_after_end); + ATF_TP_ADD_TC(tp, ctermid_r_before_end); + ATF_TP_ADD_TC(tp, ctermid_r_end); + ATF_TP_ADD_TC(tp, ctermid_r_heap_before_end); + ATF_TP_ADD_TC(tp, ctermid_r_heap_end); + ATF_TP_ADD_TC(tp, ctermid_r_heap_after_end); + ATF_TP_ADD_TC(tp, fread_before_end); + ATF_TP_ADD_TC(tp, fread_end); + ATF_TP_ADD_TC(tp, fread_heap_before_end); + ATF_TP_ADD_TC(tp, fread_heap_end); + ATF_TP_ADD_TC(tp, fread_heap_after_end); + ATF_TP_ADD_TC(tp, fread_unlocked_before_end); + ATF_TP_ADD_TC(tp, fread_unlocked_end); + ATF_TP_ADD_TC(tp, fread_unlocked_heap_before_end); + ATF_TP_ADD_TC(tp, fread_unlocked_heap_end); + ATF_TP_ADD_TC(tp, fread_unlocked_heap_after_end); + ATF_TP_ADD_TC(tp, gets_s_before_end); + ATF_TP_ADD_TC(tp, gets_s_end); + ATF_TP_ADD_TC(tp, gets_s_heap_before_end); + ATF_TP_ADD_TC(tp, gets_s_heap_end); + ATF_TP_ADD_TC(tp, gets_s_heap_after_end); ATF_TP_ADD_TC(tp, sprintf_before_end); ATF_TP_ADD_TC(tp, sprintf_end); ATF_TP_ADD_TC(tp, sprintf_heap_before_end); @@ -379,5 +1359,15 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, snprintf_heap_before_end); ATF_TP_ADD_TC(tp, snprintf_heap_end); ATF_TP_ADD_TC(tp, snprintf_heap_after_end); + ATF_TP_ADD_TC(tp, tmpnam_before_end); + ATF_TP_ADD_TC(tp, tmpnam_end); + ATF_TP_ADD_TC(tp, tmpnam_heap_before_end); + ATF_TP_ADD_TC(tp, tmpnam_heap_end); + ATF_TP_ADD_TC(tp, tmpnam_heap_after_end); + ATF_TP_ADD_TC(tp, fgets_before_end); + ATF_TP_ADD_TC(tp, fgets_end); + ATF_TP_ADD_TC(tp, fgets_heap_before_end); + ATF_TP_ADD_TC(tp, fgets_heap_end); + ATF_TP_ADD_TC(tp, fgets_heap_after_end); return (atf_no_error()); } diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 109ef40fd62d..8306abb5f9e2 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -20,6 +20,23 @@ #include #include +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + /* * Create a new symlink to use for readlink(2) style tests, we'll just use a * random target name to have something interesting to look at. @@ -79,6 +96,22 @@ disable_coredumps(void) _exit(EX_OSERR); } +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + ATF_TC_WITHOUT_HEAD(memcpy_before_end); ATF_TC_BODY(memcpy_before_end, tc) { @@ -211,6 +244,138 @@ ATF_TC_BODY(memcpy_heap_after_end, tc) } +ATF_TC_WITHOUT_HEAD(mempcpy_before_end); +ATF_TC_BODY(mempcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + mempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(mempcpy_end); +ATF_TC_BODY(mempcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + mempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(mempcpy_heap_before_end); +ATF_TC_BODY(mempcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + mempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(mempcpy_heap_end); +ATF_TC_BODY(mempcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + mempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(mempcpy_heap_after_end); +ATF_TC_BODY(mempcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + mempcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TC_WITHOUT_HEAD(memmove_before_end); ATF_TC_BODY(memmove_before_end, tc) { @@ -917,6 +1082,155 @@ ATF_TC_BODY(strcat_heap_after_end, tc) } +ATF_TC_WITHOUT_HEAD(strlcat_before_end); +ATF_TC_BODY(strlcat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcat_end); +ATF_TC_BODY(strlcat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcat_heap_before_end); +ATF_TC_BODY(strlcat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcat_heap_end); +ATF_TC_BODY(strlcat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcat_heap_after_end); +ATF_TC_BODY(strlcat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcat(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TC_WITHOUT_HEAD(strncat_before_end); ATF_TC_BODY(strncat_before_end, tc) { @@ -1215,6 +1529,155 @@ ATF_TC_BODY(strcpy_heap_after_end, tc) } +ATF_TC_WITHOUT_HEAD(strlcpy_before_end); +ATF_TC_BODY(strlcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcpy_end); +ATF_TC_BODY(strlcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcpy_heap_before_end); +ATF_TC_BODY(strlcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcpy_heap_end); +ATF_TC_BODY(strlcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + char src[__len]; + + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(strlcpy_heap_after_end); +ATF_TC_BODY(strlcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(__stack.__buf, 0, __len); + memset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + strlcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TC_WITHOUT_HEAD(strncpy_before_end); ATF_TC_BODY(strncpy_before_end, tc) { @@ -1371,6 +1834,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, memcpy_heap_before_end); ATF_TP_ADD_TC(tp, memcpy_heap_end); ATF_TP_ADD_TC(tp, memcpy_heap_after_end); + ATF_TP_ADD_TC(tp, mempcpy_before_end); + ATF_TP_ADD_TC(tp, mempcpy_end); + ATF_TP_ADD_TC(tp, mempcpy_heap_before_end); + ATF_TP_ADD_TC(tp, mempcpy_heap_end); + ATF_TP_ADD_TC(tp, mempcpy_heap_after_end); ATF_TP_ADD_TC(tp, memmove_before_end); ATF_TP_ADD_TC(tp, memmove_end); ATF_TP_ADD_TC(tp, memmove_heap_before_end); @@ -1396,6 +1864,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strcat_heap_before_end); ATF_TP_ADD_TC(tp, strcat_heap_end); ATF_TP_ADD_TC(tp, strcat_heap_after_end); + ATF_TP_ADD_TC(tp, strlcat_before_end); + ATF_TP_ADD_TC(tp, strlcat_end); + ATF_TP_ADD_TC(tp, strlcat_heap_before_end); + ATF_TP_ADD_TC(tp, strlcat_heap_end); + ATF_TP_ADD_TC(tp, strlcat_heap_after_end); ATF_TP_ADD_TC(tp, strncat_before_end); ATF_TP_ADD_TC(tp, strncat_end); ATF_TP_ADD_TC(tp, strncat_heap_before_end); @@ -1406,6 +1879,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strcpy_heap_before_end); ATF_TP_ADD_TC(tp, strcpy_heap_end); ATF_TP_ADD_TC(tp, strcpy_heap_after_end); + ATF_TP_ADD_TC(tp, strlcpy_before_end); + ATF_TP_ADD_TC(tp, strlcpy_end); + ATF_TP_ADD_TC(tp, strlcpy_heap_before_end); + ATF_TP_ADD_TC(tp, strlcpy_heap_end); + ATF_TP_ADD_TC(tp, strlcpy_heap_after_end); ATF_TP_ADD_TC(tp, strncpy_before_end); ATF_TP_ADD_TC(tp, strncpy_end); ATF_TP_ADD_TC(tp, strncpy_heap_before_end); diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index f9e628bbcd38..f9cb1e4917f7 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -20,6 +20,23 @@ #include #include +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + /* * Create a new symlink to use for readlink(2) style tests, we'll just use a * random target name to have something interesting to look at. @@ -79,6 +96,22 @@ disable_coredumps(void) _exit(EX_OSERR); } +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + ATF_TC_WITHOUT_HEAD(bcopy_before_end); ATF_TC_BODY(bcopy_before_end, tc) { @@ -338,6 +371,133 @@ ATF_TC_BODY(bzero_heap_after_end, tc) } +ATF_TC_WITHOUT_HEAD(explicit_bzero_before_end); +ATF_TC_BODY(explicit_bzero_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + explicit_bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(explicit_bzero_end); +ATF_TC_BODY(explicit_bzero_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + explicit_bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(explicit_bzero_heap_before_end); +ATF_TC_BODY(explicit_bzero_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + explicit_bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(explicit_bzero_heap_end); +ATF_TC_BODY(explicit_bzero_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + explicit_bzero(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(explicit_bzero_heap_after_end); +ATF_TC_BODY(explicit_bzero_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + explicit_bzero(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, bcopy_before_end); @@ -350,5 +510,10 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, bzero_heap_before_end); ATF_TP_ADD_TC(tp, bzero_heap_end); ATF_TP_ADD_TC(tp, bzero_heap_after_end); + ATF_TP_ADD_TC(tp, explicit_bzero_before_end); + ATF_TP_ADD_TC(tp, explicit_bzero_end); + ATF_TP_ADD_TC(tp, explicit_bzero_heap_before_end); + ATF_TP_ADD_TC(tp, explicit_bzero_heap_end); + ATF_TP_ADD_TC(tp, explicit_bzero_heap_after_end); return (atf_no_error()); } diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index 69e70124ca5f..76702321676a 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -20,6 +20,23 @@ #include #include +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + /* * Create a new symlink to use for readlink(2) style tests, we'll just use a * random target name to have something interesting to look at. @@ -79,6 +96,22 @@ disable_coredumps(void) _exit(EX_OSERR); } +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + ATF_TC_WITHOUT_HEAD(getcwd_before_end); ATF_TC_BODY(getcwd_before_end, tc) { @@ -206,107 +239,228 @@ ATF_TC_BODY(getcwd_heap_after_end, tc) } -ATF_TC_WITHOUT_HEAD(read_before_end); -ATF_TC_BODY(read_before_end, tc) +ATF_TC_WITHOUT_HEAD(getgrouplist_before_end); +ATF_TC_BODY(getgrouplist_before_end, tc) { #define BUF &__stack.__buf struct { uint8_t padding_l; - unsigned char __buf[41]; + gid_t __buf[4]; uint8_t padding_r; } __stack; const size_t __bufsz __unused = sizeof(__stack.__buf); - const size_t __len = 41 - 1; + const size_t __len = 4 - 1; const size_t __idx __unused = __len - 1; - int fd; + int intlen = (int)__len; - fd = new_tmpfile(); /* Cannot fail */ + getgrouplist("root", 0, __stack.__buf, &intlen); +#undef BUF - read(fd, __stack.__buf, __len); +} + +ATF_TC_WITHOUT_HEAD(getgrouplist_end); +ATF_TC_BODY(getgrouplist_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + gid_t __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + int intlen = (int)__len; + + getgrouplist("root", 0, __stack.__buf, &intlen); #undef BUF } -ATF_TC_WITHOUT_HEAD(read_end); -ATF_TC_BODY(read_end, tc) +ATF_TC_WITHOUT_HEAD(getgrouplist_heap_before_end); +ATF_TC_BODY(getgrouplist_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + gid_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + int intlen = (int)__len; + + __stack.__buf = malloc(__bufsz); + + getgrouplist("root", 0, __stack.__buf, &intlen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getgrouplist_heap_end); +ATF_TC_BODY(getgrouplist_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + gid_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + int intlen = (int)__len; + + __stack.__buf = malloc(__bufsz); + + getgrouplist("root", 0, __stack.__buf, &intlen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getgrouplist_heap_after_end); +ATF_TC_BODY(getgrouplist_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + gid_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int intlen = (int)__len; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getgrouplist("root", 0, __stack.__buf, &intlen); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getgroups_before_end); +ATF_TC_BODY(getgroups_before_end, tc) { #define BUF &__stack.__buf struct { uint8_t padding_l; - unsigned char __buf[41]; + gid_t __buf[4]; uint8_t padding_r; } __stack; const size_t __bufsz __unused = sizeof(__stack.__buf); - const size_t __len = 41; + const size_t __len = 4 - 1; const size_t __idx __unused = __len - 1; - int fd; - fd = new_tmpfile(); /* Cannot fail */ + getgroups(__len, __stack.__buf); +#undef BUF - read(fd, __stack.__buf, __len); +} + +ATF_TC_WITHOUT_HEAD(getgroups_end); +ATF_TC_BODY(getgroups_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + gid_t __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + + getgroups(__len, __stack.__buf); #undef BUF } -ATF_TC_WITHOUT_HEAD(read_heap_before_end); -ATF_TC_BODY(read_heap_before_end, tc) +ATF_TC_WITHOUT_HEAD(getgroups_heap_before_end); +ATF_TC_BODY(getgroups_heap_before_end, tc) { #define BUF __stack.__buf struct { uint8_t padding_l; - unsigned char * __buf; + gid_t * __buf; uint8_t padding_r; } __stack; - const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); - const size_t __len = 41 - 1; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; const size_t __idx __unused = __len - 1; - int fd; __stack.__buf = malloc(__bufsz); - fd = new_tmpfile(); /* Cannot fail */ - read(fd, __stack.__buf, __len); + getgroups(__len, __stack.__buf); #undef BUF } -ATF_TC_WITHOUT_HEAD(read_heap_end); -ATF_TC_BODY(read_heap_end, tc) +ATF_TC_WITHOUT_HEAD(getgroups_heap_end); +ATF_TC_BODY(getgroups_heap_end, tc) { #define BUF __stack.__buf struct { uint8_t padding_l; - unsigned char * __buf; + gid_t * __buf; uint8_t padding_r; } __stack; - const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); - const size_t __len = 41; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; const size_t __idx __unused = __len - 1; - int fd; __stack.__buf = malloc(__bufsz); - fd = new_tmpfile(); /* Cannot fail */ - read(fd, __stack.__buf, __len); + getgroups(__len, __stack.__buf); #undef BUF } -ATF_TC_WITHOUT_HEAD(read_heap_after_end); -ATF_TC_BODY(read_heap_after_end, tc) +ATF_TC_WITHOUT_HEAD(getgroups_heap_after_end); +ATF_TC_BODY(getgroups_heap_after_end, tc) { #define BUF __stack.__buf struct { uint8_t padding_l; - unsigned char * __buf; + gid_t * __buf; uint8_t padding_r; } __stack; - const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); - const size_t __len = 41 + 1; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; const size_t __idx __unused = __len - 1; pid_t __child; int __status; - int fd; __child = fork(); ATF_REQUIRE(__child >= 0); @@ -316,9 +470,8 @@ ATF_TC_BODY(read_heap_after_end, tc) /* Child */ disable_coredumps(); __stack.__buf = malloc(__bufsz); - fd = new_tmpfile(); /* Cannot fail */ - read(fd, __stack.__buf, __len); + getgroups(__len, __stack.__buf); _exit(EX_SOFTWARE); /* Should have aborted. */ monitor: @@ -345,8 +498,8 @@ ATF_TC_BODY(read_heap_after_end, tc) } -ATF_TC_WITHOUT_HEAD(readlink_before_end); -ATF_TC_BODY(readlink_before_end, tc) +ATF_TC_WITHOUT_HEAD(getloginclass_before_end); +ATF_TC_BODY(getloginclass_before_end, tc) { #define BUF &__stack.__buf struct { @@ -357,17 +510,14 @@ ATF_TC_BODY(readlink_before_end, tc) const size_t __bufsz __unused = sizeof(__stack.__buf); const size_t __len = 42 - 1; const size_t __idx __unused = __len - 1; - const char *path; - - path = new_symlink(__len); /* Cannot fail */ - readlink(path, __stack.__buf, __len); + getloginclass(__stack.__buf, __len); #undef BUF } -ATF_TC_WITHOUT_HEAD(readlink_end); -ATF_TC_BODY(readlink_end, tc) +ATF_TC_WITHOUT_HEAD(getloginclass_end); +ATF_TC_BODY(getloginclass_end, tc) { #define BUF &__stack.__buf struct { @@ -378,17 +528,14 @@ ATF_TC_BODY(readlink_end, tc) const size_t __bufsz __unused = sizeof(__stack.__buf); const size_t __len = 42; const size_t __idx __unused = __len - 1; - const char *path; - - path = new_symlink(__len); /* Cannot fail */ - readlink(path, __stack.__buf, __len); + getloginclass(__stack.__buf, __len); #undef BUF } -ATF_TC_WITHOUT_HEAD(readlink_heap_before_end); -ATF_TC_BODY(readlink_heap_before_end, tc) +ATF_TC_WITHOUT_HEAD(getloginclass_heap_before_end); +ATF_TC_BODY(getloginclass_heap_before_end, tc) { #define BUF __stack.__buf struct { @@ -399,18 +546,16 @@ ATF_TC_BODY(readlink_heap_before_end, tc) const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); const size_t __len = 42 - 1; const size_t __idx __unused = __len - 1; - const char *path; __stack.__buf = malloc(__bufsz); - path = new_symlink(__len); /* Cannot fail */ - readlink(path, __stack.__buf, __len); + getloginclass(__stack.__buf, __len); #undef BUF } -ATF_TC_WITHOUT_HEAD(readlink_heap_end); -ATF_TC_BODY(readlink_heap_end, tc) +ATF_TC_WITHOUT_HEAD(getloginclass_heap_end); +ATF_TC_BODY(getloginclass_heap_end, tc) { #define BUF __stack.__buf struct { @@ -421,18 +566,16 @@ ATF_TC_BODY(readlink_heap_end, tc) const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); const size_t __len = 42; const size_t __idx __unused = __len - 1; - const char *path; __stack.__buf = malloc(__bufsz); - path = new_symlink(__len); /* Cannot fail */ - readlink(path, __stack.__buf, __len); + getloginclass(__stack.__buf, __len); #undef BUF } -ATF_TC_WITHOUT_HEAD(readlink_heap_after_end); -ATF_TC_BODY(readlink_heap_after_end, tc) +ATF_TC_WITHOUT_HEAD(getloginclass_heap_after_end); +ATF_TC_BODY(getloginclass_heap_after_end, tc) { #define BUF __stack.__buf struct { @@ -445,7 +588,6 @@ ATF_TC_BODY(readlink_heap_after_end, tc) const size_t __idx __unused = __len - 1; pid_t __child; int __status; - const char *path; __child = fork(); ATF_REQUIRE(__child >= 0); @@ -455,9 +597,1279 @@ ATF_TC_BODY(readlink_heap_after_end, tc) /* Child */ disable_coredumps(); __stack.__buf = malloc(__bufsz); - path = new_symlink(__len); /* Cannot fail */ - readlink(path, __stack.__buf, __len); + getloginclass(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(pread_before_end); +ATF_TC_BODY(pread_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + pread(fd, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(pread_end); +ATF_TC_BODY(pread_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + pread(fd, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(pread_heap_before_end); +ATF_TC_BODY(pread_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + pread(fd, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(pread_heap_end); +ATF_TC_BODY(pread_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + pread(fd, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(pread_heap_after_end); +ATF_TC_BODY(pread_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int fd; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + pread(fd, __stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_before_end); +ATF_TC_BODY(read_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_end); +ATF_TC_BODY(read_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[41]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_before_end); +ATF_TC_BODY(read_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_end); +ATF_TC_BODY(read_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41; + const size_t __idx __unused = __len - 1; + int fd; + + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(read_heap_after_end); +ATF_TC_BODY(read_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (41); + const size_t __len = 41 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int fd; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + fd = new_tmpfile(); /* Cannot fail */ + + read(fd, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_before_end); +ATF_TC_BODY(readlink_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_end); +ATF_TC_BODY(readlink_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_before_end); +ATF_TC_BODY(readlink_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_end); +ATF_TC_BODY(readlink_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlink_heap_after_end); +ATF_TC_BODY(readlink_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + const char *path; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlink(path, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlinkat_before_end); +ATF_TC_BODY(readlinkat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlinkat(AT_FDCWD, path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlinkat_end); +ATF_TC_BODY(readlinkat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + path = new_symlink(__len); /* Cannot fail */ + + readlinkat(AT_FDCWD, path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlinkat_heap_before_end); +ATF_TC_BODY(readlinkat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlinkat(AT_FDCWD, path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlinkat_heap_end); +ATF_TC_BODY(readlinkat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + const char *path; + + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlinkat(AT_FDCWD, path, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readlinkat_heap_after_end); +ATF_TC_BODY(readlinkat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + const char *path; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + path = new_symlink(__len); /* Cannot fail */ + + readlinkat(AT_FDCWD, path, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getdomainname_before_end); +ATF_TC_BODY(getdomainname_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + char sysdomain[256]; + + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); + + getdomainname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getdomainname_end); +ATF_TC_BODY(getdomainname_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + char sysdomain[256]; + + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); + + getdomainname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getdomainname_heap_before_end); +ATF_TC_BODY(getdomainname_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + char sysdomain[256]; + + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); + + __stack.__buf = malloc(__bufsz); + + getdomainname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getdomainname_heap_end); +ATF_TC_BODY(getdomainname_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + char sysdomain[256]; + + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); + + __stack.__buf = malloc(__bufsz); + + getdomainname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getdomainname_heap_after_end); +ATF_TC_BODY(getdomainname_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char sysdomain[256]; + + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getdomainname(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getentropy_before_end); +ATF_TC_BODY(getentropy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + getentropy(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getentropy_end); +ATF_TC_BODY(getentropy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + getentropy(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getentropy_heap_before_end); +ATF_TC_BODY(getentropy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getentropy(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getentropy_heap_end); +ATF_TC_BODY(getentropy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getentropy(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getentropy_heap_after_end); +ATF_TC_BODY(getentropy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getentropy(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gethostname_before_end); +ATF_TC_BODY(gethostname_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + char syshost[256]; + int error; + + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); + + gethostname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gethostname_end); +ATF_TC_BODY(gethostname_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + char syshost[256]; + int error; + + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); + + gethostname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gethostname_heap_before_end); +ATF_TC_BODY(gethostname_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + char syshost[256]; + int error; + + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); + + __stack.__buf = malloc(__bufsz); + + gethostname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gethostname_heap_end); +ATF_TC_BODY(gethostname_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + char syshost[256]; + int error; + + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); + + __stack.__buf = malloc(__bufsz); + + gethostname(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(gethostname_heap_after_end); +ATF_TC_BODY(gethostname_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + char syshost[256]; + int error; + + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + gethostname(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getlogin_r_before_end); +ATF_TC_BODY(getlogin_r_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[MAXLOGNAME + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = MAXLOGNAME + 1 - 1; + const size_t __idx __unused = __len - 1; + + getlogin_r(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getlogin_r_end); +ATF_TC_BODY(getlogin_r_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[MAXLOGNAME + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = MAXLOGNAME + 1; + const size_t __idx __unused = __len - 1; + + getlogin_r(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getlogin_r_heap_before_end); +ATF_TC_BODY(getlogin_r_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (MAXLOGNAME + 1); + const size_t __len = MAXLOGNAME + 1 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getlogin_r(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getlogin_r_heap_end); +ATF_TC_BODY(getlogin_r_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (MAXLOGNAME + 1); + const size_t __len = MAXLOGNAME + 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getlogin_r(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getlogin_r_heap_after_end); +ATF_TC_BODY(getlogin_r_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (MAXLOGNAME + 1); + const size_t __len = MAXLOGNAME + 1 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getlogin_r(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ttyname_r_before_end); +ATF_TC_BODY(ttyname_r_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); + + ttyname_r(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ttyname_r_end); +ATF_TC_BODY(ttyname_r_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int fd; + + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); + + ttyname_r(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ttyname_r_heap_before_end); +ATF_TC_BODY(ttyname_r_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int fd; + + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); + + __stack.__buf = malloc(__bufsz); + + ttyname_r(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ttyname_r_heap_end); +ATF_TC_BODY(ttyname_r_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int fd; + + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); + + __stack.__buf = malloc(__bufsz); + + ttyname_r(fd, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ttyname_r_heap_after_end); +ATF_TC_BODY(ttyname_r_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int fd; + + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + ttyname_r(fd, __stack.__buf, __len); _exit(EX_SOFTWARE); /* Should have aborted. */ monitor: @@ -491,6 +1903,26 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getcwd_heap_before_end); ATF_TP_ADD_TC(tp, getcwd_heap_end); ATF_TP_ADD_TC(tp, getcwd_heap_after_end); + ATF_TP_ADD_TC(tp, getgrouplist_before_end); + ATF_TP_ADD_TC(tp, getgrouplist_end); + ATF_TP_ADD_TC(tp, getgrouplist_heap_before_end); + ATF_TP_ADD_TC(tp, getgrouplist_heap_end); + ATF_TP_ADD_TC(tp, getgrouplist_heap_after_end); + ATF_TP_ADD_TC(tp, getgroups_before_end); + ATF_TP_ADD_TC(tp, getgroups_end); + ATF_TP_ADD_TC(tp, getgroups_heap_before_end); + ATF_TP_ADD_TC(tp, getgroups_heap_end); + ATF_TP_ADD_TC(tp, getgroups_heap_after_end); + ATF_TP_ADD_TC(tp, getloginclass_before_end); + ATF_TP_ADD_TC(tp, getloginclass_end); + ATF_TP_ADD_TC(tp, getloginclass_heap_before_end); + ATF_TP_ADD_TC(tp, getloginclass_heap_end); + ATF_TP_ADD_TC(tp, getloginclass_heap_after_end); + ATF_TP_ADD_TC(tp, pread_before_end); + ATF_TP_ADD_TC(tp, pread_end); + ATF_TP_ADD_TC(tp, pread_heap_before_end); + ATF_TP_ADD_TC(tp, pread_heap_end); + ATF_TP_ADD_TC(tp, pread_heap_after_end); ATF_TP_ADD_TC(tp, read_before_end); ATF_TP_ADD_TC(tp, read_end); ATF_TP_ADD_TC(tp, read_heap_before_end); @@ -501,5 +1933,35 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, readlink_heap_before_end); ATF_TP_ADD_TC(tp, readlink_heap_end); ATF_TP_ADD_TC(tp, readlink_heap_after_end); + ATF_TP_ADD_TC(tp, readlinkat_before_end); + ATF_TP_ADD_TC(tp, readlinkat_end); + ATF_TP_ADD_TC(tp, readlinkat_heap_before_end); + ATF_TP_ADD_TC(tp, readlinkat_heap_end); + ATF_TP_ADD_TC(tp, readlinkat_heap_after_end); + ATF_TP_ADD_TC(tp, getdomainname_before_end); + ATF_TP_ADD_TC(tp, getdomainname_end); + ATF_TP_ADD_TC(tp, getdomainname_heap_before_end); + ATF_TP_ADD_TC(tp, getdomainname_heap_end); + ATF_TP_ADD_TC(tp, getdomainname_heap_after_end); + ATF_TP_ADD_TC(tp, getentropy_before_end); + ATF_TP_ADD_TC(tp, getentropy_end); + ATF_TP_ADD_TC(tp, getentropy_heap_before_end); + ATF_TP_ADD_TC(tp, getentropy_heap_end); + ATF_TP_ADD_TC(tp, getentropy_heap_after_end); + ATF_TP_ADD_TC(tp, gethostname_before_end); + ATF_TP_ADD_TC(tp, gethostname_end); + ATF_TP_ADD_TC(tp, gethostname_heap_before_end); + ATF_TP_ADD_TC(tp, gethostname_heap_end); + ATF_TP_ADD_TC(tp, gethostname_heap_after_end); + ATF_TP_ADD_TC(tp, getlogin_r_before_end); + ATF_TP_ADD_TC(tp, getlogin_r_end); + ATF_TP_ADD_TC(tp, getlogin_r_heap_before_end); + ATF_TP_ADD_TC(tp, getlogin_r_heap_end); + ATF_TP_ADD_TC(tp, getlogin_r_heap_after_end); + ATF_TP_ADD_TC(tp, ttyname_r_before_end); + ATF_TP_ADD_TC(tp, ttyname_r_end); + ATF_TP_ADD_TC(tp, ttyname_r_heap_before_end); + ATF_TP_ADD_TC(tp, ttyname_r_heap_end); + ATF_TP_ADD_TC(tp, ttyname_r_heap_after_end); return (atf_no_error()); } diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index 8734fcfa4e2e..bff1162c7d83 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -96,6 +96,10 @@ local printf_init = [[ srcvar[sizeof(srcvar) - 1] = '\0'; ]] +local stdio_init = [[ + replace_stdin(); +]] + local string_stackvars = "\tchar src[__len];\n" local string_init = [[ memset(__stack.__buf, 0, __len); @@ -130,6 +134,53 @@ local string_init = [[ local all_tests = { stdio = { -- + { + func = "ctermid", + bufsize = "L_ctermid", + arguments = { + "__buf", + }, + exclude = excludes_stack_overflow, + }, + { + func = "ctermid_r", + bufsize = "L_ctermid", + arguments = { + "__buf", + }, + exclude = excludes_stack_overflow, + }, + { + func = "fread", + arguments = { + "__buf", + "__len", + "1", + "stdin", + }, + exclude = excludes_stack_overflow, + init = stdio_init, + }, + { + func = "fread_unlocked", + arguments = { + "__buf", + "__len", + "1", + "stdin", + }, + exclude = excludes_stack_overflow, + init = stdio_init, + }, + { + func = "gets_s", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + init = stdio_init, + }, { func = "sprintf", arguments = { @@ -155,6 +206,27 @@ local all_tests = { stackvars = printf_stackvars, init = printf_init, }, + { + func = "tmpnam", + bufsize = "L_tmpnam", + arguments = { + "__buf", + }, + exclude = excludes_stack_overflow, + }, + { + func = "fgets", + arguments = { + "__buf", + "__len", + "fp", + }, + exclude = excludes_stack_overflow, + stackvars = "\tFILE *fp;\n", + init = [[ + fp = new_fp(__len); +]], + }, }, string = { -- @@ -168,6 +240,16 @@ local all_tests = { exclude = excludes_stack_overflow, stackvars = "\tchar src[__len + 10];\n", }, + { + func = "mempcpy", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tchar src[__len + 10];\n", + }, { func = "memmove", arguments = { @@ -220,6 +302,17 @@ local all_tests = { init = string_init, uses_len = true, }, + { + func = "strlcat", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + }, { func = "strncat", arguments = { @@ -242,6 +335,17 @@ local all_tests = { init = string_init, uses_len = true, }, + { + func = "strlcpy", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = string_stackvars, + init = string_init, + }, { func = "strncpy", arguments = { @@ -274,6 +378,14 @@ local all_tests = { }, exclude = excludes_stack_overflow, }, + { + func = "explicit_bzero", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, }, unistd = { -- @@ -286,6 +398,53 @@ local all_tests = { }, exclude = excludes_stack_overflow, }, + { + func = "getgrouplist", + bufsize = "4", + buftype = "gid_t[]", + arguments = { + "\"root\"", + "0", + "__buf", + "&intlen", + }, + exclude = excludes_stack_overflow, + stackvars = "\tint intlen = (int)__len;\n", + uses_len = true, + }, + { + func = "getgroups", + bufsize = "4", + buftype = "gid_t[]", + arguments = { + "__len", + "__buf", + }, + exclude = excludes_stack_overflow, + }, + { + func = "getloginclass", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "pread", + bufsize = "41", + arguments = { + "fd", + "__buf", + "__len", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = "\tint fd;\n", + init = [[ + fd = new_tmpfile(); /* Cannot fail */ +]], + }, { func = "read", bufsize = "41", @@ -313,6 +472,85 @@ local all_tests = { path = new_symlink(__len); /* Cannot fail */ ]], }, + { + func = "readlinkat", + arguments = { + "AT_FDCWD", + "path", + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tconst char *path;\n", + init = [[ + path = new_symlink(__len); /* Cannot fail */ +]], + }, + { + func = "getdomainname", + bufsize = "4", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tchar sysdomain[256];\n", + early_init = [[ + (void)getdomainname(sysdomain, __len); + if (strlen(sysdomain) <= __len) + atf_tc_skip("domain name too short for testing"); +]] + }, + { + func = "getentropy", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "gethostname", + bufsize = "4", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = [[ + char syshost[256]; + int error; +]], + early_init = [[ + error = gethostname(syshost, __len); + if (error != 0 || strlen(syshost) <= __len) + atf_tc_skip("hostname too short for testing"); +]] + }, + { + func = "getlogin_r", + bufsize = "MAXLOGNAME + 1", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "ttyname_r", + arguments = { + "fd", + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\tint fd;\n", + early_init = [[ + fd = STDIN_FILENO; + if (!isatty(fd)) + atf_tc_skip("stdin is not an fd"); +]] + }, }, } @@ -620,6 +858,23 @@ end fh:write([[ +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + /* * Create a new symlink to use for readlink(2) style tests, we'll just use a * random target name to have something interesting to look at. @@ -679,6 +934,22 @@ disable_coredumps(void) _exit(EX_OSERR); } +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + ]]) for _, def in pairs(tests) do diff --git a/lib/libutil/tests/trimdomain-nodomain_test.c b/lib/libutil/tests/trimdomain-nodomain_test.c index 7e549533996f..b2dfaa4ae9af 100644 --- a/lib/libutil/tests/trimdomain-nodomain_test.c +++ b/lib/libutil/tests/trimdomain-nodomain_test.c @@ -32,6 +32,8 @@ #include #include +#include + #define TESTDOMAIN "" #define TESTHOST "testhost" #define TESTFQDN "testhost" TESTDOMAIN @@ -45,7 +47,7 @@ int tests = 0; * oddly configured systems. */ int -gethostname(char *name, size_t namelen) +__ssp_real(gethostname)(char *name, size_t namelen) { if (strlcpy(name, TESTFQDN, namelen) > namelen) { errno = ENAMETOOLONG; diff --git a/lib/libutil/tests/trimdomain_test.c b/lib/libutil/tests/trimdomain_test.c index 772cca6aacf6..ad5b92b0ce1e 100644 --- a/lib/libutil/tests/trimdomain_test.c +++ b/lib/libutil/tests/trimdomain_test.c @@ -32,6 +32,8 @@ #include #include +#include + #define TESTDOMAIN ".domain.example.com" #define TESTHOST "testhost" #define TESTFQDN "testhost" TESTDOMAIN @@ -45,7 +47,7 @@ int tests = 0; * oddly configured systems. */ int -gethostname(char *name, size_t namelen) +__ssp_real(gethostname)(char *name, size_t namelen) { if (strlcpy(name, TESTFQDN, namelen) > namelen) { errno = ENAMETOOLONG; diff --git a/sys/libkern/explicit_bzero.c b/sys/libkern/explicit_bzero.c index 618828008ab7..97a7b71540bc 100644 --- a/sys/libkern/explicit_bzero.c +++ b/sys/libkern/explicit_bzero.c @@ -9,6 +9,7 @@ #include #else #include +#include #endif /* _KERNEL */ __attribute__((weak)) void __explicit_bzero_hook(void *, size_t); @@ -19,7 +20,7 @@ __explicit_bzero_hook(void *buf, size_t len) } void -explicit_bzero(void *buf, size_t len) +__ssp_real(explicit_bzero)(void *buf, size_t len) { memset(buf, 0, len); __explicit_bzero_hook(buf, len); diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 7d2e24f1263b..64744f57b5c3 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -337,4 +337,10 @@ signed_extend32(uint32_t bitmap, int lsb, int width) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME +#if __has_include() +#include /* __ssp_real */ +#else +#define __ssp_real(fun) fun +#endif + #endif /* !_SYS_LIBKERN_H_ */ From 88276dfbf19e3c0dbd1abee5c2e18c8a4a8c5559 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:11 -0500 Subject: [PATCH 035/151] include: ssp: fortify poll/ppoll from For poll/ppoll we just need to bounds-check the poll array that we're about to write out to. Reviewed by: kib, markj (earlier version) Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45680 --- include/ssp/Makefile | 2 +- include/ssp/poll.h | 60 ++ lib/libc/sys/poll.c | 5 +- lib/libc/sys/ppoll.c | 8 +- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_poll_test.c | 531 ++++++++++++++++++ lib/libc/tests/secure/fortify_stdio_test.c | 1 + lib/libc/tests/secure/fortify_string_test.c | 1 + lib/libc/tests/secure/fortify_strings_test.c | 1 + lib/libc/tests/secure/fortify_unistd_test.c | 1 + .../tests/secure/generate-fortify-tests.lua | 34 ++ sys/sys/poll.h | 4 + 12 files changed, 643 insertions(+), 6 deletions(-) create mode 100644 include/ssp/poll.h create mode 100644 lib/libc/tests/secure/fortify_poll_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index 69e7df68bb47..a97139e75c7b 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,4 +1,4 @@ -INCS= ssp.h stdio.h string.h strings.h unistd.h +INCS= poll.h ssp.h stdio.h string.h strings.h unistd.h INCSDIR= ${INCLUDEDIR}/ssp .include diff --git a/include/ssp/poll.h b/include/ssp/poll.h new file mode 100644 index 000000000000..66992009e928 --- /dev/null +++ b/include/ssp/poll.h @@ -0,0 +1,60 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_POLL_H_ +#define _SSP_POLL_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +__BEGIN_DECLS + +__ssp_redirect_raw_impl(int, poll, poll, + (struct pollfd fds[], nfds_t nfds, int timeout)) +{ + if (__ssp_bos(fds) / sizeof(fds[0]) < nfds) + __chk_fail(); + + return (__ssp_real(poll)(fds, nfds, timeout)); +} + + +__ssp_redirect_raw_impl(int, ppoll, ppoll, + (struct pollfd fds[], nfds_t nfds, + const struct timespec *__restrict timeout, + const sigset_t *__restrict newsigmask)) +{ + if (__ssp_bos(fds) / sizeof(fds[0]) < nfds) + __chk_fail(); + + return (__ssp_real(ppoll)(fds, nfds, timeout, newsigmask)); +} + +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_POLL_H_ */ diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 6528603e7603..7a418afbbf49 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -31,13 +31,14 @@ #include #include +#include #include "libc_private.h" __weak_reference(__sys_poll, __poll); -#pragma weak poll +#pragma weak __ssp_real(poll) int -poll(struct pollfd pfd[], nfds_t nfds, int timeout) +__ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) { return (INTERPOS_SYS(poll, pfd, nfds, timeout)); } diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index 52c4c177cf0a..ef72a902548b 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -31,14 +31,16 @@ #include #include +#include #include "libc_private.h" __weak_reference(__sys_ppoll, __ppoll); -#pragma weak ppoll +#pragma weak __ssp_real(ppoll) int -ppoll(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict - timeout, const sigset_t *__restrict newsigmask) +__ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, + const struct timespec *__restrict timeout, + const sigset_t *__restrict newsigmask) { return (INTERPOS_SYS(ppoll, pfd, nfds, timeout, newsigmask)); } diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index d809f7cadd74..2e98b5f2ed35 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -2,6 +2,7 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} +FORTIFY_TCATS+= poll FORTIFY_TCATS+= stdio FORTIFY_TCATS+= string FORTIFY_TCATS+= strings diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c new file mode 100644 index 000000000000..9d9cb4ace35a --- /dev/null +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -0,0 +1,531 @@ +/* @generated by `generate-fortify-tests.lua "poll"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(poll_before_end); +ATF_TC_BODY(poll_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(poll_end); +ATF_TC_BODY(poll_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(poll_after_end); +ATF_TC_BODY(poll_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(poll_heap_before_end); +ATF_TC_BODY(poll_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(poll_heap_end); +ATF_TC_BODY(poll_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(poll_heap_after_end); +ATF_TC_BODY(poll_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + poll(__stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_before_end); +ATF_TC_BODY(ppoll_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + struct timespec tv = { 0 }; + + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_end); +ATF_TC_BODY(ppoll_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + struct timespec tv = { 0 }; + + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_after_end); +ATF_TC_BODY(ppoll_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct pollfd __buf[4]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + struct timespec tv = { 0 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_heap_before_end); +ATF_TC_BODY(ppoll_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 - 1; + const size_t __idx __unused = __len - 1; + struct timespec tv = { 0 }; + + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_heap_end); +ATF_TC_BODY(ppoll_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4; + const size_t __idx __unused = __len - 1; + struct timespec tv = { 0 }; + + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(ppoll_heap_after_end); +ATF_TC_BODY(ppoll_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct pollfd * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (4); + const size_t __len = 4 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + struct timespec tv = { 0 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } + + ppoll(__stack.__buf, __len, &tv, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, poll_before_end); + ATF_TP_ADD_TC(tp, poll_end); + ATF_TP_ADD_TC(tp, poll_after_end); + ATF_TP_ADD_TC(tp, poll_heap_before_end); + ATF_TP_ADD_TC(tp, poll_heap_end); + ATF_TP_ADD_TC(tp, poll_heap_after_end); + ATF_TP_ADD_TC(tp, ppoll_before_end); + ATF_TP_ADD_TC(tp, ppoll_end); + ATF_TP_ADD_TC(tp, ppoll_after_end); + ATF_TP_ADD_TC(tp, ppoll_heap_before_end); + ATF_TP_ADD_TC(tp, ppoll_heap_end); + ATF_TP_ADD_TC(tp, ppoll_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index fe0f14acd988..035d84b316e6 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 8306abb5f9e2..5651d3107e91 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index f9cb1e4917f7..28f5e9ec4940 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index 76702321676a..dddc23596368 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index bff1162c7d83..bb654bbf2f71 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -69,6 +69,7 @@ local includes = { "errno.h", "fcntl.h", "limits.h", + "poll.h", "signal.h", "stdio.h", "stdlib.h", @@ -90,6 +91,12 @@ local function excludes_stack_overflow(disposition, is_heap) return (not is_heap) and disposition > 0 end +local poll_init = [[ + for (size_t i = 0; i < howmany(__bufsz, sizeof(struct pollfd)); i++) { + __stack.__buf[i].fd = -1; + } +]] + local printf_stackvars = "\tchar srcvar[__len + 10];\n" local printf_init = [[ memset(srcvar, 'A', sizeof(srcvar) - 1); @@ -132,6 +139,33 @@ local string_init = [[ -- circumstances it's useful to use a different type (e.g., for alignment -- requirements). local all_tests = { + poll = { + -- + { + func = "poll", + bufsize = "4", + buftype = "struct pollfd[]", + arguments = { + "__buf", + "__len", + "0", + }, + init = poll_init, + }, + { + func = "ppoll", + bufsize = "4", + buftype = "struct pollfd[]", + arguments = { + "__buf", + "__len", + "&tv", + "NULL", + }, + stackvars = "\tstruct timespec tv = { 0 };\n", + init = poll_init, + }, + }, stdio = { -- { diff --git a/sys/sys/poll.h b/sys/sys/poll.h index 0ae4e0f4dd15..d5f2c0373942 100644 --- a/sys/sys/poll.h +++ b/sys/sys/poll.h @@ -109,6 +109,10 @@ typedef __sigset_t sigset_t; #endif +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout); #if __BSD_VISIBLE From d0b7445904f592bf379d64932fb6f1fdc29c4aa7 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:11 -0500 Subject: [PATCH 036/151] include: ssp: fortify The immediately obvious and attractive targets from are arc4random_buf(3) and realpath(3) -- scraping the header didn't reveal much else of interest. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45681 --- include/ssp/Makefile | 2 +- include/ssp/stdlib.h | 53 +++ include/stdlib.h | 4 + lib/libc/gen/arc4random.c | 3 +- lib/libc/stdlib/realpath.c | 3 +- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_stdlib_test.c | 383 ++++++++++++++++++ .../tests/secure/generate-fortify-tests.lua | 20 + 8 files changed, 466 insertions(+), 3 deletions(-) create mode 100644 include/ssp/stdlib.h create mode 100644 lib/libc/tests/secure/fortify_stdlib_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index a97139e75c7b..2bbbc2eab705 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,4 +1,4 @@ -INCS= poll.h ssp.h stdio.h string.h strings.h unistd.h +INCS= poll.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h INCSDIR= ${INCLUDEDIR}/ssp .include diff --git a/include/ssp/stdlib.h b/include/ssp/stdlib.h new file mode 100644 index 000000000000..f595ecbcbc0a --- /dev/null +++ b/include/ssp/stdlib.h @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_STDLIB_H_ +#define _SSP_STDLIB_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +#include + +__BEGIN_DECLS + +__ssp_redirect(void, arc4random_buf, (void *__buf, size_t __len), + (__buf, __len)); + +__ssp_redirect_raw_impl(char *, realpath, realpath, + (const char *__restrict path, char *__restrict buf)) +{ + if (__ssp_bos(buf) < PATH_MAX) + __chk_fail(); + + return (__ssp_real(realpath)(path, buf)); +} + +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_STDLIB_H_ */ diff --git a/include/stdlib.h b/include/stdlib.h index db339688cb78..162031ab393d 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -69,6 +69,10 @@ typedef struct { */ #define RAND_MAX 0x7fffffff +#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS #ifdef _XLOCALE_H_ #include diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index fdb1688cfe9c..cc65e0131970 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -243,7 +244,7 @@ arc4random(void) } void -arc4random_buf(void *buf, size_t n) +__ssp_real(arc4random_buf)(void *buf, size_t n) { _ARC4_LOCK(); _rs_random_buf(buf, n); diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 992d14302fe0..554d70b43a29 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "un-namespace.h" #include "libc_private.h" @@ -203,7 +204,7 @@ realpath1(const char *path, char *resolved) } char * -realpath(const char * __restrict path, char * __restrict resolved) +__ssp_real(realpath)(const char * __restrict path, char * __restrict resolved) { char *m, *res; diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 2e98b5f2ed35..63fe4cb96f02 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -3,6 +3,7 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} FORTIFY_TCATS+= poll +FORTIFY_TCATS+= stdlib FORTIFY_TCATS+= stdio FORTIFY_TCATS+= string FORTIFY_TCATS+= strings diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c new file mode 100644 index 000000000000..e00983a58aa4 --- /dev/null +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -0,0 +1,383 @@ +/* @generated by `generate-fortify-tests.lua "stdlib"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(arc4random_buf_before_end); +ATF_TC_BODY(arc4random_buf_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + arc4random_buf(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(arc4random_buf_end); +ATF_TC_BODY(arc4random_buf_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + arc4random_buf(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(arc4random_buf_heap_before_end); +ATF_TC_BODY(arc4random_buf_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + arc4random_buf(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(arc4random_buf_heap_end); +ATF_TC_BODY(arc4random_buf_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + arc4random_buf(__stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(arc4random_buf_heap_after_end); +ATF_TC_BODY(arc4random_buf_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + arc4random_buf(__stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(realpath_before_end); +ATF_TC_BODY(realpath_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[PATH_MAX + 1]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = PATH_MAX + 1; + const size_t __idx __unused = __len - 1; + + realpath(".", __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(realpath_end); +ATF_TC_BODY(realpath_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[PATH_MAX]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = PATH_MAX; + const size_t __idx __unused = __len - 1; + + realpath(".", __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(realpath_heap_before_end); +ATF_TC_BODY(realpath_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (PATH_MAX + 1); + const size_t __len = PATH_MAX + 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + realpath(".", __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(realpath_heap_end); +ATF_TC_BODY(realpath_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (PATH_MAX); + const size_t __len = PATH_MAX; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + realpath(".", __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(realpath_heap_after_end); +ATF_TC_BODY(realpath_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (PATH_MAX - 1); + const size_t __len = PATH_MAX - 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + realpath(".", __stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, arc4random_buf_before_end); + ATF_TP_ADD_TC(tp, arc4random_buf_end); + ATF_TP_ADD_TC(tp, arc4random_buf_heap_before_end); + ATF_TP_ADD_TC(tp, arc4random_buf_heap_end); + ATF_TP_ADD_TC(tp, arc4random_buf_heap_after_end); + ATF_TP_ADD_TC(tp, realpath_before_end); + ATF_TP_ADD_TC(tp, realpath_end); + ATF_TP_ADD_TC(tp, realpath_heap_before_end); + ATF_TP_ADD_TC(tp, realpath_heap_end); + ATF_TP_ADD_TC(tp, realpath_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index bb654bbf2f71..b559fbded070 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -262,6 +262,26 @@ local all_tests = { ]], }, }, + stdlib = { + -- + { + func = "arc4random_buf", + arguments = { + "__buf", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "realpath", + bufsize = "PATH_MAX", + arguments = { + "\".\"", + "__buf", + }, + exclude = excludes_stack_overflow, + }, + }, string = { -- { From b53d7aa88fd5a5e8a67dd71ea7332fa473595d28 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:11 -0500 Subject: [PATCH 037/151] include: ssp: fortify This includes all of the w*() equivalents to str*()/mem*() implemented in more or less the same way. For these ones, we'll just use header-only implementations from the start to stop further cluttering the libc symbol table. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45682 --- include/ssp/Makefile | 2 +- include/ssp/wchar.h | 229 ++ include/wchar.h | 9 +- lib/libc/string/wcpcpy.c | 3 +- lib/libc/string/wcpncpy.c | 4 +- lib/libc/string/wcscat.c | 3 +- lib/libc/string/wcscpy.c | 3 +- lib/libc/string/wcslcat.c | 3 +- lib/libc/string/wcslcpy.c | 3 +- lib/libc/string/wcsncat.c | 4 +- lib/libc/string/wcsncpy.c | 4 +- lib/libc/string/wmemcpy.c | 4 +- lib/libc/string/wmemmove.c | 3 +- lib/libc/string/wmempcpy.c | 4 +- lib/libc/string/wmemset.c | 3 +- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_poll_test.c | 1 + lib/libc/tests/secure/fortify_stdio_test.c | 1 + lib/libc/tests/secure/fortify_stdlib_test.c | 1 + lib/libc/tests/secure/fortify_string_test.c | 1 + lib/libc/tests/secure/fortify_strings_test.c | 1 + lib/libc/tests/secure/fortify_unistd_test.c | 1 + lib/libc/tests/secure/fortify_wchar_test.c | 1895 +++++++++++++++++ .../tests/secure/generate-fortify-tests.lua | 150 ++ 24 files changed, 2319 insertions(+), 14 deletions(-) create mode 100644 include/ssp/wchar.h create mode 100644 lib/libc/tests/secure/fortify_wchar_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index 2bbbc2eab705..725d82ff10e5 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,4 +1,4 @@ -INCS= poll.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h +INCS= poll.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h wchar.h INCSDIR= ${INCLUDEDIR}/ssp .include diff --git a/include/ssp/wchar.h b/include/ssp/wchar.h new file mode 100644 index 000000000000..48fc56f9d243 --- /dev/null +++ b/include/ssp/wchar.h @@ -0,0 +1,229 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_WCHAR_H_ +#define _SSP_WCHAR_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +static inline int +__ssp_wchar_overlap(const void *leftp, const void *rightp, size_t len) +{ + + if (len > SIZE_MAX / sizeof(wchar_t)) + return (1); + return (__ssp_overlap(leftp, rightp, len * sizeof(wchar_t))); +} + +/* + * __ssp_wbos for w*() calls where the size parameters are in sizeof(wchar_t) + * units, so the result needs to be scaled appropriately. + */ +__ssp_inline size_t +__ssp_wbos(void *ptr) +{ + const size_t ptrsize = __ssp_bos(ptr); + + if (ptrsize == (size_t)-1) + return (ptrsize); + + return (ptrsize / sizeof(wchar_t)); +} + +__BEGIN_DECLS +__ssp_redirect_raw_impl(wchar_t *, wmemcpy, wmemcpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(src, buf, len)) + __chk_fail(); + + return (__ssp_real(wmemcpy)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wmempcpy, wmempcpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(src, buf, len)) + __chk_fail(); + + return (__ssp_real(wmempcpy)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wmemmove, wmemmove, + (wchar_t *buf, const wchar_t *src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + + return (__ssp_real(wmemmove)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wmemset, wmemset, + (wchar_t *buf, wchar_t c, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + return (__ssp_real(wmemset)(buf, c, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wcpcpy, wcpcpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src)) +{ + const size_t slen = __ssp_wbos(buf); + const size_t len = wcslen(src); + + if (len >= slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + (void)__ssp_real(wmemcpy)(buf, src, len + 1); + return (buf + len); +} + +__ssp_redirect_raw_impl(wchar_t *, wcpncpy, wcpncpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wcpncpy)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wcscat, wcscat, + (wchar_t *__restrict buf, const wchar_t *__restrict src)) +{ + size_t slen = __ssp_wbos(buf); + wchar_t *cp; + + cp = buf; + while (*cp != L'\0') { + cp++; + if (slen-- == 0) + __chk_fail(); + } + + while (*src != L'\0') { + if (slen-- == 0) + __chk_fail(); + *cp++ = *src++; + } + + if (slen-- == 0) + __chk_fail(); + *cp = '\0'; + return (buf); +} + +__ssp_redirect_raw_impl(wchar_t *, wcscpy, wcscpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src)) +{ + const size_t slen = __ssp_wbos(buf); + size_t len = wcslen(src) + 1; + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wmemcpy)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wcsncat, wcsncat, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len == 0) + return (buf); + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wcsncat)(buf, src, len)); +} + +__ssp_redirect_raw_impl(size_t, wcslcat, wcslcat, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wcslcat)(buf, src, len)); +} + +__ssp_redirect_raw_impl(wchar_t *, wcsncpy, wcsncpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wcsncpy)(buf, src, len)); +} + +__ssp_redirect_raw_impl(size_t, wcslcpy, wcslcpy, + (wchar_t *__restrict buf, const wchar_t *__restrict src, size_t len)) +{ + const size_t slen = __ssp_wbos(buf); + + if (len > slen) + __chk_fail(); + if (__ssp_wchar_overlap(buf, src, len)) + __chk_fail(); + + return (__ssp_real(wcslcpy)(buf, src, len)); +} +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_WCHAR_H_ */ diff --git a/include/wchar.h b/include/wchar.h index 2f23feec8792..e4b037c9b16f 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -108,6 +108,14 @@ typedef struct __sFILE FILE; #endif struct tm; +__BEGIN_DECLS +size_t wcslen(const wchar_t *) __pure; +__END_DECLS + +#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS wint_t btowc(int); wint_t fgetwc(FILE *); @@ -146,7 +154,6 @@ wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); size_t wcscspn(const wchar_t *, const wchar_t *) __pure; size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict); -size_t wcslen(const wchar_t *) __pure; wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); int wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure; diff --git a/lib/libc/string/wcpcpy.c b/lib/libc/string/wcpcpy.c index 2d377dab2777..2ae014b31d29 100644 --- a/lib/libc/string/wcpcpy.c +++ b/lib/libc/string/wcpcpy.c @@ -32,9 +32,10 @@ */ #include +#include wchar_t * -wcpcpy(wchar_t * __restrict to, const wchar_t * __restrict from) +__ssp_real(wcpcpy)(wchar_t * __restrict to, const wchar_t * __restrict from) { for (; (*to = *from); ++from, ++to); diff --git a/lib/libc/string/wcpncpy.c b/lib/libc/string/wcpncpy.c index 72c060842e26..e89facfeb642 100644 --- a/lib/libc/string/wcpncpy.c +++ b/lib/libc/string/wcpncpy.c @@ -27,9 +27,11 @@ */ #include +#include wchar_t * -wcpncpy(wchar_t * __restrict dst, const wchar_t * __restrict src, size_t n) +__ssp_real(wcpncpy)(wchar_t * __restrict dst, const wchar_t * __restrict src, + size_t n) { for (; n--; dst++, src++) { diff --git a/lib/libc/string/wcscat.c b/lib/libc/string/wcscat.c index 3599e562e9b4..98e088100a87 100644 --- a/lib/libc/string/wcscat.c +++ b/lib/libc/string/wcscat.c @@ -35,9 +35,10 @@ __RCSID("$NetBSD: wcscat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); #endif /* LIBC_SCCS and not lint */ #endif #include +#include wchar_t * -wcscat(wchar_t * __restrict s1, const wchar_t * __restrict s2) +__ssp_real(wcscat)(wchar_t * __restrict s1, const wchar_t * __restrict s2) { wchar_t *cp; diff --git a/lib/libc/string/wcscpy.c b/lib/libc/string/wcscpy.c index 622e4201f84b..d4aed8721bb8 100644 --- a/lib/libc/string/wcscpy.c +++ b/lib/libc/string/wcscpy.c @@ -35,9 +35,10 @@ __RCSID("$NetBSD: wcscpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); #endif /* LIBC_SCCS and not lint */ #endif #include +#include wchar_t * -wcscpy(wchar_t * __restrict s1, const wchar_t * __restrict s2) +__ssp_real(wcscpy)(wchar_t * __restrict s1, const wchar_t * __restrict s2) { wchar_t *cp; diff --git a/lib/libc/string/wcslcat.c b/lib/libc/string/wcslcat.c index 336947e3cd23..f74ce520b6a7 100644 --- a/lib/libc/string/wcslcat.c +++ b/lib/libc/string/wcslcat.c @@ -37,6 +37,7 @@ __RCSID("$NetBSD: wcslcat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); #endif #include #include +#include /* * Appends src to string dst of size siz (unlike wcsncat, siz is the @@ -46,7 +47,7 @@ __RCSID("$NetBSD: wcslcat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); * truncation occurred. */ size_t -wcslcat(wchar_t *dst, const wchar_t *src, size_t siz) +__ssp_real(wcslcat)(wchar_t *dst, const wchar_t *src, size_t siz) { wchar_t *d = dst; const wchar_t *s = src; diff --git a/lib/libc/string/wcslcpy.c b/lib/libc/string/wcslcpy.c index 920425bb5efc..82269656b985 100644 --- a/lib/libc/string/wcslcpy.c +++ b/lib/libc/string/wcslcpy.c @@ -37,6 +37,7 @@ __RCSID("$NetBSD: wcslcpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); #endif #include #include +#include /* * Copy src to string dst of size siz. At most siz-1 characters @@ -44,7 +45,7 @@ __RCSID("$NetBSD: wcslcpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); * Returns wcslen(src); if retval >= siz, truncation occurred. */ size_t -wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz) +__ssp_real(wcslcpy)(wchar_t *dst, const wchar_t *src, size_t siz) { wchar_t *d = dst; const wchar_t *s = src; diff --git a/lib/libc/string/wcsncat.c b/lib/libc/string/wcsncat.c index 004391423f53..5b36fd40bb4f 100644 --- a/lib/libc/string/wcsncat.c +++ b/lib/libc/string/wcsncat.c @@ -35,9 +35,11 @@ __RCSID("$NetBSD: wcsncat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $"); #endif /* LIBC_SCCS and not lint */ #endif #include +#include wchar_t * -wcsncat(wchar_t * __restrict s1, const wchar_t * __restrict s2, size_t n) +__ssp_real(wcsncat)(wchar_t * __restrict s1, const wchar_t * __restrict s2, + size_t n) { wchar_t *p; wchar_t *q; diff --git a/lib/libc/string/wcsncpy.c b/lib/libc/string/wcsncpy.c index a02a8292c0d1..2491dadadfa4 100644 --- a/lib/libc/string/wcsncpy.c +++ b/lib/libc/string/wcsncpy.c @@ -33,13 +33,15 @@ */ #include +#include /* * Copy src to dst, truncating or null-padding to always copy n bytes. * Return dst. */ wchar_t * -wcsncpy(wchar_t * __restrict dst, const wchar_t * __restrict src, size_t n) +__ssp_real(wcsncpy)(wchar_t * __restrict dst, const wchar_t * __restrict src, + size_t n) { if (n != 0) { wchar_t *d = dst; diff --git a/lib/libc/string/wmemcpy.c b/lib/libc/string/wmemcpy.c index f692a25fc95b..9db16fe77a69 100644 --- a/lib/libc/string/wmemcpy.c +++ b/lib/libc/string/wmemcpy.c @@ -36,9 +36,11 @@ __RCSID("$NetBSD: wmemcpy.c,v 1.1 2000/12/23 23:14:37 itojun Exp $"); #endif #include #include +#include wchar_t * -wmemcpy(wchar_t * __restrict d, const wchar_t * __restrict s, size_t n) +__ssp_real(wmemcpy)(wchar_t * __restrict d, const wchar_t * __restrict s, + size_t n) { return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t)); } diff --git a/lib/libc/string/wmemmove.c b/lib/libc/string/wmemmove.c index cbbdb4afdd6c..837dbe12dc7a 100644 --- a/lib/libc/string/wmemmove.c +++ b/lib/libc/string/wmemmove.c @@ -36,9 +36,10 @@ __RCSID("$NetBSD: wmemmove.c,v 1.1 2000/12/23 23:14:37 itojun Exp $"); #endif #include #include +#include wchar_t * -wmemmove(wchar_t *d, const wchar_t *s, size_t n) +__ssp_real(wmemmove)(wchar_t *d, const wchar_t *s, size_t n) { return (wchar_t *)memmove(d, s, n * sizeof(wchar_t)); } diff --git a/lib/libc/string/wmempcpy.c b/lib/libc/string/wmempcpy.c index 6551787abf65..152bb76c7e80 100644 --- a/lib/libc/string/wmempcpy.c +++ b/lib/libc/string/wmempcpy.c @@ -30,9 +30,11 @@ #include #include +#include wchar_t * -wmempcpy(wchar_t *__restrict dst, const wchar_t *__restrict src, size_t len) +__ssp_real(wmempcpy)(wchar_t *__restrict dst, const wchar_t *__restrict src, + size_t len) { return (wmemcpy(dst, src, len) + len); } diff --git a/lib/libc/string/wmemset.c b/lib/libc/string/wmemset.c index 4276373399f9..60fb14b6a4af 100644 --- a/lib/libc/string/wmemset.c +++ b/lib/libc/string/wmemset.c @@ -35,9 +35,10 @@ __RCSID("$NetBSD: wmemset.c,v 1.1 2000/12/23 23:14:37 itojun Exp $"); #endif /* LIBC_SCCS and not lint */ #endif #include +#include wchar_t * -wmemset(wchar_t *s, wchar_t c, size_t n) +__ssp_real(wmemset)(wchar_t *s, wchar_t c, size_t n) { size_t i; wchar_t *p; diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 63fe4cb96f02..27d29eabe689 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -8,6 +8,7 @@ FORTIFY_TCATS+= stdio FORTIFY_TCATS+= string FORTIFY_TCATS+= strings FORTIFY_TCATS+= unistd +FORTIFY_TCATS+= wchar # Manually run after updating the test generator. generate-tests: .PHONY diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c index 9d9cb4ace35a..447ff400dc05 100644 --- a/lib/libc/tests/secure/fortify_poll_test.c +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index 035d84b316e6..f399a32f3ca2 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c index e00983a58aa4..87e6b4b86302 100644 --- a/lib/libc/tests/secure/fortify_stdlib_test.c +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 5651d3107e91..0ba1cf0160b4 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index 28f5e9ec4940..a476564f1596 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index dddc23596368..cfd9267d0d79 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static FILE * __unused diff --git a/lib/libc/tests/secure/fortify_wchar_test.c b/lib/libc/tests/secure/fortify_wchar_test.c new file mode 100644 index 000000000000..f02e4045c8f2 --- /dev/null +++ b/lib/libc/tests/secure/fortify_wchar_test.c @@ -0,0 +1,1895 @@ +/* @generated by `generate-fortify-tests.lua "wchar"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(wmemcpy_before_end); +ATF_TC_BODY(wmemcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmemcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemcpy_end); +ATF_TC_BODY(wmemcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmemcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemcpy_heap_before_end); +ATF_TC_BODY(wmemcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmemcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemcpy_heap_end); +ATF_TC_BODY(wmemcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmemcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemcpy_heap_after_end); +ATF_TC_BODY(wmemcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + wmemcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmempcpy_before_end); +ATF_TC_BODY(wmempcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmempcpy_end); +ATF_TC_BODY(wmempcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmempcpy_heap_before_end); +ATF_TC_BODY(wmempcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmempcpy_heap_end); +ATF_TC_BODY(wmempcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmempcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmempcpy_heap_after_end); +ATF_TC_BODY(wmempcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + wmempcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemmove_before_end); +ATF_TC_BODY(wmemmove_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmemmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemmove_end); +ATF_TC_BODY(wmemmove_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + wmemmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemmove_heap_before_end); +ATF_TC_BODY(wmemmove_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmemmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemmove_heap_end); +ATF_TC_BODY(wmemmove_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len + 10]; + + __stack.__buf = malloc(__bufsz); + + wmemmove(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemmove_heap_after_end); +ATF_TC_BODY(wmemmove_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len + 10]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + wmemmove(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemset_before_end); +ATF_TC_BODY(wmemset_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + wmemset(__stack.__buf, L'0', __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemset_end); +ATF_TC_BODY(wmemset_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + wmemset(__stack.__buf, L'0', __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemset_heap_before_end); +ATF_TC_BODY(wmemset_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + wmemset(__stack.__buf, L'0', __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemset_heap_end); +ATF_TC_BODY(wmemset_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + wmemset(__stack.__buf, L'0', __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wmemset_heap_after_end); +ATF_TC_BODY(wmemset_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + wmemset(__stack.__buf, L'0', __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpcpy_before_end); +ATF_TC_BODY(wcpcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpcpy_end); +ATF_TC_BODY(wcpcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpcpy_heap_before_end); +ATF_TC_BODY(wcpcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpcpy_heap_end); +ATF_TC_BODY(wcpcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpcpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpcpy_heap_after_end); +ATF_TC_BODY(wcpcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpcpy(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpncpy_before_end); +ATF_TC_BODY(wcpncpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpncpy_end); +ATF_TC_BODY(wcpncpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpncpy_heap_before_end); +ATF_TC_BODY(wcpncpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpncpy_heap_end); +ATF_TC_BODY(wcpncpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcpncpy_heap_after_end); +ATF_TC_BODY(wcpncpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcpncpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscat_before_end); +ATF_TC_BODY(wcscat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscat_end); +ATF_TC_BODY(wcscat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscat_heap_before_end); +ATF_TC_BODY(wcscat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscat_heap_end); +ATF_TC_BODY(wcscat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscat(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscat_heap_after_end); +ATF_TC_BODY(wcscat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscat(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcat_before_end); +ATF_TC_BODY(wcslcat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcat_end); +ATF_TC_BODY(wcslcat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcat_heap_before_end); +ATF_TC_BODY(wcslcat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcat_heap_end); +ATF_TC_BODY(wcslcat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcat_heap_after_end); +ATF_TC_BODY(wcslcat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcat(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncat_before_end); +ATF_TC_BODY(wcsncat_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncat_end); +ATF_TC_BODY(wcsncat_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncat_heap_before_end); +ATF_TC_BODY(wcsncat_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncat_heap_end); +ATF_TC_BODY(wcsncat_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncat(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncat_heap_after_end); +ATF_TC_BODY(wcsncat_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncat(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscpy_before_end); +ATF_TC_BODY(wcscpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscpy_end); +ATF_TC_BODY(wcscpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscpy_heap_before_end); +ATF_TC_BODY(wcscpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscpy_heap_end); +ATF_TC_BODY(wcscpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscpy(__stack.__buf, src); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcscpy_heap_after_end); +ATF_TC_BODY(wcscpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcscpy(__stack.__buf, src); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcpy_before_end); +ATF_TC_BODY(wcslcpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcpy_end); +ATF_TC_BODY(wcslcpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcpy_heap_before_end); +ATF_TC_BODY(wcslcpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcpy_heap_end); +ATF_TC_BODY(wcslcpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcslcpy_heap_after_end); +ATF_TC_BODY(wcslcpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcslcpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncpy_before_end); +ATF_TC_BODY(wcsncpy_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncpy_end); +ATF_TC_BODY(wcsncpy_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + wchar_t __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncpy_heap_before_end); +ATF_TC_BODY(wcsncpy_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncpy_heap_end); +ATF_TC_BODY(wcsncpy_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + wchar_t src[__len]; + + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncpy(__stack.__buf, src, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(wcsncpy_heap_after_end); +ATF_TC_BODY(wcsncpy_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + wchar_t * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + wchar_t src[__len]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; + + wcsncpy(__stack.__buf, src, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, wmemcpy_before_end); + ATF_TP_ADD_TC(tp, wmemcpy_end); + ATF_TP_ADD_TC(tp, wmemcpy_heap_before_end); + ATF_TP_ADD_TC(tp, wmemcpy_heap_end); + ATF_TP_ADD_TC(tp, wmemcpy_heap_after_end); + ATF_TP_ADD_TC(tp, wmempcpy_before_end); + ATF_TP_ADD_TC(tp, wmempcpy_end); + ATF_TP_ADD_TC(tp, wmempcpy_heap_before_end); + ATF_TP_ADD_TC(tp, wmempcpy_heap_end); + ATF_TP_ADD_TC(tp, wmempcpy_heap_after_end); + ATF_TP_ADD_TC(tp, wmemmove_before_end); + ATF_TP_ADD_TC(tp, wmemmove_end); + ATF_TP_ADD_TC(tp, wmemmove_heap_before_end); + ATF_TP_ADD_TC(tp, wmemmove_heap_end); + ATF_TP_ADD_TC(tp, wmemmove_heap_after_end); + ATF_TP_ADD_TC(tp, wmemset_before_end); + ATF_TP_ADD_TC(tp, wmemset_end); + ATF_TP_ADD_TC(tp, wmemset_heap_before_end); + ATF_TP_ADD_TC(tp, wmemset_heap_end); + ATF_TP_ADD_TC(tp, wmemset_heap_after_end); + ATF_TP_ADD_TC(tp, wcpcpy_before_end); + ATF_TP_ADD_TC(tp, wcpcpy_end); + ATF_TP_ADD_TC(tp, wcpcpy_heap_before_end); + ATF_TP_ADD_TC(tp, wcpcpy_heap_end); + ATF_TP_ADD_TC(tp, wcpcpy_heap_after_end); + ATF_TP_ADD_TC(tp, wcpncpy_before_end); + ATF_TP_ADD_TC(tp, wcpncpy_end); + ATF_TP_ADD_TC(tp, wcpncpy_heap_before_end); + ATF_TP_ADD_TC(tp, wcpncpy_heap_end); + ATF_TP_ADD_TC(tp, wcpncpy_heap_after_end); + ATF_TP_ADD_TC(tp, wcscat_before_end); + ATF_TP_ADD_TC(tp, wcscat_end); + ATF_TP_ADD_TC(tp, wcscat_heap_before_end); + ATF_TP_ADD_TC(tp, wcscat_heap_end); + ATF_TP_ADD_TC(tp, wcscat_heap_after_end); + ATF_TP_ADD_TC(tp, wcslcat_before_end); + ATF_TP_ADD_TC(tp, wcslcat_end); + ATF_TP_ADD_TC(tp, wcslcat_heap_before_end); + ATF_TP_ADD_TC(tp, wcslcat_heap_end); + ATF_TP_ADD_TC(tp, wcslcat_heap_after_end); + ATF_TP_ADD_TC(tp, wcsncat_before_end); + ATF_TP_ADD_TC(tp, wcsncat_end); + ATF_TP_ADD_TC(tp, wcsncat_heap_before_end); + ATF_TP_ADD_TC(tp, wcsncat_heap_end); + ATF_TP_ADD_TC(tp, wcsncat_heap_after_end); + ATF_TP_ADD_TC(tp, wcscpy_before_end); + ATF_TP_ADD_TC(tp, wcscpy_end); + ATF_TP_ADD_TC(tp, wcscpy_heap_before_end); + ATF_TP_ADD_TC(tp, wcscpy_heap_end); + ATF_TP_ADD_TC(tp, wcscpy_heap_after_end); + ATF_TP_ADD_TC(tp, wcslcpy_before_end); + ATF_TP_ADD_TC(tp, wcslcpy_end); + ATF_TP_ADD_TC(tp, wcslcpy_heap_before_end); + ATF_TP_ADD_TC(tp, wcslcpy_heap_end); + ATF_TP_ADD_TC(tp, wcslcpy_heap_after_end); + ATF_TP_ADD_TC(tp, wcsncpy_before_end); + ATF_TP_ADD_TC(tp, wcsncpy_end); + ATF_TP_ADD_TC(tp, wcsncpy_heap_before_end); + ATF_TP_ADD_TC(tp, wcsncpy_heap_end); + ATF_TP_ADD_TC(tp, wcsncpy_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index b559fbded070..1807cbf477e9 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -77,6 +77,7 @@ local includes = { "strings.h", "sysexits.h", "unistd.h", + "wchar.h", "atf-c.h", } @@ -114,6 +115,13 @@ local string_init = [[ src[__len - 1] = '\0'; ]] +local wstring_stackvars = "\twchar_t src[__len];\n" +local wstring_init = [[ + wmemset(__stack.__buf, 0, __len); + wmemset(src, 'A', __len - 1); + src[__len - 1] = '\0'; +]] + -- Each test entry describes how to test a given function. We need to know how -- to construct the buffer, we need to know the argument set we're dealing with, -- and we need to know what we're passing to each argument. We could be passing @@ -606,6 +614,148 @@ local all_tests = { ]] }, }, + wchar = { + -- + { + func = "wmemcpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\twchar_t src[__len + 10];\n", + }, + { + func = "wmempcpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\twchar_t src[__len + 10];\n", + }, + { + func = "wmemmove", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = "\twchar_t src[__len + 10];\n", + }, + { + func = "wmemset", + buftype = "wchar_t[]", + arguments = { + "__buf", + "L'0'", + "__len", + }, + exclude = excludes_stack_overflow, + }, + { + func = "wcpcpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + uses_len = true, + }, + { + func = "wcpncpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + }, + { + func = "wcscat", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + uses_len = true, + }, + { + func = "wcslcat", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + }, + { + func = "wcsncat", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + }, + { + func = "wcscpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + uses_len = true, + }, + { + func = "wcslcpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + }, + { + func = "wcsncpy", + buftype = "wchar_t[]", + arguments = { + "__buf", + "src", + "__len", + }, + exclude = excludes_stack_overflow, + stackvars = wstring_stackvars, + init = wstring_init, + }, + }, } local function write_test_boilerplate(fh, name, body) From 062d9380b98663eb2a4a3d7ce9e919e743984060 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:11 -0500 Subject: [PATCH 038/151] include: ssp: fortify That is to say, fortify getrandom(2). Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45683 --- include/ssp/Makefile | 3 +- include/ssp/random.h | 42 +++ lib/libc/tests/secure/Makefile | 4 + lib/libc/tests/secure/fortify_poll_test.c | 1 + lib/libc/tests/secure/fortify_random_test.c | 253 ++++++++++++++++++ lib/libc/tests/secure/fortify_stdio_test.c | 1 + lib/libc/tests/secure/fortify_stdlib_test.c | 1 + lib/libc/tests/secure/fortify_string_test.c | 1 + lib/libc/tests/secure/fortify_strings_test.c | 1 + lib/libc/tests/secure/fortify_unistd_test.c | 1 + lib/libc/tests/secure/fortify_wchar_test.c | 1 + .../tests/secure/generate-fortify-tests.lua | 13 + sys/sys/random.h | 4 + 13 files changed, 325 insertions(+), 1 deletion(-) create mode 100644 include/ssp/random.h create mode 100644 lib/libc/tests/secure/fortify_random_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index 725d82ff10e5..d6e0e0698e36 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,4 +1,5 @@ -INCS= poll.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h wchar.h +INCS= poll.h random.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h +INCS+= wchar.h INCSDIR= ${INCLUDEDIR}/ssp .include diff --git a/include/ssp/random.h b/include/ssp/random.h new file mode 100644 index 000000000000..9f98ad2315a1 --- /dev/null +++ b/include/ssp/random.h @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_RANDOM_H_ +#define _SSP_RANDOM_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +__BEGIN_DECLS + +__ssp_redirect(ssize_t, getrandom, (void *__buf, size_t __len, + unsigned int __flags), (__buf, __len, __flags)); + +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_RANDOM_H_ */ diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 27d29eabe689..87c491d9cf2f 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -2,6 +2,10 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} +# sys/ headers +FORTIFY_TCATS+= random + +# non-sys/ headers FORTIFY_TCATS+= poll FORTIFY_TCATS+= stdlib FORTIFY_TCATS+= stdio diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c index 447ff400dc05..2723052ac501 100644 --- a/lib/libc/tests/secure/fortify_poll_test.c +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_random_test.c b/lib/libc/tests/secure/fortify_random_test.c new file mode 100644 index 000000000000..b89410a702d0 --- /dev/null +++ b/lib/libc/tests/secure/fortify_random_test.c @@ -0,0 +1,253 @@ +/* @generated by `generate-fortify-tests.lua "random"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(getrandom_before_end); +ATF_TC_BODY(getrandom_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + getrandom(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getrandom_end); +ATF_TC_BODY(getrandom_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + getrandom(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getrandom_heap_before_end); +ATF_TC_BODY(getrandom_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getrandom(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getrandom_heap_end); +ATF_TC_BODY(getrandom_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + getrandom(__stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getrandom_heap_after_end); +ATF_TC_BODY(getrandom_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + getrandom(__stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, getrandom_before_end); + ATF_TP_ADD_TC(tp, getrandom_end); + ATF_TP_ADD_TC(tp, getrandom_heap_before_end); + ATF_TP_ADD_TC(tp, getrandom_heap_end); + ATF_TP_ADD_TC(tp, getrandom_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index f399a32f3ca2..a19bfebba1bb 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c index 87e6b4b86302..47f4157b5a01 100644 --- a/lib/libc/tests/secure/fortify_stdlib_test.c +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 0ba1cf0160b4..6a4f08705602 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index a476564f1596..ec6340e77f74 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index cfd9267d0d79..fa478955283e 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_wchar_test.c b/lib/libc/tests/secure/fortify_wchar_test.c index f02e4045c8f2..cd09e5dac93c 100644 --- a/lib/libc/tests/secure/fortify_wchar_test.c +++ b/lib/libc/tests/secure/fortify_wchar_test.c @@ -4,6 +4,7 @@ #define TMPFILE_SIZE (1024 * 32) #include +#include #include #include #include diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index 1807cbf477e9..259c9a7825d9 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -62,6 +62,7 @@ local includes = { "sys/param.h", + "sys/random.h", "sys/resource.h", "sys/time.h", "sys/wait.h", @@ -147,6 +148,18 @@ local wstring_init = [[ -- circumstances it's useful to use a different type (e.g., for alignment -- requirements). local all_tests = { + random = { + -- + { + func = "getrandom", + arguments = { + "__buf", + "__len", + "0", + }, + exclude = excludes_stack_overflow, + }, + }, poll = { -- { diff --git a/sys/sys/random.h b/sys/sys/random.h index aa4457fc8c22..31071d356714 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -161,6 +161,10 @@ void random_harvest_deregister_source(enum random_entropy_source); #define GRND_RANDOM 0x2 #define GRND_INSECURE 0x4 +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); __END_DECLS From 1ace24b30cad59c8ae509d0c690aa55b8df73136 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:12 -0500 Subject: [PATCH 039/151] include: ssp: fortify Check both the buffer size of the iov object itself, as well as that of each indidvidually io base. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45684 --- include/ssp/Makefile | 2 +- include/ssp/ssp.h | 16 + include/ssp/uio.h | 53 ++ lib/libc/sys/readv.c | 3 +- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_poll_test.c | 1 + lib/libc/tests/secure/fortify_random_test.c | 1 + lib/libc/tests/secure/fortify_stdio_test.c | 1 + lib/libc/tests/secure/fortify_stdlib_test.c | 1 + lib/libc/tests/secure/fortify_string_test.c | 1 + lib/libc/tests/secure/fortify_strings_test.c | 1 + lib/libc/tests/secure/fortify_uio_test.c | 804 ++++++++++++++++++ lib/libc/tests/secure/fortify_unistd_test.c | 1 + lib/libc/tests/secure/fortify_wchar_test.c | 1 + .../tests/secure/generate-fortify-tests.lua | 60 ++ sys/sys/uio.h | 4 + 16 files changed, 949 insertions(+), 2 deletions(-) create mode 100644 include/ssp/uio.h create mode 100644 lib/libc/tests/secure/fortify_uio_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index d6e0e0698e36..e6c5a1e6c15e 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,4 +1,4 @@ -INCS= poll.h random.h ssp.h stdio.h stdlib.h string.h strings.h unistd.h +INCS= poll.h random.h ssp.h stdio.h stdlib.h string.h strings.h uio.h unistd.h INCS+= wchar.h INCSDIR= ${INCLUDEDIR}/ssp diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index 6ebc23288391..bdc14137d45b 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -101,9 +101,25 @@ __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) return (SIZE_MAX - sz < right || left < right + sz); } +#include + __BEGIN_DECLS void __stack_chk_fail(void) __dead2; void __chk_fail(void) __dead2; __END_DECLS +__ssp_inline void +__ssp_check_iovec(const struct iovec *iov, int iovcnt) +{ + const size_t iovsz = __ssp_bos(iov); + + if (iovsz != (size_t)-1 && iovsz / sizeof(*iov) < (size_t)iovcnt) + __chk_fail(); + + for (int i = 0; i < iovcnt; i++) { + if (__ssp_bos(iov[i].iov_base) < iov[i].iov_len) + __chk_fail(); + } +} + #endif /* _SSP_SSP_H_ */ diff --git a/include/ssp/uio.h b/include/ssp/uio.h new file mode 100644 index 000000000000..adf1dcbb3d67 --- /dev/null +++ b/include/ssp/uio.h @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_UIO_H_ +#define _SSP_UIO_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +__BEGIN_DECLS + +__ssp_redirect_raw_impl(ssize_t, readv, readv, + (int fd, const struct iovec *iov, int iovcnt)) +{ + __ssp_check_iovec(iov, iovcnt); + return (__ssp_real(readv)(fd, iov, iovcnt)); +} + +__ssp_redirect_raw_impl(ssize_t, preadv, preadv, + (int fd, const struct iovec *iov, int iovcnt, off_t offset)) +{ + __ssp_check_iovec(iov, iovcnt); + return (__ssp_real(preadv)(fd, iov, iovcnt, offset)); +} + +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_UIO_H_ */ diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index 78a529254fa0..d58dba1fc47e 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -33,13 +33,14 @@ #include #include #include +#include #include "libc_private.h" __weak_reference(__sys_readv, __readv); #pragma weak readv ssize_t -readv(int fd, const struct iovec *iov, int iovcnt) +__ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt) { return (INTERPOS_SYS(readv, fd, iov, iovcnt)); } diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 87c491d9cf2f..7aa9212b97a8 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -4,6 +4,7 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} # sys/ headers FORTIFY_TCATS+= random +FORTIFY_TCATS+= uio # non-sys/ headers FORTIFY_TCATS+= poll diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c index 2723052ac501..83c0f68b0daa 100644 --- a/lib/libc/tests/secure/fortify_poll_test.c +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_random_test.c b/lib/libc/tests/secure/fortify_random_test.c index b89410a702d0..1eb18cfcaaf4 100644 --- a/lib/libc/tests/secure/fortify_random_test.c +++ b/lib/libc/tests/secure/fortify_random_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index a19bfebba1bb..75f81c0a0750 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c index 47f4157b5a01..8556e1110156 100644 --- a/lib/libc/tests/secure/fortify_stdlib_test.c +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 6a4f08705602..70f247b09e39 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index ec6340e77f74..e6a8ea0291de 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_uio_test.c b/lib/libc/tests/secure/fortify_uio_test.c new file mode 100644 index 000000000000..56d7cf5d9a84 --- /dev/null +++ b/lib/libc/tests/secure/fortify_uio_test.c @@ -0,0 +1,804 @@ +/* @generated by `generate-fortify-tests.lua "uio"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(readv_before_end); +ATF_TC_BODY(readv_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + + readv(STDIN_FILENO, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_end); +ATF_TC_BODY(readv_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + + readv(STDIN_FILENO, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_after_end); +ATF_TC_BODY(readv_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + readv(STDIN_FILENO, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_heap_before_end); +ATF_TC_BODY(readv_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + readv(STDIN_FILENO, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_heap_end); +ATF_TC_BODY(readv_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + readv(STDIN_FILENO, __stack.__buf, __len); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_heap_after_end); +ATF_TC_BODY(readv_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + readv(STDIN_FILENO, __stack.__buf, __len); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_iov_before_end); +ATF_TC_BODY(readv_iov_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + readv(STDIN_FILENO, iov, nitems(iov)); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_iov_end); +ATF_TC_BODY(readv_iov_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + readv(STDIN_FILENO, iov, nitems(iov)); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_iov_heap_before_end); +ATF_TC_BODY(readv_iov_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + readv(STDIN_FILENO, iov, nitems(iov)); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_iov_heap_end); +ATF_TC_BODY(readv_iov_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + readv(STDIN_FILENO, iov, nitems(iov)); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(readv_iov_heap_after_end); +ATF_TC_BODY(readv_iov_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + struct iovec iov[1]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + readv(STDIN_FILENO, iov, nitems(iov)); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_before_end); +ATF_TC_BODY(preadv_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + + preadv(STDIN_FILENO, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_end); +ATF_TC_BODY(preadv_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + + preadv(STDIN_FILENO, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_after_end); +ATF_TC_BODY(preadv_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct iovec __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + preadv(STDIN_FILENO, __stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_heap_before_end); +ATF_TC_BODY(preadv_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + preadv(STDIN_FILENO, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_heap_end); +ATF_TC_BODY(preadv_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + preadv(STDIN_FILENO, __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_heap_after_end); +ATF_TC_BODY(preadv_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct iovec * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + preadv(STDIN_FILENO, __stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_iov_before_end); +ATF_TC_BODY(preadv_iov_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + preadv(STDIN_FILENO, iov, nitems(iov), 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_iov_end); +ATF_TC_BODY(preadv_iov_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + preadv(STDIN_FILENO, iov, nitems(iov), 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_iov_heap_before_end); +ATF_TC_BODY(preadv_iov_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + preadv(STDIN_FILENO, iov, nitems(iov), 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_iov_heap_end); +ATF_TC_BODY(preadv_iov_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + struct iovec iov[1]; + + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + preadv(STDIN_FILENO, iov, nitems(iov), 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(preadv_iov_heap_after_end); +ATF_TC_BODY(preadv_iov_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + struct iovec iov[1]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); + + preadv(STDIN_FILENO, iov, nitems(iov), 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, readv_before_end); + ATF_TP_ADD_TC(tp, readv_end); + ATF_TP_ADD_TC(tp, readv_after_end); + ATF_TP_ADD_TC(tp, readv_heap_before_end); + ATF_TP_ADD_TC(tp, readv_heap_end); + ATF_TP_ADD_TC(tp, readv_heap_after_end); + ATF_TP_ADD_TC(tp, readv_iov_before_end); + ATF_TP_ADD_TC(tp, readv_iov_end); + ATF_TP_ADD_TC(tp, readv_iov_heap_before_end); + ATF_TP_ADD_TC(tp, readv_iov_heap_end); + ATF_TP_ADD_TC(tp, readv_iov_heap_after_end); + ATF_TP_ADD_TC(tp, preadv_before_end); + ATF_TP_ADD_TC(tp, preadv_end); + ATF_TP_ADD_TC(tp, preadv_after_end); + ATF_TP_ADD_TC(tp, preadv_heap_before_end); + ATF_TP_ADD_TC(tp, preadv_heap_end); + ATF_TP_ADD_TC(tp, preadv_heap_after_end); + ATF_TP_ADD_TC(tp, preadv_iov_before_end); + ATF_TP_ADD_TC(tp, preadv_iov_end); + ATF_TP_ADD_TC(tp, preadv_iov_heap_before_end); + ATF_TP_ADD_TC(tp, preadv_iov_heap_end); + ATF_TP_ADD_TC(tp, preadv_iov_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index fa478955283e..7a91d3b06c75 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_wchar_test.c b/lib/libc/tests/secure/fortify_wchar_test.c index cd09e5dac93c..8c5e0782c65a 100644 --- a/lib/libc/tests/secure/fortify_wchar_test.c +++ b/lib/libc/tests/secure/fortify_wchar_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index 259c9a7825d9..23b33acb757b 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -65,6 +65,7 @@ local includes = { "sys/random.h", "sys/resource.h", "sys/time.h", + "sys/uio.h", "sys/wait.h", "dirent.h", "errno.h", @@ -105,6 +106,14 @@ local printf_init = [[ srcvar[sizeof(srcvar) - 1] = '\0'; ]] +local readv_stackvars = "\tstruct iovec iov[1];\n" +local readv_init = [[ + iov[0].iov_base = __stack.__buf; + iov[0].iov_len = __len; + + replace_stdin(); +]] + local stdio_init = [[ replace_stdin(); ]] @@ -160,6 +169,57 @@ local all_tests = { exclude = excludes_stack_overflow, }, }, + uio = { + -- + { + func = "readv", + buftype = "struct iovec[]", + bufsize = 2, + arguments = { + "STDIN_FILENO", + "__buf", + "__len", + }, + }, + { + func = "readv", + variant = "iov", + arguments = { + "STDIN_FILENO", + "iov", + "nitems(iov)", + }, + exclude = excludes_stack_overflow, + stackvars = readv_stackvars, + init = readv_init, + uses_len = true, + }, + { + func = "preadv", + buftype = "struct iovec[]", + bufsize = 2, + arguments = { + "STDIN_FILENO", + "__buf", + "__len", + "0", + }, + }, + { + func = "preadv", + variant = "iov", + arguments = { + "STDIN_FILENO", + "iov", + "nitems(iov)", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = readv_stackvars, + init = readv_init, + uses_len = true, + }, + }, poll = { -- { diff --git a/sys/sys/uio.h b/sys/sys/uio.h index 42ab0cda8e38..1c9d2d39cf57 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -99,6 +99,10 @@ int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio); #else /* !_KERNEL */ +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + __BEGIN_DECLS ssize_t readv(int, const struct iovec *, int); ssize_t writev(int, const struct iovec *, int); From 2aba0eea3ffffce74f9d8df20e0aaf49ea6d76c3 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:12 -0500 Subject: [PATCH 040/151] include: ssp: fortify Notably sanity check indices passed to the FD_*() macros against the size of the fd_set itself. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45685 --- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_poll_test.c | 1 + lib/libc/tests/secure/fortify_random_test.c | 1 + lib/libc/tests/secure/fortify_select_test.c | 669 ++++++++++++++++++ lib/libc/tests/secure/fortify_stdio_test.c | 1 + lib/libc/tests/secure/fortify_stdlib_test.c | 1 + lib/libc/tests/secure/fortify_string_test.c | 1 + lib/libc/tests/secure/fortify_strings_test.c | 1 + lib/libc/tests/secure/fortify_uio_test.c | 1 + lib/libc/tests/secure/fortify_unistd_test.c | 1 + lib/libc/tests/secure/fortify_wchar_test.c | 1 + .../tests/secure/generate-fortify-tests.lua | 31 + sys/sys/select.h | 32 +- 13 files changed, 739 insertions(+), 3 deletions(-) create mode 100644 lib/libc/tests/secure/fortify_select_test.c diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 7aa9212b97a8..996536beac91 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -4,6 +4,7 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} # sys/ headers FORTIFY_TCATS+= random +FORTIFY_TCATS+= select FORTIFY_TCATS+= uio # non-sys/ headers diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c index 83c0f68b0daa..47648fe54b47 100644 --- a/lib/libc/tests/secure/fortify_poll_test.c +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_random_test.c b/lib/libc/tests/secure/fortify_random_test.c index 1eb18cfcaaf4..64c32c6c6a8f 100644 --- a/lib/libc/tests/secure/fortify_random_test.c +++ b/lib/libc/tests/secure/fortify_random_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_select_test.c b/lib/libc/tests/secure/fortify_select_test.c new file mode 100644 index 000000000000..ccd3f97004fc --- /dev/null +++ b/lib/libc/tests/secure/fortify_select_test.c @@ -0,0 +1,669 @@ +/* @generated by `generate-fortify-tests.lua "select"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(FD_SET_before_end); +ATF_TC_BODY(FD_SET_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + FD_SET(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_SET_end); +ATF_TC_BODY(FD_SET_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + FD_SET(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_SET_after_end); +ATF_TC_BODY(FD_SET_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + FD_SET(__idx, &__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_SET_heap_before_end); +ATF_TC_BODY(FD_SET_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_SET(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_SET_heap_end); +ATF_TC_BODY(FD_SET_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_SET(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_SET_heap_after_end); +ATF_TC_BODY(FD_SET_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + FD_SET(__idx, __stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_before_end); +ATF_TC_BODY(FD_CLR_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + FD_CLR(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_end); +ATF_TC_BODY(FD_CLR_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + FD_CLR(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_after_end); +ATF_TC_BODY(FD_CLR_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + FD_CLR(__idx, &__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_heap_before_end); +ATF_TC_BODY(FD_CLR_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_CLR(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_heap_end); +ATF_TC_BODY(FD_CLR_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_CLR(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_CLR_heap_after_end); +ATF_TC_BODY(FD_CLR_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + FD_CLR(__idx, __stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_before_end); +ATF_TC_BODY(FD_ISSET_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + FD_ISSET(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_end); +ATF_TC_BODY(FD_ISSET_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + FD_ISSET(__idx, &__stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_after_end); +ATF_TC_BODY(FD_ISSET_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + fd_set __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + FD_ISSET(__idx, &__stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_heap_before_end); +ATF_TC_BODY(FD_ISSET_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE - 1; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_ISSET(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_heap_end); +ATF_TC_BODY(FD_ISSET_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE; + const size_t __idx __unused = __len - 1; + + __stack.__buf = malloc(__bufsz); + + FD_ISSET(__idx, __stack.__buf); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(FD_ISSET_heap_after_end); +ATF_TC_BODY(FD_ISSET_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + fd_set * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = FD_SETSIZE + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + FD_ISSET(__idx, __stack.__buf); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, FD_SET_before_end); + ATF_TP_ADD_TC(tp, FD_SET_end); + ATF_TP_ADD_TC(tp, FD_SET_after_end); + ATF_TP_ADD_TC(tp, FD_SET_heap_before_end); + ATF_TP_ADD_TC(tp, FD_SET_heap_end); + ATF_TP_ADD_TC(tp, FD_SET_heap_after_end); + ATF_TP_ADD_TC(tp, FD_CLR_before_end); + ATF_TP_ADD_TC(tp, FD_CLR_end); + ATF_TP_ADD_TC(tp, FD_CLR_after_end); + ATF_TP_ADD_TC(tp, FD_CLR_heap_before_end); + ATF_TP_ADD_TC(tp, FD_CLR_heap_end); + ATF_TP_ADD_TC(tp, FD_CLR_heap_after_end); + ATF_TP_ADD_TC(tp, FD_ISSET_before_end); + ATF_TP_ADD_TC(tp, FD_ISSET_end); + ATF_TP_ADD_TC(tp, FD_ISSET_after_end); + ATF_TP_ADD_TC(tp, FD_ISSET_heap_before_end); + ATF_TP_ADD_TC(tp, FD_ISSET_heap_end); + ATF_TP_ADD_TC(tp, FD_ISSET_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index 75f81c0a0750..61ccc8fc5592 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c index 8556e1110156..5383b73d4058 100644 --- a/lib/libc/tests/secure/fortify_stdlib_test.c +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 70f247b09e39..918445ca68a1 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index e6a8ea0291de..1cecd7033ae3 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_uio_test.c b/lib/libc/tests/secure/fortify_uio_test.c index 56d7cf5d9a84..0c709ac8b945 100644 --- a/lib/libc/tests/secure/fortify_uio_test.c +++ b/lib/libc/tests/secure/fortify_uio_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index 7a91d3b06c75..e2127450f565 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/fortify_wchar_test.c b/lib/libc/tests/secure/fortify_wchar_test.c index 8c5e0782c65a..31ae02c412a7 100644 --- a/lib/libc/tests/secure/fortify_wchar_test.c +++ b/lib/libc/tests/secure/fortify_wchar_test.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index 23b33acb757b..fdbc6c550551 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -64,6 +64,7 @@ local includes = { "sys/param.h", "sys/random.h", "sys/resource.h", + "sys/select.h", "sys/time.h", "sys/uio.h", "sys/wait.h", @@ -169,6 +170,36 @@ local all_tests = { exclude = excludes_stack_overflow, }, }, + select = { + -- + { + func = "FD_SET", + bufsize = "FD_SETSIZE", + buftype = "fd_set", + arguments = { + "__idx", + "__buf", + }, + }, + { + func = "FD_CLR", + bufsize = "FD_SETSIZE", + buftype = "fd_set", + arguments = { + "__idx", + "__buf", + }, + }, + { + func = "FD_ISSET", + bufsize = "FD_SETSIZE", + buftype = "fd_set", + arguments = { + "__idx", + "__buf", + }, + }, + }, uio = { -- { diff --git a/sys/sys/select.h b/sys/sys/select.h index 1ded44197de9..9b734754b944 100644 --- a/sys/sys/select.h +++ b/sys/sys/select.h @@ -49,6 +49,12 @@ typedef __fd_mask fd_mask; typedef __sigset_t sigset_t; #endif +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#else +#define __SSP_FORTIFY_LEVEL 0 +#endif + /* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). @@ -75,13 +81,33 @@ typedef struct fd_set { #define fds_bits __fds_bits #endif +#define __fdset_idx_(p, n) ((n) / _NFDBITS) +#if __SSP_FORTIFY_LEVEL == 0 +#define __fdset_idx(p, n) __fdset_idx_(p, n) +#else +__ssp_inline unsigned long +__fdset_idx(fd_set *p, unsigned long idx) +{ + __size_t psz = __ssp_bos0(p); + unsigned long sidx = __fdset_idx_(p, idx); + + if (idx >= FD_SETSIZE) + __chk_fail(); + if (psz / sizeof(__fd_mask) < (sidx + 1)) + __chk_fail(); + + return (sidx); +} +#endif + #define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) -#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n)) +#define FD_CLR(n, p) ((p)->__fds_bits[__fdset_idx(p, n)] &= ~__fdset_mask(n)) #if __BSD_VISIBLE #define FD_COPY(f, t) (void)(*(t) = *(f)) #endif -#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0) -#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n)) +#define FD_ISSET(n, p) \ + (((p)->__fds_bits[__fdset_idx(p, n)] & __fdset_mask(n)) != 0) +#define FD_SET(n, p) ((p)->__fds_bits[__fdset_idx(p, n)] |= __fdset_mask(n)) #define FD_ZERO(p) do { \ fd_set *_p; \ __size_t _n; \ From 1f155d48f878495d31592c59cab82f975c210ad8 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 13 Jul 2024 00:16:12 -0500 Subject: [PATCH 041/151] include: ssp: fortify The entire recv*() implementation set is ripe for opportunities to validate, so do what we can with what we have. Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45686 --- include/ssp/Makefile | 4 +- include/ssp/socket.h | 119 ++ lib/libc/sys/recv.c | 3 +- lib/libc/sys/recvfrom.c | 3 +- lib/libc/sys/recvmsg.c | 3 +- lib/libc/tests/secure/Makefile | 1 + lib/libc/tests/secure/fortify_poll_test.c | 45 + lib/libc/tests/secure/fortify_random_test.c | 45 + lib/libc/tests/secure/fortify_select_test.c | 45 + lib/libc/tests/secure/fortify_socket_test.c | 1817 +++++++++++++++++ lib/libc/tests/secure/fortify_stdio_test.c | 45 + lib/libc/tests/secure/fortify_stdlib_test.c | 45 + lib/libc/tests/secure/fortify_string_test.c | 45 + lib/libc/tests/secure/fortify_strings_test.c | 45 + lib/libc/tests/secure/fortify_uio_test.c | 45 + lib/libc/tests/secure/fortify_unistd_test.c | 45 + lib/libc/tests/secure/fortify_wchar_test.c | 45 + .../tests/secure/generate-fortify-tests.lua | 239 +++ lib/libsys/recvmmsg.c | 5 +- sys/sys/socket.h | 4 + 20 files changed, 2641 insertions(+), 7 deletions(-) create mode 100644 include/ssp/socket.h create mode 100644 lib/libc/tests/secure/fortify_socket_test.c diff --git a/include/ssp/Makefile b/include/ssp/Makefile index e6c5a1e6c15e..ff622aeecfe9 100644 --- a/include/ssp/Makefile +++ b/include/ssp/Makefile @@ -1,5 +1,5 @@ -INCS= poll.h random.h ssp.h stdio.h stdlib.h string.h strings.h uio.h unistd.h -INCS+= wchar.h +INCS= poll.h random.h socket.h ssp.h stdio.h stdlib.h string.h strings.h +INCS+= uio.h unistd.h wchar.h INCSDIR= ${INCLUDEDIR}/ssp .include diff --git a/include/ssp/socket.h b/include/ssp/socket.h new file mode 100644 index 000000000000..6c0051ad72dc --- /dev/null +++ b/include/ssp/socket.h @@ -0,0 +1,119 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024, Klara, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SSP_SOCKET_H_ +#define _SSP_SOCKET_H_ + +#include + +#if __SSP_FORTIFY_LEVEL > 0 + +#include + +__BEGIN_DECLS + +__ssp_inline void +__ssp_check_msghdr(struct msghdr *hdr) +{ + if (__ssp_bos(hdr->msg_name) < hdr->msg_namelen) + __chk_fail(); + + __ssp_check_iovec(hdr->msg_iov, hdr->msg_iovlen); + + if (__ssp_bos(hdr->msg_control) < hdr->msg_controllen) + __chk_fail(); +} + +__ssp_redirect_raw_impl(int, getpeername, getpeername, + (int fdes, struct sockaddr *__restrict name, socklen_t *__restrict namelen)) +{ + size_t namesz = __ssp_bos(name); + + if (namesz != (size_t)-1 && namesz < *namelen) + __chk_fail(); + + return (__ssp_real(getpeername)(fdes, name, namelen)); +} + +__ssp_redirect_raw_impl(int, getsockname, getsockname, + (int fdes, struct sockaddr *__restrict name, + socklen_t *__restrict namelen)) +{ + size_t namesz = __ssp_bos(name); + + if (namesz != (size_t)-1 && namesz < *namelen) + __chk_fail(); + + return (__ssp_real(getsockname)(fdes, name, namelen)); +} + +__ssp_redirect(ssize_t, recv, (int __sock, void *__buf, size_t __len, + int __flags), (__sock, __buf, __len, __flags)); + +__ssp_redirect_raw_impl(ssize_t, recvfrom, recvfrom, + (int s, void *buf, size_t len, int flags, + struct sockaddr *__restrict from, + socklen_t *__restrict fromlen)) +{ + if (__ssp_bos(buf) < len) + __chk_fail(); + if (from != NULL && __ssp_bos(from) < *fromlen) + __chk_fail(); + + return (__ssp_real(recvfrom)(s, buf, len, flags, from, fromlen)); +} + +__ssp_redirect_raw_impl(ssize_t, recvmsg, recvmsg, + (int s, struct msghdr *hdr, int flags)) +{ + __ssp_check_msghdr(hdr); + return (__ssp_real(recvmsg)(s, hdr, flags)); +} + +#if __BSD_VISIBLE +struct timespec; + +__ssp_redirect_raw_impl(ssize_t, recvmmsg, recvmmsg, + (int s, struct mmsghdr *__restrict hdrvec, size_t vlen, int flags, + const struct timespec *__restrict timeout)) +{ + const size_t vecsz = __ssp_bos(hdrvec); + + if (vecsz != (size_t)-1 && vecsz / sizeof(*hdrvec) < vlen) + __chk_fail(); + + for (size_t i = 0; i < vlen; i++) { + __ssp_check_msghdr(&hdrvec[i].msg_hdr); + } + + return (__ssp_real(recvmmsg)(s, hdrvec, vlen, flags, timeout)); +} +#endif + +__END_DECLS + +#endif /* __SSP_FORTIFY_LEVEL > 0 */ +#endif /* _SSP_SOCKET_H_ */ diff --git a/lib/libc/sys/recv.c b/lib/libc/sys/recv.c index 9afb1dee0654..2bccfbee4eed 100644 --- a/lib/libc/sys/recv.c +++ b/lib/libc/sys/recv.c @@ -31,12 +31,13 @@ #include #include +#include #include "libc_private.h" #include ssize_t -recv(int s, void *buf, size_t len, int flags) +__ssp_real(recv)(int s, void *buf, size_t len, int flags) { /* * POSIX says recv() shall be a cancellation point, so call the diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index 04738d06a71c..6247b315d078 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -32,13 +32,14 @@ #include #include #include +#include #include "libc_private.h" __weak_reference(__sys_recvfrom, __recvfrom); #pragma weak recvfrom ssize_t -recvfrom(int s, void *buf, size_t len, int flags, +__ssp_real(recvfrom)(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) { return (INTERPOS_SYS(recvfrom, s, buf, len, flags, from, fromlen)); diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index c7e34b9beeb4..334049d6cfad 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -32,13 +32,14 @@ #include #include #include +#include #include "libc_private.h" __weak_reference(__sys_recvmsg, __recvmsg); #pragma weak recvmsg ssize_t -recvmsg(int s, struct msghdr *msg, int flags) +__ssp_real(recvmsg)(int s, struct msghdr *msg, int flags) { return (INTERPOS_SYS(recvmsg, s, msg, flags)); } diff --git a/lib/libc/tests/secure/Makefile b/lib/libc/tests/secure/Makefile index 996536beac91..ccf89afb1ad5 100644 --- a/lib/libc/tests/secure/Makefile +++ b/lib/libc/tests/secure/Makefile @@ -5,6 +5,7 @@ TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} # sys/ headers FORTIFY_TCATS+= random FORTIFY_TCATS+= select +FORTIFY_TCATS+= socket FORTIFY_TCATS+= uio # non-sys/ headers diff --git a/lib/libc/tests/secure/fortify_poll_test.c b/lib/libc/tests/secure/fortify_poll_test.c index 47648fe54b47..dce0b0bb65ea 100644 --- a/lib/libc/tests/secure/fortify_poll_test.c +++ b/lib/libc/tests/secure/fortify_poll_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_random_test.c b/lib/libc/tests/secure/fortify_random_test.c index 64c32c6c6a8f..7763607dd2ed 100644 --- a/lib/libc/tests/secure/fortify_random_test.c +++ b/lib/libc/tests/secure/fortify_random_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_select_test.c b/lib/libc/tests/secure/fortify_select_test.c index ccd3f97004fc..dfafac7e4d6d 100644 --- a/lib/libc/tests/secure/fortify_select_test.c +++ b/lib/libc/tests/secure/fortify_select_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_socket_test.c b/lib/libc/tests/secure/fortify_socket_test.c new file mode 100644 index 000000000000..a2125d60fc2d --- /dev/null +++ b/lib/libc/tests/secure/fortify_socket_test.c @@ -0,0 +1,1817 @@ +/* @generated by `generate-fortify-tests.lua "socket"` */ + +#define _FORTIFY_SOURCE 2 +#define TMPFILE_SIZE (1024 * 32) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE * __unused +new_fp(size_t __len) +{ + static char fpbuf[LINE_MAX]; + FILE *fp; + + ATF_REQUIRE(__len <= sizeof(fpbuf)); + + memset(fpbuf, 'A', sizeof(fpbuf) - 1); + fpbuf[sizeof(fpbuf) - 1] = '\0'; + + fp = fmemopen(fpbuf, sizeof(fpbuf), "rb"); + ATF_REQUIRE(fp != NULL); + + return (fp); +} + +/* + * Create a new symlink to use for readlink(2) style tests, we'll just use a + * random target name to have something interesting to look at. + */ +static const char * __unused +new_symlink(size_t __len) +{ + static const char linkname[] = "link"; + char target[MAXNAMLEN]; + int error; + + ATF_REQUIRE(__len <= sizeof(target)); + + arc4random_buf(target, sizeof(target)); + + error = unlink(linkname); + ATF_REQUIRE(error == 0 || errno == ENOENT); + + error = symlink(target, linkname); + ATF_REQUIRE(error == 0); + + return (linkname); +} + +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + +/* + * Constructs a tmpfile that we can use for testing read(2) and friends. + */ +static int __unused +new_tmpfile(void) +{ + char buf[1024]; + ssize_t rv; + size_t written; + int fd; + + fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE(fd >= 0); + + written = 0; + while (written < TMPFILE_SIZE) { + rv = write(fd, buf, sizeof(buf)); + ATF_REQUIRE(rv > 0); + + written += rv; + } + + ATF_REQUIRE_EQ(0, lseek(fd, 0, SEEK_SET)); + return (fd); +} + +static void +disable_coredumps(void) +{ + struct rlimit rl = { 0 }; + + if (setrlimit(RLIMIT_CORE, &rl) == -1) + _exit(EX_OSERR); +} + +/* + * Replaces stdin with a file that we can actually read from, for tests where + * we want a FILE * or fd that we can get data from. + */ +static void __unused +replace_stdin(void) +{ + int fd; + + fd = new_tmpfile(); + + (void)dup2(fd, STDIN_FILENO); + if (fd != STDIN_FILENO) + close(fd); +} + +ATF_TC_WITHOUT_HEAD(getpeername_before_end); +ATF_TC_BODY(getpeername_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + new_socket(sock); + socklen = __len; + + getpeername(sock[0], &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getpeername_end); +ATF_TC_BODY(getpeername_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + new_socket(sock); + socklen = __len; + + getpeername(sock[0], &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getpeername_heap_before_end); +ATF_TC_BODY(getpeername_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getpeername(sock[0], __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getpeername_heap_end); +ATF_TC_BODY(getpeername_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getpeername(sock[0], __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getpeername_heap_after_end); +ATF_TC_BODY(getpeername_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getpeername(sock[0], __stack.__buf, &socklen); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getsockname_before_end); +ATF_TC_BODY(getsockname_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + new_socket(sock); + socklen = __len; + + getsockname(sock[0], &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getsockname_end); +ATF_TC_BODY(getsockname_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + new_socket(sock); + socklen = __len; + + getsockname(sock[0], &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getsockname_heap_before_end); +ATF_TC_BODY(getsockname_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getsockname(sock[0], __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getsockname_heap_end); +ATF_TC_BODY(getsockname_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getsockname(sock[0], __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(getsockname_heap_after_end); +ATF_TC_BODY(getsockname_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + socklen_t socklen; + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + getsockname(sock[0], __stack.__buf, &socklen); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recv_before_end); +ATF_TC_BODY(recv_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + new_socket(sock); + + recv(sock[0], __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recv_end); +ATF_TC_BODY(recv_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + new_socket(sock); + + recv(sock[0], __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recv_heap_before_end); +ATF_TC_BODY(recv_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recv(sock[0], __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recv_heap_end); +ATF_TC_BODY(recv_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recv(sock[0], __stack.__buf, __len, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recv_heap_after_end); +ATF_TC_BODY(recv_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recv(sock[0], __stack.__buf, __len, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_before_end); +ATF_TC_BODY(recvfrom_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + new_socket(sock); + + recvfrom(sock[0], __stack.__buf, __len, 0, NULL, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_end); +ATF_TC_BODY(recvfrom_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + new_socket(sock); + + recvfrom(sock[0], __stack.__buf, __len, 0, NULL, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_heap_before_end); +ATF_TC_BODY(recvfrom_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recvfrom(sock[0], __stack.__buf, __len, 0, NULL, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_heap_end); +ATF_TC_BODY(recvfrom_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recvfrom(sock[0], __stack.__buf, __len, 0, NULL, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_heap_after_end); +ATF_TC_BODY(recvfrom_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + new_socket(sock); + + recvfrom(sock[0], __stack.__buf, __len, 0, NULL, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_sockaddr_before_end); +ATF_TC_BODY(recvfrom_sockaddr_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + char data[16]; + socklen_t socklen; + + new_socket(sock); + socklen = __len; + + recvfrom(sock[0], data, sizeof(data), 0, &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_sockaddr_end); +ATF_TC_BODY(recvfrom_sockaddr_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + char data[16]; + socklen_t socklen; + + new_socket(sock); + socklen = __len; + + recvfrom(sock[0], data, sizeof(data), 0, &__stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_sockaddr_heap_before_end); +ATF_TC_BODY(recvfrom_sockaddr_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + char data[16]; + socklen_t socklen; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + recvfrom(sock[0], data, sizeof(data), 0, __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_sockaddr_heap_end); +ATF_TC_BODY(recvfrom_sockaddr_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + char data[16]; + socklen_t socklen; + + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + recvfrom(sock[0], data, sizeof(data), 0, __stack.__buf, &socklen); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvfrom_sockaddr_heap_after_end); +ATF_TC_BODY(recvfrom_sockaddr_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + char data[16]; + socklen_t socklen; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + new_socket(sock); + socklen = __len; + + recvfrom(sock[0], data, sizeof(data), 0, __stack.__buf, &socklen); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_name_before_end); +ATF_TC_BODY(recvmsg_msg_name_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_name_end); +ATF_TC_BODY(recvmsg_msg_name_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct sockaddr __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_name_heap_before_end); +ATF_TC_BODY(recvmsg_msg_name_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_name_heap_end); +ATF_TC_BODY(recvmsg_msg_name_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_name_heap_after_end); +ATF_TC_BODY(recvmsg_msg_name_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct sockaddr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (1); + const size_t __len = sizeof(struct sockaddr) + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; + + recvmsg(sock[0], &msg, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_iov_before_end); +ATF_TC_BODY(recvmsg_msg_iov_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + struct iovec iov[2]; + + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_iov_end); +ATF_TC_BODY(recvmsg_msg_iov_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + struct iovec iov[2]; + + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_iov_heap_before_end); +ATF_TC_BODY(recvmsg_msg_iov_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + struct iovec iov[2]; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_iov_heap_end); +ATF_TC_BODY(recvmsg_msg_iov_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + struct iovec iov[2]; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_iov_heap_after_end); +ATF_TC_BODY(recvmsg_msg_iov_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + struct msghdr msg; + struct iovec iov[2]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); + + recvmsg(sock[0], &msg, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_control_before_end); +ATF_TC_BODY(recvmsg_msg_control_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[CMSG_SPACE(sizeof(int))]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = CMSG_SPACE(sizeof(int)) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_control_end); +ATF_TC_BODY(recvmsg_msg_control_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[CMSG_SPACE(sizeof(int))]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = CMSG_SPACE(sizeof(int)); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_control_heap_before_end); +ATF_TC_BODY(recvmsg_msg_control_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (CMSG_SPACE(sizeof(int))); + const size_t __len = CMSG_SPACE(sizeof(int)) - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_control_heap_end); +ATF_TC_BODY(recvmsg_msg_control_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (CMSG_SPACE(sizeof(int))); + const size_t __len = CMSG_SPACE(sizeof(int)); + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; + + recvmsg(sock[0], &msg, 0); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmsg_msg_control_heap_after_end); +ATF_TC_BODY(recvmsg_msg_control_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (CMSG_SPACE(sizeof(int))); + const size_t __len = CMSG_SPACE(sizeof(int)) + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + struct msghdr msg; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; + + recvmsg(sock[0], &msg, 0); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_before_end); +ATF_TC_BODY(recvmmsg_msgvec_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_end); +ATF_TC_BODY(recvmmsg_msgvec_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_after_end); +ATF_TC_BODY(recvmmsg_msgvec_after_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr __buf[2]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_heap_before_end); +ATF_TC_BODY(recvmmsg_msgvec_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_heap_end); +ATF_TC_BODY(recvmmsg_msgvec_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + + __stack.__buf = malloc(__bufsz); + + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msgvec_heap_after_end); +ATF_TC_BODY(recvmmsg_msgvec_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + struct mmsghdr * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (2); + const size_t __len = 2 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + + recvmmsg(sock[0], __stack.__buf, __len, 0, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msghdr_before_end); +ATF_TC_BODY(recvmmsg_msghdr_before_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct mmsghdr msgvec[2]; + + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; + + recvmmsg(sock[0], &msgvec[0], nitems(msgvec), 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msghdr_end); +ATF_TC_BODY(recvmmsg_msghdr_end, tc) +{ +#define BUF &__stack.__buf + struct { + uint8_t padding_l; + unsigned char __buf[42]; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(__stack.__buf); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct mmsghdr msgvec[2]; + + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; + + recvmmsg(sock[0], &msgvec[0], nitems(msgvec), 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msghdr_heap_before_end); +ATF_TC_BODY(recvmmsg_msghdr_heap_before_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 - 1; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct mmsghdr msgvec[2]; + + __stack.__buf = malloc(__bufsz); + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; + + recvmmsg(sock[0], &msgvec[0], nitems(msgvec), 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msghdr_heap_end); +ATF_TC_BODY(recvmmsg_msghdr_heap_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42; + const size_t __idx __unused = __len - 1; + int sock[2] = { -1, -1 }; + struct mmsghdr msgvec[2]; + + __stack.__buf = malloc(__bufsz); + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; + + recvmmsg(sock[0], &msgvec[0], nitems(msgvec), 0, NULL); +#undef BUF + +} + +ATF_TC_WITHOUT_HEAD(recvmmsg_msghdr_heap_after_end); +ATF_TC_BODY(recvmmsg_msghdr_heap_after_end, tc) +{ +#define BUF __stack.__buf + struct { + uint8_t padding_l; + unsigned char * __buf; + uint8_t padding_r; + } __stack; + const size_t __bufsz __unused = sizeof(*__stack.__buf) * (42); + const size_t __len = 42 + 1; + const size_t __idx __unused = __len - 1; + pid_t __child; + int __status; + int sock[2] = { -1, -1 }; + struct mmsghdr msgvec[2]; + + __child = fork(); + ATF_REQUIRE(__child >= 0); + if (__child > 0) + goto monitor; + + /* Child */ + disable_coredumps(); + __stack.__buf = malloc(__bufsz); + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; + + recvmmsg(sock[0], &msgvec[0], nitems(msgvec), 0, NULL); + _exit(EX_SOFTWARE); /* Should have aborted. */ + +monitor: + while (waitpid(__child, &__status, 0) != __child) { + ATF_REQUIRE_EQ(EINTR, errno); + } + + if (!WIFSIGNALED(__status)) { + switch (WEXITSTATUS(__status)) { + case EX_SOFTWARE: + atf_tc_fail("FORTIFY_SOURCE failed to abort"); + break; + case EX_OSERR: + atf_tc_fail("setrlimit(2) failed"); + break; + default: + atf_tc_fail("child exited with status %d", + WEXITSTATUS(__status)); + } + } else { + ATF_REQUIRE_EQ(SIGABRT, WTERMSIG(__status)); + } +#undef BUF + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, getpeername_before_end); + ATF_TP_ADD_TC(tp, getpeername_end); + ATF_TP_ADD_TC(tp, getpeername_heap_before_end); + ATF_TP_ADD_TC(tp, getpeername_heap_end); + ATF_TP_ADD_TC(tp, getpeername_heap_after_end); + ATF_TP_ADD_TC(tp, getsockname_before_end); + ATF_TP_ADD_TC(tp, getsockname_end); + ATF_TP_ADD_TC(tp, getsockname_heap_before_end); + ATF_TP_ADD_TC(tp, getsockname_heap_end); + ATF_TP_ADD_TC(tp, getsockname_heap_after_end); + ATF_TP_ADD_TC(tp, recv_before_end); + ATF_TP_ADD_TC(tp, recv_end); + ATF_TP_ADD_TC(tp, recv_heap_before_end); + ATF_TP_ADD_TC(tp, recv_heap_end); + ATF_TP_ADD_TC(tp, recv_heap_after_end); + ATF_TP_ADD_TC(tp, recvfrom_before_end); + ATF_TP_ADD_TC(tp, recvfrom_end); + ATF_TP_ADD_TC(tp, recvfrom_heap_before_end); + ATF_TP_ADD_TC(tp, recvfrom_heap_end); + ATF_TP_ADD_TC(tp, recvfrom_heap_after_end); + ATF_TP_ADD_TC(tp, recvfrom_sockaddr_before_end); + ATF_TP_ADD_TC(tp, recvfrom_sockaddr_end); + ATF_TP_ADD_TC(tp, recvfrom_sockaddr_heap_before_end); + ATF_TP_ADD_TC(tp, recvfrom_sockaddr_heap_end); + ATF_TP_ADD_TC(tp, recvfrom_sockaddr_heap_after_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_name_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_name_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_name_heap_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_name_heap_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_name_heap_after_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_iov_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_iov_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_iov_heap_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_iov_heap_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_iov_heap_after_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_control_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_control_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_control_heap_before_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_control_heap_end); + ATF_TP_ADD_TC(tp, recvmsg_msg_control_heap_after_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_before_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_after_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_heap_before_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_heap_end); + ATF_TP_ADD_TC(tp, recvmmsg_msgvec_heap_after_end); + ATF_TP_ADD_TC(tp, recvmmsg_msghdr_before_end); + ATF_TP_ADD_TC(tp, recvmmsg_msghdr_end); + ATF_TP_ADD_TC(tp, recvmmsg_msghdr_heap_before_end); + ATF_TP_ADD_TC(tp, recvmmsg_msghdr_heap_end); + ATF_TP_ADD_TC(tp, recvmmsg_msghdr_heap_after_end); + return (atf_no_error()); +} diff --git a/lib/libc/tests/secure/fortify_stdio_test.c b/lib/libc/tests/secure/fortify_stdio_test.c index 61ccc8fc5592..a8764d646de2 100644 --- a/lib/libc/tests/secure/fortify_stdio_test.c +++ b/lib/libc/tests/secure/fortify_stdio_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_stdlib_test.c b/lib/libc/tests/secure/fortify_stdlib_test.c index 5383b73d4058..11bb714151e1 100644 --- a/lib/libc/tests/secure/fortify_stdlib_test.c +++ b/lib/libc/tests/secure/fortify_stdlib_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_string_test.c b/lib/libc/tests/secure/fortify_string_test.c index 918445ca68a1..cc87ae56488d 100644 --- a/lib/libc/tests/secure/fortify_string_test.c +++ b/lib/libc/tests/secure/fortify_string_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_strings_test.c b/lib/libc/tests/secure/fortify_strings_test.c index 1cecd7033ae3..69093bec04dd 100644 --- a/lib/libc/tests/secure/fortify_strings_test.c +++ b/lib/libc/tests/secure/fortify_strings_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_uio_test.c b/lib/libc/tests/secure/fortify_uio_test.c index 0c709ac8b945..4a2637d75353 100644 --- a/lib/libc/tests/secure/fortify_uio_test.c +++ b/lib/libc/tests/secure/fortify_uio_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_unistd_test.c b/lib/libc/tests/secure/fortify_unistd_test.c index e2127450f565..e467ba849bd4 100644 --- a/lib/libc/tests/secure/fortify_unistd_test.c +++ b/lib/libc/tests/secure/fortify_unistd_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/fortify_wchar_test.c b/lib/libc/tests/secure/fortify_wchar_test.c index 31ae02c412a7..618cc74ade9a 100644 --- a/lib/libc/tests/secure/fortify_wchar_test.c +++ b/lib/libc/tests/secure/fortify_wchar_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libc/tests/secure/generate-fortify-tests.lua b/lib/libc/tests/secure/generate-fortify-tests.lua index fdbc6c550551..eec5f7253f73 100755 --- a/lib/libc/tests/secure/generate-fortify-tests.lua +++ b/lib/libc/tests/secure/generate-fortify-tests.lua @@ -65,6 +65,7 @@ local includes = { "sys/random.h", "sys/resource.h", "sys/select.h", + "sys/socket.h", "sys/time.h", "sys/uio.h", "sys/wait.h", @@ -115,6 +116,19 @@ local readv_init = [[ replace_stdin(); ]] +local socket_stackvars = "\tint sock[2] = { -1, -1 };\n" +local recvfrom_sockaddr_stackvars = socket_stackvars .. [[ + char data[16]; + socklen_t socklen; +]] +local recvmsg_stackvars = socket_stackvars .. "\tstruct msghdr msg;\n" +local socket_init = [[ + new_socket(sock); +]] +local socket_socklen_init = socket_init .. [[ + socklen = __len; +]] + local stdio_init = [[ replace_stdin(); ]] @@ -200,6 +214,187 @@ local all_tests = { }, }, }, + socket = { + -- + { + func = "getpeername", + buftype = "struct sockaddr", + bufsize = "sizeof(struct sockaddr)", + arguments = { + "sock[0]", + "__buf", + "&socklen", + }, + exclude = excludes_stack_overflow, + stackvars = socket_stackvars .. "\tsocklen_t socklen;", + init = socket_socklen_init, + uses_len = true, + }, + { + func = "getsockname", + buftype = "struct sockaddr", + bufsize = "sizeof(struct sockaddr)", + arguments = { + "sock[0]", + "__buf", + "&socklen", + }, + exclude = excludes_stack_overflow, + stackvars = socket_stackvars .. "\tsocklen_t socklen;", + init = socket_socklen_init, + uses_len = true, + }, + { + func = "recv", + arguments = { + "sock[0]", + "__buf", + "__len", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = socket_stackvars, + init = socket_init, + }, + { + func = "recvfrom", + arguments = { + "sock[0]", + "__buf", + "__len", + "0", + "NULL", + "NULL", + }, + exclude = excludes_stack_overflow, + stackvars = socket_stackvars, + init = socket_init, + }, + { + func = "recvfrom", + variant = "sockaddr", + buftype = "struct sockaddr", + bufsize = "sizeof(struct sockaddr)", + arguments = { + "sock[0]", + "data", + "sizeof(data)", + "0", + "__buf", + "&socklen", + }, + exclude = excludes_stack_overflow, + stackvars = recvfrom_sockaddr_stackvars, + init = socket_socklen_init, + uses_len = true, + }, + { + func = "recvmsg", + variant = "msg_name", + buftype = "struct sockaddr", + bufsize = "sizeof(struct sockaddr)", + arguments = { + "sock[0]", + "&msg", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = recvmsg_stackvars, + init = [[ + memset(&msg, 0, sizeof(msg)); + msg.msg_name = BUF; + msg.msg_namelen = __len; +]], + uses_len = true, + }, + { + func = "recvmsg", + variant = "msg_iov", + arguments = { + "sock[0]", + "&msg", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = recvmsg_stackvars .. "\tstruct iovec iov[2];\n", + init = [[ + memset(&msg, 0, sizeof(msg)); + memset(&iov[0], 0, sizeof(iov)); + + /* + * We position the buffer second just so that we can confirm that the + * fortification bits are traversing the iovec correctly. + */ + iov[1].iov_base = BUF; + iov[1].iov_len = __len; + + msg.msg_iov = &iov[0]; + msg.msg_iovlen = nitems(iov); +]], + uses_len = true, + }, + { + func = "recvmsg", + variant = "msg_control", + bufsize = "CMSG_SPACE(sizeof(int))", + arguments = { + "sock[0]", + "&msg", + "0", + }, + exclude = excludes_stack_overflow, + stackvars = recvmsg_stackvars, + init = [[ + memset(&msg, 0, sizeof(msg)); + + msg.msg_control = BUF; + msg.msg_controllen = __len; +]], + uses_len = true, + }, + { + func = "recvmmsg", + variant = "msgvec", + buftype = "struct mmsghdr[]", + bufsize = "2", + arguments = { + "sock[0]", + "__buf", + "__len", + "0", + "NULL", + }, + stackvars = socket_stackvars, + }, + { + -- We'll assume that recvmsg is covering msghdr + -- validation thoroughly enough, we'll just try tossing + -- an error in the second element of a msgvec to try and + -- make sure that each one is being validated. + func = "recvmmsg", + variant = "msghdr", + arguments = { + "sock[0]", + "&msgvec[0]", + "nitems(msgvec)", + "0", + "NULL", + }, + exclude = excludes_stack_overflow, + stackvars = socket_stackvars .. "\tstruct mmsghdr msgvec[2];\n", + init = [[ + memset(&msgvec[0], 0, sizeof(msgvec)); + + /* + * Same as above, make sure fortification isn't ignoring n > 1 elements + * of the msgvec. + */ + msgvec[1].msg_hdr.msg_control = BUF; + msgvec[1].msg_hdr.msg_controllen = __len; +]], + uses_len = true, + }, + }, uio = { -- { @@ -1207,6 +1402,50 @@ new_symlink(size_t __len) return (linkname); } +/* + * For our purposes, first descriptor will be the reader; we'll send both + * raw data and a control message over it so that the result can be used for + * any of our recv*() tests. + */ +static void __unused +new_socket(int sock[2]) +{ + unsigned char ctrl[CMSG_SPACE(sizeof(int))] = { 0 }; + static char sockbuf[256]; + ssize_t rv; + size_t total = 0; + struct msghdr hdr = { 0 }; + struct cmsghdr *cmsg; + int error, fd; + + error = socketpair(AF_UNIX, SOCK_STREAM, 0, sock); + ATF_REQUIRE(error == 0); + + while (total != sizeof(sockbuf)) { + rv = send(sock[1], &sockbuf[total], sizeof(sockbuf) - total, 0); + + ATF_REQUIRE_MSG(rv > 0, + "expected bytes sent, got %zd with %zu left (size %zu, total %zu)", + rv, sizeof(sockbuf) - total, sizeof(sockbuf), total); + ATF_REQUIRE_MSG(total + (size_t)rv <= sizeof(sockbuf), + "%zd exceeds total %zu", rv, sizeof(sockbuf)); + total += rv; + } + + hdr.msg_control = ctrl; + hdr.msg_controllen = sizeof(ctrl); + + cmsg = CMSG_FIRSTHDR(&hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); + fd = STDIN_FILENO; + memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); + + error = sendmsg(sock[1], &hdr, 0); + ATF_REQUIRE(error != -1); +} + /* * Constructs a tmpfile that we can use for testing read(2) and friends. */ diff --git a/lib/libsys/recvmmsg.c b/lib/libsys/recvmmsg.c index 24c4abf58287..c03fe98c37ef 100644 --- a/lib/libsys/recvmmsg.c +++ b/lib/libsys/recvmmsg.c @@ -32,11 +32,12 @@ #include #include #include +#include #include "libc_private.h" ssize_t -recvmmsg(int s, struct mmsghdr *__restrict msgvec, size_t vlen, int flags, - const struct timespec *__restrict timeout) +__ssp_real(recvmmsg)(int s, struct mmsghdr *__restrict msgvec, size_t vlen, + int flags, const struct timespec *__restrict timeout) { struct pollfd pfd[1]; size_t i, rcvd; diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 9d46dac376d7..e45e46da77b3 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -670,6 +670,10 @@ struct mmsghdr { }; #endif /* __BSD_VISIBLE */ +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 +#include +#endif + #ifndef _KERNEL #include From 859f0f0d6bf753c16caa0103a541c69fb6bd5e37 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 13 Jul 2024 12:22:25 +0200 Subject: [PATCH 042/151] tcp: refactor register_tcp_functions_as_names() Refactor register_tcp_functions_as_names() such that either all or no (in error cases) registrations happen atomically (while holding the tcp_function_lock write lock). Also ensure that the TCP function block is not already registered. This avoids situations, where some registrations were performed and then they were removed without holding a lock in between or checking ref counts. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45947 --- share/man/man9/tcp_functions.9 | 25 +++++++++-- sys/netinet/tcp_subr.c | 78 +++++++++++++++++----------------- sys/netinet/tcp_var.h | 3 ++ 3 files changed, 64 insertions(+), 42 deletions(-) diff --git a/share/man/man9/tcp_functions.9 b/share/man/man9/tcp_functions.9 index 1e0616e03a9f..8ba7f21c978c 100644 --- a/share/man/man9/tcp_functions.9 +++ b/share/man/man9/tcp_functions.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2024 +.Dd July 13, 2024 .Dt TCP_FUNCTIONS 9 .Os .Sh NAME @@ -37,6 +37,7 @@ .Ft int .Fn register_tcp_functions_as_name "struct tcp_function_block *blk" \ "const char *name" "int wait" +.Ft int .Fn register_tcp_functions_as_names "struct tcp_function_block *blk" \ "int wait" "const char *names[]" "int *num_names" .Ft int @@ -112,6 +113,7 @@ argument. The .Fa num_names argument provides a pointer to the number of names. +This number must not exceed TCP_FUNCTION_NAME_NUM_MAX. This function will either succeed in registering all of the names in the array, or none of the names in the array. On failure, the @@ -328,8 +330,11 @@ must be prepared to wait until all connections have stopped using the specified TCP stack. .Sh ERRORS The -.Fn register_tcp_functions -function will fail if: +.Fn register_tcp_functions , +.Fn register_tcp_functions_as_name , +and +.Fn register_tcp_functions_as_names +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL Any of the members of the @@ -338,7 +343,19 @@ argument are set incorrectly. .It Bq Er ENOMEM The function could not allocate memory for its internal data. .It Bq Er EALREADY -A function block is already registered with the same name. +The +.Fa blk +is already registered or a function block is already registered with the same +name. +.El +Additionally, +.Fn register_tcp_functions_as_names +will fail if: +.Bl -tag -width Er +.It Bq Er E2BIG +The number of names pointed to by the +.Fa num_names +argument is larger than TCP_FUNCTION_NAME_NUM_MAX. .El The .Fn deregister_tcp_functions diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b4f605534d59..5743d1bbd100 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1172,9 +1172,9 @@ int register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, const char *names[], int *num_names) { - struct tcp_function *n; + struct tcp_function *f[TCP_FUNCTION_NAME_NUM_MAX]; struct tcp_function_set fs; - int error, i; + int error, i, num_registered; KASSERT(names != NULL, ("%s: Called with NULL name list", __func__)); KASSERT(*num_names > 0, @@ -1182,71 +1182,73 @@ register_tcp_functions_as_names(struct tcp_function_block *blk, int wait, KASSERT(rw_initialized(&tcp_function_lock), ("%s: called too early", __func__)); + if (*num_names > TCP_FUNCTION_NAME_NUM_MAX) { + /* Too many names. */ + *num_names = 0; + return (E2BIG); + } if ((blk->tfb_tcp_output == NULL) || (blk->tfb_tcp_do_segment == NULL) || (blk->tfb_tcp_ctloutput == NULL) || (blk->tfb_tcp_handoff_ok == NULL) || (strlen(blk->tfb_tcp_block_name) == 0)) { - /* - * These functions are required and you - * need a name. - */ + /* These functions are required and a name is needed. */ *num_names = 0; return (EINVAL); } - if (blk->tfb_flags & TCP_FUNC_BEING_REMOVED) { - *num_names = 0; - return (EINVAL); + for (i = 0; i < *num_names; i++) { + f[i] = malloc(sizeof(struct tcp_function), M_TCPFUNCTIONS, wait); + if (f[i] == NULL) { + while (--i >= 0) + free(f[i], M_TCPFUNCTIONS); + *num_names = 0; + return (ENOMEM); + } } + num_registered = 0; + rw_wlock(&tcp_function_lock); + if (find_tcp_fb_locked(blk, NULL) != NULL) { + /* A TCP function block can only be registered once. */ + error = EALREADY; + goto cleanup; + } + if (blk->tfb_flags & TCP_FUNC_BEING_REMOVED) { + error = EINVAL; + goto cleanup; + } refcount_init(&blk->tfb_refcnt, 0); blk->tfb_id = atomic_fetchadd_int(&next_tcp_stack_id, 1); for (i = 0; i < *num_names; i++) { - n = malloc(sizeof(struct tcp_function), M_TCPFUNCTIONS, wait); - if (n == NULL) { - error = ENOMEM; - goto cleanup; - } - n->tf_fb = blk; - (void)strlcpy(fs.function_set_name, names[i], sizeof(fs.function_set_name)); - rw_wlock(&tcp_function_lock); if (find_tcp_functions_locked(&fs) != NULL) { /* Duplicate name space not allowed */ - rw_wunlock(&tcp_function_lock); - free(n, M_TCPFUNCTIONS); error = EALREADY; goto cleanup; } - (void)strlcpy(n->tf_name, names[i], sizeof(n->tf_name)); - TAILQ_INSERT_TAIL(&t_functions, n, tf_next); + f[i]->tf_fb = blk; + (void)strlcpy(f[i]->tf_name, names[i], sizeof(f[i]->tf_name)); + TAILQ_INSERT_TAIL(&t_functions, f[i], tf_next); tcp_fb_cnt++; - rw_wunlock(&tcp_function_lock); + num_registered++; } + rw_wunlock(&tcp_function_lock); return (0); cleanup: - /* - * Deregister the names we just added. Because registration failed - * for names[i], we don't need to deregister that name. - */ - *num_names = i; - rw_wlock(&tcp_function_lock); - while (--i >= 0) { - TAILQ_FOREACH(n, &t_functions, tf_next) { - if (!strncmp(n->tf_name, names[i], - TCP_FUNCTION_NAME_LEN_MAX)) { - TAILQ_REMOVE(&t_functions, n, tf_next); - tcp_fb_cnt--; - n->tf_fb = NULL; - free(n, M_TCPFUNCTIONS); - break; - } + /* Remove the entries just added. */ + for (i = 0; i < *num_names; i++) { + if (i < num_registered) { + TAILQ_REMOVE(&t_functions, f[i], tf_next); + tcp_fb_cnt--; } + f[i]->tf_fb = NULL; + free(f[i], M_TCPFUNCTIONS); } rw_wunlock(&tcp_function_lock); + *num_names = num_registered; return (error); } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 8330966c2c3f..1f48297c2b0a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -634,6 +634,9 @@ struct tcp_function_block { uint8_t tfb_id; }; +/* Maximum number of names each TCP function block can be registered with. */ +#define TCP_FUNCTION_NAME_NUM_MAX 8 + struct tcp_function { TAILQ_ENTRY(tcp_function) tf_next; char tf_name[TCP_FUNCTION_NAME_LEN_MAX]; From e5a0202f96948a95bf1b879727e155a4f1d1da93 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sat, 13 Jul 2024 10:37:14 +0000 Subject: [PATCH 043/151] Makefile.inc1: show time for `make installworld' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For years we display the time in seconds how long it takes to run `make buildworld' (see PR 224433). Now we will display the time for "installworld" and "installkernel" as well. e.g.: -------------------------------------------------------------- >>> Installing everything completed on Sun Jul  7 16:11:37 UTC 2024 >>> Install world completed in 110 seconds, ncpu: 2, make -j2 -------------------------------------------------------------- PR: 280187 Approved by: imp Differential Revision: https://reviews.freebsd.org/D45912 --- Makefile.inc1 | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 19ed923702b1..7ff961e22e7a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1241,11 +1241,19 @@ WMAKE_TGTS+= build${libcompat} .endif WMAKE_TGTS+= everything -# record buildworld time in seconds +# record buildworld / install time in seconds .if make(buildworld) _BUILDWORLD_START!= date '+%s' .export _BUILDWORLD_START .endif +.if make(installworld) +_INSTALLWORLD_START!= date '+%s' +.export _INSTALLWORLD_START +.endif +.if make(installkernel) +_INSTALLKERNEL_START!= date '+%s' +.export _INSTALLKERNEL_START +.endif buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue @@ -1313,11 +1321,11 @@ kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY installcheck: _installcheck_world _installcheck_kernel .PHONY _installcheck_world: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check world" + @echo ">>> Install check world started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" _installcheck_kernel: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check kernel" + @echo ">>> Install check kernel started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" # @@ -1641,6 +1649,8 @@ restage reinstall: .MAKE .PHONY .endfor @echo "--------------------------------------------------------------" @echo ">>> Installing everything completed on `LC_ALL=C date`" + @seconds=$$(($$(date '+%s') - ${_INSTALLWORLD_START})); \ + echo ">>> Install world completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" redistribute: .MAKE .PHONY @@ -1873,6 +1883,9 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" + @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ + echo ">>> Install kernel(s) ${INSTALLKERNEL} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" + @echo "--------------------------------------------------------------" .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @@ -1887,6 +1900,9 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo ">>> Installing kernel ${_kernel} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" .endfor + @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ + echo ">>> Install kernel(s) ${BUILDKERNELS} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" + @echo "--------------------------------------------------------------" .endif distributekernel distributekernel.debug: .PHONY From 69dace892d58516fa32ab03de39ea6205b2363c4 Mon Sep 17 00:00:00 2001 From: Peter Lei Date: Sat, 13 Jul 2024 13:43:09 +0200 Subject: [PATCH 044/151] tcp: fix number in comment Fixes: e18b97bd63a8 ("Update to bring the rack stack with all its fixes in.") MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_log_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 082c2ca0f057..011506e2ed8a 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -269,7 +269,7 @@ enum tcp_log_events { TCP_LOG_PRU, /* TCP protocol user request 70 */ TCP_POLICER_DET, /* TCP Policer detectionn 71 */ TCP_PCM_MEASURE, /* TCP Path Capacity Measurement 72 */ - TCP_LOG_END /* End (keep at end) 72 */ + TCP_LOG_END /* End (keep at end) 73 */ }; enum tcp_log_states { From f0d1236f0fc944165b657306a39d44fcc6aaa709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Strahinja=20Stani=C5=A1i=C4=87?= Date: Sat, 13 Jul 2024 14:53:07 +0200 Subject: [PATCH 045/151] libc: Add memset test for int-to-char conversion Test case to check if an implementation of memset correctly handles the value passed being wider than a byte Approved by: emaste Reviewed By: fuz (GSoC mentor), emaste Sponsored by: Google LLC (GSoC 2024) Differential Revision: https://reviews.freebsd.org/D45738 --- lib/libc/tests/string/Makefile | 2 ++ lib/libc/tests/string/memset_test.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lib/libc/tests/string/memset_test.c diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index 4fce79685c0e..c71a83eede61 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= flsll_test ATF_TESTS_C+= memccpy_test ATF_TESTS_C+= memcmp_test ATF_TESTS_C+= memrchr_test +ATF_TESTS_C+= memset2_test ATF_TESTS_C+= memset_s_test ATF_TESTS_C+= strncmp_test ATF_TESTS_C+= stpncpy_test @@ -45,6 +46,7 @@ NETBSD_ATF_TESTS_C+= strpbrk_test NETBSD_ATF_TESTS_C+= strrchr_test NETBSD_ATF_TESTS_C+= swab_test +SRCS.memset2_test= memset_test.c SRCS.strcmp2_test= strcmp_test.c SRCS.strerror2_test= strerror_test.c diff --git a/lib/libc/tests/string/memset_test.c b/lib/libc/tests/string/memset_test.c new file mode 100644 index 000000000000..b898ad5af251 --- /dev/null +++ b/lib/libc/tests/string/memset_test.c @@ -0,0 +1,29 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Strahinja Stanisic + */ + +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(int_char_conv); +ATF_TC_BODY(int_char_conv, tc) +{ + char b[64]; + int c = 0xDEADBEEF; + memset(&b, c, 64); + for(int i = 0; i < 64; i++) { + assert(b[i] == (char)c); + } + +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, int_char_conv); + return (atf_no_error()); +} + From 3e00c11a4f43bf1c7b88d25638e2bfee399e7674 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 12 Jul 2024 02:44:56 -0500 Subject: [PATCH 046/151] arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[] Update pagesizes[] to include the L3 ATTR_CONTIGUOUS (L3C) page size, which is 64KB when the base page size is 4KB and 2MB when the base page size is 16KB. Add support for L3C pages to shm_create_largepage(). Add support for creating L3C page mappings to pmap_enter(psind=1). Add support for reporting L3C page mappings to mincore(2) and procstat(8). Update vm_fault_soft_fast() and vm_fault_populate() to handle multiple superpage sizes. Declare arm64 as supporting two superpage reservation sizes, and simulate two superpage reservation sizes, updating the vm_page's psind field to reflect the correct page size from pagesizes[]. (The next patch in this series will replace this simulation. This patch is already big enough.) Co-authored-by: Eliot Solomon Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45766 --- share/man/man7/arch.7 | 2 +- sys/arm64/arm64/pmap.c | 162 +++++++++++++++++++++++++++--------- sys/arm64/include/param.h | 2 +- sys/arm64/include/vmparam.h | 25 ++++-- sys/kern/imgact_elf.c | 8 +- sys/kern/kern_mib.c | 8 +- sys/kern/kern_proc.c | 12 ++- sys/kern/uipc_shm.c | 15 +++- sys/sys/mman.h | 4 +- sys/vm/vm_domainset.c | 3 + sys/vm/vm_fault.c | 32 ++++--- sys/vm/vm_glue.c | 5 +- sys/vm/vm_kern.c | 5 +- sys/vm/vm_map.c | 46 +++++++--- sys/vm/vm_page.c | 6 +- sys/vm/vm_page.h | 2 +- sys/vm/vm_reserv.c | 104 ++++++++++++++++++++--- 17 files changed, 344 insertions(+), 97 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index f3d2e1036706..88228b807e6a 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -218,7 +218,7 @@ is 8 bytes on all supported architectures except i386. .Ss Page Size .Bl -column -offset indent "Architecture" "Page Sizes" .It Sy Architecture Ta Sy Page Sizes -.It aarch64 Ta 4K, 2M, 1G +.It aarch64 Ta 4K, 64K, 2M, 1G .It amd64 Ta 4K, 2M, 1G .It armv7 Ta 4K, 1M .It i386 Ta 4K, 2M (PAE), 4M diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index c3357900e1be..2540b5eaf4b9 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1631,11 +1631,14 @@ pmap_init(void) if (superpages_enabled) { KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, ("pmap_init: can't assign to pagesizes[1]")); - pagesizes[1] = L2_SIZE; + pagesizes[1] = L3C_SIZE; + KASSERT(MAXPAGESIZES > 2 && pagesizes[2] == 0, + ("pmap_init: can't assign to pagesizes[2]")); + pagesizes[2] = L2_SIZE; if (L1_BLOCKS_SUPPORTED) { - KASSERT(MAXPAGESIZES > 2 && pagesizes[2] == 0, - ("pmap_init: can't assign to pagesizes[2]")); - pagesizes[2] = L1_SIZE; + KASSERT(MAXPAGESIZES > 3 && pagesizes[3] == 0, + ("pmap_init: can't assign to pagesizes[3]")); + pagesizes[3] = L1_SIZE; } } @@ -4959,7 +4962,7 @@ static int pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_entry_t pte, int flags, int psind) { - pd_entry_t *l0p, *l1p, *l2p, newpte, origpte; + pd_entry_t *l0p, *l1p, *l2p, *l3p, newpte, origpte, *tl3p; vm_page_t mp; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -4973,9 +4976,11 @@ pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_entry_t pte, int flags, newpte = pte; if (!pmap_bti_same(pmap, va, va + pagesizes[psind], &newpte)) return (KERN_PROTECTION_FAILURE); - if (psind == 2) { + if (psind == 3) { PMAP_ASSERT_L1_BLOCKS_SUPPORTED; + KASSERT(pagesizes[psind] == L1_SIZE, + ("pagesizes[%d] != L1_SIZE", psind)); l0p = pmap_l0(pmap, va); if ((pmap_load(l0p) & ATTR_DESCR_VALID) == 0) { mp = _pmap_alloc_l3(pmap, pmap_l0_pindex(va), NULL); @@ -5005,7 +5010,9 @@ pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_entry_t pte, int flags, ("va %#lx changing 1G phys page l1 %#lx newpte %#lx", va, origpte, newpte)); pmap_store(l1p, newpte); - } else /* (psind == 1) */ { + } else if (psind == 2) { + KASSERT(pagesizes[psind] == L2_SIZE, + ("pagesizes[%d] != L2_SIZE", psind)); l2p = pmap_l2(pmap, va); if (l2p == NULL) { mp = _pmap_alloc_l3(pmap, pmap_l1_pindex(va), NULL); @@ -5034,6 +5041,40 @@ pmap_enter_largepage(pmap_t pmap, vm_offset_t va, pt_entry_t pte, int flags, ("va %#lx changing 2M phys page l2 %#lx newpte %#lx", va, origpte, newpte)); pmap_store(l2p, newpte); + } else /* (psind == 1) */ { + KASSERT(pagesizes[psind] == L3C_SIZE, + ("pagesizes[%d] != L3C_SIZE", psind)); + l2p = pmap_l2(pmap, va); + if (l2p == NULL || (pmap_load(l2p) & ATTR_DESCR_VALID) == 0) { + mp = _pmap_alloc_l3(pmap, pmap_l2_pindex(va), NULL); + if (mp == NULL) { + if ((flags & PMAP_ENTER_NOSLEEP) != 0) + return (KERN_RESOURCE_SHORTAGE); + PMAP_UNLOCK(pmap); + vm_wait(NULL); + PMAP_LOCK(pmap); + goto restart; + } + mp->ref_count += L3C_ENTRIES - 1; + l3p = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mp)); + l3p = &l3p[pmap_l3_index(va)]; + } else { + l3p = pmap_l2_to_l3(l2p, va); + if ((pmap_load(l3p) & ATTR_DESCR_VALID) == 0) { + mp = PTE_TO_VM_PAGE(pmap_load(l2p)); + mp->ref_count += L3C_ENTRIES; + } + } + for (tl3p = l3p; tl3p < &l3p[L3C_ENTRIES]; tl3p++) { + origpte = pmap_load(tl3p); + KASSERT((origpte & ATTR_DESCR_VALID) == 0 || + ((origpte & ATTR_CONTIGUOUS) != 0 && + PTE_TO_PHYS(origpte) == PTE_TO_PHYS(newpte)), + ("va %#lx changing 64K phys page l3 %#lx newpte %#lx", + va, origpte, newpte)); + pmap_store(tl3p, newpte); + newpte += L3_SIZE; + } } dsb(ishst); @@ -5072,7 +5113,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_paddr_t opa, pa; vm_page_t mpte, om; bool nosleep; - int lvl, rv; + int full_lvl, lvl, rv; KASSERT(ADDR_IS_CANONICAL(va), ("%s: Address not in canonical form: %lx", __func__, va)); @@ -5128,24 +5169,47 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, if ((flags & PMAP_ENTER_LARGEPAGE) != 0) { KASSERT((m->oflags & VPO_UNMANAGED) != 0, ("managed largepage va %#lx flags %#x", va, flags)); - new_l3 &= ~L3_PAGE; - if (psind == 2) { + if (psind == 3) { PMAP_ASSERT_L1_BLOCKS_SUPPORTED; + new_l3 &= ~L3_PAGE; new_l3 |= L1_BLOCK; - } else /* (psind == 1) */ + } else if (psind == 2) { + new_l3 &= ~L3_PAGE; new_l3 |= L2_BLOCK; + } else /* (psind == 1) */ + new_l3 |= ATTR_CONTIGUOUS; rv = pmap_enter_largepage(pmap, va, new_l3, flags, psind); goto out; } - if (psind == 1) { + if (psind == 2) { /* Assert the required virtual and physical alignment. */ KASSERT((va & L2_OFFSET) == 0, ("pmap_enter: va unaligned")); - KASSERT(m->psind > 0, ("pmap_enter: m->psind < psind")); + KASSERT(m->psind > 1, ("pmap_enter: m->psind < psind")); rv = pmap_enter_l2(pmap, va, (new_l3 & ~L3_PAGE) | L2_BLOCK, flags, m, &lock); goto out; } mpte = NULL; + if (psind == 1) { + KASSERT((va & L3C_OFFSET) == 0, ("pmap_enter: va unaligned")); + KASSERT(m->psind > 0, ("pmap_enter: m->psind < psind")); + rv = pmap_enter_l3c(pmap, va, new_l3 | ATTR_CONTIGUOUS, flags, + m, &mpte, &lock); +#if VM_NRESERVLEVEL > 0 + /* + * Attempt L2 promotion, if both the PTP and a level 1 + * reservation are fully populated. + */ + if (rv == KERN_SUCCESS && + (mpte == NULL || mpte->ref_count == NL3PG) && + (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 1) { + pde = pmap_l2(pmap, va); + (void)pmap_promote_l2(pmap, pde, va, mpte, &lock); + } +#endif + goto out; + } /* * In the case that a page table page is not @@ -5365,15 +5429,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, * are aligned with each other and an underlying reservation has the * neighboring L3 pages allocated. The first condition is simply an * optimization that recognizes some eventual promotion failures early - * at a lower run-time cost. Then, if both the page table page and - * the reservation are fully populated, attempt L2 promotion. + * at a lower run-time cost. Then, if both a level 1 reservation and + * the PTP are fully populated, attempt L2 promotion. */ if ((va & L3C_OFFSET) == (pa & L3C_OFFSET) && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_is_populated(m, L3C_ENTRIES) && + (full_lvl = vm_reserv_level_iffullpop(m)) >= 0 && pmap_promote_l3c(pmap, l3, va) && - (mpte == NULL || mpte->ref_count == NL3PG) && - vm_reserv_level_iffullpop(m) == 0) + full_lvl == 1 && (mpte == NULL || mpte->ref_count == NL3PG)) (void)pmap_promote_l2(pmap, pde, va, mpte, &lock); #endif @@ -5667,6 +5730,8 @@ pmap_enter_l3c(pmap_t pmap, vm_offset_t va, pt_entry_t l3e, u_int flags, ("pmap_enter_l3c: va is not aligned")); KASSERT(!VA_IS_CLEANMAP(va) || (l3e & ATTR_SW_MANAGED) == 0, ("pmap_enter_l3c: managed mapping within the clean submap")); + KASSERT((l3e & ATTR_CONTIGUOUS) != 0, + ("pmap_enter_l3c: l3e is missing ATTR_CONTIGUOUS")); /* * If the L3 PTP is not resident, we attempt to create it here. @@ -5873,14 +5938,12 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); if ((va & L2_OFFSET) == 0 && va + L2_SIZE <= end && - m->psind == 1 && pmap_ps_enabled(pmap) && + m->psind == 2 && pmap_ps_enabled(pmap) && ((rv = pmap_enter_l2_rx(pmap, va, m, prot, &lock)) == KERN_SUCCESS || rv == KERN_NO_SPACE)) m = &m[L2_SIZE / PAGE_SIZE - 1]; else if ((va & L3C_OFFSET) == 0 && va + L3C_SIZE <= end && - (VM_PAGE_TO_PHYS(m) & L3C_OFFSET) == 0 && - vm_reserv_is_populated(m, L3C_ENTRIES) && - pmap_ps_enabled(pmap) && + m->psind >= 1 && pmap_ps_enabled(pmap) && ((rv = pmap_enter_l3c_rx(pmap, va, m, &mpte, prot, &lock)) == KERN_SUCCESS || rv == KERN_NO_SPACE)) m = &m[L3C_ENTRIES - 1]; @@ -5932,7 +5995,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, { pt_entry_t *l1, *l2, *l3, l3_val; vm_paddr_t pa; - int lvl; + int full_lvl, lvl; KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, @@ -6063,18 +6126,17 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, * are aligned with each other and an underlying reservation has the * neighboring L3 pages allocated. The first condition is simply an * optimization that recognizes some eventual promotion failures early - * at a lower run-time cost. Then, attempt L2 promotion, if both the - * PTP and the reservation are fully populated. + * at a lower run-time cost. Then, attempt L2 promotion, if both a + * level 1 reservation and the PTP are fully populated. */ if ((prot & VM_PROT_NO_PROMOTE) == 0 && (va & L3C_OFFSET) == (pa & L3C_OFFSET) && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_is_populated(m, L3C_ENTRIES) && + (full_lvl = vm_reserv_level_iffullpop(m)) >= 0 && pmap_promote_l3c(pmap, l3, va) && - (mpte == NULL || mpte->ref_count == NL3PG) && - vm_reserv_level_iffullpop(m) == 0) { + full_lvl == 1 && (mpte == NULL || mpte->ref_count == NL3PG)) { if (l2 == NULL) - l2 = pmap_pde(pmap, va, &lvl); + l2 = pmap_l2(pmap, va); /* * If promotion succeeds, then the next call to this function @@ -8566,7 +8628,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap) { pt_entry_t *pte, tpte; vm_paddr_t mask, pa; - int lvl, val; + int lvl, psind, val; bool managed; PMAP_ASSERT_STAGE1(pmap); @@ -8578,21 +8640,22 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap) switch (lvl) { case 3: mask = L3_OFFSET; + psind = (tpte & ATTR_CONTIGUOUS) != 0 ? 1 : 0; break; case 2: mask = L2_OFFSET; + psind = 2; break; case 1: mask = L1_OFFSET; + psind = 3; break; default: panic("pmap_mincore: invalid level %d", lvl); } managed = (tpte & ATTR_SW_MANAGED) != 0; - val = MINCORE_INCORE; - if (lvl != 3) - val |= MINCORE_PSIND(3 - lvl); + val = MINCORE_INCORE | MINCORE_PSIND(psind); if ((managed && pmap_pte_dirty(pmap, tpte)) || (!managed && (tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW))) val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; @@ -9128,18 +9191,37 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, { vm_offset_t superpage_offset; - if (size < L2_SIZE) + if (size < L3C_SIZE) return; if (object != NULL && (object->flags & OBJ_COLORED) != 0) offset += ptoa(object->pg_color); + + /* + * Considering the object's physical alignment, is the mapping large + * enough to encompass an L2 (2MB/32MB) superpage ... + */ superpage_offset = offset & L2_OFFSET; - if (size - ((L2_SIZE - superpage_offset) & L2_OFFSET) < L2_SIZE || - (*addr & L2_OFFSET) == superpage_offset) + if (size - ((L2_SIZE - superpage_offset) & L2_OFFSET) >= L2_SIZE) { + /* + * If the virtual and physical alignments differ, then + * increase the virtual address so that the alignments match. + */ + if ((*addr & L2_OFFSET) < superpage_offset) + *addr = (*addr & ~L2_OFFSET) + superpage_offset; + else if ((*addr & L2_OFFSET) > superpage_offset) + *addr = ((*addr + L2_OFFSET) & ~L2_OFFSET) + + superpage_offset; return; - if ((*addr & L2_OFFSET) < superpage_offset) - *addr = (*addr & ~L2_OFFSET) + superpage_offset; - else - *addr = ((*addr + L2_OFFSET) & ~L2_OFFSET) + superpage_offset; + } + /* ... or an L3C (64KB/2MB) superpage? */ + superpage_offset = offset & L3C_OFFSET; + if (size - ((L3C_SIZE - superpage_offset) & L3C_OFFSET) >= L3C_SIZE) { + if ((*addr & L3C_OFFSET) < superpage_offset) + *addr = (*addr & ~L3C_OFFSET) + superpage_offset; + else if ((*addr & L3C_OFFSET) > superpage_offset) + *addr = ((*addr + L3C_OFFSET) & ~L3C_OFFSET) + + superpage_offset; + } } /** diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h index ca3fae11c515..6eb58a69dba1 100644 --- a/sys/arm64/include/param.h +++ b/sys/arm64/include/param.h @@ -97,7 +97,7 @@ #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (PAGE_SIZE - 1) -#define MAXPAGESIZES 3 /* maximum number of supported page sizes */ +#define MAXPAGESIZES 4 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES #if defined(KASAN) || defined(KMSAN) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 28b8380fc7c1..349849845e73 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -114,25 +114,34 @@ #endif /* - * Enable superpage reservations: 1 level. + * Enable superpage reservations: 2 levels. */ #ifndef VM_NRESERVLEVEL -#define VM_NRESERVLEVEL 1 +#define VM_NRESERVLEVEL 2 #endif /* - * Level 0 reservations consist of 512 pages when PAGE_SIZE is 4KB, and - * 2048 pages when PAGE_SIZE is 16KB. + * Level 0 reservations consist of 16 pages when PAGE_SIZE is 4KB, and 128 + * pages when PAGE_SIZE is 16KB. Level 1 reservations consist of 32 64KB + * pages when PAGE_SIZE is 4KB, and 16 2M pages when PAGE_SIZE is 16KB. */ -#ifndef VM_LEVEL_0_ORDER #if PAGE_SIZE == PAGE_SIZE_4K -#define VM_LEVEL_0_ORDER 9 +#ifndef VM_LEVEL_0_ORDER +#define VM_LEVEL_0_ORDER 4 +#endif +#ifndef VM_LEVEL_1_ORDER +#define VM_LEVEL_1_ORDER 5 +#endif #elif PAGE_SIZE == PAGE_SIZE_16K -#define VM_LEVEL_0_ORDER 11 +#ifndef VM_LEVEL_0_ORDER +#define VM_LEVEL_0_ORDER 7 +#endif +#ifndef VM_LEVEL_1_ORDER +#define VM_LEVEL_1_ORDER 4 +#endif #else #error Unsupported page size #endif -#endif /** * Address space layout. diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 4cee366ed747..a623a63e9c2e 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1360,8 +1360,12 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) if ((map->flags & MAP_ASLR) != 0) { maxv1 = maxv / 2 + addr / 2; error = __CONCAT(rnd_, __elfN(base))(map, addr, maxv1, - (MAXPAGESIZES > 1 && pagesizes[1] != 0) ? - pagesizes[1] : pagesizes[0], &anon_loc); +#if VM_NRESERVLEVEL > 0 + pagesizes[VM_NRESERVLEVEL] != 0 ? + /* Align anon_loc to the largest superpage size. */ + pagesizes[VM_NRESERVLEVEL] : +#endif + pagesizes[0], &anon_loc); if (error != 0) goto ret; map->anon_loc = anon_loc; diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index e4f557a3461d..5724ed3f6932 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -58,6 +58,8 @@ #include #include +#include + SYSCTL_ROOT_NODE(0, sysctl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Sysctl internal magic"); SYSCTL_ROOT_NODE(CTL_KERN, kern, CTLFLAG_RW | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, 0, @@ -242,7 +244,11 @@ SYSCTL_PROC(_hw, HW_USERMEM, usermem, SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "Amount of physical memory (in pages)"); -u_long pagesizes[MAXPAGESIZES] = { PAGE_SIZE }; +#if VM_NRESERVLEVEL > 0 +_Static_assert(MAXPAGESIZES > VM_NRESERVLEVEL, "MAXPAGESIZES is too small"); +#endif + +u_long __read_mostly pagesizes[MAXPAGESIZES] = { PAGE_SIZE }; static int sysctl_hw_pagesizes(SYSCTL_HANDLER_ARGS) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 2ecc82026b3f..52b361832218 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2542,6 +2542,7 @@ kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t entry, vm_offset_t addr; vm_paddr_t pa; vm_pindex_t pi, pi_adv, pindex; + int incore; *super = false; *resident_count = 0; @@ -2577,10 +2578,15 @@ kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t entry, } m_adv = NULL; if (m->psind != 0 && addr + pagesizes[1] <= entry->end && - (addr & (pagesizes[1] - 1)) == 0 && - (pmap_mincore(map->pmap, addr, &pa) & MINCORE_SUPER) != 0) { + (addr & (pagesizes[1] - 1)) == 0 && (incore = + pmap_mincore(map->pmap, addr, &pa) & MINCORE_SUPER) != 0) { *super = true; - pi_adv = atop(pagesizes[1]); + /* + * The virtual page might be smaller than the physical + * page, so we use the page size reported by the pmap + * rather than m->psind. + */ + pi_adv = atop(pagesizes[incore >> MINCORE_PSIND_SHIFT]); } else { /* * We do not test the found page on validity. diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index c83455d1e70b..7672ded459df 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1589,9 +1589,20 @@ shm_mmap_large(struct shmfd *shmfd, vm_map_t map, vm_offset_t *addr, if (align == 0) { align = pagesizes[shmfd->shm_lp_psind]; } else if (align == MAP_ALIGNED_SUPER) { - if (shmfd->shm_lp_psind != 1) + /* + * MAP_ALIGNED_SUPER is only supported on superpage sizes, + * i.e., [1, VM_NRESERVLEVEL]. shmfd->shm_lp_psind < 1 is + * handled above. + */ + if ( +#if VM_NRESERVLEVEL > 0 + shmfd->shm_lp_psind > VM_NRESERVLEVEL +#else + shmfd->shm_lp_psind > 1 +#endif + ) return (EINVAL); - align = pagesizes[1]; + align = pagesizes[shmfd->shm_lp_psind]; } else { align >>= MAP_ALIGNMENT_SHIFT; align = 1ULL << align; diff --git a/sys/sys/mman.h b/sys/sys/mman.h index cc840fb96d8e..8feba252e2fe 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -175,7 +175,9 @@ #define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */ #define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */ #define MINCORE_SUPER 0x60 /* Page is a "super" page */ -#define MINCORE_PSIND(i) (((i) << 5) & MINCORE_SUPER) /* Page size */ +#define MINCORE_PSIND_SHIFT 5 +#define MINCORE_PSIND(i) (((i) << MINCORE_PSIND_SHIFT) & MINCORE_SUPER) + /* Page size */ /* * Anonymous object constant for shm_open(). diff --git a/sys/vm/vm_domainset.c b/sys/vm/vm_domainset.c index b881466bffe5..f6ac3c984cbf 100644 --- a/sys/vm/vm_domainset.c +++ b/sys/vm/vm_domainset.c @@ -77,6 +77,9 @@ vm_domainset_iter_init(struct vm_domainset_iter *di, struct domainset *ds, * reservation boundary. */ pindex += obj->pg_color; +#if VM_NRESERVLEVEL > 1 + pindex >>= VM_LEVEL_1_ORDER; +#endif pindex >>= VM_LEVEL_0_ORDER; } else #endif diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 3da411643f26..df686f3e46dc 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -380,12 +380,10 @@ vm_fault_soft_fast(struct faultstate *fs) psind = 0; #if VM_NRESERVLEVEL > 0 if ((m->flags & PG_FICTITIOUS) == 0 && - (m_super = vm_reserv_to_superpage(m)) != NULL && - rounddown2(vaddr, pagesizes[m_super->psind]) >= fs->entry->start && - roundup2(vaddr + 1, pagesizes[m_super->psind]) <= fs->entry->end && - (vaddr & (pagesizes[m_super->psind] - 1)) == (VM_PAGE_TO_PHYS(m) & - (pagesizes[m_super->psind] - 1)) && - pmap_ps_enabled(fs->map->pmap)) { + (m_super = vm_reserv_to_superpage(m)) != NULL) { + psind = m_super->psind; + KASSERT(psind > 0, + ("psind %d of m_super %p < 1", psind, m_super)); flags = PS_ALL_VALID; if ((fs->prot & VM_PROT_WRITE) != 0) { /* @@ -398,9 +396,23 @@ vm_fault_soft_fast(struct faultstate *fs) if ((fs->first_object->flags & OBJ_UNMANAGED) == 0) flags |= PS_ALL_DIRTY; } - if (vm_page_ps_test(m_super, flags, m)) { + while (rounddown2(vaddr, pagesizes[psind]) < fs->entry->start || + roundup2(vaddr + 1, pagesizes[psind]) > fs->entry->end || + (vaddr & (pagesizes[psind] - 1)) != + (VM_PAGE_TO_PHYS(m) & (pagesizes[psind] - 1)) || + !vm_page_ps_test(m_super, psind, flags, m) || + !pmap_ps_enabled(fs->map->pmap)) { + psind--; + if (psind == 0) + break; + m_super += rounddown2(m - m_super, + atop(pagesizes[psind])); + KASSERT(m_super->psind >= psind, + ("psind %d of m_super %p < %d", m_super->psind, + m_super, psind)); + } + if (psind > 0) { m_map = m_super; - psind = m_super->psind; vaddr = rounddown2(vaddr, pagesizes[psind]); /* Preset the modified bit for dirty superpages. */ if ((flags & PS_ALL_DIRTY) != 0) @@ -615,10 +627,10 @@ vm_fault_populate(struct faultstate *fs) vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset; psind = m->psind; - if (psind > 0 && ((vaddr & (pagesizes[psind] - 1)) != 0 || + while (psind > 0 && ((vaddr & (pagesizes[psind] - 1)) != 0 || pidx + OFF_TO_IDX(pagesizes[psind]) - 1 > pager_last || !pmap_ps_enabled(fs->map->pmap))) - psind = 0; + psind--; npages = atop(pagesizes[psind]); for (i = 0; i < npages; i++) { diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 641800413e68..4f8121fa1064 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -106,7 +106,10 @@ #include -#if VM_NRESERVLEVEL > 0 +#if VM_NRESERVLEVEL > 1 +#define KVA_KSTACK_QUANTUM_SHIFT (VM_LEVEL_1_ORDER + VM_LEVEL_0_ORDER + \ + PAGE_SHIFT) +#elif VM_NRESERVLEVEL > 0 #define KVA_KSTACK_QUANTUM_SHIFT (VM_LEVEL_0_ORDER + PAGE_SHIFT) #else #define KVA_KSTACK_QUANTUM_SHIFT (8 + PAGE_SHIFT) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 1ef3154845b3..a04044463fe2 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -120,7 +120,10 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLAG_RD, #endif "Max kernel address"); -#if VM_NRESERVLEVEL > 0 +#if VM_NRESERVLEVEL > 1 +#define KVA_QUANTUM_SHIFT (VM_LEVEL_1_ORDER + VM_LEVEL_0_ORDER + \ + PAGE_SHIFT) +#elif VM_NRESERVLEVEL > 0 #define KVA_QUANTUM_SHIFT (VM_LEVEL_0_ORDER + PAGE_SHIFT) #else /* On non-superpage architectures we want large import sizes. */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index fa71bb8a01d6..b9c27e14d1d0 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1993,8 +1993,15 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, return (result); } +#if VM_NRESERVLEVEL == 1 static const int aslr_pages_rnd_64[2] = {0x1000, 0x10}; static const int aslr_pages_rnd_32[2] = {0x100, 0x4}; +#elif VM_NRESERVLEVEL == 2 +static const int aslr_pages_rnd_64[3] = {0x1000, 0x1000, 0x10}; +static const int aslr_pages_rnd_32[3] = {0x100, 0x100, 0x4}; +#else +#error "Unsupported VM_NRESERVLEVEL" +#endif static int cluster_anon = 1; SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW, @@ -2190,9 +2197,23 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, * Find space for allocation, including * gap needed for later randomization. */ - pidx = MAXPAGESIZES > 1 && pagesizes[1] != 0 && - (find_space == VMFS_SUPER_SPACE || find_space == - VMFS_OPTIMAL_SPACE) ? 1 : 0; + pidx = 0; +#if VM_NRESERVLEVEL > 0 + if ((find_space == VMFS_SUPER_SPACE || + find_space == VMFS_OPTIMAL_SPACE) && + pagesizes[VM_NRESERVLEVEL] != 0) { + /* + * Do not pointlessly increase the space that + * is requested from vm_map_findspace(). + * pmap_align_superpage() will only change a + * mapping's alignment if that mapping is at + * least a superpage in size. + */ + pidx = VM_NRESERVLEVEL; + while (pidx > 0 && length < pagesizes[pidx]) + pidx--; + } +#endif gap = vm_map_max(map) > MAP_32BIT_MAX_ADDR && (max_addr == 0 || max_addr > MAP_32BIT_MAX_ADDR) ? aslr_pages_rnd_64[pidx] : aslr_pages_rnd_32[pidx]; @@ -2656,6 +2677,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, vm_offset_t start; vm_page_t p, p_start; vm_pindex_t mask, psize, threshold, tmpidx; + int psind; if ((prot & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0 || object == NULL) return; @@ -2710,13 +2732,17 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, p_start = p; } /* Jump ahead if a superpage mapping is possible. */ - if (p->psind > 0 && ((addr + ptoa(tmpidx)) & - (pagesizes[p->psind] - 1)) == 0) { - mask = atop(pagesizes[p->psind]) - 1; - if (tmpidx + mask < psize && - vm_page_ps_test(p, PS_ALL_VALID, NULL)) { - p += mask; - threshold += mask; + for (psind = p->psind; psind > 0; psind--) { + if (((addr + ptoa(tmpidx)) & + (pagesizes[psind] - 1)) == 0) { + mask = atop(pagesizes[psind]) - 1; + if (tmpidx + mask < psize && + vm_page_ps_test(p, psind, + PS_ALL_VALID, NULL)) { + p += mask; + threshold += mask; + break; + } } } } else if (p_start != NULL) { diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index e343170eff6a..c9ac79330696 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -5562,7 +5562,7 @@ vm_page_is_valid(vm_page_t m, int base, int size) * (super)page and false otherwise. */ bool -vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip_m) +vm_page_ps_test(vm_page_t m, int psind, int flags, vm_page_t skip_m) { vm_object_t object; int i, npages; @@ -5571,7 +5571,9 @@ vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip_m) if (skip_m != NULL && skip_m->object != object) return (false); VM_OBJECT_ASSERT_LOCKED(object); - npages = atop(pagesizes[m->psind]); + KASSERT(psind <= m->psind, + ("psind %d > psind %d of m %p", psind, m->psind, m)); + npages = atop(pagesizes[psind]); /* * The physically contiguous pages that make up a superpage, i.e., a diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 5422f8df89a0..f419ba8e3d34 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -657,7 +657,7 @@ void vm_page_pqbatch_submit(vm_page_t m, uint8_t queue); bool vm_page_pqstate_commit(vm_page_t m, vm_page_astate_t *old, vm_page_astate_t new); vm_page_t vm_page_prev(vm_page_t m); -bool vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip_m); +bool vm_page_ps_test(vm_page_t m, int psind, int flags, vm_page_t skip_m); void vm_page_putfake(vm_page_t m); void vm_page_readahead_finish(vm_page_t m); int vm_page_reclaim_contig(int req, u_long npages, vm_paddr_t low, diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index a4bbccdfb428..aa20eca129fb 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -77,6 +77,29 @@ #if VM_NRESERVLEVEL > 0 +/* + * Temporarily simulate two-level reservations. Effectively, VM_LEVEL_0_* is + * level 1, and VM_SUBLEVEL_0_* is level 0. + */ +#if VM_NRESERVLEVEL == 2 +#undef VM_NRESERVLEVEL +#define VM_NRESERVLEVEL 1 +#if VM_LEVEL_0_ORDER == 4 +#undef VM_LEVEL_0_ORDER +#define VM_LEVEL_0_ORDER (4 + VM_LEVEL_1_ORDER) +#define VM_SUBLEVEL_0_NPAGES (1 << 4) +#elif VM_LEVEL_0_ORDER == 7 +#undef VM_LEVEL_0_ORDER +#define VM_LEVEL_0_ORDER (7 + VM_LEVEL_1_ORDER) +#define VM_SUBLEVEL_0_NPAGES (1 << 7) +#else +#error "Unsupported level 0 reservation size" +#endif +#define VM_LEVEL_0_PSIND 2 +#else +#define VM_LEVEL_0_PSIND 1 +#endif + #ifndef VM_LEVEL_0_ORDER_MAX #define VM_LEVEL_0_ORDER_MAX VM_LEVEL_0_ORDER #endif @@ -381,6 +404,27 @@ vm_reserv_insert(vm_reserv_t rv, vm_object_t object, vm_pindex_t pindex) vm_reserv_object_unlock(object); } +#ifdef VM_SUBLEVEL_0_NPAGES +static inline bool +vm_reserv_is_sublevel_full(vm_reserv_t rv, int index) +{ + _Static_assert(VM_SUBLEVEL_0_NPAGES == 16 || + VM_SUBLEVEL_0_NPAGES == 128, + "vm_reserv_is_sublevel_full: unsupported VM_SUBLEVEL_0_NPAGES"); + /* An equivalent bit_ntest() compiles to more instructions. */ + switch (VM_SUBLEVEL_0_NPAGES) { + case 16: + return (((uint16_t *)rv->popmap)[index / 16] == UINT16_MAX); + case 128: + index = rounddown2(index, 128) / 64; + return (((uint64_t *)rv->popmap)[index] == UINT64_MAX && + ((uint64_t *)rv->popmap)[index + 1] == UINT64_MAX); + default: + __unreachable(); + } +} +#endif + /* * Reduces the given reservation's population count. If the population count * becomes zero, the reservation is destroyed. Additionally, moves the @@ -406,11 +450,15 @@ vm_reserv_depopulate(vm_reserv_t rv, int index) ("vm_reserv_depopulate: reserv %p's domain is corrupted %d", rv, rv->domain)); if (rv->popcnt == VM_LEVEL_0_NPAGES) { - KASSERT(rv->pages->psind == 1, + KASSERT(rv->pages->psind == VM_LEVEL_0_PSIND, ("vm_reserv_depopulate: reserv %p is already demoted", rv)); - rv->pages->psind = 0; + rv->pages->psind = VM_LEVEL_0_PSIND - 1; } +#ifdef VM_SUBLEVEL_0_NPAGES + if (vm_reserv_is_sublevel_full(rv, index)) + rv->pages[rounddown2(index, VM_SUBLEVEL_0_NPAGES)].psind = 0; +#endif bit_clear(rv->popmap, index); rv->popcnt--; if ((unsigned)(ticks - rv->lasttick) >= PARTPOPSLOP || @@ -522,12 +570,17 @@ vm_reserv_populate(vm_reserv_t rv, int index) index)); KASSERT(rv->popcnt < VM_LEVEL_0_NPAGES, ("vm_reserv_populate: reserv %p is already full", rv)); - KASSERT(rv->pages->psind == 0, + KASSERT(rv->pages->psind >= 0 && + rv->pages->psind < VM_LEVEL_0_PSIND, ("vm_reserv_populate: reserv %p is already promoted", rv)); KASSERT(rv->domain < vm_ndomains, ("vm_reserv_populate: reserv %p's domain is corrupted %d", rv, rv->domain)); bit_set(rv->popmap, index); +#ifdef VM_SUBLEVEL_0_NPAGES + if (vm_reserv_is_sublevel_full(rv, index)) + rv->pages[rounddown2(index, VM_SUBLEVEL_0_NPAGES)].psind = 1; +#endif rv->popcnt++; if ((unsigned)(ticks - rv->lasttick) < PARTPOPSLOP && rv->inpartpopq && rv->popcnt != VM_LEVEL_0_NPAGES) @@ -542,10 +595,10 @@ vm_reserv_populate(vm_reserv_t rv, int index) rv->inpartpopq = TRUE; TAILQ_INSERT_TAIL(&vm_rvd[rv->domain].partpop, rv, partpopq); } else { - KASSERT(rv->pages->psind == 0, + KASSERT(rv->pages->psind == VM_LEVEL_0_PSIND - 1, ("vm_reserv_populate: reserv %p is already promoted", rv)); - rv->pages->psind = 1; + rv->pages->psind = VM_LEVEL_0_PSIND; } vm_reserv_domain_unlock(rv->domain); } @@ -889,13 +942,18 @@ vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex, int domain, static void vm_reserv_break(vm_reserv_t rv) { + vm_page_t m; int hi, lo, pos; vm_reserv_assert_locked(rv); CTR5(KTR_VM, "%s: rv %p object %p popcnt %d inpartpop %d", __FUNCTION__, rv, rv->object, rv->popcnt, rv->inpartpopq); vm_reserv_remove(rv); - rv->pages->psind = 0; + m = rv->pages; +#ifdef VM_SUBLEVEL_0_NPAGES + for (; m < rv->pages + VM_LEVEL_0_NPAGES; m += VM_SUBLEVEL_0_NPAGES) +#endif + m->psind = 0; hi = lo = -1; pos = 0; for (;;) { @@ -1089,7 +1147,11 @@ vm_reserv_level(vm_page_t m) vm_reserv_t rv; rv = vm_reserv_from_page(m); +#ifdef VM_SUBLEVEL_0_NPAGES + return (rv->object != NULL ? 1 : -1); +#else return (rv->object != NULL ? 0 : -1); +#endif } /* @@ -1102,7 +1164,15 @@ vm_reserv_level_iffullpop(vm_page_t m) vm_reserv_t rv; rv = vm_reserv_from_page(m); - return (rv->popcnt == VM_LEVEL_0_NPAGES ? 0 : -1); + if (rv->popcnt == VM_LEVEL_0_NPAGES) { +#ifdef VM_SUBLEVEL_0_NPAGES + return (1); + } else if (rv->pages != NULL && + vm_reserv_is_sublevel_full(rv, m - rv->pages)) { +#endif + return (0); + } + return (-1); } /* @@ -1357,6 +1427,10 @@ vm_reserv_size(int level) switch (level) { case 0: +#ifdef VM_SUBLEVEL_0_NPAGES + return (VM_SUBLEVEL_0_NPAGES * PAGE_SIZE); + case 1: +#endif return (VM_LEVEL_0_SIZE); case -1: return (PAGE_SIZE); @@ -1432,12 +1506,16 @@ vm_reserv_to_superpage(vm_page_t m) VM_OBJECT_ASSERT_LOCKED(m->object); rv = vm_reserv_from_page(m); - if (rv->object == m->object && rv->popcnt == VM_LEVEL_0_NPAGES) - m = rv->pages; - else - m = NULL; - - return (m); + if (rv->object == m->object) { + if (rv->popcnt == VM_LEVEL_0_NPAGES) + return (rv->pages); +#ifdef VM_SUBLEVEL_0_NPAGES + if (vm_reserv_is_sublevel_full(rv, m - rv->pages)) + return (rv->pages + rounddown2(m - rv->pages, + VM_SUBLEVEL_0_NPAGES)); +#endif + } + return (NULL); } #endif /* VM_NRESERVLEVEL > 0 */ From 772ae9eddf87d835279ea6aaaf08b8ca421101ff Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 13 Jul 2024 14:40:43 -0500 Subject: [PATCH 047/151] vm ASLR: Handle VM_NRESERV_LEVEL == 0 Some flavors of powerpc don't enable superpage reservations. Fixes: 3e00c11a4f43 ("arm64: Support the L3 ATTR_CONTIGUOUS page ...") --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index b9c27e14d1d0..77297a0e3957 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1993,7 +1993,7 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, return (result); } -#if VM_NRESERVLEVEL == 1 +#if VM_NRESERVLEVEL <= 1 static const int aslr_pages_rnd_64[2] = {0x1000, 0x10}; static const int aslr_pages_rnd_32[2] = {0x100, 0x4}; #elif VM_NRESERVLEVEL == 2 From 616dd88a2e68c1243e4c8b57e883742937a61af0 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 13 Jul 2024 07:05:36 +0300 Subject: [PATCH 048/151] amd64 pmap_allocpte_nosleep(): fix indent Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45966 --- sys/amd64/amd64/pmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9f85e903cd74..337edd646ca0 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4761,8 +4761,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, } if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ - if (pmap_allocpte_nosleep(pmap, pmap_pdpe_pindex(va), - lockp, va) == NULL) { + if (pmap_allocpte_nosleep(pmap, pmap_pdpe_pindex(va), + lockp, va) == NULL) { pmap_allocpte_free_unref(pmap, va, pmap_pml4e(pmap, va)); pmap_free_pt_page(pmap, m, true); From 10a6ae0ddffb1de842a0ba6a6ca29786de6d3bfd Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 13 Jul 2024 07:07:18 +0300 Subject: [PATCH 049/151] amd64 pmap_allocpte_nosleep(): stop testing tautological condition Enabled PTI for given pmap is equivalent to pm_ucr3 being valid is equivalent to root userspace page table page pm_pmltopu being allocated. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45966 --- sys/amd64/amd64/pmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 337edd646ca0..dcf9b4f5a4f3 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4707,8 +4707,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, *pml5 = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M; if (pmap->pm_pmltopu != NULL && pml5index < NUPML5E) { - if (pmap->pm_ucr3 != PMAP_NO_CR3) - *pml5 |= pg_nx; + MPASS(pmap->pm_ucr3 != PMAP_NO_CR3); + *pml5 |= pg_nx; pml5u = &pmap->pm_pmltopu[pml5index]; *pml5u = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | @@ -4728,6 +4728,8 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, if (!pmap_is_la57(pmap) && pmap->pm_pmltopu != NULL && pml4index < NUPML4E) { + MPASS(pmap->pm_ucr3 != PMAP_NO_CR3); + /* * PTI: Make all user-space mappings in the * kernel-mode page table no-execute so that @@ -4735,8 +4737,7 @@ pmap_allocpte_nosleep(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp, * the kernel-mode page table active on return * to user space. */ - if (pmap->pm_ucr3 != PMAP_NO_CR3) - *pml4 |= pg_nx; + *pml4 |= pg_nx; pml4u = &pmap->pm_pmltopu[pml4index]; *pml4u = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | From 60f098f841198d06a3b10d66c99c4778f2167fbb Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 13 Jul 2024 23:47:20 -0600 Subject: [PATCH 050/151] arch: Update to remove armv6 There were two stray places where armv6 remained that shouldn't be there. Remove them. Replace one with aarch64 and update MACHINE_ARCH description of amd64 while I'm here. Eliminate a near-by contraction igor noted. Sponsored by: Netflix --- share/man/man7/arch.7 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 88228b807e6a..21d2b156af87 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 19, 2024 +.Dd July 13, 2024 .Dt ARCH 7 .Os .Sh NAME @@ -161,12 +161,11 @@ Examples are: .Pp .Dv aarch64 will support execution of -.Dv armv6 -or .Dv armv7 binaries if the CPU implements .Dv AArch32 -execution state, however older arm binaries aren't supported. +execution state, however older arm binaries are not supported by +.Fx . .Pp On all supported architectures: .Bl -column -offset -indent "long long" "Size" @@ -374,15 +373,19 @@ It, along with defines the ABI used by the system. Generally, the plain CPU name specifies the most common (or at least first) variant of the CPU. -This is why powerpc and powerpc64 imply 'big endian' while 'armv6' and 'armv7' +This is why powerpc and powerpc64 imply 'big endian' while armv7 and aarch64 imply little endian. If we ever were to support the so-called x32 ABI (using 32-bit pointers on the amd64 architecture), it would most likely be encoded as amd64-x32. -It is unfortunate that amd64 specifies the 64-bit evolution of the x86 -platform (it matches the 'first rule') as everybody else uses x86_64. -There is no standard name for the processor: each OS selects its own -conventions. +It is unfortunate that amd64 specifies the 64-bit evolution of the x86 platform +(it matches the 'first rule') as almost everybody else uses x86_64. +The +.Fx +port was so early, it predated processor name standardization after Intel joined +the market. +At the time, each OS selected its own conventions. +Backwards compatibility means it is not easy to change to the consensus name. .It Dv MACHINE_CPUARCH Represents the source location for a given .Dv MACHINE_ARCH . From 82dfbaf7e7ca1334960ee918fa1b4eb2537d444b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 14 Jul 2024 12:01:43 -0600 Subject: [PATCH 051/151] rtld-elf: Fix signed conversion for %hh While char is signed on some of FreeBSD's architecutres, it's unsigned on others. So the naked 'char' cast here needs to be 'signed char' because in this context, we want the signed interpretation. We don't really use %hh conversions in the run time linker, so this is likely a nop. However, for correctness, we need this, like we did in the kernel in fc3e5334ab89. It's a nop on x86 and riscv due to defaults as well, but does fix a bug on arm and powerpc where char is unsigned. Suggested by: kib Sponsored by: Netflix --- libexec/rtld-elf/rtld_printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld_printf.c b/libexec/rtld-elf/rtld_printf.c index befac1c547b7..45c0bdc00b29 100644 --- a/libexec/rtld-elf/rtld_printf.c +++ b/libexec/rtld-elf/rtld_printf.c @@ -367,7 +367,7 @@ reswitch: switch (ch = (u_char)*fmt++) { else if (hflag) num = (short)va_arg(ap, int); else if (cflag) - num = (char)va_arg(ap, int); + num = (signed char)va_arg(ap, int); else num = va_arg(ap, int); number: From 7cd91315911d3413ccf527228d4b8c060b681fba Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:12:01 -0400 Subject: [PATCH 052/151] vmm: Conditionalize addition of opt_*.h headers These are only included in the amd64 vmm code, so it doesn't make sense to list them unconditionally. PR: 280171 Reviewed by: wosch, imp, emaste Differential Revision: https://reviews.freebsd.org/D45964 --- sys/modules/vmm/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 8f6eb915290a..96155753f1de 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -3,8 +3,13 @@ KMOD= vmm -SRCS= opt_acpi.h opt_bhyve_snapshot.h opt_ddb.h \ - acpi_if.h bus_if.h device_if.h pci_if.h pcib_if.h vnode_if.h +.if ${MACHINE_CPUARCH} == "amd64" +SRCS+= opt_acpi.h \ + opt_bhyve_snapshot.h \ + opt_ddb.h +.endif + +SRCS+= acpi_if.h bus_if.h device_if.h pci_if.h pcib_if.h vnode_if.h CFLAGS+= -DVMM_KEEP_STATS CFLAGS+= -I${SRCTOP}/sys/${MACHINE}/vmm From 5b98bd30686a358b2a20728a4a6b5cecb7e28dc9 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:12:32 -0400 Subject: [PATCH 053/151] sched tests: Avoid underflow when maxcpuid == 0 MFC after: 1 week --- tests/sys/kern/sched_affinity.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/sched_affinity.c b/tests/sys/kern/sched_affinity.c index cbba226b3fa2..9af6076c1649 100644 --- a/tests/sys/kern/sched_affinity.c +++ b/tests/sys/kern/sched_affinity.c @@ -67,13 +67,16 @@ ATF_TC_BODY(test_setinvalidcpu, tc) { size_t cpusetsize; cpuset_t *set; + int cpu; + + cpu = maxcpuid > 1 ? maxcpuid - 1 : 0; cpusetsize = CPU_ALLOC_SIZE(maxcpuid + 1); set = CPU_ALLOC(maxcpuid + 1); ATF_REQUIRE(set != NULL); CPU_ZERO_S(cpusetsize, set); CPU_SET_S(maxcpuid + 1, cpusetsize, set); - CPU_SET_S(maxcpuid - 1, cpusetsize, set); + CPU_SET_S(cpu, cpusetsize, set); ATF_REQUIRE(sched_setaffinity(0, cpusetsize, set) == 0); CPU_FREE(set); @@ -82,7 +85,7 @@ ATF_TC_BODY(test_setinvalidcpu, tc) ATF_REQUIRE(set != NULL); CPU_ZERO_S(cpusetsize, set); CPU_SET_S(maxcpuid + 1, cpusetsize, set); - CPU_SET_S(maxcpuid - 1, cpusetsize, set); + CPU_SET_S(cpu, cpusetsize, set); ATF_REQUIRE(cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, cpusetsize, set) == -1); ATF_REQUIRE_EQ(errno, EINVAL); From ab27e232b14c07317642a2e4c546c9b71bd9c00b Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:12:50 -0400 Subject: [PATCH 054/151] socket tests: Serialize sonewconn_overflow It relies on being able inspect the dmesg buffer to see whether the kernel logged certain messages. If it's interleaved with tests that generate large amounts of console output (e.g., GELI tests), then it can fail spuriously. MFC after: 2 weeks --- tests/sys/kern/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index c5107ce8f9fe..0b9182b0808c 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -60,6 +60,7 @@ ATF_TESTS_SH+= coredump_phnum_test ATF_TESTS_SH+= sonewconn_overflow TEST_METADATA.sonewconn_overflow+= required_programs="python" TEST_METADATA.sonewconn_overflow+= required_user="root" +TEST_METADATA.sonewconn_overflow+= is_exclusive="true" ATF_TESTS_SH+= sendfile_test ATF_TESTS_SH+= sysctl_security_jail_children TEST_METADATA.sysctl_security_jail_children+= is_exclusive="true" From 498b3b494b8b3e500e555a9653d950b9e25a2f1a Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:13:13 -0400 Subject: [PATCH 055/151] lockf tests: Fix a race The test launches lockf(1) in the background and races with it, so it shouldn't be using atf_check to check that lockf won the race. MFC after: 1 week --- usr.bin/lockf/tests/lockf_test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh index cc6938d2306e..d73c7590653d 100644 --- a/usr.bin/lockf/tests/lockf_test.sh +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -47,7 +47,9 @@ basic_body() lpid=$! # Make sure that the lock exists... - atf_check test -e "testlock" + while ! test -e "testlock"; do + sleep 0.1 + done # Attempt both verbose and silent re-lock atf_check -s exit:${EX_TEMPFAIL} -e not-empty \ From dc8357de606aa65fc1c35a43d4a5f1d706164ddb Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:14:50 -0400 Subject: [PATCH 056/151] gnop tests: Serialize Some of these tests make use of test disk devices, but then they can't run in parallel. MFC after: 2 weeks --- tests/sys/geom/class/nop/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/geom/class/nop/Makefile b/tests/sys/geom/class/nop/Makefile index 54b41584d441..a3347e0cdb65 100644 --- a/tests/sys/geom/class/nop/Makefile +++ b/tests/sys/geom/class/nop/Makefile @@ -5,4 +5,8 @@ TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} ATF_TESTS_SH+= nop_test +# Some tests make use of the "disks" property and kyua may schedule +# them to run at the time time, which the tests do not expect. +TEST_METADATA.nop_test+= is_exclusive="true" + .include From d254651de392538fa7f5c0020093dde0ca06c614 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:15:23 -0400 Subject: [PATCH 057/151] axgbe: Remove a nonsensical use of kernel_sysctlbyname() No functional change intended. MFC after: 1 week --- sys/dev/axgbe/if_axgbe_pci.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 3e68525067fb..320799e77188 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -610,8 +611,6 @@ axgbe_set_counts(if_ctx_t ctx) struct axgbe_if_softc *sc = iflib_get_softc(ctx); struct xgbe_prv_data *pdata = &sc->pdata; cpuset_t lcpus; - int cpu_count, err; - size_t len; /* Set all function pointers */ xgbe_init_all_fptrs(pdata); @@ -638,21 +637,12 @@ axgbe_set_counts(if_ctx_t ctx) * number of Rx queues or maximum allowed */ - /* Get cpu count from sysctl */ - len = sizeof(cpu_count); - err = kernel_sysctlbyname(curthread, "hw.ncpu", &cpu_count, &len, NULL, - 0, NULL, 0); - if (err) { - axgbe_error("Unable to fetch number of cpus\n"); - cpu_count = 1; - } - if (bus_get_cpus(pdata->dev, INTR_CPUS, sizeof(lcpus), &lcpus) != 0) { axgbe_error("Unable to fetch CPU list\n"); /* TODO - handle CPU_COPY(&all_cpus, &lcpus); */ } - DBGPR("ncpu %d intrcpu %d\n", cpu_count, CPU_COUNT(&lcpus)); + DBGPR("ncpu %d intrcpu %d\n", mp_ncpus, CPU_COUNT(&lcpus)); pdata->tx_ring_count = min(CPU_COUNT(&lcpus), pdata->hw_feat.tx_ch_cnt); pdata->tx_ring_count = min(pdata->tx_ring_count, From 1c64b3aba3d0e2910ac52c18e3c240348eb3e36e Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:18:27 -0400 Subject: [PATCH 058/151] hptiop: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/hptiop/hptiop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c index 547957c30ef1..8252dbad4a07 100644 --- a/sys/dev/hptiop/hptiop.c +++ b/sys/dev/hptiop/hptiop.c @@ -1798,7 +1798,6 @@ static int hptiop_probe(device_t dev) { struct hpt_iop_hba *hba; u_int32_t id; - static char buf[256]; int sas = 0; struct hptiop_adapter_ops *ops; @@ -1851,9 +1850,8 @@ static int hptiop_probe(device_t dev) pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev)); - sprintf(buf, "RocketRAID %x %s Controller\n", - id, sas ? "SAS" : "SATA"); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "RocketRAID %x %s Controller", + id, sas ? "SAS" : "SATA"); hba = (struct hpt_iop_hba *)device_get_softc(dev); bzero(hba, sizeof(struct hpt_iop_hba)); From e536b197c0cf5c245e0b65f1b73447d53f3656f2 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:20:18 -0400 Subject: [PATCH 059/151] netlink: Wrap long lines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. --- sys/netlink/netlink_debug.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sys/netlink/netlink_debug.h b/sys/netlink/netlink_debug.h index 0d8423d4933a..db987b26b6d7 100644 --- a/sys/netlink/netlink_debug.h +++ b/sys/netlink/netlink_debug.h @@ -46,12 +46,16 @@ SYSCTL_DECL(_net_netlink_debug); * Logging for events specific for particular process * Example: [nl_domain] PID 4834 fdump_sa: unsupported family: 45 */ -#define NL_RAW_PID_LOG(_l, _pid, _fmt, ...) NL_RAW_PID_LOG_##_l(_l, _pid, _fmt, ## __VA_ARGS__) -#define _NL_RAW_PID_LOG(_l, _pid, _fmt, ...) if (_DEBUG_PASS_MSG(_l)) { \ - _output("[" DEBUG_PREFIX_NAME "] PID %u %s: " _fmt "\n", _pid, __func__, ##__VA_ARGS__); \ -} +#define NL_RAW_PID_LOG(_l, _pid, _fmt, ...) \ + NL_RAW_PID_LOG_##_l(_l, _pid, _fmt, ## __VA_ARGS__) +#define _NL_RAW_PID_LOG(_l, _pid, _fmt, ...) \ + if (_DEBUG_PASS_MSG(_l)) { \ + _output("[" DEBUG_PREFIX_NAME "] PID %u %s: " _fmt "\n", _pid, \ + __func__, ##__VA_ARGS__); \ + } -#define NLP_LOG(_l, _nlp, _fmt, ...) NL_RAW_PID_LOG_##_l(_l, nlp_get_pid(_nlp), _fmt, ## __VA_ARGS__) +#define NLP_LOG(_l, _nlp, _fmt, ...) \ + NL_RAW_PID_LOG_##_l(_l, nlp_get_pid(_nlp), _fmt, ## __VA_ARGS__) #if DEBUG_MAX_LEVEL>=LOG_DEBUG3 #define NL_RAW_PID_LOG_LOG_DEBUG3 _NL_RAW_PID_LOG @@ -77,7 +81,5 @@ SYSCTL_DECL(_net_netlink_debug); #define NL_RAW_PID_LOG_LOG_ERR _NL_RAW_PID_LOG #define NL_RAW_PID_LOG_LOG_WARNING _NL_RAW_PID_LOG - - -#endif -#endif +#endif /* _KERNEL */ +#endif /* !_NETLINK_NETLINK_DEBUG_H_ */ From ec1b18c7353ad20d2d373e58931aeccfccd5599d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sun, 14 Jul 2024 12:20:48 -0400 Subject: [PATCH 060/151] route: Wrap long lines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. --- sys/net/route/route_debug.h | 36 +++++++++++++++++++++++------------- sys/net/rtsock.c | 4 +++- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/sys/net/route/route_debug.h b/sys/net/route/route_debug.h index 1e682bd4561b..d0b1f864eec9 100644 --- a/sys/net/route/route_debug.h +++ b/sys/net/route/route_debug.h @@ -78,33 +78,42 @@ SYSCTL_DECL(_net_route_debug); * This is NOT compiled in by default. Turning it on should NOT seriously impact performance * LOG_DEBUG3 - last debug level. Per-item large debug outputs. * This is NOT compiled in by default. All performance bets are off. - * */ -#define _output printf +#define _output printf #define _DEBUG_PASS_MSG(_l) (DEBUG_VAR_NAME >= (_l)) -#define IF_DEBUG_LEVEL(_l) if ((DEBUG_MAX_LEVEL >= (_l)) && (__predict_false(DEBUG_VAR_NAME >= (_l)))) +#define IF_DEBUG_LEVEL(_l) \ + if ((DEBUG_MAX_LEVEL >= (_l)) && (__predict_false(DEBUG_VAR_NAME >= (_l)))) /* * Logging for events specific for particular family and fib - * Example: [nhop_neigh] inet.0 find_lle: nhop nh#4/inet/vtnet0/10.0.0.1: mapped to lle NULL + * Example: [nhop_neigh] inet.0 find_lle: */ -#define FIB_LOG(_l, _fib, _fam, _fmt, ...) FIB_LOG_##_l(_l, _fib, _fam, _fmt, ## __VA_ARGS__) -#define _FIB_LOG(_l, _fib, _fam, _fmt, ...) if (_DEBUG_PASS_MSG(_l)) { \ - _output("[" DEBUG_PREFIX_NAME "] %s.%u %s: " _fmt "\n", rib_print_family(_fam), _fib, __func__, ##__VA_ARGS__); \ -} +#define FIB_LOG(_l, _fib, _fam, _fmt, ...) \ + FIB_LOG_##_l(_l, _fib, _fam, _fmt, ## __VA_ARGS__) +#define _FIB_LOG(_l, _fib, _fam, _fmt, ...) \ + if (_DEBUG_PASS_MSG(_l)) { \ + _output("[" DEBUG_PREFIX_NAME "] %s.%u %s: " _fmt "\n", \ + rib_print_family(_fam), _fib, __func__, ##__VA_ARGS__); \ + } /* Same as FIB_LOG, but uses nhop to get fib and family */ -#define FIB_NH_LOG(_l, _nh, _fmt, ...) FIB_LOG_##_l(_l, nhop_get_fibnum(_nh), nhop_get_upper_family(_nh), _fmt, ## __VA_ARGS__) +#define FIB_NH_LOG(_l, _nh, _fmt, ...) \ + FIB_LOG_##_l(_l, nhop_get_fibnum(_nh), nhop_get_upper_family(_nh), \ + _fmt, ## __VA_ARGS__) /* Same as FIB_LOG, but uses rib_head to get fib and family */ -#define FIB_RH_LOG(_l, _rh, _fmt, ...) FIB_LOG_##_l(_l, (_rh)->rib_fibnum, (_rh)->rib_family, _fmt, ## __VA_ARGS__) +#define FIB_RH_LOG(_l, _rh, _fmt, ...) \ + FIB_LOG_##_l(_l, (_rh)->rib_fibnum, (_rh)->rib_family, _fmt, \ + ## __VA_ARGS__) /* Same as FIB_LOG, but uses nh_control to get fib and family from linked rib */ -#define FIB_CTL_LOG(_l, _ctl, _fmt, ...) FIB_LOG_##_l(_l, (_ctl)->ctl_rh->rib_fibnum, (_ctl)->ctl_rh->rib_family, _fmt, ## __VA_ARGS__) +#define FIB_CTL_LOG(_l, _ctl, _fmt, ...) \ + FIB_LOG_##_l(_l, (_ctl)->ctl_rh->rib_fibnum, \ + (_ctl)->ctl_rh->rib_family, _fmt, ## __VA_ARGS__) /* * Generic logging for routing subsystem - * Example: [nhop_neigh] nhops_update_neigh: L2 prepend update from lle/inet/valid/vtnet0/10.0.0.157 + * Example: [nhop_neigh] nhops_update_neigh: */ #define RT_LOG(_l, _fmt, ...) RT_LOG_##_l(_l, _fmt, ## __VA_ARGS__) #define _RT_LOG(_l, _fmt, ...) do { \ @@ -114,7 +123,8 @@ SYSCTL_DECL(_net_route_debug); } while (0) /* - * Wrapper logic to avoid compiling high levels of debugging messages for production systems. + * Wrapper logic to avoid compiling high levels of debugging messages for + * production systems. */ #if DEBUG_MAX_LEVEL>=LOG_DEBUG3 #define FIB_LOG_LOG_DEBUG3 _FIB_LOG diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index e0411ed0c1d0..09d463dc17af 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -136,7 +136,9 @@ struct linear_buffer { }; #define SCRATCH_BUFFER_SIZE 1024 -#define RTS_PID_LOG(_l, _fmt, ...) RT_LOG_##_l(_l, "PID %d: " _fmt, curproc ? curproc->p_pid : 0, ## __VA_ARGS__) +#define RTS_PID_LOG(_l, _fmt, ...) \ + RT_LOG_##_l(_l, "PID %d: " _fmt, curproc ? curproc->p_pid : 0, \ + ## __VA_ARGS__) MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables"); From 45cde0e439188589ca2511f6fd76829cbf68267e Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 8 Jul 2024 20:45:33 +0300 Subject: [PATCH 061/151] vm_page: add vm_page_clearref() helper It is supposed to be used for ref_count manipulations when the pages are owned by an object, but ref_count is used for something else than the wiring, e.g. PTE population count on the page table page. Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45910 --- sys/vm/vm_page.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index f419ba8e3d34..49f4c0fbc0cb 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -947,6 +947,17 @@ vm_page_in_laundry(vm_page_t m) return (queue == PQ_LAUNDRY || queue == PQ_UNSWAPPABLE); } +static inline void +vm_page_clearref(vm_page_t m) +{ + u_int r; + + r = m->ref_count; + while (atomic_fcmpset_int(&m->ref_count, &r, r & (VPRC_BLOCKED | + VPRC_OBJREF)) == 0) + ; +} + /* * vm_page_drop: * From 7773023b72de19c6c9a47fd04ac955ec52773f0f Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 8 Jul 2024 02:26:57 +0300 Subject: [PATCH 062/151] DMAR pagetables pages: handle ref_count special references Preserve object reference and block bit during refcount arithmetic and obliteration, by using vm_page_wire()/unwire_noq(). Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45910 --- sys/x86/iommu/intel_idpgtbl.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 157afaec75ef..de38a6fece94 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -390,7 +391,7 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, * pte write and clean while the lock is * dropped. */ - m->ref_count++; + vm_page_wire(m); sfp = NULL; ptep = domain_pgtbl_map_pte(domain, base, lvl - 1, @@ -398,7 +399,7 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, if (ptep == NULL) { KASSERT(m->pindex != 0, ("loosing root page %p", domain)); - m->ref_count--; + vm_page_unwire_noq(m); iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); return (NULL); @@ -406,8 +407,8 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | VM_PAGE_TO_PHYS(m)); dmar_flush_pte_to_ram(domain->dmar, ptep); - sf_buf_page(sfp)->ref_count += 1; - m->ref_count--; + vm_page_wire(sf_buf_page(sfp)); + vm_page_unwire_noq(m); iommu_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; @@ -486,7 +487,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, dmar_pte_store(&pte->pte, VM_PAGE_TO_PHYS(ma[pi]) | pflags | (superpage ? DMAR_PTE_SP : 0)); dmar_flush_pte_to_ram(domain->dmar, pte); - sf_buf_page(sf)->ref_count += 1; + vm_page_wire(sf_buf_page(sf)); } if (sf != NULL) iommu_unmap_pgtbl(sf); @@ -592,8 +593,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, iommu_unmap_pgtbl(*sf); *sf = NULL; } - m->ref_count--; - if (m->ref_count != 0) + if (!vm_page_unwire_noq(m)) return; KASSERT(lvl != 0, ("lost reference (lvl) on root pg domain %p base %jx lvl %d", @@ -709,7 +709,7 @@ domain_alloc_pgtbl(struct dmar_domain *domain) m = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO | IOMMU_PGF_OBJL); /* No implicit free of the top level page table page. */ - m->ref_count = 1; + vm_page_wire(m); DMAR_DOMAIN_PGUNLOCK(domain); DMAR_LOCK(domain->dmar); domain->iodom.flags |= IOMMU_DOMAIN_PGTBL_INITED; @@ -741,8 +741,10 @@ domain_free_pgtbl(struct dmar_domain *domain) /* Obliterate ref_counts */ VM_OBJECT_ASSERT_WLOCKED(obj); - for (m = vm_page_lookup(obj, 0); m != NULL; m = vm_page_next(m)) - m->ref_count = 0; + for (m = vm_page_lookup(obj, 0); m != NULL; m = vm_page_next(m)) { + vm_page_clearref(m); + vm_wire_sub(1); + } VM_OBJECT_WUNLOCK(obj); vm_object_deallocate(obj); } From 004d5af853bfef1eb66394a15ac9e94e6dcebc0a Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 15 Jul 2024 08:53:52 -0400 Subject: [PATCH 063/151] splash(4): fix markup around cross-references Fixes: 7504e0e3e517 ("splash(4): Document how to use splash screen ...") Sponsored by: The FreeBSD Foundation --- share/man/man4/splash.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 736703317a7f..af2ae2e4369a 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -204,8 +204,8 @@ have the following line in the kernel configuration file. .Dl device splash .Pp Next for -.Xr syscons 4 -, edit +.Xr syscons 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) @@ -244,8 +244,8 @@ bitmap_name="/boot/splash.bin" .Ed .Pp For -.Xr vt 4 -, edit +.Xr vt 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) From 001606523a48ca2aa440c985db47327a00671358 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 17 Jun 2024 21:30:44 -0400 Subject: [PATCH 064/151] libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD --- lib/msun/src/s_fma.c | 6 +++--- lib/msun/src/s_fmal.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 16902d321290..6c889a6a46ca 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -222,17 +222,17 @@ fma(double x, double y, double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafter(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafter(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafter(z, INFINITY)); else return (z); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 9d08bc72e12e..80c835d09c2b 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -203,17 +203,17 @@ fmal(long double x, long double y, long double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafterl(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafterl(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafterl(z, INFINITY)); else return (z); From 867873b3980c42c379f1f0e6ac88d92337ddf5dd Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 15 Jul 2024 09:49:26 -0400 Subject: [PATCH 065/151] Revert "Makefile.inc1: show time for `make installworld'" It broke `make packages`, so revert until that can be fixed. This reverts commit e5a0202f96948a95bf1b879727e155a4f1d1da93. Reported by: bapt, theraven --- Makefile.inc1 | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7ff961e22e7a..19ed923702b1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1241,19 +1241,11 @@ WMAKE_TGTS+= build${libcompat} .endif WMAKE_TGTS+= everything -# record buildworld / install time in seconds +# record buildworld time in seconds .if make(buildworld) _BUILDWORLD_START!= date '+%s' .export _BUILDWORLD_START .endif -.if make(installworld) -_INSTALLWORLD_START!= date '+%s' -.export _INSTALLWORLD_START -.endif -.if make(installkernel) -_INSTALLKERNEL_START!= date '+%s' -.export _INSTALLKERNEL_START -.endif buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue @@ -1321,11 +1313,11 @@ kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY installcheck: _installcheck_world _installcheck_kernel .PHONY _installcheck_world: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check world started on `LC_ALL=C date`" + @echo ">>> Install check world" @echo "--------------------------------------------------------------" _installcheck_kernel: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check kernel started on `LC_ALL=C date`" + @echo ">>> Install check kernel" @echo "--------------------------------------------------------------" # @@ -1649,8 +1641,6 @@ restage reinstall: .MAKE .PHONY .endfor @echo "--------------------------------------------------------------" @echo ">>> Installing everything completed on `LC_ALL=C date`" - @seconds=$$(($$(date '+%s') - ${_INSTALLWORLD_START})); \ - echo ">>> Install world completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" redistribute: .MAKE .PHONY @@ -1883,9 +1873,6 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" - @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ - echo ">>> Install kernel(s) ${INSTALLKERNEL} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" - @echo "--------------------------------------------------------------" .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @@ -1900,9 +1887,6 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel .PHONY @echo ">>> Installing kernel ${_kernel} completed on $$(LC_ALL=C date)" @echo "--------------------------------------------------------------" .endfor - @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ - echo ">>> Install kernel(s) ${BUILDKERNELS} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" - @echo "--------------------------------------------------------------" .endif distributekernel distributekernel.debug: .PHONY From e5a18aa2373b9446fd93622acf6a8a7ba10e2589 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 15 Jul 2024 09:59:57 -0400 Subject: [PATCH 066/151] splash(4): Subject/verb agreement --- share/man/man4/splash.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index af2ae2e4369a..b001663c4fa5 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -304,7 +304,7 @@ and modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . .Sh CAVEATS -The screen saver work with +The screen saver works with .Xr syscons 4 only. .Sh BUGS From 480cc750a2a8f92d078803f15eecb1f8a084a1ea Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 15 Jul 2024 07:16:39 -0700 Subject: [PATCH 067/151] amd64 GENERIC: Drop hints for fdc0 and ppc0 Modern x86 systems do not ship with ISA floppy disk controllers or LPT ports. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45946 --- sys/amd64/conf/GENERIC.hints | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hints index be3f59cd1950..7c2a3f28b9ce 100644 --- a/sys/amd64/conf/GENERIC.hints +++ b/sys/amd64/conf/GENERIC.hints @@ -1,11 +1,3 @@ -hint.fdc.0.at="isa" -hint.fdc.0.port="0x3F0" -hint.fdc.0.irq="6" -hint.fdc.0.drq="2" -hint.fd.0.at="fdc0" -hint.fd.0.drive="0" -hint.fd.1.at="fdc0" -hint.fd.1.drive="1" hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" hint.atkbd.0.at="atkbdc" @@ -21,8 +13,6 @@ hint.uart.0.irq="4" hint.uart.1.at="isa" hint.uart.1.port="0x2F8" hint.uart.1.irq="3" -hint.ppc.0.at="isa" -hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" From 51c8a9c1be57b6750e7c64e1379e8c33bd0f02c1 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Mon, 15 Jul 2024 08:15:27 -0700 Subject: [PATCH 068/151] unbound: Remove backup file Upstream unbound includes a backup configure file which is distributed in the upstream tarball. It must be created by their release process and not deleted prior to packaging the tarball. I've received two emails so far asking about it. Let's remove it so nobody else asks about it. MFC: 1 week --- contrib/unbound/configure~ | 26616 ----------------------------------- 1 file changed, 26616 deletions(-) delete mode 100755 contrib/unbound/configure~ diff --git a/contrib/unbound/configure~ b/contrib/unbound/configure~ deleted file mode 100755 index d4a394eb9540..000000000000 --- a/contrib/unbound/configure~ +++ /dev/null @@ -1,26616 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for unbound 1.20.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : - -else \$as_nop - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null -then : - as_have_required=yes -else $as_nop - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : - -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : - break 2 -fi -fi - done;; - esac - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi - - - if test "x$CONFIG_SHELL" != x -then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." - else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and -$0: unbound-bugs@nlnetlabs.nl or -$0: https://github.com/NLnetLabs/unbound/issues about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='unbound' -PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.20.0' -PACKAGE_STRING='unbound 1.20.0' -PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include -#endif -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_STRING_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_header_c_list= -ac_func_c_list= -ac_subst_vars='LTLIBOBJS -date -version -INSTALLTARGET -ALLTARGET -SOURCEFILE -SOURCEDETERMINE -IPSET_OBJ -IPSET_SRC -IPSECMOD_HEADER -IPSECMOD_OBJ -CACHEDB_OBJ -CACHEDB_SRC -DNSCRYPT_OBJ -DNSCRYPT_SRC -ENABLE_DNSCRYPT -ENABLE_DNSCRYPT_XCHACHA20 -DNSTAP_OBJ -DNSTAP_SRC -DNSTAP_SOCKET_TESTBIN -DNSTAP_SOCKET_PATH -opt_dnstap_socket_path -ENABLE_DNSTAP -PROTOBUFC_LIBS -PROTOBUFC_CFLAGS -PROTOC_C -UBSYMS -EXTRALINK -COMMON_OBJ_ALL_SYMBOLS -LIBOBJ_WITHOUT_CTIME -LIBOBJ_WITHOUT_CTIMEARC4 -WIN_CHECKCONF_OBJ_LINK -WIN_CONTROL_OBJ_LINK -WIN_UBANCHOR_OBJ_LINK -WIN_HOST_OBJ_LINK -WIN_DAEMON_OBJ_LINK -WIN_DAEMON_OBJ -WIN_DAEMON_SRC -WINAPPS -WINDRES -CHECKLOCK_OBJ -staticexe -PC_LIBEVENT_DEPENDENCY -UNBOUND_EVENT_UNINSTALL -UNBOUND_EVENT_INSTALL -SUBNET_HEADER -SUBNET_OBJ -PC_LIBBSD_DEPENDENCY -SSLLIB -HAVE_SSL -PC_CRYPTO_DEPENDENCY -CONFIG_DATE -GCC_DOCKER_LINTFLAGS -NETBSD_LINTFLAGS -PYUNBOUND_UNINSTALL -PYUNBOUND_INSTALL -PYUNBOUND_TARGET -PYUNBOUND_OBJ -WITH_PYUNBOUND -PYTHONMOD_UNINSTALL -PYTHONMOD_INSTALL -PYTHONMOD_HEADER -PYTHONMOD_OBJ -WITH_PYTHONMODULE -swig -SWIG_LIB -SWIG -PC_PY_DEPENDENCY -PYTHON_LIBS -PY_MAJOR_VERSION -PYTHON_SITE_PKG -PYTHON_LDFLAGS -PYTHON_CPPFLAGS -PYTHON -PYTHON_VERSION -DYNLIBMOD_EXTRALIBS -DYNLIBMOD_HEADER -DYNLIBMOD_OBJ -WITH_DYNLIBMODULE -PTHREAD_CFLAGS_ONLY -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CXX -PTHREAD_CC -ax_pthread_config -ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ -SLDNS_ALLOCCHECK_EXTRA_OBJ -USE_SYSTEMD_FALSE -USE_SYSTEMD_TRUE -SYSTEMD_DAEMON_LIBS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_LIBS -SYSTEMD_CFLAGS -RUNTIME_PATH -LIBOBJS -CPP -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -AWK -RANLIB -ac_ct_AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -SED -LIBTOOL -AR -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -libtool -STRIP -doxygen -YFLAGS -YACC -LEXLIB -LEX_OUTPUT_ROOT -LEX -debug_enabled -DEPFLAG -GREP -UNBOUND_USERNAME -UNBOUND_ROOTCERT_FILE -UNBOUND_ROOTKEY_FILE -UNBOUND_PIDFILE -UNBOUND_SHARE_DIR -UNBOUND_CHROOT_DIR -UNBOUND_RUN_DIR -ub_conf_dir -ub_conf_file -UNBOUND_LOCALSTATE_DIR -UNBOUND_SYSCONF_DIR -UNBOUND_SBIN_DIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LIBUNBOUND_AGE -LIBUNBOUND_REVISION -LIBUNBOUND_CURRENT -UNBOUND_VERSION_MICRO -UNBOUND_VERSION_MINOR -UNBOUND_VERSION_MAJOR -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_conf_file -with_run_dir -with_chroot_dir -with_share_dir -with_pidfile -with_rootkey_file -with_rootcert_file -with_username -enable_checking -enable_debug -enable_flto -enable_pie -enable_relro_now -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_rpath -enable_largefile -enable_systemd -enable_alloc_checks -enable_alloc_lite -enable_alloc_nonregional -with_pthreads -with_solaris_threads -with_syslog_facility -with_dynlibmodule -with_pyunbound -with_pythonmodule -enable_swig_version_check -with_nss -with_nettle -with_ssl -with_libbsd -enable_sha1 -enable_sha2 -enable_subnet -enable_gost -enable_ecdsa -enable_dsa -with_deprecate_rsa_1024 -enable_ed25519 -enable_ed448 -enable_event_api -enable_tfo_client -enable_tfo_server -with_libevent -with_libexpat -with_libhiredis -with_libnghttp2 -enable_static_exe -enable_fully_static -enable_lock_checks -enable_allsymbols -enable_dnstap -with_dnstap_socket_path -with_protobuf_c -enable_dnscrypt -with_libsodium -enable_cachedb -enable_ipsecmod -enable_ipset -with_libmnl -enable_explicit_port_randomisation -enable_linux_ip_local_port_range -with_libunbound_only -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -YACC -YFLAGS -LT_SYS_LIBRARY_PATH -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -CPP -SYSTEMD_CFLAGS -SYSTEMD_LIBS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_DAEMON_LIBS -PYTHON_VERSION -PROTOBUFC_CFLAGS -PROTOBUFC_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures unbound 1.20.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/unbound] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.20.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-checking Enable warnings, asserts, makefile-dependencies - --enable-debug same as enable-checking - --disable-flto Disable link-time optimization (gcc specific option) - --enable-pie Enable Position-Independent Executable (eg. to fully - benefit from ASLR, small performance penalty) - --enable-relro-now Enable full relocation binding at load-time (RELRO - NOW, to protect GOT and .dtor areas) - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-rpath disable hardcoded rpath (default=enabled) - --disable-largefile omit support for large files - --enable-systemd compile with systemd support - --enable-alloc-checks enable to memory allocation statistics, for debug - purposes - --enable-alloc-lite enable for lightweight alloc assertions, for debug - purposes - --enable-alloc-nonregional - enable nonregional allocs, slow but exposes regional - allocations to other memory purifiers, for debug - purposes - --disable-swig-version-check - Disable swig version check to build python modules - with older swig even though that is unreliable - --disable-sha1 Disable SHA1 RRSIG support, does not disable nsec3 - support - --disable-sha2 Disable SHA256 and SHA512 RRSIG support - --enable-subnet Enable client subnet - --disable-gost Disable GOST support - --disable-ecdsa Disable ECDSA support - --disable-dsa Disable DSA support - --disable-ed25519 Disable ED25519 support - --disable-ed448 Disable ED448 support - --enable-event-api Enable (experimental) pluggable event base - libunbound API installed to unbound-event.h - --enable-tfo-client Enable TCP Fast Open for client mode - --enable-tfo-server Enable TCP Fast Open for server mode - --enable-static-exe enable to compile executables statically against - (event) uninstalled libs, for debug purposes - --enable-fully-static enable to compile fully static - --enable-lock-checks enable to check lock and unlock calls, for debug - purposes - --enable-allsymbols export all symbols from libunbound and link binaries - to it, smaller install size but libunbound export - table is polluted by internal symbols - --enable-dnstap Enable dnstap support (requires protobuf-c) - --enable-dnscrypt Enable dnscrypt support (requires libsodium) - --enable-cachedb enable cachedb module that can use external cache - storage - --enable-ipsecmod Enable ipsecmod module that facilitates - opportunistic IPsec - --enable-ipset enable ipset module - --disable-explicit-port-randomisation - disable explicit source port randomisation and rely - on the kernel to provide random source ports - --enable-linux-ip-local-port-range - Define this to enable use of - /proc/sys/net/ipv4/ip_local_port_range as a default - outgoing port range. This is only for the libunbound - on Linux and does not affect unbound resolving - daemon itself. This may severely limit the number of - available outgoing ports and thus decrease - randomness. Define this only when the target system - restricts (e.g. some of SELinux enabled - distributions) the use of non-ephemeral ports. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-conf-file=path Pathname to the Unbound configuration file - --with-run-dir=path set default directory to chdir to (by default dir - part of cfg file) - --with-chroot-dir=path set default directory to chroot to (by default same - as run-dir) - --with-share-dir=path set default directory with shared data (by default - same as share/unbound) - --with-pidfile=filename set default pathname to unbound pidfile (default - run-dir/unbound.pid) - --with-rootkey-file=filename - set default pathname to root key file (default - run-dir/root.key). This file is read and written. - --with-rootcert-file=filename - set default pathname to root update certificate file - (default run-dir/icannbundle.pem). This file need - not exist if you are content with the builtin. - --with-username=user set default user that unbound changes to (default - user is unbound) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-pthreads use pthreads library, or --without-pthreads to - disable threading support. - --with-solaris-threads use solaris native thread library. - --with-syslog-facility=LOCAL0 - LOCAL7 - set SYSLOG_FACILITY, default DAEMON - --with-dynlibmodule build dynamic library module, or - --without-dynlibmodule to disable it. (default=no) - --with-pyunbound build PyUnbound, or --without-pyunbound to skip it. - (default=no) - --with-pythonmodule build Python module, or --without-pythonmodule to - disable script engine. (default=no) - --with-nss=path use libnss instead of openssl, installed at path. - --with-nettle=path use libnettle as crypto library, installed at path. - --with-ssl=pathname enable SSL (will check /usr/local/ssl /usr/lib/ssl - /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw - /usr or specify like /usr/include/openssl11) - --with-libbsd Use portable libbsd functions - --with-deprecate-rsa-1024 - Deprecate RSA 1024 bit length, makes that an - unsupported key, for use when OpenSSL FIPS refuses - 1024 bit verification - --with-libevent=pathname - use libevent (will check /usr/local /opt/local - /usr/lib /usr/pkg /usr/sfw /usr or you can specify - an explicit path). Slower, but allows use of large - outgoing port ranges. - --with-libexpat=path specify explicit path for libexpat. - --with-libhiredis=path specify explicit path for libhiredis. - --with-libnghttp2=path specify explicit path for libnghttp2. - --with-dnstap-socket-path=pathname - set default dnstap socket path - --with-protobuf-c=path Path where protobuf-c is installed, for dnstap - --with-libsodium=path Path where libsodium is installed, for dnscrypt - --with-libmnl=path specify explicit path for libmnl. - --with-libunbound-only do not build daemon and tool programs - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to $YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - CPP C preprocessor - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config - SYSTEMD_DAEMON_CFLAGS - C compiler flags for SYSTEMD_DAEMON, overriding pkg-config - SYSTEMD_DAEMON_LIBS - linker flags for SYSTEMD_DAEMON, overriding pkg-config - PYTHON_VERSION - The installed Python version to use, for example '2.3'. This - string will be appended to the Python interpreter canonical - name. - PROTOBUFC_CFLAGS - C compiler flags for PROTOBUFC, overriding pkg-config - PROTOBUFC_LIBS - linker flags for PROTOBUFC, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -unbound configure 1.20.0 -generated by GNU Autoconf 2.71 - -Copyright (C) 2021 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done -else $as_nop - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } -#include -#include -int -main (void) -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - echo >>conftest.val; read $3 &5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_check_decl - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by unbound $as_me 1.20.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - $ $0$ac_configure_args_raw - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" - # Save into config.log some information that might help in debugging. - { - echo - - printf "%s\n" "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - printf "%s\n" "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - printf "%s\n" "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -printf "%s\n" "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h - -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" -else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -fi - -for ac_site_file in $ac_site_files -do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" -as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" -as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" -as_fn_append ac_func_c_list " fork HAVE_FORK" -as_fn_append ac_func_c_list " vfork HAVE_VFORK" - -# Auxiliary files required by this configure script. -ac_aux_files="ltmain.sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -UNBOUND_VERSION_MAJOR=1 - -UNBOUND_VERSION_MINOR=20 - -UNBOUND_VERSION_MICRO=0 - - -LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=27 -LIBUNBOUND_AGE=1 -# 1.0.0 had 0:12:0 -# 1.0.1 had 0:13:0 -# 1.0.2 had 0:14:0 -# 1.1.0 had 0:15:0 -# 1.1.1 had 0:16:0 -# 1.2.0 had 0:17:0 -# 1.2.1 had 0:18:0 -# 1.3.0 had 1:0:0 # ub_cancel and -export-symbols. -# 1.3.1 had 1:1:0 -# 1.3.2 had 1:2:0 -# 1.3.3 had 1:3:0 -# 1.3.4 had 1:4:0 -# 1.4.0-snapshots had 1:5:0 -# 1.4.0 had 1:5:0 (not 2:0:0) # ub_result.why_bogus -# 1.4.1 had 2:1:0 -# 1.4.2 had 2:2:0 -# 1.4.3 had 2:3:0 -# 1.4.4 had 2:4:0 -# 1.4.5 had 2:5:0 -# 1.4.6 had 2:6:0 -# 1.4.7 had 2:7:0 -# 1.4.8 had 2:8:0 -# 1.4.9 had 2:9:0 -# 1.4.10 had 2:10:0 -# 1.4.11 had 2:11:0 -# 1.4.12 had 2:12:0 -# 1.4.13 had 2:13:0 -# and 1.4.13p1 and 1.4.13.p2 -# 1.4.14 had 2:14:0 -# 1.4.15 had 3:0:1 # adds ub_version() -# 1.4.16 had 3:1:1 -# 1.4.17 had 3:2:1 -# 1.4.18 had 3:3:1 -# 1.4.19 had 3:4:1 -# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1 -# 1.4.21 had 4:1:2 -# 1.4.22 had 4:1:2 -# 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr -# 1.5.1 had 5:3:3 -# 1.5.2 had 5:5:3 -# 1.5.3 had 5:6:3 -# 1.5.4 had 5:7:3 -# 1.5.5 had 5:8:3 -# 1.5.6 had 5:9:3 -# 1.5.7 had 5:10:3 -# 1.5.8 had 6:0:4 # adds ub_ctx_set_stub -# 1.5.9 had 6:1:4 -# 1.5.10 had 6:2:4 -# 1.6.0 had 6:3:4 -# 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type -# 1.6.2 had 7:1:5 -# 1.6.3 had 7:2:5 -# 1.6.4 had 7:3:5 -# 1.6.5 had 7:4:5 -# 1.6.6 had 7:5:5 -# 1.6.7 had 7:6:5 -# 1.6.8 had 7:7:5 -# 1.7.0 had 7:8:5 -# 1.7.1 had 7:9:5 -# 1.7.2 had 7:10:5 -# 1.7.3 had 7:11:5 -# 1.8.0 had 8:0:0 # changes the event callback function signature -# 1.8.1 had 8:1:0 -# 1.8.2 had 8:2:0 -# 1.8.3 had 8:3:0 -# 1.9.0 had 9:0:1 # add ub_ctx_set_tls -# 1.9.1 had 9:1:1 -# 1.9.2 had 9:2:1 -# 1.9.3 had 9:3:1 -# 1.9.4 had 9:4:1 -# 1.9.5 had 9:5:1 -# 1.9.6 had 9:6:1 -# 1.10.0 had 9:7:1 -# 1.10.1 had 9:8:1 -# 1.11.0 had 9:9:1 -# 1.12.0 had 9:10:1 -# 1.13.0 had 9:11:1 -# 1.13.1 had 9:12:1 -# 1.13.2 had 9:13:1 -# 1.14.0 had 9:14:1 -# 1.15.0 had 9:15:1 -# 1.16.0 had 9:16:1 -# 1.16.1 had 9:17:1 -# 1.16.2 had 9:18:1 -# 1.16.3 had 9:19:1 -# 1.17.0 had 9:20:1 -# 1.17.1 had 9:21:1 -# 1.18.0 had 9:22:1 -# 1.19.0 had 9:23:1 -# 1.19.1 had 9:24:1 -# 1.19.2 had 9:25:1 -# 1.19.3 had 9:26:1 -# 1.20.0 had 9:27:1 - -# Current -- the number of the binary API that we're implementing -# Revision -- which iteration of the implementation of the binary -# API are we supplying? -# Age -- How many previous binary API versions do we also -# support? -# -# If we release a new version that does not change the binary API, -# increment Revision. -# -# If we release a new version that changes the binary API, but does -# not break programs compiled against the old binary API, increment -# Current and Age. Set Revision to 0, since this is the first -# implementation of the new API. -# -# Otherwise, we're changing the binary API and breaking backward -# compatibility with old binaries. Increment Current. Set Age to 0, -# since we're backward compatible with no previous APIs. Set Revision -# to 0 too. - - - - - -cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`" - -printf "%s\n" "#define CONFCMDLINE \"$cmdln\"" >>confdefs.h - - -CFLAGS="$CFLAGS" - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else $as_nop - ac_file='' -fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 -fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - -fi - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test ${ac_cv_safe_to_define___extensions__+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_safe_to_define___extensions__=yes -else $as_nop - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 -printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } -if test ${ac_cv_should_define__xopen_source+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_should_define__xopen_source=no - if test $ac_cv_header_wchar_h = yes -then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - mbstate_t x; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define _XOPEN_SOURCE 500 - #include - mbstate_t x; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_should_define__xopen_source=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 -printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } - - printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h - - printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h - - printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h - - printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h - - if test $ac_cv_header_minix_config_h = yes -then : - MINIX=yes - printf "%s\n" "#define _MINIX 1" >>confdefs.h - - printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h - - printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h - -else $as_nop - MINIX= -fi - if test $ac_cv_safe_to_define___extensions__ = yes -then : - printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - -fi - if test $ac_cv_should_define__xopen_source = yes -then : - printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h - -fi - -if test "$ac_cv_header_minix_config_h" = "yes"; then - -printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h - -fi - -case "$prefix" in - NONE) - prefix="/usr/local" - ;; -esac -case "$exec_prefix" in - NONE) - exec_prefix="$prefix" - ;; -esac - -# are we on MinGW? -if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes" -else - if echo $host | grep mingw >/dev/null; then on_mingw="yes" - else on_mingw="no"; fi -fi - -# -# Determine configuration file -# the eval is to evaluate shell expansion twice -UNBOUND_SBIN_DIR=`eval echo "${sbindir}"` - -UNBOUND_SYSCONF_DIR=`eval echo "${sysconfdir}"` - -UNBOUND_LOCALSTATE_DIR=`eval echo "${localstatedir}"` - -if test $on_mingw = "no"; then - ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"` -else - ub_conf_file="C:\\Program Files\\Unbound\\service.conf" -fi - -# Check whether --with-conf_file was given. -if test ${with_conf_file+y} -then : - withval=$with_conf_file; ub_conf_file="$withval" -fi - - -hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define CONFIGFILE \"$hdr_config\"" >>confdefs.h - -ub_conf_dir=`$as_dirname -- "$ub_conf_file" || -$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ub_conf_file" : 'X\(//\)[^/]' \| \ - X"$ub_conf_file" : 'X\(//\)$' \| \ - X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ub_conf_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - -# Determine run, chroot directory and pidfile locations - -# Check whether --with-run-dir was given. -if test ${with_run_dir+y} -then : - withval=$with_run_dir; UNBOUND_RUN_DIR="$withval" -else $as_nop - if test $on_mingw = no; then - UNBOUND_RUN_DIR=`dirname "$ub_conf_file"` -else - UNBOUND_RUN_DIR="" -fi - -fi - - -hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define RUN_DIR \"$hdr_run\"" >>confdefs.h - - - -# Check whether --with-chroot-dir was given. -if test ${with_chroot_dir+y} -then : - withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval" -else $as_nop - if test $on_mingw = no; then - UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR" -else - UNBOUND_CHROOT_DIR="" -fi - -fi - - -hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define CHROOT_DIR \"$hdr_chroot\"" >>confdefs.h - - - -# Check whether --with-share-dir was given. -if test ${with_share_dir+y} -then : - withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval" -else $as_nop - UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR" -fi - - - -printf "%s\n" "#define SHARE_DIR \"$UNBOUND_SHARE_DIR\"" >>confdefs.h - - - -# Check whether --with-pidfile was given. -if test ${with_pidfile+y} -then : - withval=$with_pidfile; UNBOUND_PIDFILE="$withval" -else $as_nop - if test $on_mingw = no; then - UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid" -else - UNBOUND_PIDFILE="" -fi - -fi - - -hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define PIDFILE \"$hdr_pid\"" >>confdefs.h - - - -# Check whether --with-rootkey-file was given. -if test ${with_rootkey_file+y} -then : - withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval" -else $as_nop - if test $on_mingw = no; then - UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key" -else - UNBOUND_ROOTKEY_FILE="C:\\Program Files\\Unbound\\root.key" -fi - -fi - - -hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define ROOT_ANCHOR_FILE \"$hdr_rkey\"" >>confdefs.h - - - -# Check whether --with-rootcert-file was given. -if test ${with_rootcert_file+y} -then : - withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval" -else $as_nop - if test $on_mingw = no; then - UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem" -else - UNBOUND_ROOTCERT_FILE="C:\\Program Files\\Unbound\\icannbundle.pem" -fi - -fi - - -hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define ROOT_CERT_FILE \"$hdr_rpem\"" >>confdefs.h - - - -# Check whether --with-username was given. -if test ${with_username+y} -then : - withval=$with_username; UNBOUND_USERNAME="$withval" -else $as_nop - UNBOUND_USERNAME="unbound" -fi - - - -printf "%s\n" "#define UB_USERNAME \"$UNBOUND_USERNAME\"" >>confdefs.h - - - -printf "%s\n" "#define WINVER 0x0502" >>confdefs.h - -wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' ` - - -printf "%s\n" "#define RSRC_PACKAGE_VERSION $wnvs" >>confdefs.h - - -# Check for 'grep -e' program, here, since ACX_CHECK_FLTO needs that. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - - -# Checks for typedefs, structures, and compiler characteristics. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -printf "%s\n" "#define const /**/" >>confdefs.h - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# allow user to override the -g -O2 flags. -default_cflags=no -if test "x$CFLAGS" = "x" ; then - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5 -printf %s "checking whether $CC supports -g... " >&6; } -cache=`echo g | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -g" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5 -printf %s "checking whether $CC supports -O2... " >&6; } -cache=`echo O2 | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -O2" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - -default_cflags=yes -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 -fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5 -printf %s "checking $CC dependency flag... " >&6; } -echo 'void f(void){}' >conftest.c -if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then - DEPFLAG="-MM" -else - if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then - DEPFLAG="-xM1" - else - DEPFLAG="-MM" # dunno do something - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5 -printf "%s\n" "$DEPFLAG" >&6; } -rm -f conftest.c - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5 -printf %s "checking whether $CC supports -Werror... " >&6; } -cache=`echo Werror | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -ERRFLAG="-Werror" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: -ERRFLAG="-errwarn" -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5 -printf %s "checking whether $CC supports -Wall... " >&6; } -cache=`echo Wall | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -ERRFLAG="$ERRFLAG -Wall" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: -ERRFLAG="$ERRFLAG -errfmt" -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5 -printf %s "checking whether $CC supports -std=c99... " >&6; } -cache=`echo std=c99 | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -C99FLAG="-std=c99" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5 -printf %s "checking whether $CC supports -xc99... " >&6; } -cache=`echo xc99 | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -C99FLAG="-xc99" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - -ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default -" -if test "x$ac_cv_header_getopt_h" = xyes -then : - printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default -" -if test "x$ac_cv_header_time_h" = xyes -then : - printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h - -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5 -printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; } -cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh` -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include "confdefs.h" -#include -#include -#include -#ifdef HAVE_TIME_H -#include -#endif -#include -#include -#ifdef HAVE_GETOPT_H -#include -#endif - -int test(void) { - int a; - char **opts = NULL; - struct timeval tv; - char *t; - time_t time = 0; - char *buf = NULL; - const char* str = NULL; - struct msghdr msg; - msg.msg_control = 0; - t = ctime_r(&time, buf); - tv.tv_usec = 10; - srandom(32); - a = getopt(2, opts, "a"); - a = isascii(32); - str = gai_strerror(0); - if(str && t && tv.tv_usec && msg.msg_control) - a = 0; - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5 -printf %s "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; } -cache=`printf "%s\n" "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh` -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include "confdefs.h" -#include -#include -#include -#ifdef HAVE_TIME_H -#include -#endif -#include -#include -#ifdef HAVE_GETOPT_H -#include -#endif - -int test(void) { - int a; - char **opts = NULL; - struct timeval tv; - char *t; - time_t time = 0; - char *buf = NULL; - const char* str = NULL; - struct msghdr msg; - msg.msg_control = 0; - t = ctime_r(&time, buf); - tv.tv_usec = 10; - srandom(32); - a = getopt(2, opts, "a"); - a = isascii(32); - str = gai_strerror(0); - if(str && t && tv.tv_usec && msg.msg_control) - a = 0; - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5 -printf %s "checking whether we need $C99FLAG as a flag for $CC... " >&6; } -cache=`printf "%s\n" "$C99FLAG" | $as_tr_sh` -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include -#include -int test(void) { - int a = 0; - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS $C99FLAG" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5 -printf %s "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; } -cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include - -int test(void) { - int a; - a = isascii(32); - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5 -printf %s "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; } -cache=_D_GNU_SOURCE -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include - -int test(void) { - struct in6_pktinfo inf; - int a = (int)sizeof(inf); - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D_GNU_SOURCE" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - -# check again for GNU_SOURCE for setresgid. May fail if setresgid -# is not available at all. -D_FRSRESGID is to make this check unique. -# otherwise we would get the previous cached result. - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5 -printf %s "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; } -cache=_D_GNU_SOURCE__D_FRSRESGID -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include - -int test(void) { - int a = setresgid(0,0,0); - a = setresuid(0,0,0); - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D_GNU_SOURCE" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5 -printf %s "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; } -cache=_D_POSIX_C_SOURCE_200112 -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include "confdefs.h" -#ifdef HAVE_TIME_H -#include -#endif -#include - -int test(void) { - int a = 0; - char *t; - time_t time = 0; - char *buf = NULL; - const char* str = NULL; - t = ctime_r(&time, buf); - str = gai_strerror(0); - if(t && str) - a = 0; - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5 -printf %s "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; } -cache=_D__EXTENSIONS__ -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include "confdefs.h" -#include -#include -#include -#ifdef HAVE_TIME_H -#include -#endif -#include -#ifdef HAVE_GETOPT_H -#include -#endif - -int test(void) { - int a; - char **opts = NULL; - struct timeval tv; - tv.tv_usec = 10; - srandom(32); - a = getopt(2, opts, "a"); - a = isascii(32); - if(tv.tv_usec) - a = 0; - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D__EXTENSIONS__" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - - -# debug mode flags warnings -# Check whether --enable-checking was given. -if test ${enable_checking+y} -then : - enableval=$enable_checking; -fi - -# Check whether --enable-debug was given. -if test ${enable_debug+y} -then : - enableval=$enable_debug; -fi - -if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug"; -else debug_enabled="$enable_checking"; fi - -case "$debug_enabled" in - yes) - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5 -printf %s "checking whether $CC supports -W... " >&6; } -cache=`echo W | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -W" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5 -printf %s "checking whether $CC supports -Wall... " >&6; } -cache=`echo Wall | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -Wall" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5 -printf %s "checking whether $CC supports -Wextra... " >&6; } -cache=`echo Wextra | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -Wextra" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5 -printf %s "checking whether $CC supports -Wdeclaration-after-statement... " >&6; } -cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -Wdeclaration-after-statement" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - - -printf "%s\n" "#define UNBOUND_DEBUG /**/" >>confdefs.h - - ;; - no|*) - # nothing to do. - ;; -esac -if test "$default_cflags" = "yes"; then - # only when CFLAGS was "" at the start, if the users wants to - # override we shouldn't add default cflags, because they wouldn't - # be able to turn off these options and set the CFLAGS wanted. - - # Check whether --enable-flto was given. -if test ${enable_flto+y} -then : - enableval=$enable_flto; -fi - - if test "x$enable_flto" != "xno" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5 -printf %s "checking if $CC supports -flto... " >&6; } - BAKCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -flto" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then - CFLAGS="$BAKCFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - rm -f conftest conftest.c conftest.o - -else $as_nop - CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi - - - # Check whether --enable-pie was given. -if test ${enable_pie+y} -then : - enableval=$enable_pie; -fi - - if test "x$enable_pie" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5 -printf %s "checking if $CC supports PIE... " >&6; } - BAKLDFLAGS="$LDFLAGS" - BAKCFLAGS="$CFLAGS" - LDFLAGS="$LDFLAGS -pie" - CFLAGS="$CFLAGS -fPIE" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then - LDFLAGS="$BAKLDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - rm -f conftest conftest.c conftest.o - -else $as_nop - LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi - - - # Check whether --enable-relro_now was given. -if test ${enable_relro_now+y} -then : - enableval=$enable_relro_now; -fi - - if test "x$enable_relro_now" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5 -printf %s "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; } - BAKLDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then - LDFLAGS="$BAKLDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - rm -f conftest conftest.c conftest.o - -else $as_nop - LDFLAGS="$BAKLDFLAGS" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi - -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5 -printf %s "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; } -if test ${ac_cv_c_format_attribute+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_format_attribute=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -void f (char *format, ...) __attribute__ ((format (printf, 1, 2))); -void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2))); - -int -main (void) -{ - - f ("%s", "str"); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_format_attribute="yes" -else $as_nop - ac_cv_c_format_attribute="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5 -printf "%s\n" "$ac_cv_c_format_attribute" >&6; } -if test $ac_cv_c_format_attribute = yes; then - -printf "%s\n" "#define HAVE_ATTR_FORMAT 1" >>confdefs.h - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5 -printf %s "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; } -if test ${ac_cv_c_unused_attribute+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_unused_attribute=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -void f (char *u __attribute__((unused))); - -int -main (void) -{ - - f ("x"); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_unused_attribute="yes" -else $as_nop - ac_cv_c_unused_attribute="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5 -printf "%s\n" "$ac_cv_c_unused_attribute" >&6; } -if test $ac_cv_c_unused_attribute = yes; then - -printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h - -fi - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5 -printf %s "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; } -if test ${ac_cv_c_weak_attribute+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_weak_attribute=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include -__attribute__((weak)) void f(int x) { printf("%d", x); } - -int -main (void) -{ - - f(1); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_weak_attribute="yes" -else $as_nop - ac_cv_c_weak_attribute="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5 -printf "%s\n" "$ac_cv_c_weak_attribute" >&6; } -if test $ac_cv_c_weak_attribute = yes; then - -printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h - - -printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h - -fi - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute" >&5 -printf %s "checking whether the C compiler (${CC-cc}) accepts the \"noreturn\" attribute... " >&6; } -if test ${ac_cv_c_noreturn_attribute+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_noreturn_attribute=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include -__attribute__((noreturn)) void f(int x) { printf("%d", x); } - -int -main (void) -{ - - f(1); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_c_noreturn_attribute="yes" -else $as_nop - ac_cv_c_noreturn_attribute="no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_noreturn_attribute" >&5 -printf "%s\n" "$ac_cv_c_noreturn_attribute" >&6; } -if test $ac_cv_c_noreturn_attribute = yes; then - -printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h - - -printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h - -fi - - -if test "$srcdir" != "."; then - CPPFLAGS="$CPPFLAGS -I$srcdir" -fi - - - - - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LEX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -printf "%s\n" "$LEX" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - - if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%{ -#ifdef __cplusplus -extern "C" -#endif -int yywrap(void); -%} -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ -#ifdef __cplusplus - yyless ((yyinput () != 0)); -#else - yyless ((input () != 0)); -#endif - } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -yywrap (void) -{ - return 1; -} -int -main (void) -{ - return ! yylex (); -} -_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 -printf %s "checking for lex output file root... " >&6; } -if test ${ac_cv_prog_lex_root+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -ac_cv_prog_lex_root=unknown -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -printf "%s\n" "$ac_cv_prog_lex_root" >&6; } -if test "$ac_cv_prog_lex_root" = unknown -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 -printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} - LEX=: LEXLIB= -fi -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test ${LEXLIB+y} -then : - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 -printf %s "checking for lex library... " >&6; } -if test ${ac_cv_lib_lex+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - ac_save_LIBS="$LIBS" - ac_found=false - for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do - case $ac_cv_lib_lex in #( - 'none needed') : - ;; #( - 'not found') : - break ;; #( - *) : - LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( - *) : - ;; -esac - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_found=: -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if $ac_found; then - break - fi - done - LIBS="$ac_save_LIBS" - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -printf "%s\n" "$ac_cv_lib_lex" >&6; } - if test "$ac_cv_lib_lex" = 'not found' -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 -printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} - LEX=: LEXLIB= -elif test "$ac_cv_lib_lex" = 'none needed' -then : - LEXLIB='' -else $as_nop - LEXLIB=$ac_cv_lib_lex -fi - -fi - - -if test "$LEX" != : -then : - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -printf %s "checking whether yytext is a pointer... " >&6; } -if test ${ac_cv_prog_lex_yytext_pointer+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h - -fi - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" != "" -a "$LEX" != ":"; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5 -printf %s "checking for yylex_destroy... " >&6; } - if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then - -printf "%s\n" "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; - LEX=":" - fi - -fi -if test "$LEX" != "" -a "$LEX" != ":"; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex %option" >&5 -printf %s "checking for lex %option... " >&6; } - if cat <&1 | grep yy_delete_buffer >/dev/null 2>&1; then -%option nounput -%% -EOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; - LEX=":" - fi - -fi -if test "$LEX" = "" -o "$LEX" = ":"; then - if test ! -f util/configlexer.c; then - as_fn_error $? "no lex and no util/configlexer.c: need flex and bison to compile from source repository." "$LINENO" 5 - fi -fi -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_YACC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -printf "%s\n" "$YACC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -if test "$YACC" = "" -o "$YACC" = ":"; then - if test ! -f util/configparser.c; then - as_fn_error $? "no yacc and no util/configparser.c: need flex and bison to compile from source repository." "$LINENO" 5 - fi -fi -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_doxygen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$doxygen"; then - ac_cv_prog_doxygen="$doxygen" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_doxygen="doxygen" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -doxygen=$ac_cv_prog_doxygen -if test -n "$doxygen"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5 -printf "%s\n" "$doxygen" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -# skip these tests, we do not need them. - - - - - - - - -# always use ./libtool unless override from commandline (libtool=mylibtool) -if test -z "$libtool"; then - libtool="./libtool" -fi - -# avoid libtool max commandline length test on systems that fork slowly. - -if echo "$host_os" | grep "sunos4" >/dev/null; then - lt_cv_sys_max_cmd_len=32750; -fi -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $AR in - [\\/]* | ?:[\\/]*) - ac_cv_path_AR="$AR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_AR="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -AR=$ac_cv_path_AR -if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_AR"; then - ac_pt_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_AR in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_AR="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_AR=$ac_cv_path_ac_pt_AR -if test -n "$ac_pt_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5 -printf "%s\n" "$ac_pt_AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_pt_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_pt_AR - fi -else - AR="$ac_cv_path_AR" -fi - -if test $AR = false; then - as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5 -fi - - -case `pwd` in - *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } -fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -printf "%s\n" "$LD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_reload_flag='-r' -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$AWK" && break -done - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : - withval=$with_sysroot; -else $as_nop - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_cc_needs_belf=yes -else $as_nop - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_ld_exported_symbols_list=yes -else $as_nop - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h - -fi - - - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test ${enable_static+y} -then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test ${with_pic+y} -then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else $as_nop - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } - if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_irix_exported_symbol=yes -else $as_nop - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : - lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main (void) -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_shl_load=yes -else $as_nop - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : - lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_svld_dlopen=yes -else $as_nop - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main (void) -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_dld_dld_link=yes -else $as_nop - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - -# pkg-config is only needed for these options, do not require it otherwise -if test "$enable_systemd" = "yes" -o "$enable_dnstap" = "yes" -o "$with_pyunbound" = "yes" -o "$with_pythonmod" = "yes"; then - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - PKG_CONFIG="" - fi -fi -fi - -# Checks for header files. -ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default -" -if test "x$ac_cv_header_stdarg_h" = xyes -then : - printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default -" -if test "x$ac_cv_header_stdbool_h" = xyes -then : - printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default -" -if test "x$ac_cv_header_netinet_in_h" = xyes -then : - printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default -" -if test "x$ac_cv_header_netinet_tcp_h" = xyes -then : - printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_param_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_select_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_socket_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_un_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_uio_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_resource_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default -" -if test "x$ac_cv_header_arpa_inet_h" = xyes -then : - printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default -" -if test "x$ac_cv_header_syslog_h" = xyes -then : - printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default -" -if test "x$ac_cv_header_netdb_h" = xyes -then : - printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_wait_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default -" -if test "x$ac_cv_header_pwd_h" = xyes -then : - printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default -" -if test "x$ac_cv_header_glob_h" = xyes -then : - printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default -" -if test "x$ac_cv_header_grp_h" = xyes -then : - printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "$ac_includes_default -" -if test "x$ac_cv_header_login_cap_h" = xyes -then : - printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default -" -if test "x$ac_cv_header_winsock2_h" = xyes -then : - printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default -" -if test "x$ac_cv_header_ws2tcpip_h" = xyes -then : - printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default -" -if test "x$ac_cv_header_endian_h" = xyes -then : - printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_endian_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "libkern/OSByteOrder.h" "ac_cv_header_libkern_OSByteOrder_h" "$ac_includes_default -" -if test "x$ac_cv_header_libkern_OSByteOrder_h" = xyes -then : - printf "%s\n" "#define HAVE_LIBKERN_OSBYTEORDER_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_ipc_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_shm_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default -" -if test "x$ac_cv_header_ifaddrs_h" = xyes -then : - printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default -" -if test "x$ac_cv_header_poll_h" = xyes -then : - printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h - -fi - -# net/if.h portability for Darwin see: -# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html -ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " -#include -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -" -if test "x$ac_cv_header_net_if_h" = xyes -then : - printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h - -fi - - -# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH -ac_fn_c_check_header_compile "$LINENO" "TargetConditionals.h" "ac_cv_header_TargetConditionals_h" "$ac_includes_default -" -if test "x$ac_cv_header_TargetConditionals_h" = xyes -then : - printf "%s\n" "#define HAVE_TARGETCONDITIONALS_H 1" >>confdefs.h - -fi - -ac_fn_c_check_header_compile "$LINENO" "netioapi.h" "ac_cv_header_netioapi_h" "$ac_includes_default -#if HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_SYS_UIO_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_WINSOCK2_H -#include -#endif - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_header_netioapi_h" = xyes -then : - printf "%s\n" "#define HAVE_NETIOAPI_H 1" >>confdefs.h - -fi - - -# Check for Linux timestamping headers -ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default -" -if test "x$ac_cv_header_linux_net_tstamp_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h - -fi - - -# check for types. -# Using own tests for int64* because autoconf builtin only give 32bit. -ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default" -if test "x$ac_cv_type_int8_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define int8_t signed char" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default" -if test "x$ac_cv_type_int16_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define int16_t short" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default" -if test "x$ac_cv_type_int32_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define int32_t int" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" -if test "x$ac_cv_type_int64_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define int64_t long long" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default" -if test "x$ac_cv_type_uint8_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default" -if test "x$ac_cv_type_uint16_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint32_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" -if test "x$ac_cv_type_uint64_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define size_t unsigned int" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define ssize_t int" >>confdefs.h - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -printf %s "checking for uid_t in sys/types.h... " >&6; } -if test ${ac_cv_type_uid_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1 -then : - ac_cv_type_uid_t=yes -else $as_nop - ac_cv_type_uid_t=no -fi -rm -rf conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -printf "%s\n" "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -printf "%s\n" "#define uid_t int" >>confdefs.h - - -printf "%s\n" "#define gid_t int" >>confdefs.h - -fi - - - ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default -" -if test "x$ac_cv_type_pid_t" = xyes -then : - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #if defined _WIN64 && !defined __CYGWIN__ - LLP64 - #endif - -int -main (void) -{ - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - - -fi - - -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define off_t long int" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" " -$ac_includes_default -#ifdef HAVE_WINSOCK2_H -# include -#endif - -" -if test "x$ac_cv_type_u_char" = xyes -then : - -else $as_nop - -printf "%s\n" "#define u_char unsigned char" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" " -$ac_includes_default -#ifdef HAVE_SYS_RESOURCE_H -# include -#endif - -" -if test "x$ac_cv_type_rlim_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define rlim_t unsigned long" >>confdefs.h - -fi - - -ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " -$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_WS2TCPIP_H -# include -#endif - -" -if test "x$ac_cv_type_socklen_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define socklen_t int" >>confdefs.h - -fi - - ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" " -$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif - -" -if test "x$ac_cv_type_in_addr_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define in_addr_t uint32_t" >>confdefs.h - -fi - - ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" " -$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif - -" -if test "x$ac_cv_type_in_port_t" = xyes -then : - -else $as_nop - -printf "%s\n" "#define in_port_t uint16_t" >>confdefs.h - -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5 -printf %s "checking if memcmp compares unsigned... " >&6; } -if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5 -printf "%s\n" "cross-compile no" >&6; } - -printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h - - case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac - - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -int main(void) -{ - char a = 255, b = 0; - if(memcmp(&a, &b, 1) < 0) - return 1; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define MEMCMP_IS_BROKEN 1" >>confdefs.h - - case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 -printf %s "checking size of time_t... " >&6; } -if test ${ac_cv_sizeof_time_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " -$ac_includes_default -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -" -then : - -else $as_nop - if test "$ac_cv_type_time_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (time_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_time_t=0 - fi -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 -printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } - - - -printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -printf %s "checking size of size_t... " >&6; } -if test ${ac_cv_sizeof_size_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" -then : - -else $as_nop - if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (size_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_size_t=0 - fi -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } - - - -printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h - - - -# add option to disable the evil rpath - -# Check whether --enable-rpath was given. -if test ${enable_rpath+y} -then : - enableval=$enable_rpath; enable_rpath=$enableval -else $as_nop - enable_rpath=yes -fi - -if test "x$enable_rpath" = xno; then - ac_config_commands="$ac_config_commands disable-rpath" - -fi - - - -# check to see if libraries are needed for these functions. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5 -printf %s "checking for library containing inet_pton... " >&6; } -if test ${ac_cv_search_inet_pton+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inet_pton (); -int -main (void) -{ -return inet_pton (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_inet_pton=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_inet_pton+y} -then : - break -fi -done -if test ${ac_cv_search_inet_pton+y} -then : - -else $as_nop - ac_cv_search_inet_pton=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5 -printf "%s\n" "$ac_cv_search_inet_pton" >&6; } -ac_res=$ac_cv_search_inet_pton -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -printf %s "checking for library containing socket... " >&6; } -if test ${ac_cv_search_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char socket (); -int -main (void) -{ -return socket (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_socket+y} -then : - break -fi -done -if test ${ac_cv_search_socket+y} -then : - -else $as_nop - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -printf "%s\n" "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -# check whether strptime also works - -# check some functions of the OS before linking libs (while still runnable). -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 -printf %s "checking for working chown... " >&6; } -if test ${ac_cv_func_chown_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_chown_works=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_chown_works=no ;; - esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -#include - -int -main (void) -{ - char *f = "conftest.chown"; - struct stat before, after; - - if (creat (f, 0600) < 0) - return 1; - if (stat (f, &before) < 0) - return 1; - if (chown (f, (uid_t) -1, (gid_t) -1) == -1) - return 1; - if (stat (f, &after) < 0) - return 1; - return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - ac_cv_func_chown_works=yes -else $as_nop - ac_cv_func_chown_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -rm -f conftest.chown - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 -printf "%s\n" "$ac_cv_func_chown_works" >&6; } -if test $ac_cv_func_chown_works = yes; then - -printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h - -fi - - -ac_func= -for ac_item in $ac_func_c_list -do - if test $ac_func; then - ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func - if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then - echo "#define $ac_item 1" >> confdefs.h - fi - ac_func= - else - ac_func=$ac_item - fi -done - - - -if test "x$ac_cv_func_fork" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -printf %s "checking for working fork... " >&6; } -if test ${ac_cv_func_fork_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - ac_cv_func_fork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main (void) -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - ac_cv_func_fork_works=yes -else $as_nop - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -printf "%s\n" "$ac_cv_func_fork_works" >&6; } - -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -printf %s "checking for working vfork... " >&6; } -if test ${ac_cv_func_vfork_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - ac_cv_func_vfork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#include -#ifdef HAVE_VFORK_H -# include -#endif - -static void -do_nothing (int sig) -{ - (void) sig; -} - -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -sparc_address_test (int arg) -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main (void) -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - /* On Solaris 2.4, changes by the child to the signal handler - also munge signal handlers in the parent. To detect this, - start by putting the parent's handler in a known state. */ - signal (SIGTERM, SIG_DFL); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* Alter the child's signal handler. */ - if (signal (SIGTERM, do_nothing) != SIG_DFL) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child munge the parent's signal handler? */ - || signal (SIGTERM, SIG_DFL) != SIG_DFL - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - ac_cv_func_vfork_works=yes -else $as_nop - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -printf "%s\n" "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h - -else - -printf "%s\n" "#define vfork fork" >>confdefs.h - -fi -if test "x$ac_cv_func_fork_works" = xyes; then - -printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h - -fi - - -printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test ${ac_cv_sys_largefile_source+y} -then : - printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main (void) -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main (void) -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -printf "%s\n" "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - - -# Check whether --enable-largefile was given. -if test ${enable_largefile+y} -then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -printf %s "checking for special C compiler options needed for large files... " >&6; } -if test ${ac_cv_sys_largefile_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO" -then : - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test ${ac_cv_sys_file_offset_bits+y} -then : - printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } -if test ${ac_cv_sys_large_files+y} -then : - printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -printf "%s\n" "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h -;; -esac -rm -rf conftest* - fi -fi - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5 -printf %s "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; } -cache=_D_LARGEFILE_SOURCE_1 -if eval test \${cv_prog_cc_flag_needed_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include -int test(void) { - int a = fseeko(stdin, 0, 0); - return a; -} -' > conftest.c -echo 'void f(void){}' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=no" -else - -if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_needed_$cache=yes" -else -eval "cv_prog_cc_flag_needed_$cache=fail" -#echo 'Test with flag fails too!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1` -#exit 1 -fi - -fi -rm -f conftest conftest.c conftest.o - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1" -else -if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -#echo 'Test with flag is no!' -#cat conftest.c -#echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1" -#echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1` -#exit 1 -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } -: - -fi -fi - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5 -printf %s "checking if nonblocking sockets work... " >&6; } -if echo $host | grep mingw >/dev/null; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5 -printf "%s\n" "no (windows)" >&6; } - -printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h - -else -if test "$cross_compiling" = yes -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5 -printf "%s\n" "crosscompile(yes)" >&6; } - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif - -int main(void) -{ - int port; - int sfd, cfd; - int num = 10; - int i, p; - struct sockaddr_in a; - /* test if select and nonblocking reads work well together */ - /* open port. - fork child to send 10 messages. - select to read. - then try to nonblocking read the 10 messages - then, nonblocking read must give EAGAIN - */ - - port = 12345 + (time(0)%32); - sfd = socket(PF_INET, SOCK_DGRAM, 0); - if(sfd == -1) { - perror("socket"); - return 1; - } - memset(&a, 0, sizeof(a)); - a.sin_family = AF_INET; - a.sin_port = htons(port); - a.sin_addr.s_addr = inet_addr("127.0.0.1"); - if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) { - perror("bind"); - return 1; - } - if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) { - perror("fcntl"); - return 1; - } - - cfd = socket(PF_INET, SOCK_DGRAM, 0); - if(cfd == -1) { - perror("client socket"); - return 1; - } - a.sin_port = 0; - if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) { - perror("client bind"); - return 1; - } - a.sin_port = htons(port); - - /* no handler, causes exit in 10 seconds */ - alarm(10); - - /* send and receive on the socket */ - if((p=fork()) == 0) { - for(i=0; i&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5 -printf %s "checking whether mkdir has one arg... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#ifdef HAVE_WINSOCK2_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif - -int -main (void) -{ - - (void)mkdir("directory"); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h - - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - - - for ac_func in strptime -do : - ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime" -if test "x$ac_cv_func_strptime" = xyes -then : - printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5 -printf %s "checking whether strptime works... " >&6; } -if test c${cross_compiling} = cno; then -if test "$cross_compiling" = yes -then : - eval "ac_cv_c_strptime_works=maybe" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _XOPEN_SOURCE 600 -#include -int main(void) { struct tm tm; char *res; -res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm); -if (!res) return 2; -res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm); -if (!res) return 1; return 0; } - -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - eval "ac_cv_c_strptime_works=yes" -else $as_nop - eval "ac_cv_c_strptime_works=no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -else -eval "ac_cv_c_strptime_works=maybe" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5 -printf "%s\n" "$ac_cv_c_strptime_works" >&6; } -if test $ac_cv_c_strptime_works = no; then -case " $LIBOBJS " in - *" strptime.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strptime.$ac_objext" - ;; -esac - -else - -printf "%s\n" "#define STRPTIME_WORKS 1" >>confdefs.h - -fi - -else $as_nop - case " $LIBOBJS " in - *" strptime.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strptime.$ac_objext" - ;; -esac - -fi - -done - -# check if we can use SO_REUSEPORT -reuseport_default=0 -if echo "$host" | $GREP -i -e linux >/dev/null; then reuseport_default=1; fi -if echo "$host" | $GREP -i -e dragonfly >/dev/null; then reuseport_default=1; fi -if test "$reuseport_default" = 1; then - -printf "%s\n" "#define REUSEPORT_DEFAULT 1" >>confdefs.h - -else - -printf "%s\n" "#define REUSEPORT_DEFAULT 0" >>confdefs.h - -fi - -# Include systemd.m4 - begin -# macros for configuring systemd -# Copyright 2015, Sami Kerola, CloudFlare. -# BSD licensed. -# Check whether --enable-systemd was given. -if test ${enable_systemd+y} -then : - enableval=$enable_systemd; -else $as_nop - enable_systemd=no -fi - -have_systemd=no -if test "x$enable_systemd" != xno -then : - - - -pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -printf %s "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - have_systemd=no -elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - have_systemd=no -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - have_systemd=yes -fi - if test "x$have_systemd" != "xyes" -then : - - -pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5 -printf %s "checking for SYSTEMD_DAEMON... " >&6; } - -if test -n "$SYSTEMD_DAEMON_CFLAGS"; then - pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_DAEMON_LIBS"; then - pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 - - have_systemd_daemon=no -elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - have_systemd_daemon=no -else - SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS - SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - have_systemd_daemon=yes -fi - if test "x$have_systemd_daemon" = "xyes" -then : - have_systemd=yes -fi - -fi - case $enable_systemd:$have_systemd in #( - yes:no) : - as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #( - *:yes) : - -printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h - - LIBS="$LIBS $SYSTEMD_LIBS" - - ;; #( - *) : - ;; -esac - - -fi - if test "x$have_systemd" = xyes; then - USE_SYSTEMD_TRUE= - USE_SYSTEMD_FALSE='#' -else - USE_SYSTEMD_TRUE='#' - USE_SYSTEMD_FALSE= -fi - - -# Include systemd.m4 - end - -# set memory allocation checking if requested -# Check whether --enable-alloc-checks was given. -if test ${enable_alloc_checks+y} -then : - enableval=$enable_alloc_checks; -fi - -# Check whether --enable-alloc-lite was given. -if test ${enable_alloc_lite+y} -then : - enableval=$enable_alloc_lite; -fi - -# Check whether --enable-alloc-nonregional was given. -if test ${enable_alloc_nonregional+y} -then : - enableval=$enable_alloc_nonregional; -fi - -if test x_$enable_alloc_nonregional = x_yes; then - -printf "%s\n" "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h - -fi -if test x_$enable_alloc_checks = x_yes; then - -printf "%s\n" "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h - - SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo" - - ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo" - -else - if test x_$enable_alloc_lite = x_yes; then - -printf "%s\n" "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h - - else - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } - if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5 -printf "%s\n" "no (crosscompile)" >&6; } - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -#include -#else -char *malloc (); -#endif - -int -main (void) -{ - if(malloc(0) != 0) return 1; - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -printf "%s\n" "#define malloc rpl_malloc_unbound" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - fi -fi - -# check windows threads (we use them, not pthreads, on windows). -if test "$on_mingw" = "yes"; then -# check windows threads - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default -" -if test "x$ac_cv_header_windows_h" = xyes -then : - printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5 -printf %s "checking for CreateThread... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WINDOWS_H -#include -#endif - -int -main (void) -{ - - HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h - - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -else -# not on mingw, check thread libraries. - -# check for thread library. -# check this first, so that the pthread lib does not get linked in via -# libssl or libpython, and thus distorts the tests, and we end up using -# the non-threadsafe C libraries. - -# Check whether --with-pthreads was given. -if test ${with_pthreads+y} -then : - withval=$with_pthreads; -else $as_nop - withval="yes" -fi - -ub_have_pthreads=no -if test x_$withval != x_no; then - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - if test "x$PTHREAD_CC" != "x" -then : - CC="$PTHREAD_CC" -fi - if test "x$PTHREAD_CXX" != "x" -then : - CXX="$PTHREAD_CXX" -fi - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 -printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pthread_join (); -int -main (void) -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items with a "," contain both -# C compiler flags (before ",") and linker flags (after ","). Other items -# starting with a "-" are C compiler flags, and remaining items are -# library names, except for "none" which indicates that we try without -# any flags at all, and "pthread-config" which is a program returning -# the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case $host_os in - - freebsd*) - - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - - hpux*) - - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." - - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - - openedition*) - - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 -printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} -fi -rm -rf conftest* - - ;; - - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). - - ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" - ;; -esac - -# Are we compiling with Clang? - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 -printf %s "checking whether $CC is Clang... " >&6; } -if test ${ax_cv_PTHREAD_CLANG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 -then : - ax_cv_PTHREAD_CLANG=yes -fi -rm -rf conftest* - - fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 -printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" - - -# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) - -# Note that for GCC and Clang -pthread generally implies -lpthread, -# except when -nostdlib is passed. -# This is problematic using libtool to build C++ shared libraries with pthread: -# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 -# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 -# To solve this, first try -pthread together with -lpthread for GCC - -if test "x$GCC" = "xyes" -then : - ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags" -fi - -# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first - -if test "x$ax_pthread_clang" = "xyes" -then : - ax_pthread_flags="-pthread,-lpthread -pthread" -fi - - -# The presence of a feature test macro requesting re-entrant function -# definitions is, on some systems, a strong hint that pthreads support is -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - - *) - ax_pthread_check_macro="--" - ;; -esac -if test "x$ax_pthread_check_macro" = "x--" -then : - ax_pthread_check_cond=0 -else $as_nop - ax_pthread_check_cond="!defined($ax_pthread_check_macro)" -fi - - -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -printf %s "checking whether pthreads work without any flags... " >&6; } - ;; - - *,*) - PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` - PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 -printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } - ;; - - -*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 -printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ax_pthread_config+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ax_pthread_config="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -printf "%s\n" "$ax_pthread_config" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test "x$ax_pthread_config" = "xno" -then : - continue -fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 -printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void *some_global = NULL; - static void routine(void *a) - { - /* To avoid any unused-parameter or - unused-but-set-parameter warning. */ - some_global = a; - } - static void *start_routine(void *a) { return a; } -int -main (void) -{ -pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xyes" -then : - break -fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - - -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way - -if test "x$ax_pthread_clang" = "xyes"; then - - # Clang takes -pthread; it has never supported any other flag - - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 -printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } -if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - if test "x$ax_pthread_try" = "xunknown" -then : - break -fi - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(void){return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_link="$ax_pthread_2step_ac_link" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(void){return 0;} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - if test "x$ax_pthread_try" = "x" -then : - ax_pthread_try=no -fi - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 -printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } - - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac - -fi # $ax_pthread_clang = yes - - - -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -printf %s "checking for joinable pthread attribute... " >&6; } -if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int attr = $ax_pthread_attr; return attr /* ; */ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - done - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 -printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } - if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes" -then : - -printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h - - ax_pthread_joinable_attr_defined=yes - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 -printf %s "checking whether more special flags are required for pthreads... " >&6; } -if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 -printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } - if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes" -then : - PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -int i = PTHREAD_PRIO_INHERIT; - return i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ax_cv_PTHREAD_PRIO_INHERIT=yes -else $as_nop - ax_cv_PTHREAD_PRIO_INHERIT=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } - if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes" -then : - -printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h - - ax_pthread_prio_inherit_defined=yes - -fi - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - case "x/$CC" in #( - x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : - #handle absolute path differently from PATH based program lookup - case "x$CC" in #( - x/*) : - - if as_fn_executable_p ${CC}_r -then : - PTHREAD_CC="${CC}_r" -fi - if test "x${CXX}" != "x" -then : - if as_fn_executable_p ${CXX}_r -then : - PTHREAD_CXX="${CXX}_r" -fi -fi - ;; #( - *) : - - for ac_prog in ${CC}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PTHREAD_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -printf "%s\n" "$PTHREAD_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - - if test "x${CXX}" != "x" -then : - for ac_prog in ${CXX}_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PTHREAD_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$PTHREAD_CXX"; then - ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_PTHREAD_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX -if test -n "$PTHREAD_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5 -printf "%s\n" "$PTHREAD_CXX" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$PTHREAD_CXX" && break -done -test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" - -fi - - ;; -esac - ;; #( - *) : - ;; -esac - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" -test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" - - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then - - -printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h - - if test -n "$PTHREAD_LIBS"; then - LIBS="$PTHREAD_LIBS $LIBS" - fi - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - CC="$PTHREAD_CC" - ub_have_pthreads=yes - ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include -" -if test "x$ac_cv_type_pthread_spinlock_t" = xyes -then : - -printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h - - -fi -ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include -" -if test "x$ac_cv_type_pthread_rwlock_t" = xyes -then : - -printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_T 1" >>confdefs.h - - -fi - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 -printf %s "checking size of unsigned long... " >&6; } -if test ${ac_cv_sizeof_unsigned_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default" -then : - -else $as_nop - if test "$ac_cv_type_unsigned_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_long=0 - fi -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; } - - - -printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 -printf %s "checking size of pthread_t... " >&6; } -if test ${ac_cv_sizeof_pthread_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default" -then : - -else $as_nop - if test "$ac_cv_type_pthread_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (pthread_t) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_pthread_t=0 - fi -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 -printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; } - - - -printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h - - - - if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5 -printf %s "checking if -pthread unused during linking... " >&6; } - # catch clang warning 'argument unused during compilation' - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - -int main(void) {return 0;} - -_ACEOF - pthread_unused="yes" - # first compile - echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5 - $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5 - if test $? = 0; then - # then link - echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5 - $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5 - if test $? -ne 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'` - PTHREAD_CFLAGS_ONLY="-pthread" - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi # endif cc successful - rm -f conftest conftest.c conftest.o - fi # endif -pthread in CFLAGS - - - : -else - ax_pthread_ok=no - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi - -# check solaris thread library - -# Check whether --with-solaris-threads was given. -if test ${with_solaris_threads+y} -then : - withval=$with_solaris_threads; -else $as_nop - withval="no" -fi - -ub_have_sol_threads=no -if test x_$withval != x_no; then - if test x_$ub_have_pthreads != x_no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5 -printf "%s\n" "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;} - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5 -printf %s "checking for library containing thr_create... " >&6; } -if test ${ac_cv_search_thr_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char thr_create (); -int -main (void) -{ -return thr_create (); - ; - return 0; -} -_ACEOF -for ac_lib in '' thread -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_thr_create=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_thr_create+y} -then : - break -fi -done -if test ${ac_cv_search_thr_create+y} -then : - -else $as_nop - ac_cv_search_thr_create=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5 -printf "%s\n" "$ac_cv_search_thr_create" >&6; } -ac_res=$ac_cv_search_thr_create -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -printf "%s\n" "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5 -printf %s "checking whether $CC supports -mt... " >&6; } -cache=`echo mt | sed 'y%.=/+-%___p_%'` -if eval test \${cv_prog_cc_flag_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo 'void f(void){}' >conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then -eval "cv_prog_cc_flag_$cache=yes" -else -eval "cv_prog_cc_flag_$cache=no" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -: -CFLAGS="$CFLAGS -mt" -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: -CFLAGS="$CFLAGS -D_REENTRANT" -fi - - ub_have_sol_threads=yes - -else $as_nop - - as_fn_error $? "no solaris threads found." "$LINENO" 5 - -fi - - fi -fi - -fi # end of non-mingw check of thread libraries - -# Check for SYSLOG_FACILITY - -# Check whether --with-syslog-facility was given. -if test ${with_syslog_facility+y} -then : - withval=$with_syslog_facility; UNBOUND_SYSLOG_FACILITY="$withval" -fi - -case "${UNBOUND_SYSLOG_FACILITY}" in - - LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;; - - *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;; - -esac - -printf "%s\n" "#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY}" >>confdefs.h - - -# Check for dynamic library module - -# Check whether --with-dynlibmodule was given. -if test ${with_dynlibmodule+y} -then : - withval=$with_dynlibmodule; -else $as_nop - withval="no" -fi - - -if test x_$withval != x_no; then - -printf "%s\n" "#define WITH_DYNLIBMODULE 1" >>confdefs.h - - WITH_DYNLIBMODULE=yes - - DYNLIBMOD_OBJ="dynlibmod.lo" - - DYNLIBMOD_HEADER='$(srcdir)/dynlibmod/dynlibmod.h' - - if test $on_mingw = "no"; then - # link with -ldl if not already there, for all executables because - # dlopen call is in the dynlib module. For unbound executable, also - # export symbols. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -printf %s "checking for library containing dlopen... " >&6; } -if test ${ac_cv_search_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_dlopen+y} -then : - break -fi -done -if test ${ac_cv_search_dlopen+y} -then : - -else $as_nop - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -printf "%s\n" "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - DYNLIBMOD_EXTRALIBS="-export-dynamic" - else - DYNLIBMOD_EXTRALIBS="-Wl,--export-all-symbols,--out-implib,libunbound.dll.a" - fi - -fi - -# Check for PyUnbound - -# Check whether --with-pyunbound was given. -if test ${with_pyunbound+y} -then : - withval=$with_pyunbound; -else $as_nop - withval="no" -fi - - -ub_test_python=no -ub_with_pyunbound=no -if test x_$withval != x_no; then - ub_with_pyunbound=yes - ub_test_python=yes -fi - -# Check for Python module - -# Check whether --with-pythonmodule was given. -if test ${with_pythonmodule+y} -then : - withval=$with_pythonmodule; -else $as_nop - withval="no" -fi - - -ub_with_pythonmod=no -if test x_$withval != x_no; then - ub_with_pythonmod=yes - ub_test_python=yes -fi - -# Check for Python & SWIG only on PyUnbound or PyModule -if test x_$ub_test_python != x_no; then - - # Check for Python - ub_have_python=no - ac_save_LIBS="$LIBS" - # - # Allow the use of a (user set) custom python version - # - - - # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. -set dummy python$PYTHON_VERSION; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test -z "$PYTHON"; then - as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 - PYTHON_VERSION="" - fi - - if test -z "$PYTHON_VERSION"; then - PYTHON_VERSION=`$PYTHON -c "import sys; \ - print(sys.version.split()[0])"` - fi - # calculate the version number components. - - v="$PYTHON_VERSION" - PYTHON_VERSION_MAJOR=`echo $v | sed 's/[^0-9].*//'` - if test -z "$PYTHON_VERSION_MAJOR"; then PYTHON_VERSION_MAJOR="0"; fi - v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` - PYTHON_VERSION_MINOR=`echo $v | sed 's/[^0-9].*//'` - if test -z "$PYTHON_VERSION_MINOR"; then PYTHON_VERSION_MINOR="0"; fi - v=`echo $v | sed -e 's/^[0-9]*$//' -e 's/[0-9]*[^0-9]//'` - PYTHON_VERSION_PATCH=`echo $v | sed 's/[^0-9].*//'` - if test -z "$PYTHON_VERSION_PATCH"; then PYTHON_VERSION_PATCH="0"; fi - - - # For some systems, sysconfig exists, but has the wrong paths, - # on Debian 10, for python 2.7 and 3.7. So, we check the version, - # and for older versions try distutils.sysconfig first. For newer - # versions>=3.10, where distutils.sysconfig is deprecated, use - # sysconfig first and then attempt the other one. - py_distutils_first="no" - if test $PYTHON_VERSION_MAJOR -lt 3; then - py_distutils_first="yes" - fi - if test $PYTHON_VERSION_MAJOR -eq 3 -a $PYTHON_VERSION_MINOR -lt 10; then - py_distutils_first="yes" - fi - - # Check if you have the first module - if test "$py_distutils_first" = "yes"; then m="distutils"; else m="sysconfig"; fi - sysconfig_module="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m Python module" >&5 -printf %s "checking for the $m Python module... " >&6; } - if ac_modulecheck_result1=`$PYTHON -c "import $m" 2>&1`; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - sysconfig_module="$m" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - - # if not found, try the other one. - if test -z "$sysconfig_module"; then - if test "$py_distutils_first" = "yes"; then m2="sysconfig"; else m2="distutils"; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the $m2 Python module" >&5 -printf %s "checking for the $m2 Python module... " >&6; } - if ac_modulecheck_result2=`$PYTHON -c "import $m2" 2>&1`; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - sysconfig_module="$m2" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? "cannot import Python module \"$m\", or \"$m2\". - Please check your Python installation. The errors are: - $m - $ac_modulecheck_result1 - $m2 - $ac_modulecheck_result2" "$LINENO" 5 - PYTHON_VERSION="" - fi - fi - if test "$sysconfig_module" = "distutils"; then sysconfig_module="distutils.sysconfig"; fi - - # - # Check for Python include path - # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 -printf %s "checking for Python include path... " >&6; } - if test -z "$PYTHON_CPPFLAGS"; then - if test "$sysconfig_module" = "sysconfig"; then - python_path=`$PYTHON -c 'import sysconfig; \ - print(sysconfig.get_path("include"));'` - else - python_path=`$PYTHON -c "import distutils.sysconfig; \ - print(distutils.sysconfig.get_python_inc());"` - fi - if test -n "${python_path}"; then - python_path="-I$python_path" - fi - PYTHON_CPPFLAGS=$python_path - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 -printf "%s\n" "$PYTHON_CPPFLAGS" >&6; } - - - # - # Check for Python library path - # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 -printf %s "checking for Python library path... " >&6; } - if test -z "$PYTHON_LDFLAGS"; then - PYTHON_LDFLAGS=`$PYTHON -c "from $sysconfig_module import *; \ - print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"` - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 -printf "%s\n" "$PYTHON_LDFLAGS" >&6; } - - - if test -z "$PYTHON_LIBDIR"; then - PYTHON_LIBDIR=`$PYTHON -c "from $sysconfig_module import *; \ - print(get_config_var('LIBDIR'));"` - fi - - # - # Check for site packages - # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 -printf %s "checking for Python site-packages path... " >&6; } - if test -z "$PYTHON_SITE_PKG"; then - if test "$sysconfig_module" = "sysconfig"; then - PYTHON_SITE_PKG=`$PYTHON -c 'import sysconfig; \ - print(sysconfig.get_path("platlib"));'` - else - PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ - print(distutils.sysconfig.get_python_lib(1,0));"` - fi - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 -printf "%s\n" "$PYTHON_SITE_PKG" >&6; } - - - # - # final check to see if everything compiles alright - # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 -printf %s "checking consistency of all components of python development environment... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # save current global flags - ac_save_LIBS="$LIBS" - ac_save_CPPFLAGS="$CPPFLAGS" - - LIBS="$LIBS $PYTHON_LDFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main (void) -{ - - Py_Initialize(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - pythonexists=yes -else $as_nop - pythonexists=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 -printf "%s\n" "$pythonexists" >&6; } - - if test ! "$pythonexists" = "yes"; then - as_fn_error $? " - Could not link test program to Python. Maybe the main Python library has been - installed in some non-standard library path. If so, pass it to configure, - via the LDFLAGS environment variable. - Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\" - ============================================================================ - ERROR! - You probably have to install the development version of the Python package - for your distribution. The exact name of this package varies among them. - ============================================================================ - " "$LINENO" 5 - PYTHON_VERSION="" - fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # turn back to default flags - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - - # - # all done! - # - - if test ! -z "$PYTHON_VERSION"; then - badversion="no" - if test "$PYTHON_VERSION_MAJOR" -lt 2; then - badversion="yes" - fi - if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then - badversion="yes" - fi - if test "$badversion" = "yes"; then - as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5 - fi - - PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`" - - # Have Python - -printf "%s\n" "#define HAVE_PYTHON 1" >>confdefs.h - - if test x_$ub_with_pythonmod != x_no; then - if test -n "$LIBS"; then - LIBS="$PYTHON_LDFLAGS $LIBS" - else - LIBS="$PYTHON_LDFLAGS" - fi - fi - PYTHON_LIBS="$PYTHON_LDFLAGS" - - if test -n "$CPPFLAGS"; then - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - else - CPPFLAGS="$PYTHON_CPPFLAGS" - fi - if test "$PYTHON_LIBDIR" != "/usr/lib" -a "$PYTHON_LIBDIR" != "" -a "$PYTHON_LIBDIR" != "/usr/lib64"; then - - if test "x$enable_rpath" = xyes; then - if echo "$PYTHON_LIBDIR" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$PYTHON_LIBDIR" - fi - fi - - fi - ub_have_python=yes - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5 - ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}" -else - PC_PY_DEPENDENCY="python" -fi - - - # Check for SWIG - ub_have_swig=no - # Check whether --enable-swig-version-check was given. -if test ${enable_swig_version_check+y} -then : - enableval=$enable_swig_version_check; -fi - - if test "$enable_swig_version_check" = "yes"; then - - # Find path to the "swig" executable. - for ac_prog in swig swig3.0 swig2.0 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_SWIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $SWIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -SWIG=$ac_cv_path_SWIG -if test -n "$SWIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 -printf "%s\n" "$SWIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$SWIG" && break -done - - if test -z "$SWIG" ; then - : - elif test -z "2.0.1" ; then - : - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5 -printf %s "checking SWIG version... " >&6; } - swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 -printf "%s\n" "$swig_version" >&6; } - if test -n "$swig_version" ; then - # Calculate the required version number components - required=2.0.1 - required_major=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_major" ; then - required_major=0 - fi - required=`echo $required. | sed 's/[0-9]*[^0-9]//'` - required_minor=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_minor" ; then - required_minor=0 - fi - required=`echo $required. | sed 's/[0-9]*[^0-9]//'` - required_patch=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_patch" ; then - required_patch=0 - fi - # Calculate the available version number components - available=$swig_version - available_major=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_major" ; then - available_major=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_minor=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_minor" ; then - available_minor=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_patch=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_patch" ; then - available_patch=0 - fi - # Convert the version tuple into a single number for easier comparison. - # Using base 100 should be safe since SWIG internally uses BCD values - # to encode its version number. - required_swig_vernum=`expr $required_major \* 10000 \ - \+ $required_minor \* 100 \+ $required_patch` - available_swig_vernum=`expr $available_major \* 10000 \ - \+ $available_minor \* 100 \+ $available_patch` - - if test $available_swig_vernum -lt $required_swig_vernum; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&5 -printf "%s\n" "$as_me: WARNING: SWIG version >= 2.0.1 is required. You have $swig_version." >&2;} - SWIG='' - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5 -printf %s "checking for SWIG library... " >&6; } - SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5 -printf "%s\n" "$SWIG_LIB" >&6; } - - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;} - SWIG='' - - fi - fi - - - else - - # Find path to the "swig" executable. - for ac_prog in swig swig3.0 swig2.0 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_SWIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $SWIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_SWIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -SWIG=$ac_cv_path_SWIG -if test -n "$SWIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 -printf "%s\n" "$SWIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - test -n "$SWIG" && break -done - - if test -z "$SWIG" ; then - : - elif test -z "" ; then - : - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5 -printf %s "checking SWIG version... " >&6; } - swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 -printf "%s\n" "$swig_version" >&6; } - if test -n "$swig_version" ; then - # Calculate the required version number components - required= - required_major=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_major" ; then - required_major=0 - fi - required=`echo $required. | sed 's/[0-9]*[^0-9]//'` - required_minor=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_minor" ; then - required_minor=0 - fi - required=`echo $required. | sed 's/[0-9]*[^0-9]//'` - required_patch=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_patch" ; then - required_patch=0 - fi - # Calculate the available version number components - available=$swig_version - available_major=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_major" ; then - available_major=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_minor=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_minor" ; then - available_minor=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_patch=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_patch" ; then - available_patch=0 - fi - # Convert the version tuple into a single number for easier comparison. - # Using base 100 should be safe since SWIG internally uses BCD values - # to encode its version number. - required_swig_vernum=`expr $required_major \* 10000 \ - \+ $required_minor \* 100 \+ $required_patch` - available_swig_vernum=`expr $available_major \* 10000 \ - \+ $available_minor \* 100 \+ $available_patch` - - if test $available_swig_vernum -lt $required_swig_vernum; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= is required. You have $swig_version." >&5 -printf "%s\n" "$as_me: WARNING: SWIG version >= is required. You have $swig_version." >&2;} - SWIG='' - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5 -printf %s "checking for SWIG library... " >&6; } - SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5 -printf "%s\n" "$SWIG_LIB" >&6; } - - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine SWIG version" >&2;} - SWIG='' - - fi - fi - - - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5 -printf %s "checking SWIG... " >&6; } - if test ! -x "$SWIG"; then - as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5 - else - -printf "%s\n" "#define HAVE_SWIG 1" >>confdefs.h - - swig="$SWIG" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: present" >&5 -printf "%s\n" "present" >&6; } - - # If have Python & SWIG - # Declare PythonMod - if test x_$ub_with_pythonmod != x_no; then - -printf "%s\n" "#define WITH_PYTHONMODULE 1" >>confdefs.h - - WITH_PYTHONMODULE=yes - - PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo" - - PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h' - - PYTHONMOD_INSTALL=pythonmod-install - - PYTHONMOD_UNINSTALL=pythonmod-uninstall - - fi - - # Declare PyUnbound - if test x_$ub_with_pyunbound != x_no; then - -printf "%s\n" "#define WITH_PYUNBOUND 1" >>confdefs.h - - WITH_PYUNBOUND=yes - - PYUNBOUND_OBJ="libunbound_wrap.lo" - - PYUNBOUND_TARGET="_unbound.la" - - PYUNBOUND_INSTALL=pyunbound-install - - PYUNBOUND_UNINSTALL=pyunbound-uninstall - - fi - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5 -printf "%s\n" "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; } - ub_with_pyunbound=no - ub_with_pythonmod=no - fi -fi - -if test "`uname`" = "NetBSD"; then - NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_' - -fi - -if test "`uname`" = "Linux"; then - # splint cannot parse modern c99 header files - GCC_DOCKER_LINTFLAGS='-syntax' - -fi -CONFIG_DATE=`date +%Y%m%d` - - -# Checks for libraries. - -# libnss -USE_NSS="no" - -# Check whether --with-nss was given. -if test ${with_nss+y} -then : - withval=$with_nss; - USE_NSS="yes" - -printf "%s\n" "#define HAVE_NSS 1" >>confdefs.h - - if test "$withval" != "" -a "$withval" != "yes"; then - CPPFLAGS="$CPPFLAGS -I$withval/include/nss3" - LDFLAGS="$LDFLAGS -L$withval/lib" - - if test "x$enable_rpath" = xyes; then - if echo "$withval/lib" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib" - fi - fi - - CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS" - else - CPPFLAGS="$CPPFLAGS -I/usr/include/nss3" - CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS" - fi - LIBS="$LIBS -lnss3 -lnspr4" - SSLLIB="" - PC_CRYPTO_DEPENDENCY="nss nspr" - - - -fi - - -# libnettle -USE_NETTLE="no" - -# Check whether --with-nettle was given. -if test ${with_nettle+y} -then : - withval=$with_nettle; - USE_NETTLE="yes" - -printf "%s\n" "#define HAVE_NETTLE 1" >>confdefs.h - - ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default -" -if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes -then : - printf "%s\n" "#define HAVE_NETTLE_DSA_COMPAT_H 1" >>confdefs.h - -fi - - if test "$withval" != "" -a "$withval" != "yes"; then - CPPFLAGS="$CPPFLAGS -I$withval/include/nettle" - LDFLAGS="$LDFLAGS -L$withval/lib" - - if test "x$enable_rpath" = xyes; then - if echo "$withval/lib" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib" - fi - fi - - else - CPPFLAGS="$CPPFLAGS -I/usr/include/nettle" - fi - LIBS="$LIBS -lhogweed -lnettle -lgmp" - SSLLIB="" - PC_CRYPTO_DEPENDENCY="hogweed nettle" - - - -fi - - -# openssl -if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - - -# Check whether --with-ssl was given. -if test ${with_ssl+y} -then : - withval=$with_ssl; - -else $as_nop - - withval="yes" - -fi - - if test x_$withval = x_no; then - as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5 - fi - - withval=$withval - if test x_$withval != x_no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5 -printf %s "checking for SSL... " >&6; } - if test -n "$withval"; then - if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then - ssldir="$withval" - found_ssl="yes" - withval="" - ssldir_include="$ssldir" - ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` - if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then - : # found here - else - ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` - if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then - : # found here - else - as_fn_error $? "Could not find openssl lib file, $ssldir_lib/libssl.so,a, pass like \"/usr/local\" or \"/usr/include/openssl11\"" "$LINENO" 5 - fi - fi - fi - fi - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" - fi - for dir in $withval; do - ssldir="$dir" - if test -f "$dir/include/openssl/ssl.h"; then - found_ssl="yes" - ssldir_include="$ssldir/include" - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - ssldir_lib="$ssldir/lib64" - else - ssldir_lib="$ssldir/lib" - fi - break; - fi - done - if test x_$found_ssl != x_yes; then - as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5 -printf "%s\n" "found in $ssldir" >&6; } - -printf "%s\n" "#define HAVE_SSL /**/" >>confdefs.h - - HAVE_SSL=yes - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir_include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" - LDFLAGS="$LDFLAGS -L$ssldir_lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" - - if test "x$enable_rpath" = xyes; then - if echo "$ssldir_lib" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$ssldir_lib" - fi - fi - - fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lcrypto" >&5 -printf %s "checking for EVP_sha256 in -lcrypto... " >&6; } - LIBS="$LIBS -lcrypto" - LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - # check if -lwsock32 or -lgdi32 are needed. - BAKLIBS="$LIBS" - BAKSSLLIBS="$LIBSSL_LIBS" - LIBS="$LIBS -lgdi32 -lws2_32" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5 -printf %s "checking if -lcrypto needs -lgdi32... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32" >&5 -printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" >&5 -printf %s "checking if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5 -printf %s "checking if -lcrypto needs -ldl... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5 -printf %s "checking if -lcrypto needs -ldl -pthread... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - -printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - fi - - - fi -ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_ssl_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h - -fi - -ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_err_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_ERR_H 1" >>confdefs.h - -fi - -ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_rand_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_RAND_H 1" >>confdefs.h - -fi - - - - -# check if libssl needs libdl -BAKLIBS="$LIBS" -LIBS="-lssl $LIBS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5 -printf %s "checking if libssl needs libdl... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char SSL_CTX_new (); -int -main (void) -{ -return SSL_CTX_new (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - LIBS="$BAKLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -printf %s "checking for library containing dlopen... " >&6; } -if test ${ac_cv_search_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main (void) -{ -return dlopen (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dl -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_dlopen=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_dlopen+y} -then : - break -fi -done -if test ${ac_cv_search_dlopen+y} -then : - -else $as_nop - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -printf "%s\n" "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -SSLLIB="-lssl" - -PC_CRYPTO_DEPENDENCY="" - - -# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) -BAKLIBS="$LIBS" -LIBS="-lssl $LIBS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5 -printf %s "checking if libssl needs -lcrypt32... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - int EVP_sha256(void); - (void)EVP_sha256(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - LIBS="$BAKLIBS" - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - LIBS="$BAKLIBS" - LIBS="$LIBS -lcrypt32" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 -printf %s "checking for LibreSSL... " >&6; } -if grep VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_LIBRESSL 1" >>confdefs.h - - # libressl provides these compat functions, but they may also be - # declared by the OS in libc. See if they have been declared. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 -printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } -if test ${ac_cv_c_undeclared_builtin_options+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS - ac_cv_c_undeclared_builtin_options='cannot detect' - for ac_arg in '' -fno-builtin; do - CFLAGS="$ac_save_CFLAGS $ac_arg" - # This test program should *not* compile successfully. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -(void) strchr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - # This test program should compile successfully. - # No library function is consistently available on - # freestanding implementations, so test against a dummy - # declaration. Include always-available headers on the - # off chance that they somehow elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); - -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if test x"$ac_arg" = x -then : - ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg -fi - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done - CFLAGS=$ac_save_CFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 -printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } - case $ac_cv_c_undeclared_builtin_options in #( - 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( - 'none needed') : - ac_c_undeclared_builtin_options='' ;; #( - *) : - ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; -esac - -ac_fn_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_strlcpy" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_STRLCPY $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_strlcat" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_STRLCAT $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_arc4random" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_ARC4RANDOM $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_arc4random_uniform" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl" >>confdefs.h - -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/conf.h" "ac_cv_header_openssl_conf_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_conf_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_CONF_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_engine_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_ENGINE_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_bn_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_BN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_dh_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_DH_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/dsa.h" "ac_cv_header_openssl_dsa_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_dsa_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_DSA_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/rsa.h" "ac_cv_header_openssl_rsa_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_rsa_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_RSA_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/core_names.h" "ac_cv_header_openssl_core_names_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_core_names_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_CORE_NAMES_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "openssl/param_build.h" "ac_cv_header_openssl_param_build_h" "$ac_includes_default -" -if test "x$ac_cv_header_openssl_param_build_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_PARAM_BUILD_H 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "OPENSSL_config" "ac_cv_func_OPENSSL_config" -if test "x$ac_cv_func_OPENSSL_config" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_CONFIG 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_sha1" "ac_cv_func_EVP_sha1" -if test "x$ac_cv_func_EVP_sha1" = xyes -then : - printf "%s\n" "#define HAVE_EVP_SHA1 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_sha256" "ac_cv_func_EVP_sha256" -if test "x$ac_cv_func_EVP_sha256" = xyes -then : - printf "%s\n" "#define HAVE_EVP_SHA256 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_sha512" "ac_cv_func_EVP_sha512" -if test "x$ac_cv_func_EVP_sha512" = xyes -then : - printf "%s\n" "#define HAVE_EVP_SHA512 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "FIPS_mode" "ac_cv_func_FIPS_mode" -if test "x$ac_cv_func_FIPS_mode" = xyes -then : - printf "%s\n" "#define HAVE_FIPS_MODE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_default_properties_is_fips_enabled" "ac_cv_func_EVP_default_properties_is_fips_enabled" -if test "x$ac_cv_func_EVP_default_properties_is_fips_enabled" = xyes -then : - printf "%s\n" "#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_MD_CTX_new" "ac_cv_func_EVP_MD_CTX_new" -if test "x$ac_cv_func_EVP_MD_CTX_new" = xyes -then : - printf "%s\n" "#define HAVE_EVP_MD_CTX_NEW 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_digests" "ac_cv_func_OpenSSL_add_all_digests" -if test "x$ac_cv_func_OpenSSL_add_all_digests" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_ADD_ALL_DIGESTS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "OPENSSL_init_crypto" "ac_cv_func_OPENSSL_init_crypto" -if test "x$ac_cv_func_OPENSSL_init_crypto" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_INIT_CRYPTO 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_cleanup" "ac_cv_func_EVP_cleanup" -if test "x$ac_cv_func_EVP_cleanup" = xyes -then : - printf "%s\n" "#define HAVE_EVP_CLEANUP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ENGINE_cleanup" "ac_cv_func_ENGINE_cleanup" -if test "x$ac_cv_func_ENGINE_cleanup" = xyes -then : - printf "%s\n" "#define HAVE_ENGINE_CLEANUP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ERR_load_crypto_strings" "ac_cv_func_ERR_load_crypto_strings" -if test "x$ac_cv_func_ERR_load_crypto_strings" = xyes -then : - printf "%s\n" "#define HAVE_ERR_LOAD_CRYPTO_STRINGS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "CRYPTO_cleanup_all_ex_data" "ac_cv_func_CRYPTO_cleanup_all_ex_data" -if test "x$ac_cv_func_CRYPTO_cleanup_all_ex_data" = xyes -then : - printf "%s\n" "#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ERR_free_strings" "ac_cv_func_ERR_free_strings" -if test "x$ac_cv_func_ERR_free_strings" = xyes -then : - printf "%s\n" "#define HAVE_ERR_FREE_STRINGS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "RAND_cleanup" "ac_cv_func_RAND_cleanup" -if test "x$ac_cv_func_RAND_cleanup" = xyes -then : - printf "%s\n" "#define HAVE_RAND_CLEANUP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "DSA_SIG_set0" "ac_cv_func_DSA_SIG_set0" -if test "x$ac_cv_func_DSA_SIG_set0" = xyes -then : - printf "%s\n" "#define HAVE_DSA_SIG_SET0 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1" -if test "x$ac_cv_func_EVP_dss1" = xyes -then : - printf "%s\n" "#define HAVE_EVP_DSS1 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_DigestVerify" "ac_cv_func_EVP_DigestVerify" -if test "x$ac_cv_func_EVP_DigestVerify" = xyes -then : - printf "%s\n" "#define HAVE_EVP_DIGESTVERIFY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_aes_256_cbc" "ac_cv_func_EVP_aes_256_cbc" -if test "x$ac_cv_func_EVP_aes_256_cbc" = xyes -then : - printf "%s\n" "#define HAVE_EVP_AES_256_CBC 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_EncryptInit_ex" "ac_cv_func_EVP_EncryptInit_ex" -if test "x$ac_cv_func_EVP_EncryptInit_ex" = xyes -then : - printf "%s\n" "#define HAVE_EVP_ENCRYPTINIT_EX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "HMAC_Init_ex" "ac_cv_func_HMAC_Init_ex" -if test "x$ac_cv_func_HMAC_Init_ex" = xyes -then : - printf "%s\n" "#define HAVE_HMAC_INIT_EX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "CRYPTO_THREADID_set_callback" "ac_cv_func_CRYPTO_THREADID_set_callback" -if test "x$ac_cv_func_CRYPTO_THREADID_set_callback" = xyes -then : - printf "%s\n" "#define HAVE_CRYPTO_THREADID_SET_CALLBACK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "EVP_MAC_CTX_set_params" "ac_cv_func_EVP_MAC_CTX_set_params" -if test "x$ac_cv_func_EVP_MAC_CTX_set_params" = xyes -then : - printf "%s\n" "#define HAVE_EVP_MAC_CTX_SET_PARAMS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "OSSL_PARAM_BLD_new" "ac_cv_func_OSSL_PARAM_BLD_new" -if test "x$ac_cv_func_OSSL_PARAM_BLD_new" = xyes -then : - printf "%s\n" "#define HAVE_OSSL_PARAM_BLD_NEW 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "BIO_set_callback_ex" "ac_cv_func_BIO_set_callback_ex" -if test "x$ac_cv_func_BIO_set_callback_ex" = xyes -then : - printf "%s\n" "#define HAVE_BIO_SET_CALLBACK_EX 1" >>confdefs.h - -fi - - -# these check_funcs need -lssl -BAKLIBS="$LIBS" -LIBS="-lssl $LIBS" -ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl" -if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_INIT_SSL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_CTX_set_security_level" "ac_cv_func_SSL_CTX_set_security_level" -if test "x$ac_cv_func_SSL_CTX_set_security_level" = xyes -then : - printf "%s\n" "#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_set1_host" "ac_cv_func_SSL_set1_host" -if test "x$ac_cv_func_SSL_set1_host" = xyes -then : - printf "%s\n" "#define HAVE_SSL_SET1_HOST 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_get0_peername" "ac_cv_func_SSL_get0_peername" -if test "x$ac_cv_func_SSL_get0_peername" = xyes -then : - printf "%s\n" "#define HAVE_SSL_GET0_PEERNAME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "X509_VERIFY_PARAM_set1_host" "ac_cv_func_X509_VERIFY_PARAM_set1_host" -if test "x$ac_cv_func_X509_VERIFY_PARAM_set1_host" = xyes -then : - printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites" -if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes -then : - printf "%s\n" "#define HAVE_SSL_CTX_SET_CIPHERSUITES 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_CTX_set_tlsext_ticket_key_evp_cb" "ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" -if test "x$ac_cv_func_SSL_CTX_set_tlsext_ticket_key_evp_cb" = xyes -then : - printf "%s\n" "#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_select_cb" "ac_cv_func_SSL_CTX_set_alpn_select_cb" -if test "x$ac_cv_func_SSL_CTX_set_alpn_select_cb" = xyes -then : - printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_get0_alpn_selected" "ac_cv_func_SSL_get0_alpn_selected" -if test "x$ac_cv_func_SSL_get0_alpn_selected" = xyes -then : - printf "%s\n" "#define HAVE_SSL_GET0_ALPN_SELECTED 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_CTX_set_alpn_protos" "ac_cv_func_SSL_CTX_set_alpn_protos" -if test "x$ac_cv_func_SSL_CTX_set_alpn_protos" = xyes -then : - printf "%s\n" "#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "SSL_get1_peer_certificate" "ac_cv_func_SSL_get1_peer_certificate" -if test "x$ac_cv_func_SSL_get1_peer_certificate" = xyes -then : - printf "%s\n" "#define HAVE_SSL_GET1_PEER_CERTIFICATE 1" >>confdefs.h - -fi - -LIBS="$BAKLIBS" - -ac_fn_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" " -$ac_includes_default -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#include -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" " -$ac_includes_default -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#include -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" " -$ac_includes_default -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#include -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl" >>confdefs.h - - -if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then -# check function return type. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5 -printf %s "checking the return type of HMAC_Init_ex... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#include -#include - -int -main (void) -{ - - HMAC_CTX* hmac_ctx = NULL; - void* hmac_key = NULL; - const EVP_MD* digest = NULL; - int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL); - (void)x; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: int" >&5 -printf "%s\n" "int" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: void" >&5 -printf "%s\n" "void" >&6; } - -printf "%s\n" "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - - -# libbsd - -# Check whether --with-libbsd was given. -if test ${with_libbsd+y} -then : - withval=$with_libbsd; - ac_fn_c_check_header_compile "$LINENO" "bsd/string.h" "ac_cv_header_bsd_string_h" "$ac_includes_default -" -if test "x$ac_cv_header_bsd_string_h" = xyes -then : - printf "%s\n" "#define HAVE_BSD_STRING_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "bsd/stdlib.h" "ac_cv_header_bsd_stdlib_h" "$ac_includes_default -" -if test "x$ac_cv_header_bsd_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_BSD_STDLIB_H 1" >>confdefs.h - -fi - - if test "x$ac_cv_header_bsd_string_h" = xyes -a "x$ac_cv_header_bsd_stdlib_h" = xyes; then - for func in strlcpy strlcat arc4random arc4random_uniform reallocarray; do - as_ac_Search=`printf "%s\n" "ac_cv_search_$func" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing $func" >&5 -printf %s "checking for library containing $func... " >&6; } -if eval test \${$as_ac_Search+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char $func (); -int -main (void) -{ -return $func (); - ; - return 0; -} -_ACEOF -for ac_lib in '' bsd -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - eval "$as_ac_Search=\$ac_res" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if eval test \${$as_ac_Search+y} -then : - break -fi -done -if eval test \${$as_ac_Search+y} -then : - -else $as_nop - eval "$as_ac_Search=no" -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -eval ac_res=\$$as_ac_Search - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -eval ac_res=\$$as_ac_Search -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h - - PC_LIBBSD_DEPENDENCY=libbsd - - -fi - - done - fi - -fi - - -# Check whether --enable-sha1 was given. -if test ${enable_sha1+y} -then : - enableval=$enable_sha1; -fi - -case "$enable_sha1" in - no) - ;; - yes|*) - -printf "%s\n" "#define USE_SHA1 1" >>confdefs.h - - ;; -esac - - -# Check whether --enable-sha2 was given. -if test ${enable_sha2+y} -then : - enableval=$enable_sha2; -fi - -case "$enable_sha2" in - no) - ;; - yes|*) - -printf "%s\n" "#define USE_SHA2 1" >>confdefs.h - - ;; -esac - -# Check whether --enable-subnet was given. -if test ${enable_subnet+y} -then : - enableval=$enable_subnet; -fi - -case "$enable_subnet" in - yes) - -printf "%s\n" "#define CLIENT_SUBNET 1" >>confdefs.h - - SUBNET_OBJ="edns-subnet.lo subnetmod.lo addrtree.lo subnet-whitelist.lo" - - SUBNET_HEADER='$(srcdir)/edns-subnet/subnetmod.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/edns-subnet/addrtree.h' - - ;; - no|*) - ;; -esac - -# check whether gost also works - -# Check whether --enable-gost was given. -if test ${enable_gost+y} -then : - enableval=$enable_gost; -fi - -use_gost="no" -if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then -case "$enable_gost" in - no) - ;; - *) - ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str" -if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes -then : - : -else $as_nop - as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5 -fi - - ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new" -if test "x$ac_cv_func_EC_KEY_new" = xyes -then : - -else $as_nop - as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5 -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5 -printf %s "checking if GOST works... " >&6; } -if test c${cross_compiling} = cno; then -BAKCFLAGS="$CFLAGS" -if test -n "$ssldir"; then - CFLAGS="$CFLAGS -Wl,-rpath,$ssldir_lib" -fi -if test "$cross_compiling" = yes -then : - eval "ac_cv_c_gost_works=maybe" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include -#include -/* routine to load gost (from sldns) */ -int load_gost_id(void) -{ - static int gost_id = 0; - const EVP_PKEY_ASN1_METHOD* meth; - ENGINE* e; - - if(gost_id) return gost_id; - - /* see if configuration loaded gost implementation from other engine*/ - meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1); - if(meth) { - EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth); - return gost_id; - } - - /* see if engine can be loaded already */ - e = ENGINE_by_id("gost"); - if(!e) { - /* load it ourself, in case statically linked */ - ENGINE_load_builtin_engines(); - ENGINE_load_dynamic(); - e = ENGINE_by_id("gost"); - } - if(!e) { - /* no gost engine in openssl */ - return 0; - } - if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { - ENGINE_finish(e); - ENGINE_free(e); - return 0; - } - - meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1); - if(!meth) { - /* algo not found */ - ENGINE_finish(e); - ENGINE_free(e); - return 0; - } - EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth); - return gost_id; -} -int main(void) { - EVP_MD_CTX* ctx; - const EVP_MD* md; - unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */ - const char* str = "Hello world"; - const unsigned char check[] = { - 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 , - 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 , - 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d , - 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d - }; - OPENSSL_config(NULL); - (void)load_gost_id(); - md = EVP_get_digestbyname("md_gost94"); - if(!md) return 1; - memset(digest, 0, sizeof(digest)); - ctx = EVP_MD_CTX_create(); - if(!ctx) return 2; - if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3; - if(!EVP_DigestUpdate(ctx, str, 10)) return 4; - if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5; - /* uncomment to see the hash calculated. - {int i; - for(i=0; i<32; i++) - printf(" %2.2x", (int)digest[i]); - printf("\n");} - */ - if(memcmp(digest, check, sizeof(check)) != 0) - return 6; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - eval "ac_cv_c_gost_works=yes" -else $as_nop - eval "ac_cv_c_gost_works=no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -CFLAGS="$BAKCFLAGS" -else -eval "ac_cv_c_gost_works=maybe" -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5 -printf "%s\n" "$ac_cv_c_gost_works" >&6; } - - if test "$ac_cv_c_gost_works" != no; then - use_gost="yes" - -printf "%s\n" "#define USE_GOST 1" >>confdefs.h - - fi - ;; -esac -fi -# Check whether --enable-ecdsa was given. -if test ${enable_ecdsa+y} -then : - enableval=$enable_ecdsa; -fi - -use_ecdsa="no" -case "$enable_ecdsa" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign" -if test "x$ac_cv_func_ECDSA_sign" = xyes -then : - -else $as_nop - as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 -fi - - ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init" -if test "x$ac_cv_func_SHA384_Init" = xyes -then : - -else $as_nop - as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 -fi - - ac_fn_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl" >>confdefs.h -if test $ac_have_decl = 1 -then : - -else $as_nop - as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 -fi -ac_fn_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_NID_secp384r1" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_NID_SECP384R1 $ac_have_decl" >>confdefs.h -if test $ac_have_decl = 1 -then : - -else $as_nop - as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5 -fi - - # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5 -printf %s "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; } - if grep OPENSSL_VERSION_TEXT $ssldir_include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then - if grep OPENSSL_VERSION_NUMBER $ssldir_include/openssl/opensslv.h | grep 0x0 >/dev/null; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define USE_ECDSA_EVP_WORKAROUND 1" >>confdefs.h - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - else - # not OpenSSL, thus likely LibreSSL, which supports it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - fi - # we now know we have ECDSA and the required curves. - -printf "%s\n" "#define USE_ECDSA 1" >>confdefs.h - - use_ecdsa="yes" - ;; -esac - -# Check whether --enable-dsa was given. -if test ${enable_dsa+y} -then : - enableval=$enable_dsa; -fi - -use_dsa="no" -case "$enable_dsa" in - yes) - # detect if DSA is supported, and turn it off if not. - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new" -if test "x$ac_cv_func_DSA_SIG_new" = xyes -then : - - as_ac_Type=`printf "%s\n" "ac_cv_type_DSA_SIG*" | $as_tr_sh` -ac_fn_c_check_type "$LINENO" "DSA_SIG*" "$as_ac_Type" " -$ac_includes_default -#ifdef HAVE_OPENSSL_ERR_H -#include -#endif - -#ifdef HAVE_OPENSSL_RAND_H -#include -#endif - -#ifdef HAVE_OPENSSL_CONF_H -#include -#endif - -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif - -" -if eval test \"x\$"$as_ac_Type"\" = x"yes" -then : - - -printf "%s\n" "#define USE_DSA 1" >>confdefs.h - - -else $as_nop - if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5 - fi -fi - - -else $as_nop - if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5 - fi -fi - - else - -printf "%s\n" "#define USE_DSA 1" >>confdefs.h - - fi - ;; - *) - # disable dsa by default, RFC 8624 section 3.1, validators MUST NOT - # support DSA for DNSSEC Validation. - ;; -esac - - -# Check whether --with-deprecate-rsa-1024 was given. -if test ${with_deprecate_rsa_1024+y} -then : - withval=$with_deprecate_rsa_1024; -fi - -if test "$with_deprecate_rsa_1024" = "yes"; then - -printf "%s\n" "#define DEPRECATE_RSA_1024 1" >>confdefs.h - -fi - -# Check whether --enable-ed25519 was given. -if test ${enable_ed25519+y} -then : - enableval=$enable_ed25519; -fi - -use_ed25519="no" -case "$enable_ed25519" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - ac_fn_check_decl "$LINENO" "NID_ED25519" "ac_cv_have_decl_NID_ED25519" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_NID_ED25519" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_NID_ED25519 $ac_have_decl" >>confdefs.h -if test $ac_have_decl = 1 -then : - - use_ed25519="yes" - -else $as_nop - if test "x$enable_ed25519" = "xyes"; then as_fn_error $? "OpenSSL does not support ED25519 and you used --enable-ed25519." "$LINENO" 5 - fi -fi - - fi - if test $USE_NETTLE = "yes"; then - for ac_header in nettle/eddsa.h -do : - ac_fn_c_check_header_compile "$LINENO" "nettle/eddsa.h" "ac_cv_header_nettle_eddsa_h" "$ac_includes_default -" -if test "x$ac_cv_header_nettle_eddsa_h" = xyes -then : - printf "%s\n" "#define HAVE_NETTLE_EDDSA_H 1" >>confdefs.h - use_ed25519="yes" -fi - -done - fi - if test $use_ed25519 = "yes"; then - -printf "%s\n" "#define USE_ED25519 1" >>confdefs.h - - fi - ;; -esac - -# Check whether --enable-ed448 was given. -if test ${enable_ed448+y} -then : - enableval=$enable_ed448; -fi - -use_ed448="no" -case "$enable_ed448" in - no) - ;; - *) - if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then - ac_fn_check_decl "$LINENO" "NID_ED448" "ac_cv_have_decl_NID_ED448" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_NID_ED448" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_NID_ED448 $ac_have_decl" >>confdefs.h -if test $ac_have_decl = 1 -then : - - use_ed448="yes" - -else $as_nop - if test "x$enable_ed448" = "xyes"; then as_fn_error $? "OpenSSL does not support ED448 and you used --enable-ed448." "$LINENO" 5 - fi -fi - - fi - if test $use_ed448 = "yes"; then - -printf "%s\n" "#define USE_ED448 1" >>confdefs.h - - fi - ;; -esac - -# Check whether --enable-event-api was given. -if test ${enable_event_api+y} -then : - enableval=$enable_event_api; -fi - -case "$enable_event_api" in - yes) - UNBOUND_EVENT_INSTALL=unbound-event-install - - UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall - - ;; - *) - ;; -esac - -# Check whether --enable-tfo-client was given. -if test ${enable_tfo_client+y} -then : - enableval=$enable_tfo_client; -fi - -case "$enable_tfo_client" in - yes) - case "$host_os" in - linux*) ac_fn_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 -printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} -else $as_nop - as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 -fi - -printf "%s\n" "#define USE_MSG_FASTOPEN 1" >>confdefs.h - - ;; - darwin*) ac_fn_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5 -printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;} -else $as_nop - as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5 -fi - -printf "%s\n" "#define USE_OSX_MSG_FASTOPEN 1" >>confdefs.h - - ;; - esac - ;; - no|*) - ;; -esac - -# Check whether --enable-tfo-server was given. -if test ${enable_tfo_server+y} -then : - enableval=$enable_tfo_server; -fi - -case "$enable_tfo_server" in - yes) - ac_fn_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5 -printf "%s\n" "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;} -else $as_nop - as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5 -fi - -printf "%s\n" "#define USE_TCP_FASTOPEN 1" >>confdefs.h - - ;; - no|*) - ;; -esac - -# check for libevent - -# Check whether --with-libevent was given. -if test ${with_libevent+y} -then : - withval=$with_libevent; -else $as_nop - with_libevent="no" -fi - -if test "x_$with_libevent" != x_no; then - -printf "%s\n" "#define USE_LIBEVENT 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5 -printf %s "checking for libevent... " >&6; } - if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then - with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" - fi - for dir in $with_libevent; do - thedir="$dir" - if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then - found_libevent="yes" - if test "$thedir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$thedir/include" - fi - break; - fi - done - if test x_$found_libevent != x_yes; then - if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then - # libevent source directory - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5 -printf "%s\n" "found in $thedir" >&6; } - CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include" - BAK_LDFLAGS_SET="1" - BAK_LDFLAGS="$LDFLAGS" - # remove evdns from linking - mkdir build >/dev/null 2>&1 - mkdir build/libevent >/dev/null 2>&1 - mkdir build/libevent/.libs >/dev/null 2>&1 - ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` - ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo` - ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o` - cp $ev_files_o build/libevent - cp $ev_files_lo build/libevent - cp $ev_files_libso build/libevent/.libs - LATE_LDFLAGS="build/libevent/*.lo -lm" - LDFLAGS="build/libevent/*.o $LDFLAGS -lm" - else - as_fn_error $? "Cannot find the libevent library in $with_libevent -You can restart ./configure --with-libevent=no to use a builtin alternative. -Please note that this alternative is not as capable as libevent when using -large outgoing port ranges. " "$LINENO" 5 - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5 -printf "%s\n" "found in $thedir" >&6; } - if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then - LDFLAGS="$LDFLAGS -L$thedir/lib/event2" - - if test "x$enable_rpath" = xyes; then - if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2" - fi - fi - - else - if test "$thedir" != "/usr" -a "$thedir" != ""; then - LDFLAGS="$LDFLAGS -L$thedir/lib" - - if test "x$enable_rpath" = xyes; then - if echo "$thedir/lib" | grep "^/" >/dev/null; then - RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib" - fi - fi - - fi - fi - fi - # check for library used by libevent after 1.3c - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_gettime (); -int -main (void) -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : - break -fi -done -if test ${ac_cv_search_clock_gettime+y} -then : - -else $as_nop - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - - # is the event.h header libev or libevent? - ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default -" -if test "x$ac_cv_header_event_h" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_H 1" >>confdefs.h - -fi - - ac_fn_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5 -printf %s "checking for library containing event_set... " >&6; } -if test ${ac_cv_search_event_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char event_set (); -int -main (void) -{ -return event_set (); - ; - return 0; -} -_ACEOF -for ac_lib in '' ev -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_event_set=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_event_set+y} -then : - break -fi -done -if test ${ac_cv_search_event_set+y} -then : - -else $as_nop - ac_cv_search_event_set=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5 -printf "%s\n" "$ac_cv_search_event_set" >&6; } -ac_res=$ac_cv_search_event_set -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5 -printf %s "checking for library containing event_set... " >&6; } -if test ${ac_cv_search_event_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char event_set (); -int -main (void) -{ -return event_set (); - ; - return 0; -} -_ACEOF -for ac_lib in '' event -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_event_set=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_event_set+y} -then : - break -fi -done -if test ${ac_cv_search_event_set+y} -then : - -else $as_nop - ac_cv_search_event_set=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5 -printf "%s\n" "$ac_cv_search_event_set" >&6; } -ac_res=$ac_cv_search_event_set -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -fi - ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free" -if test "x$ac_cv_func_event_base_free" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_BASE_FREE 1" >>confdefs.h - -fi - # only in libevent 1.2 and later - ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once" -if test "x$ac_cv_func_event_base_once" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_BASE_ONCE 1" >>confdefs.h - -fi - # only in libevent 1.4.1 and later - ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new" -if test "x$ac_cv_func_event_base_new" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_BASE_NEW 1" >>confdefs.h - -fi - # only in libevent 1.4.1 and later - ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method" -if test "x$ac_cv_func_event_base_get_method" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_BASE_GET_METHOD 1" >>confdefs.h - -fi - # only in libevent 1.4.3 and later - ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop" -if test "x$ac_cv_func_ev_loop" = xyes -then : - printf "%s\n" "#define HAVE_EV_LOOP 1" >>confdefs.h - -fi - # only in libev. (tested on 3.51) - ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop" -if test "x$ac_cv_func_ev_default_loop" = xyes -then : - printf "%s\n" "#define HAVE_EV_DEFAULT_LOOP 1" >>confdefs.h - -fi - # only in libev. (tested on 4.00) - ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign" -if test "x$ac_cv_func_event_assign" = xyes -then : - printf "%s\n" "#define HAVE_EVENT_ASSIGN 1" >>confdefs.h - -fi - # in libevent, for thread-safety - ac_fn_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default -#ifdef HAVE_EVENT_H -# include -#else -# include \"event2/event.h\" -#endif - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_evsignal_assign" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl" >>confdefs.h - - PC_LIBEVENT_DEPENDENCY="libevent" - - if test -n "$BAK_LDFLAGS_SET"; then - LDFLAGS="$BAK_LDFLAGS" - fi -else - -printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h - -fi - -# check for libexpat - -# Check whether --with-libexpat was given. -if test ${with_libexpat+y} -then : - withval=$with_libexpat; -else $as_nop - withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 -printf %s "checking for libexpat... " >&6; } -found_libexpat="no" -for dir in $withval ; do - if test -f "$dir/include/expat.h"; then - found_libexpat="yes" - if test "$dir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 -printf "%s\n" "found in $dir" >&6; } - break; - fi -done -if test x_$found_libexpat != x_yes; then - as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5 -fi -ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default -" -if test "x$ac_cv_header_expat_h" = xyes -then : - printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h - -fi - -ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default -#include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_XML_StopParser" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h - - -# hiredis (redis C client for cachedb) - -# Check whether --with-libhiredis was given. -if test ${with_libhiredis+y} -then : - withval=$with_libhiredis; -else $as_nop - withval="no" -fi - -found_libhiredis="no" -if test x_$withval = x_yes -o x_$withval != x_no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5 -printf %s "checking for libhiredis... " >&6; } - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" - fi - for dir in $withval ; do - if test -f "$dir/include/hiredis/hiredis.h"; then - found_libhiredis="yes" - if test "$dir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 -printf "%s\n" "found in $dir" >&6; } - -printf "%s\n" "#define USE_REDIS 1" >>confdefs.h - - LIBS="$LIBS -lhiredis" - break; - fi - done - if test x_$found_libhiredis != x_yes; then - as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5 - fi - ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default -" -if test "x$ac_cv_header_hiredis_hiredis_h" = xyes -then : - printf "%s\n" "#define HAVE_HIREDIS_HIREDIS_H 1" >>confdefs.h - -fi - - ac_fn_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default - #include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_redisConnect" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_REDISCONNECT $ac_have_decl" >>confdefs.h - -fi - -# nghttp2 - -# Check whether --with-libnghttp2 was given. -if test ${with_libnghttp2+y} -then : - withval=$with_libnghttp2; -else $as_nop - withval="no" -fi - -found_libnghttp2="no" -if test x_$withval = x_yes -o x_$withval != x_no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5 -printf %s "checking for libnghttp2... " >&6; } - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" - fi - for dir in $withval ; do - if test -f "$dir/include/nghttp2/nghttp2.h"; then - found_libnghttp2="yes" - if test "$dir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 -printf "%s\n" "found in $dir" >&6; } - -printf "%s\n" "#define HAVE_NGHTTP2 1" >>confdefs.h - - LIBS="$LIBS -lnghttp2" - break; - fi - done - if test x_$found_libnghttp2 != x_yes; then - as_fn_error $? "Could not find libnghttp2, nghttp2.h" "$LINENO" 5 - fi - ac_fn_c_check_header_compile "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default -" -if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes -then : - printf "%s\n" "#define HAVE_NGHTTP2_NGHTTP2_H 1" >>confdefs.h - -fi - - ac_fn_check_decl "$LINENO" "nghttp2_session_server_new" "ac_cv_have_decl_nghttp2_session_server_new" "$ac_includes_default - #include - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_nghttp2_session_server_new" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW $ac_have_decl" >>confdefs.h - -fi - -# set static linking for uninstalled libraries if requested - -staticexe="" -# Check whether --enable-static-exe was given. -if test ${enable_static_exe+y} -then : - enableval=$enable_static_exe; -fi - -if test x_$enable_static_exe = x_yes; then - staticexe="-static" - if test "$on_mingw" = yes; then - staticexe="-all-static" - # for static compile, include gdi32 and zlib here. - if echo "$LIBS" | grep 'lgdi32' >/dev/null; then - : - else - LIBS="$LIBS -lgdi32" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 -printf %s "checking for compress in -lz... " >&6; } -if test ${ac_cv_lib_z_compress+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char compress (); -int -main (void) -{ -return compress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_z_compress=yes -else $as_nop - ac_cv_lib_z_compress=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 -printf "%s\n" "$ac_cv_lib_z_compress" >&6; } -if test "x$ac_cv_lib_z_compress" = xyes -then : - LIBS="$LIBS -lz" -fi - - if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then - : - else - LIBS="$LIBS -l:libssp.a" - fi - fi -fi - -# set full static linking if requested -# Check whether --enable-fully-static was given. -if test ${enable_fully_static+y} -then : - enableval=$enable_fully_static; -fi - -if test x_$enable_fully_static = x_yes; then - staticexe="-all-static" - if test "$on_mingw" = yes; then - # for static compile, include gdi32 and zlib here. - if echo $LIBS | grep 'lgdi32' >/dev/null; then - : - else - LIBS="$LIBS -lgdi32" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 -printf %s "checking for compress in -lz... " >&6; } -if test ${ac_cv_lib_z_compress+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char compress (); -int -main (void) -{ -return compress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_z_compress=yes -else $as_nop - ac_cv_lib_z_compress=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 -printf "%s\n" "$ac_cv_lib_z_compress" >&6; } -if test "x$ac_cv_lib_z_compress" = xyes -then : - LIBS="$LIBS -lz" -fi - - if echo "$LIBS" | grep -e "libssp.a" -e "lssp" >/dev/null; then - : - else - LIBS="$LIBS -l:libssp.a" - fi - fi -fi - -# set lock checking if requested -# Check whether --enable-lock_checks was given. -if test ${enable_lock_checks+y} -then : - enableval=$enable_lock_checks; -fi - -if test x_$enable_lock_checks = x_yes; then - -printf "%s\n" "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h - - CHECKLOCK_OBJ="checklocks.lo" - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 -printf %s "checking for getaddrinfo... " >&6; } -ac_cv_func_getaddrinfo=no -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __cplusplus -extern "C" -{ -#endif -char* getaddrinfo(); -char* (*f) () = getaddrinfo; -#ifdef __cplusplus -} -#endif -int main(void) { - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_func_getaddrinfo="yes" -if test "$ac_cv_header_windows_h" = "yes"; then - -printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h - - USE_WINSOCK="1" - if echo "$LIBS" | grep 'lws2_32' >/dev/null; then - : - else - LIBS="$LIBS -lws2_32" - fi -fi - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -int -main (void) -{ - - (void)getaddrinfo(NULL, NULL, NULL, NULL); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - -ac_cv_func_getaddrinfo="yes" - -printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h - -USE_WINSOCK="1" - -else $as_nop - ORIGLIBS="$LIBS" -LIBS="$LIBS -lws2_32" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -int -main (void) -{ - - (void)getaddrinfo(NULL, NULL, NULL, NULL); - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - -ac_cv_func_getaddrinfo="yes" - -printf "%s\n" "#define USE_WINSOCK 1" >>confdefs.h - -USE_WINSOCK="1" - -else $as_nop - -ac_cv_func_getaddrinfo="no" -LIBS="$ORIGLIBS" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5 -printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; } -if test $ac_cv_func_getaddrinfo = yes; then - -printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h - -fi - -if test "$USE_WINSOCK" = 1; then - -printf "%s\n" "#define UB_ON_WINDOWS 1" >>confdefs.h - - ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default -#include - -" -if test "x$ac_cv_header_iphlpapi_h" = xyes -then : - printf "%s\n" "#define HAVE_IPHLPAPI_H 1" >>confdefs.h - -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. -set dummy ${ac_tool_prefix}windres; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_WINDRES+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$WINDRES"; then - ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_WINDRES="${ac_tool_prefix}windres" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -WINDRES=$ac_cv_prog_WINDRES -if test -n "$WINDRES"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 -printf "%s\n" "$WINDRES" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_WINDRES"; then - ac_ct_WINDRES=$WINDRES - # Extract the first word of "windres", so it can be a program name with args. -set dummy windres; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_WINDRES+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_WINDRES"; then - ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_WINDRES="windres" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES -if test -n "$ac_ct_WINDRES"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 -printf "%s\n" "$ac_ct_WINDRES" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_WINDRES" = x; then - WINDRES="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - WINDRES=$ac_ct_WINDRES - fi -else - WINDRES="$ac_cv_prog_WINDRES" -fi - - if echo "$LIBS" | grep crypt32 >/dev/null; then - LIBS="$LIBS -liphlpapi" - else - LIBS="$LIBS -liphlpapi -lcrypt32" - fi - WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe" - - WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c" - - WIN_DAEMON_OBJ="win_svc.lo w_inst.lo" - - WIN_DAEMON_OBJ_LINK="rsrc_unbound.o" - - WIN_HOST_OBJ_LINK="rsrc_unbound_host.o" - - WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo" - - WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o" - - WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o" - - -printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h - -fi -if test $ac_cv_func_getaddrinfo = no; then - case " $LIBOBJS " in - *" fake-rfc2553.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext" - ;; -esac - -fi -# check after getaddrinfo for its libraries - -# check ioctlsocket -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5 -printf %s "checking for ioctlsocket... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WINSOCK2_H -#include -#endif - -int -main (void) -{ - - (void)ioctlsocket(0, 0, NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_IOCTLSOCKET 1" >>confdefs.h - - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - - -# see if daemon(3) exists, and if it is deprecated. -ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon" -if test "x$ac_cv_func_daemon" = xyes -then : - printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h - -fi - -if test $ac_cv_func_daemon = yes; then - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5 -printf %s "checking if daemon is deprecated... " >&6; } -cache=`echo daemon | sed 'y%.=/+-%___p_%'` -if eval test \${cv_cc_deprecated_$cache+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -echo ' -#include -#include -' >conftest.c -echo 'void f(void){ (void)daemon(0, 0); }' >>conftest.c -if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then -eval "cv_cc_deprecated_$cache=no" -else -eval "cv_cc_deprecated_$cache=yes" -fi -rm -f conftest conftest.o conftest.c - -fi - -if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define DEPRECATED_DAEMON 1" >>confdefs.h - -: - -else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -: - -fi - -fi - -ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" " -$ac_includes_default -#ifdef HAVE_SYS_UN_H -#include -#endif - -" -if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1" >>confdefs.h - - -fi - -ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" " -$ac_includes_default -#if HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_SYS_UIO_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_WINSOCK2_H -#include -#endif - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1" >>confdefs.h - - -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htobe64" >&5 -printf %s "checking for htobe64... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_ENDIAN_H -# include -#endif -#ifdef HAVE_SYS_ENDIAN_H -# include -#endif - -int -main (void) -{ -unsigned long long x = htobe64(0); printf("%u", (unsigned)x); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_HTOBE64 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for be64toh" >&5 -printf %s "checking for be64toh... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_ENDIAN_H -# include -#endif -#ifdef HAVE_SYS_ENDIAN_H -# include -#endif - -int -main (void) -{ -unsigned long long x = be64toh(0); printf("%u", (unsigned)x); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_BE64TOH 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5 -printf %s "checking for library containing setusercontext... " >&6; } -if test ${ac_cv_search_setusercontext+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char setusercontext (); -int -main (void) -{ -return setusercontext (); - ; - return 0; -} -_ACEOF -for ac_lib in '' util -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_setusercontext=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_setusercontext+y} -then : - break -fi -done -if test ${ac_cv_search_setusercontext+y} -then : - -else $as_nop - ac_cv_search_setusercontext=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5 -printf "%s\n" "$ac_cv_search_setusercontext" >&6; } -ac_res=$ac_cv_search_setusercontext -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" -if test "x$ac_cv_func_tzset" = xyes -then : - printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" -if test "x$ac_cv_func_sigprocmask" = xyes -then : - printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" -if test "x$ac_cv_func_fcntl" = xyes -then : - printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" -if test "x$ac_cv_func_getpwnam" = xyes -then : - printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "endpwent" "ac_cv_func_endpwent" -if test "x$ac_cv_func_endpwent" = xyes -then : - printf "%s\n" "#define HAVE_ENDPWENT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" -if test "x$ac_cv_func_getrlimit" = xyes -then : - printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit" -if test "x$ac_cv_func_setrlimit" = xyes -then : - printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" -if test "x$ac_cv_func_setsid" = xyes -then : - printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot" -if test "x$ac_cv_func_chroot" = xyes -then : - printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill" -if test "x$ac_cv_func_kill" = xyes -then : - printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown" -if test "x$ac_cv_func_chown" = xyes -then : - printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep" -if test "x$ac_cv_func_sleep" = xyes -then : - printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep" -if test "x$ac_cv_func_usleep" = xyes -then : - printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" -if test "x$ac_cv_func_random" = xyes -then : - printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom" -if test "x$ac_cv_func_srandom" = xyes -then : - printf "%s\n" "#define HAVE_SRANDOM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg" -if test "x$ac_cv_func_recvmsg" = xyes -then : - printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg" -if test "x$ac_cv_func_sendmsg" = xyes -then : - printf "%s\n" "#define HAVE_SENDMSG 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" -if test "x$ac_cv_func_writev" = xyes -then : - printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair" -if test "x$ac_cv_func_socketpair" = xyes -then : - printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "glob" "ac_cv_func_glob" -if test "x$ac_cv_func_glob" = xyes -then : - printf "%s\n" "#define HAVE_GLOB 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" -if test "x$ac_cv_func_initgroups" = xyes -then : - printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = xyes -then : - printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" -if test "x$ac_cv_func_localtime_r" = xyes -then : - printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "setusercontext" "ac_cv_func_setusercontext" -if test "x$ac_cv_func_setusercontext" = xyes -then : - printf "%s\n" "#define HAVE_SETUSERCONTEXT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "_beginthreadex" "ac_cv_func__beginthreadex" -if test "x$ac_cv_func__beginthreadex" = xyes -then : - printf "%s\n" "#define HAVE__BEGINTHREADEX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "endservent" "ac_cv_func_endservent" -if test "x$ac_cv_func_endservent" = xyes -then : - printf "%s\n" "#define HAVE_ENDSERVENT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent" -if test "x$ac_cv_func_endprotoent" = xyes -then : - printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync" -if test "x$ac_cv_func_fsync" = xyes -then : - printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget" -if test "x$ac_cv_func_shmget" = xyes -then : - printf "%s\n" "#define HAVE_SHMGET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" -if test "x$ac_cv_func_accept4" = xyes -then : - printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = xyes -then : - printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" -if test "x$ac_cv_func_if_nametoindex" = xyes -then : - printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" -if test "x$ac_cv_func_poll" = xyes -then : - printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid" -if test "x$ac_cv_func_gettid" = xyes -then : - printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h - -fi - - - for ac_func in setresuid -do : - ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" -if test "x$ac_cv_func_setresuid" = xyes -then : - printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h - -else $as_nop - ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid" -if test "x$ac_cv_func_setreuid" = xyes -then : - printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h - -fi - -fi - -done - - for ac_func in setresgid -do : - ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" -if test "x$ac_cv_func_setresgid" = xyes -then : - printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h - -else $as_nop - ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid" -if test "x$ac_cv_func_setregid" = xyes -then : - printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h - -fi - -fi - -done - -# check if setreuid en setregid fail, on MacOSX10.4(darwin8). -if echo $host_os | grep darwin8 > /dev/null; then - -printf "%s\n" "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h - -fi -ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" " -$ac_includes_default -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_WINSOCK2_H -#include -#endif - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_inet_pton" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" " -$ac_includes_default -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_NETINET_TCP_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_WINSOCK2_H -#include -#endif - -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_inet_ntop" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h - -ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" -if test "x$ac_cv_func_inet_aton" = xyes -then : - printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" inet_aton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = xyes -then : - printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" inet_pton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = xyes -then : - printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" inet_ntop.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = xyes -then : - printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" snprintf.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" - ;; -esac - -fi - -# test if snprintf return the proper length -if test "x$ac_cv_func_snprintf" = xyes; then - if test c${cross_compiling} = cno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5 -printf %s "checking for correct snprintf return value... " >&6; } - if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe" >&5 -printf "%s\n" "maybe" >&6; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - -int main(void) { return !(snprintf(NULL, 0, "test") == 4); } - -_ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h - - case " $LIBOBJS " in - *" snprintf.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" - ;; -esac - - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi -fi -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes -then : - printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" strlcat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes -then : - printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" strlcpy.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = xyes -then : - printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" memmove.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memmove.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" -if test "x$ac_cv_func_gmtime_r" = xyes -then : - printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" gmtime_r.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank" -if test "x$ac_cv_func_isblank" = xyes -then : - printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" isblank.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS isblank.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" -if test "x$ac_cv_func_explicit_bzero" = xyes -then : - printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" explicit_bzero.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext" - ;; -esac - -fi - -LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS" - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5 -printf %s "checking for reallocarray... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - -#ifndef _OPENBSD_SOURCE -#define _OPENBSD_SOURCE 1 -#endif -#include -int main(void) { - void* p = reallocarray(NULL, 10, 100); - free(p); - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h - - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - case " $LIBOBJS " in - *" reallocarray.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" - ;; -esac - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -ac_fn_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_reallocarray" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_REALLOCARRAY $ac_have_decl" >>confdefs.h - -if test "$USE_NSS" = "no"; then - ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" -if test "x$ac_cv_func_arc4random" = xyes -then : - printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" arc4random.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS arc4random.$ac_objext" - ;; -esac - -fi - - ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform" -if test "x$ac_cv_func_arc4random_uniform" = xyes -then : - printf "%s\n" "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" arc4random_uniform.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext" - ;; -esac - -fi - - if test "$ac_cv_func_arc4random" = "no"; then - case " $LIBOBJS " in - *" arc4_lock.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext" - ;; -esac - - - for ac_func in getentropy -do : - ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" -if test "x$ac_cv_func_getentropy" = xyes -then : - printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h - -else $as_nop - - if test "$USE_WINSOCK" = 1; then - case " $LIBOBJS " in - *" getentropy_win.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext" - ;; -esac - - else - case "$host" in - Darwin|*darwin*) - case " $LIBOBJS " in - *" getentropy_osx.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext" - ;; -esac - - ;; - *solaris*|*sunos*|SunOS) - case " $LIBOBJS " in - *" getentropy_solaris.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext" - ;; -esac - - for ac_header in sys/sha2.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_sha2_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SHA2_H 1" >>confdefs.h - -else $as_nop - - - for ac_func in SHA512_Update -do : - ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update" -if test "x$ac_cv_func_SHA512_Update" = xyes -then : - printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h - -else $as_nop - - case " $LIBOBJS " in - *" sha512.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS sha512.$ac_objext" - ;; -esac - - -fi - -done - -fi - -done - if test "$ac_cv_header_sys_sha2_h" = "yes"; then - # this lib needed for sha2 on solaris - LIBS="$LIBS -lmd" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_gettime (); -int -main (void) -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : - break -fi -done -if test ${ac_cv_search_clock_gettime+y} -then : - -else $as_nop - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - ;; - *freebsd*|*FreeBSD) - case " $LIBOBJS " in - *" getentropy_freebsd.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext" - ;; -esac - - ;; - *linux*|Linux|*) - case " $LIBOBJS " in - *" getentropy_linux.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext" - ;; -esac - - - for ac_func in SHA512_Update -do : - ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update" -if test "x$ac_cv_func_SHA512_Update" = xyes -then : - printf "%s\n" "#define HAVE_SHA512_UPDATE 1" >>confdefs.h - -else $as_nop - - -printf "%s\n" "#define COMPAT_SHA512 1" >>confdefs.h - - case " $LIBOBJS " in - *" sha512.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS sha512.$ac_objext" - ;; -esac - - -fi - -done - ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_sysctl_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h - -fi - - ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval" -if test "x$ac_cv_func_getauxval" = xyes -then : - printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_gettime (); -int -main (void) -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : - break -fi -done -if test ${ac_cv_search_clock_gettime+y} -then : - -else $as_nop - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - ;; - esac - fi - -fi - -done - fi -fi -LIBOBJ_WITHOUT_CTIME="$LIBOBJS" - -ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r" -if test "x$ac_cv_func_ctime_r" = xyes -then : - printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" ctime_r.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext" - ;; -esac - -fi - -ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" -if test "x$ac_cv_func_strsep" = xyes -then : - printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h - -else $as_nop - case " $LIBOBJS " in - *" strsep.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strsep.$ac_objext" - ;; -esac - -fi - - -# Check whether --enable-allsymbols was given. -if test ${enable_allsymbols+y} -then : - enableval=$enable_allsymbols; -fi - -case "$enable_allsymbols" in - yes) - COMMON_OBJ_ALL_SYMBOLS="" - UBSYMS="" - EXTRALINK="libunbound.la" - -printf "%s\n" "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h - - ;; - no|*) - COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)' - UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def' - EXTRALINK="" - ;; -esac - - - -if test x_$enable_lock_checks = x_yes; then - UBSYMS="-export-symbols clubsyms.def" - cp ${srcdir}/libunbound/ubsyms.def clubsyms.def - echo lock_protect >> clubsyms.def - echo lock_unprotect >> clubsyms.def - echo lock_get_mem >> clubsyms.def - echo checklock_start >> clubsyms.def - echo checklock_stop >> clubsyms.def - echo checklock_lock >> clubsyms.def - echo checklock_unlock >> clubsyms.def - echo checklock_init >> clubsyms.def - echo checklock_thrcreate >> clubsyms.def - echo checklock_thrjoin >> clubsyms.def -fi - -# check for dnstap if requested - - # Check whether --enable-dnstap was given. -if test ${enable_dnstap+y} -then : - enableval=$enable_dnstap; opt_dnstap=$enableval -else $as_nop - opt_dnstap=no -fi - - - -# Check whether --with-dnstap-socket-path was given. -if test ${with_dnstap_socket_path+y} -then : - withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval -else $as_nop - opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock" -fi - - - if test "x$opt_dnstap" != "xno"; then - # Extract the first word of "protoc-c", so it can be a program name with args. -set dummy protoc-c; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PROTOC_C+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $PROTOC_C in - [\\/]* | ?:[\\/]*) - ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PROTOC_C="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PROTOC_C=$ac_cv_path_PROTOC_C -if test -n "$PROTOC_C"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5 -printf "%s\n" "$PROTOC_C" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test -z "$PROTOC_C"; then - as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5 - fi - -# Check whether --with-protobuf-c was given. -if test ${with_protobuf_c+y} -then : - withval=$with_protobuf_c; - # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0 - if test -f $withval/include/google/protobuf-c/protobuf-c.h; then - CFLAGS="$CFLAGS -I$withval/include/google" - else - CFLAGS="$CFLAGS -I$withval/include" - fi - LDFLAGS="$LDFLAGS -L$withval/lib" - -else $as_nop - - - -pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5 -printf %s "checking for PROTOBUFC... " >&6; } - -if test -n "$PROTOBUFC_CFLAGS"; then - pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$PROTOBUFC_LIBS"; then - pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1` - else - PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$PROTOBUFC_PKG_ERRORS" >&5 - - - # pkg-config failed; try falling back to known values - # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0 - if test -f /usr/include/google/protobuf-c/protobuf-c.h; then - CFLAGS="$CFLAGS -I/usr/include/google" - else - if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then - CFLAGS="$CFLAGS -I/usr/local/include/google" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - else - as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5 - fi - fi - - -elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - - # pkg-config failed; try falling back to known values - # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0 - if test -f /usr/include/google/protobuf-c/protobuf-c.h; then - CFLAGS="$CFLAGS -I/usr/include/google" - else - if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then - CFLAGS="$CFLAGS -I/usr/local/include/google" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - else - as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5 - fi - fi - - -else - PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS - PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - - CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS" - LIBS="$LIBS $PROTOBUFC_LIBS" - -fi - - - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5 -printf %s "checking for library containing protobuf_c_message_pack... " >&6; } -if test ${ac_cv_search_protobuf_c_message_pack+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char protobuf_c_message_pack (); -int -main (void) -{ -return protobuf_c_message_pack (); - ; - return 0; -} -_ACEOF -for ac_lib in '' protobuf-c -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_protobuf_c_message_pack=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_protobuf_c_message_pack+y} -then : - break -fi -done -if test ${ac_cv_search_protobuf_c_message_pack+y} -then : - -else $as_nop - ac_cv_search_protobuf_c_message_pack=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5 -printf "%s\n" "$ac_cv_search_protobuf_c_message_pack" >&6; } -ac_res=$ac_cv_search_protobuf_c_message_pack -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else $as_nop - as_fn_error $? "The protobuf-c library was not found. Please install the development libraries for protobuf-c!" "$LINENO" 5 -fi - - - -printf "%s\n" "#define USE_DNSTAP 1" >>confdefs.h - - ENABLE_DNSTAP=1 - - - - hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`" - - -printf "%s\n" "#define DNSTAP_SOCKET_PATH \"$hdr_dnstap_socket_path\"" >>confdefs.h - - DNSTAP_SOCKET_PATH="$hdr_dnstap_socket_path" - - DNSTAP_SOCKET_TESTBIN='unbound-dnstap-socket$(EXEEXT)' - - DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c dnstap/dnstap_fstrm.c dnstap/dtstream.c" - - DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo dnstap_fstrm.lo dtstream.lo" - - - else - - ENABLE_DNSTAP=0 - - - - fi - - -# check for dnscrypt if requested - - # Check whether --enable-dnscrypt was given. -if test ${enable_dnscrypt+y} -then : - enableval=$enable_dnscrypt; opt_dnscrypt=$enableval -else $as_nop - opt_dnscrypt=no -fi - - - if test "x$opt_dnscrypt" != "xno"; then - -# Check whether --with-libsodium was given. -if test ${with_libsodium+y} -then : - withval=$with_libsodium; - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_init" >&5 -printf %s "checking for library containing sodium_init... " >&6; } -if test ${ac_cv_search_sodium_init+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sodium_init (); -int -main (void) -{ -return sodium_init (); - ; - return 0; -} -_ACEOF -for ac_lib in '' sodium -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_sodium_init=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_sodium_init+y} -then : - break -fi -done -if test ${ac_cv_search_sodium_init+y} -then : - -else $as_nop - ac_cv_search_sodium_init=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_init" >&5 -printf "%s\n" "$ac_cv_search_sodium_init" >&6; } -ac_res=$ac_cv_search_sodium_init -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else $as_nop - as_fn_error $? "The sodium library was not found. Please install sodium!" "$LINENO" 5 -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm" >&5 -printf %s "checking for library containing crypto_box_curve25519xchacha20poly1305_beforenm... " >&6; } -if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char crypto_box_curve25519xchacha20poly1305_beforenm (); -int -main (void) -{ -return crypto_box_curve25519xchacha20poly1305_beforenm (); - ; - return 0; -} -_ACEOF -for ac_lib in '' sodium -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y} -then : - break -fi -done -if test ${ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm+y} -then : - -else $as_nop - ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&5 -printf "%s\n" "$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm" >&6; } -ac_res=$ac_cv_search_crypto_box_curve25519xchacha20poly1305_beforenm -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - ENABLE_DNSCRYPT_XCHACHA20=1 - - -printf "%s\n" "#define USE_DNSCRYPT_XCHACHA20 1" >>confdefs.h - - -else $as_nop - - ENABLE_DNSCRYPT_XCHACHA20=0 - - -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sodium_set_misuse_handler" >&5 -printf %s "checking for library containing sodium_set_misuse_handler... " >&6; } -if test ${ac_cv_search_sodium_set_misuse_handler+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sodium_set_misuse_handler (); -int -main (void) -{ -return sodium_set_misuse_handler (); - ; - return 0; -} -_ACEOF -for ac_lib in '' sodium -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_sodium_set_misuse_handler=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_sodium_set_misuse_handler+y} -then : - break -fi -done -if test ${ac_cv_search_sodium_set_misuse_handler+y} -then : - -else $as_nop - ac_cv_search_sodium_set_misuse_handler=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sodium_set_misuse_handler" >&5 -printf "%s\n" "$ac_cv_search_sodium_set_misuse_handler" >&6; } -ac_res=$ac_cv_search_sodium_set_misuse_handler -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - -printf "%s\n" "#define SODIUM_MISUSE_HANDLER 1" >>confdefs.h - - -fi - - - -printf "%s\n" "#define USE_DNSCRYPT 1" >>confdefs.h - - ENABLE_DNSCRYPT=1 - - - DNSCRYPT_SRC="dnscrypt/dnscrypt.c" - - DNSCRYPT_OBJ="dnscrypt.lo" - - - else - ENABLE_DNSCRYPT_XCHACHA20=0 - - - ENABLE_DNSCRYPT=0 - - - - fi - - -# check for cachedb if requested -# Check whether --enable-cachedb was given. -if test ${enable_cachedb+y} -then : - enableval=$enable_cachedb; -fi - -# turn on cachedb when hiredis support is enabled. -if test "$found_libhiredis" = "yes"; then enable_cachedb="yes"; fi -case "$enable_cachedb" in - yes) - -printf "%s\n" "#define USE_CACHEDB 1" >>confdefs.h - - CACHEDB_SRC="cachedb/cachedb.c cachedb/redis.c" - - CACHEDB_OBJ="cachedb.lo redis.lo" - - ;; - no|*) - # nothing - ;; -esac - -# check for ipsecmod if requested -# Check whether --enable-ipsecmod was given. -if test ${enable_ipsecmod+y} -then : - enableval=$enable_ipsecmod; -fi - -case "$enable_ipsecmod" in - yes) - -printf "%s\n" "#define USE_IPSECMOD 1" >>confdefs.h - - IPSECMOD_OBJ="ipsecmod.lo ipsecmod-whitelist.lo" - - IPSECMOD_HEADER='$(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h' - - ;; - no|*) - # nothing - ;; -esac - -# check for ipset if requested -# Check whether --enable-ipset was given. -if test ${enable_ipset+y} -then : - enableval=$enable_ipset; -fi - -case "$enable_ipset" in - yes) - -printf "%s\n" "#define USE_IPSET 1" >>confdefs.h - - IPSET_SRC="ipset/ipset.c" - - IPSET_OBJ="ipset.lo" - - - # mnl - -# Check whether --with-libmnl was given. -if test ${with_libmnl+y} -then : - withval=$with_libmnl; -else $as_nop - withval="yes" -fi - - found_libmnl="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5 -printf %s "checking for libmnl... " >&6; } - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" - fi - for dir in $withval ; do - if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then - found_libmnl="yes" - extralibmnl="" - if test -f "$dir/include/libmnl/libmnl/libmnl.h"; then - extralibmnl="/libmnl" - fi - if test "$dir" != "/usr" -o -n "$extralibmnl"; then - CPPFLAGS="$CPPFLAGS -I$dir/include$extralibmnl" - fi - if test "$dir" != "/usr"; then - LDFLAGS="$LDFLAGS -L$dir/lib" - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 -printf "%s\n" "found in $dir" >&6; } - LIBS="$LIBS -lmnl" - break; - fi - done - if test x_$found_libmnl != x_yes; then - as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5 - fi - ;; - no|*) - # nothing - ;; -esac -# Check whether --enable-explicit-port-randomisation was given. -if test ${enable_explicit_port_randomisation+y} -then : - enableval=$enable_explicit_port_randomisation; -fi - -case "$enable_explicit_port_randomisation" in - no) - -printf "%s\n" "#define DISABLE_EXPLICIT_PORT_RANDOMISATION 1" >>confdefs.h - - ;; - yes|*) - ;; -esac - -if echo "$host" | $GREP -i -e linux >/dev/null; then - # Check whether --enable-linux-ip-local-port-range was given. -if test ${enable_linux_ip_local_port_range+y} -then : - enableval=$enable_linux_ip_local_port_range; -fi - - case "$enable_linux_ip_local_port_range" in - yes) - -printf "%s\n" "#define USE_LINUX_IP_LOCAL_PORT_RANGE 1" >>confdefs.h - - ;; - no|*) - ;; - esac -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5 -printf %s "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; } -# on openBSD, the implicit rule make $< work. -# on Solaris, it does not work ($? is changed sources, $^ lists dependencies). -# gmake works. -cat >conftest.make </dev/null -rm -f conftest.make conftest.c conftest.dir/conftest.c -rm -rf conftest.dir -if test ! -f conftest.lo; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source' - SOURCEFILE='`cat .source`' -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - SOURCEDETERMINE=':' - SOURCEFILE='$<' -fi -rm -f conftest.lo - - - -# see if we want to build the library or everything -ALLTARGET="alltargets" -INSTALLTARGET="install-all" - -# Check whether --with-libunbound-only was given. -if test ${with_libunbound_only+y} -then : - withval=$with_libunbound_only; - if test "$withval" = "yes"; then - ALLTARGET="lib" - INSTALLTARGET="install-lib" - fi - -fi - -if test $ALLTARGET = "alltargets"; then - if test $USE_NSS = "yes"; then - as_fn_error $? "--with-nss can only be used in combination with --with-libunbound-only." "$LINENO" 5 - fi - if test $USE_NETTLE = "yes"; then - as_fn_error $? "--with-nettle can only be used in combination with --with-libunbound-only." "$LINENO" 5 - fi -fi - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5 -printf "%s\n" "$as_me: Stripping extension flags..." >&6;} - - if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`" - -printf "%s\n" "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`" - -printf "%s\n" "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`" - -printf "%s\n" "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`" - -printf "%s\n" "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`" - -printf "%s\n" "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`" - -printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`" - -printf "%s\n" "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`" - -printf "%s\n" "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h - - fi - - - if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then - CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`" - -printf "%s\n" "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h - - fi - - -if test -n "$LATE_LDFLAGS"; then - LDFLAGS="$LATE_LDFLAGS $LDFLAGS" -fi -# remove start spaces -LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'` -LIBS=`echo "$LIBS"|sed -e 's/^ *//'` - - -printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h - - - - -version=1.20.0 - -date=`date +'%b %e, %Y'` - - -ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service contrib/unbound_portable.service" - -ac_config_headers="$ac_config_headers config.h" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then - as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else $as_nop - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else $as_nop - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by unbound $as_me 1.20.0, which was -generated by GNU Autoconf 2.71. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' -ac_cs_version="\\ -unbound config.status 1.20.0 -configured by $0, generated by GNU Autoconf 2.71, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2021 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - printf "%s\n" "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;; - "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;; - "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;; - "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;; - "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;; - "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;; - "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;; - "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;; - "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;; - "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;; - "dnscrypt/dnscrypt_config.h") CONFIG_FILES="$CONFIG_FILES dnscrypt/dnscrypt_config.h" ;; - "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;; - "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;; - "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;; - "contrib/unbound_portable.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound_portable.service" ;; - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "disable-rpath":C) - sed < libtool > libtool-2 \ - 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/' - mv libtool-2 libtool - chmod 755 libtool - libtool="./libtool" - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - From 6af3d59962449c66688361598163dd174cc5fb2a Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 21 May 2024 15:18:32 -0400 Subject: [PATCH 069/151] cxgbe: Flush transmitted packets more regularly in netmap mode Previously, when transmitting short runs of packets via cxgbe_nm_tx(), we would wait until a large number of packets were buffered before scheduling a task to clean transmit buffers. Obtained from: np --- sys/dev/cxgbe/t4_netmap.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 0377f65acc3e..e53fb5054316 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1025,29 +1025,28 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, nm_txq->pidx = 0; } - if (npkt == 0 && npkt_remaining == 0) { + if (npkt + npkt_remaining == 0) { /* All done. */ - if (lazy_tx_credit_flush == 0) { + if (lazy_tx_credit_flush == 0 || + NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); nm_txq->equeqidx = nm_txq->pidx; nm_txq->equiqidx = nm_txq->pidx; + } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; } ring_nm_txq_db(sc, nm_txq); return; } - - if (NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | - F_FW_WR_EQUIQ); - nm_txq->equeqidx = nm_txq->pidx; - nm_txq->equiqidx = nm_txq->pidx; - } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); - nm_txq->equeqidx = nm_txq->pidx; - } - if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) + if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) { + if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; + } ring_nm_txq_db(sc, nm_txq); + } } /* Will get called again. */ From c87cb22ba9fa5f4ed4c9afa0eb66092c2f08841e Mon Sep 17 00:00:00 2001 From: George Amanakis Date: Mon, 15 Jul 2024 18:05:42 +0200 Subject: [PATCH 070/151] head_errlog: fix use-after-free In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Reviewed-by: Brian Behlendorf Reviewed-by: Chunwei Chen Reviewed-by: Rob Norris Reviewed-by: Tony Hutter Signed-off-by: George Amanakis Closes #16272 Closes #16273 --- module/zfs/dsl_dataset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index b4de0e7ff073..45d8a290d67d 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -3712,16 +3712,19 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) spa_history_log_internal_ds(hds, "promote", tx, " "); dsl_dir_rele(odd, FTAG); - promote_rele(ddpa, FTAG); /* - * Transfer common error blocks from old head to new head. + * Transfer common error blocks from old head to new head, before + * calling promote_rele() on ddpa since we need to dereference + * origin_head and hds. */ if (spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_HEAD_ERRLOG)) { uint64_t old_head = origin_head->ds_object; uint64_t new_head = hds->ds_object; spa_swap_errlog(dp->dp_spa, new_head, old_head, tx); } + + promote_rele(ddpa, FTAG); } /* From ac6dc5cde729a602252a0b80f82424861d2eb7b5 Mon Sep 17 00:00:00 2001 From: Yuichiro NAITO Date: Thu, 4 Jul 2024 09:57:02 +0200 Subject: [PATCH 071/151] dhclient: Ignore SIP servers DHCP option defined in RFC 3361 Ignore SIP servers dhcp option to shut up the warning message. This option is defined in the RFC 3361 and sent from NSD-G1000T router. PR: 280119 Reviewed by: jrm (mentor), brooks MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45873 --- sbin/dhclient/dhclient.c | 1 + sbin/dhclient/dhcp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 8179a5c34209..62e55eb4d01f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2618,6 +2618,7 @@ check_option(struct client_lease *l, int option) case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: case DHO_URL: + case DHO_SIP_SERVERS: case DHO_END: return (1); case DHO_CLASSLESS_ROUTES: diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 300deb464238..99b69613934f 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -172,6 +172,7 @@ struct dhcp_packet { #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_URL 114 #define DHO_DOMAIN_SEARCH 119 +#define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 #define DHO_END 255 From 2589197adb199ec37f132dd7e279eb0795713f1e Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 6 Jun 2024 10:28:03 -0700 Subject: [PATCH 072/151] net80211: migrate the group/unicast key check into inline functions The way that net80211 and drivers are checking for the /type/ of key is to check if it's in the vap WEP key array and if so, it's a group key. If not, it's a unicast key. That's not only kind of terrible, but it's also going to be problematic with future 802.11 support (for multiple unicast keys and IGTK keys for management frame protection.) So as part of this, remove the places where this is done and instead use a pair inline functions - ieee80211_is_key_global() and ieee80211_is_key_unicast(). They currenly still use the same logic but the drivers and net80211 stack isn't doing it itself. There are still open questions about why keys are not being correctly tagged as GROUP, GTK, PTK, etc. That will be investigated and addressed in follow-up work as a pre-cursor to MFP, IGTK, etc. as mentioned above. Testing: * iwn, rtwn - STA mode Differential Revision: https://reviews.freebsd.org/D45516 --- sys/dev/ath/if_ath_keycache.c | 3 +-- sys/dev/mwl/if_mwl.c | 3 +-- sys/dev/rtwn/if_rtwn_cam.c | 6 ++---- sys/dev/usb/wlan/if_rsu.c | 7 +++---- sys/dev/usb/wlan/if_rum.c | 10 ++++------ sys/dev/wpi/if_wpi.c | 11 +++++------ sys/net80211/ieee80211.c | 31 +++++++++++++++++++++++++++++++ sys/net80211/ieee80211_crypto.c | 16 ++++++++-------- sys/net80211/ieee80211_var.h | 5 +++++ 9 files changed, 60 insertions(+), 32 deletions(-) diff --git a/sys/dev/ath/if_ath_keycache.c b/sys/dev/ath/if_ath_keycache.c index bc94273bf5ce..a58625ad2803 100644 --- a/sys/dev/ath/if_ath_keycache.c +++ b/sys/dev/ath/if_ath_keycache.c @@ -434,8 +434,7 @@ ath_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, /* * Only global keys should have key index assigned. */ - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (!ieee80211_is_key_global(vap, k)) { /* should not happen */ DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s: bogus group key\n", __func__); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 479f3144dce3..49b8b3279c7f 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -1519,8 +1519,7 @@ mwl_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, if (k->wk_keyix != IEEE80211_KEYIX_NONE || (k->wk_flags & IEEE80211_KEY_GROUP)) { - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (!ieee80211_is_key_global(vap, k)) { /* should not happen */ DPRINTF(sc, MWL_DEBUG_KEYCACHE, "%s: bogus group key\n", __func__); diff --git a/sys/dev/rtwn/if_rtwn_cam.c b/sys/dev/rtwn/if_rtwn_cam.c index 864c13d78285..d142cd0476e4 100644 --- a/sys/dev/rtwn/if_rtwn_cam.c +++ b/sys/dev/rtwn/if_rtwn_cam.c @@ -113,8 +113,7 @@ rtwn_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rtwn_softc *sc = vap->iv_ic->ic_softc; int i, start; - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { *keyix = ieee80211_crypto_get_key_wepidx(vap, k); if (sc->sc_hwcrypto != RTWN_CRYPTO_FULL) k->wk_flags |= IEEE80211_KEY_SWCRYPT; @@ -308,8 +307,7 @@ rtwn_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, return (1); } - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { if (sc->sc_hwcrypto == RTWN_CRYPTO_FULL) { struct rtwn_vap *rvp = RTWN_VAP(vap); diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index e000d1fb5992..c967435250ee 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -1526,10 +1526,10 @@ rsu_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rsu_softc *sc = vap->iv_ic->ic_softc; int is_checked = 0; - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { *keyix = ieee80211_crypto_get_key_wepidx(vap, k); } else { + /* Note: assumes this is a pairwise key */ if (vap->iv_opmode != IEEE80211_M_STA) { *keyix = 0; /* TODO: obtain keyix from node id */ @@ -1570,8 +1570,7 @@ rsu_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, } /* Handle group keys. */ - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { KASSERT(k->wk_keyix < nitems(sc->group_keys), ("keyix %u > %zu\n", k->wk_keyix, nitems(sc->group_keys))); diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 2720f2ffedcb..edf92e2222b4 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1468,8 +1468,7 @@ rum_tx_crypto_flags(struct rum_softc *sc, struct ieee80211_node *ni, flags |= RT2573_TX_CIP_MODE(mode); /* Do not trust GROUP flag */ - if (!(k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) + if (ieee80211_is_key_unicast(vap, k)) flags |= RT2573_TX_KEY_PAIR; else pos += 0 * RT2573_SKEY_MAX; /* vap id */ @@ -3006,8 +3005,7 @@ rum_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, struct rum_softc *sc = vap->iv_ic->ic_softc; uint8_t i; - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + if (ieee80211_is_key_unicast(vap, k)) { if (!(k->wk_flags & IEEE80211_KEY_SWCRYPT)) { RUM_LOCK(sc); for (i = 0; i < RT2573_ADDR_MAX; i++) { @@ -3044,7 +3042,7 @@ rum_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k) return 1; } - group = k >= &vap->iv_nw_keys[0] && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]; + group = ieee80211_is_key_global(vap, k); return !rum_cmd_sleepable(sc, k, sizeof(*k), 0, group ? rum_group_key_set_cb : rum_pair_key_set_cb); @@ -3061,7 +3059,7 @@ rum_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) return 1; } - group = k >= &vap->iv_nw_keys[0] && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]; + group = ieee80211_is_key_global(vap, k); return !rum_cmd_sleepable(sc, k, sizeof(*k), 0, group ? rum_group_key_del_cb : rum_pair_key_del_cb); diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index fc5cf02f3a25..11b8a749090d 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -4641,8 +4641,8 @@ wpi_load_key(struct ieee80211_node *ni, const struct ieee80211_key *k) return !error; } - if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (!(kflags & WPI_KFLAG_MULTICAST) && + ieee80211_is_key_global(vap, k)) { kflags |= WPI_KFLAG_MULTICAST; node.kflags = htole16(kflags); @@ -4726,8 +4726,8 @@ wpi_del_key(struct ieee80211_node *ni, const struct ieee80211_key *k) return !error; } - if (!(kflags & WPI_KFLAG_MULTICAST) && &vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (!(kflags & WPI_KFLAG_MULTICAST) && + ieee80211_is_key_global(vap, k)) { kflags |= WPI_KFLAG_MULTICAST; node.kflags = htole16(kflags); @@ -4782,8 +4782,7 @@ wpi_process_key(struct ieee80211vap *vap, const struct ieee80211_key *k, } /* Handle group keys. */ - if (&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) { + if (ieee80211_is_key_global(vap, k)) { WPI_NT_LOCK(sc); if (set) wvp->wv_gtk |= WPI_VAP_KEY(k->wk_keyix); diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 9f91e31d13a6..ecf87020b066 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -2679,3 +2679,34 @@ ieee80211_channel_type_char(const struct ieee80211_channel *c) return 'b'; return 'f'; } + +/* + * Determine whether the given key in the given VAP is a global key. + * (key index 0..3, shared between all stations on a VAP.) + * + * This is either a WEP key or a GROUP key. + * + * Note this will NOT return true if it is a IGTK key. + */ +bool +ieee80211_is_key_global(const struct ieee80211vap *vap, + const struct ieee80211_key *key) +{ + return (&vap->iv_nw_keys[0] <= key && + key < &vap->iv_nw_keys[IEEE80211_WEP_NKID]); +} + +/* + * Determine whether the given key in the given VAP is a unicast key. + */ +bool +ieee80211_is_key_unicast(const struct ieee80211vap *vap, + const struct ieee80211_key *key) +{ + /* + * This is a short-cut for now; eventually we will need + * to support multiple unicast keys, IGTK, etc) so we + * will absolutely need to fix the key flags. + */ + return (!ieee80211_is_key_global(vap, key)); +} diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 829653ff1335..d70b3aa4a24a 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -62,8 +62,8 @@ static int null_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k, ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix) { - if (!(&vap->iv_nw_keys[0] <= k && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { + + if (!ieee80211_is_key_global(vap, k)) { /* * Not in the global key table, the driver should handle this * by allocating a slot in the h/w key table/cache. In @@ -606,9 +606,9 @@ ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, const struct ieee80211_key *k) { - if (k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) + if (ieee80211_is_key_global(vap, k)) { return (k - vap->iv_nw_keys); + } return (-1); } @@ -618,11 +618,11 @@ ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, uint8_t ieee80211_crypto_get_keyid(struct ieee80211vap *vap, struct ieee80211_key *k) { - if (k >= &vap->iv_nw_keys[0] && - k < &vap->iv_nw_keys[IEEE80211_WEP_NKID]) + if (ieee80211_is_key_global(vap, k)) { return (k - vap->iv_nw_keys); - else - return (0); + } + + return (0); } struct ieee80211_key * diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index c827984b5f37..53139a3852b8 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -824,6 +824,11 @@ char ieee80211_channel_type_char(const struct ieee80211_channel *c); #define ieee80211_get_home_channel(_ic) ((_ic)->ic_bsschan) #define ieee80211_get_vap_desired_channel(_iv) ((_iv)->iv_des_chan) +bool ieee80211_is_key_global(const struct ieee80211vap *vap, + const struct ieee80211_key *key); +bool ieee80211_is_key_unicast(const struct ieee80211vap *vap, + const struct ieee80211_key *key); + void ieee80211_radiotap_attach(struct ieee80211com *, struct ieee80211_radiotap_header *th, int tlen, uint32_t tx_radiotap, From 3ab5e29778835065d80cbb6610ece981ac65c4c7 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 9 Jul 2024 09:54:21 -0700 Subject: [PATCH 073/151] net80211: fix RSN capability parsing The RSN capability field may be the last two bytes in the IE. 802.11-2016 9.4.2.25.1 (General) doesn't require anything afterwards - the PMKID/List and Group Management Cipher Suite are optional. Thus having a check of len > 2 will miss the situation where it IS the last field. This showed up when developing MFP, as I'm using optional MFP at home and optional MFP doesn't encrypt group management frames. (It should only add the BIP message integrity check IE in each action frame.) Differential Revision: https://reviews.freebsd.org/D45936 --- sys/net80211/ieee80211_hostap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 82d8f8b2907b..1d741ca4d7bf 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -1539,9 +1539,14 @@ ieee80211_parse_rsn(struct ieee80211vap *vap, const uint8_t *frm, rsn->rsn_keymgmt = RSN_ASE_8021X_PSK; /* optional RSN capabilities */ - if (len > 2) + if (len >= 2) { rsn->rsn_caps = le16dec(frm); - /* XXXPMKID */ + frm += 2, len -= 2; + } + + /* XXX PMK Count / PMKID */ + + /* XXX Group Cipher Management Suite */ return 0; } From 0a34d050ae8ea14feddd3d2a62fd2f612613b2c5 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 15 Jul 2024 12:13:08 -0700 Subject: [PATCH 074/151] acpi: Narrow workaround for broken interrupt settings on x86 Commit 9a7bf07ccdc1 from 2016 introduced a workaround for some broken BIOSes that specified active-lo instead of active-hi polarity for ISA IRQs for UARTs. The workaround assumed that edge-sensitive ISA IRQs on x86 should always be active-hi. However, some recent AMD systems actually use active-lo edge-sensitive ISA IRQs (and not just for UARTs, but also for the keyboard and PS/2 mouse devices) and the override causes interrupts to be dropped resulting in boot time hangs, non-working keyboards, etc. Add a hw.acpi.override_isa_irq_polarity tunable (readable as a sysctl post-boot) to control this quirk. It can be set to 1 to force enable the override and 0 to disable it. The log of original message mentions an Intel motherboard as the sample case, so default the tunable to 1 on systems with an Intel CPU and 0 otherwise. Special thanks to Matthias Lanter for tracking down boot time issues on recent AMD systems to mismatched interrupt polarity. PR: 270707 Reported by: aixdroix_OSS@protonmail.com, Michael Dexter Reported by: mfw_burn@pm.me, Hannes Hfauswedell Reported by: Matthias Lanter Reported by: William Bulley Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45554 --- share/man/man4/acpi.4 | 8 +++++++- sys/dev/acpica/acpi.c | 19 +++++++++++++++++++ sys/dev/acpica/acpi_resource.c | 11 ++++------- sys/dev/acpica/acpivar.h | 12 ++++++++++++ 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4 index 434e97d529f5..cdad3ceeedfc 100644 --- a/share/man/man4/acpi.4 +++ b/share/man/man4/acpi.4 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 12, 2021 +.Dd July 15, 2024 .Dt ACPI 4 .Os .Sh NAME @@ -256,6 +256,12 @@ is a valid list of two interfaces .Qq Li FreeBSD and .Qq Li Linux . +.It Va hw.acpi.hw.acpi.override_isa_irq_polarity (x86) +Forces active-lo polarity for edge-triggered ISA interrupts. +Some older systems incorrectly specify active-lo polarity for ISA +interrupts and this override fixes those systems. +This override is enabled by default on systems with Intel CPUs, +but can be enabled or disabled by setting the tunable explicitly. .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. This can fix some graphics cards that have problems such as LCD white-out diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 24d7027f165d..91a1636f2808 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -55,6 +55,8 @@ #if defined(__i386__) || defined(__amd64__) #include #include +#include +#include #endif #include #include @@ -297,6 +299,10 @@ int acpi_susp_bounce; SYSCTL_INT(_debug_acpi, OID_AUTO, suspend_bounce, CTLFLAG_RW, &acpi_susp_bounce, 0, "Don't actually suspend, just test devices."); +#if defined(__amd64__) || defined(__i386__) +int acpi_override_isa_irq_polarity; +#endif + /* * ACPI standard UUID for Device Specific Data Package * "Device Properties UUID for _DSD" Rev. 2.0 @@ -611,6 +617,19 @@ acpi_attach(device_t dev) OID_AUTO, "handle_reboot", CTLFLAG_RW, &sc->acpi_handle_reboot, 0, "Use ACPI Reset Register to reboot"); +#if defined(__amd64__) || defined(__i386__) + /* + * Enable workaround for incorrect ISA IRQ polarity by default on + * systems with Intel CPUs. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL) + acpi_override_isa_irq_polarity = 1; + SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "override_isa_irq_polarity", CTLFLAG_RDTUN, + &acpi_override_isa_irq_polarity, 0, + "Force active-hi polarity for edge-triggered ISA IRQs"); +#endif + /* * Default to 1 second before sleeping to give some machines time to * stabilize. diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 87b82a574beb..1257ed30cc65 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -159,14 +159,11 @@ acpi_config_intr(device_t dev, ACPI_RESOURCE *res) } #if defined(__amd64__) || defined(__i386__) - /* - * XXX: Certain BIOSes have buggy AML that specify an IRQ that is - * edge-sensitive and active-lo. However, edge-sensitive IRQs - * should be active-hi. Force IRQs with an ISA IRQ value to be - * active-hi instead. - */ - if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW) + if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW && + acpi_override_isa_irq_polarity) { + device_printf(dev, "forcing active-hi polarity for IRQ %u\n", irq); pol = ACPI_ACTIVE_HIGH; + } #endif BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ? diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 2322ab96014b..a71eb9b47eb7 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -234,6 +234,18 @@ extern int acpi_quirks; #define ACPI_Q_TIMER (1 << 1) #define ACPI_Q_MADT_IRQ0 (1 << 2) +#if defined(__amd64__) || defined(__i386__) +/* + * Certain Intel BIOSes have buggy AML that specify an IRQ that is + * edge-sensitive and active-lo. Normally, edge-sensitive IRQs should + * be active-hi. If this value is non-zero, edge-sensitive ISA IRQs + * are forced to be active-hi instead. At least some AMD systems use + * active-lo edge-sensitive ISA IRQs, so this setting is only enabled + * by default on systems with Intel CPUs. + */ +extern int acpi_override_isa_irq_polarity; +#endif + /* * Plug and play information for device matching. Matching table format * is compatible with ids parameter of ACPI_ID_PROBE bus method. From 9cc06bf7aa2846c35483de567779bb8afc289f53 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 15 Jul 2024 12:14:01 -0700 Subject: [PATCH 075/151] amd64 GENERIC: Switch uart hints from "isa" to "acpi" This causes these hints to be only used to wire device unit numbers for serial ports enumerated by ACPI but will not create ISA device nodes if ACPI doesn't enumerate them. Note that IRQ hints are not used for wiring so have been removed. PR: 270707 Reported by: aixdroix_OSS@protonmail.com, Michael Dexter Reported by: mfw_burn@pm.me, Hannes Hfauswedell Reported by: Matthias Lanter Reported by: William Bulley Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45945 --- sys/amd64/conf/GENERIC.hints | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hints index 7c2a3f28b9ce..4f6121c7cf77 100644 --- a/sys/amd64/conf/GENERIC.hints +++ b/sys/amd64/conf/GENERIC.hints @@ -6,13 +6,11 @@ hint.psm.0.at="atkbdc" hint.psm.0.irq="12" hint.sc.0.at="isa" hint.sc.0.flags="0x100" -hint.uart.0.at="isa" +hint.uart.0.at="acpi" hint.uart.0.port="0x3F8" hint.uart.0.flags="0x10" -hint.uart.0.irq="4" -hint.uart.1.at="isa" +hint.uart.1.at="acpi" hint.uart.1.port="0x2F8" -hint.uart.1.irq="3" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" From 5862c891bb7c588aa00538d85eb26ffe77d3f709 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Mon, 15 Jul 2024 15:17:47 -0500 Subject: [PATCH 076/151] kern: zero out stack buffer after copying out random bits The kern.arandom sysctl handler uses an intermediate buffer on the stack to hold random data that it subsequently copies out to the sysctl request. Err on the side of caution and zero out the stack buffer after we're done with it to avoid a potential entropy leak later on. Reviewed by: cem, emaste, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45978 --- sys/kern/kern_mib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 5724ed3f6932..fe6e49865682 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -182,10 +182,14 @@ sysctl_kern_arnd(SYSCTL_HANDLER_ARGS) { char buf[256]; size_t len; + int error; len = MIN(req->oldlen, sizeof(buf)); read_random(buf, len); - return (SYSCTL_OUT(req, buf, len)); + + error = SYSCTL_OUT(req, buf, len); + explicit_bzero(buf, len); + return (error); } SYSCTL_PROC(_kern, KERN_ARND, arandom, From b3877767883e9b26fbcce47c015ba3eab323bf1b Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 15 Jul 2024 16:06:24 -0400 Subject: [PATCH 077/151] ndp: Fix libxo formatting for the prefix expiry string Fixes: e1c7783e220b ("ndp(8): add structured output formatting via libxo") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Bell Tower Integration --- usr.sbin/ndp/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index dcb3b5e3571b..637aac2823ed 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1334,7 +1334,7 @@ plist(void) if (p->expire == 0) xo_emit(", expire=Never{en:permanent/true}"); else if (p->expire >= now.tv_sec) - xo_emit(", expire=%s{e:expires_sec/%d}", + xo_emit(", expire={:expires/%s}{e:expires_sec/%d}", sec2str(expire_in), expire_in); else xo_emit(", expired{e:expires_sec/%d}", expire_in); From a7fc4c85e3ad282a62d95c84c5eaf1b59c1fb23a Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Mon, 15 Jul 2024 23:51:37 +0200 Subject: [PATCH 078/151] zstd: don't call zstd_mempool_reap if there are no buffers (#16302) zfs_zstd_cache_reap_now is issued every second. zstd_mempool_reap checks for both pool existence and buffer count, but that's still 2 func calls which are trivially avoidable. With clang it even avoids pushing the stack pointer (but still suffers the mispredict due to a forward jump, not modified in case someone is using zstd): <+0>: cmpq $0x0,0x0(%rip) # <+8>: je 0x217de4 <+10>: push %rbp <+11>: mov %rsp,%rbp <+14>: mov 0x0(%rip),%rdi # <+21>: call 0x217df0 <+26>: mov 0x0(%rip),%rdi # <+33>: pop %rbp <+34>: jmp 0x217df0 <+36>: ret Preferably the call would not be made to begin with if zstd is not used, but this retains all the logic confined to zstd code. Sponsored by: Rubicon Communications, LLC ("Netgate") Signed-off-by: Mateusz Guzik Reviewed-by: Allan Jude Reviewed-by: Tony Hutter --- module/zstd/zfs_zstd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/zstd/zfs_zstd.c b/module/zstd/zfs_zstd.c index ed0271a8d683..05120d27b8d6 100644 --- a/module/zstd/zfs_zstd.c +++ b/module/zstd/zfs_zstd.c @@ -844,6 +844,13 @@ zstd_mempool_deinit(void) void zfs_zstd_cache_reap_now(void) { + + /* + * Short-circuit if there are no buffers to begin with. + */ + if (ZSTDSTAT(zstd_stat_buffers) == 0) + return; + /* * calling alloc with zero size seeks * and releases old unused objects From e9ac41698b2f322d55ccf9da50a3596edb2c1800 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 14 Jul 2024 22:46:32 -0600 Subject: [PATCH 079/151] Remove residual blank line at start of Makefile This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix --- Makefile.libcompat | 1 - bin/Makefile | 1 - bin/Makefile.inc | 1 - bin/cat/Makefile | 1 - bin/cat/tests/Makefile | 1 - bin/chflags/Makefile | 1 - bin/chflags/tests/Makefile | 1 - bin/chio/Makefile | 1 - bin/chmod/Makefile | 1 - bin/chmod/tests/Makefile | 1 - bin/cp/Makefile | 1 - bin/cp/tests/Makefile | 1 - bin/cpuset/Makefile | 1 - bin/date/Makefile | 1 - bin/date/tests/Makefile | 1 - bin/dd/Makefile | 1 - bin/dd/tests/Makefile | 1 - bin/df/Makefile | 1 - bin/domainname/Makefile | 1 - bin/echo/Makefile | 1 - bin/echo/tests/Makefile | 1 - bin/ed/Makefile | 1 - bin/ed/test/Makefile | 1 - bin/expr/Makefile | 1 - bin/expr/tests/Makefile | 1 - bin/freebsd-version/Makefile | 1 - bin/getfacl/Makefile | 1 - bin/kenv/Makefile | 1 - bin/kill/Makefile | 1 - bin/ln/Makefile | 1 - bin/ln/tests/Makefile | 1 - bin/ls/Makefile | 1 - bin/ls/tests/Makefile | 1 - bin/mkdir/Makefile | 1 - bin/mkdir/tests/Makefile | 1 - bin/mv/Makefile | 1 - bin/mv/tests/Makefile | 1 - bin/pax/Makefile | 1 - bin/pax/tests/Makefile | 1 - bin/pkill/tests/Makefile | 1 - bin/ps/Makefile | 1 - bin/pwait/Makefile | 1 - bin/pwait/tests/Makefile | 1 - bin/pwd/Makefile | 1 - bin/realpath/Makefile | 1 - bin/rm/Makefile | 1 - bin/rm/tests/Makefile | 1 - bin/rmail/Makefile | 1 - bin/rmdir/Makefile | 1 - bin/rmdir/tests/Makefile | 1 - bin/setfacl/Makefile | 1 - bin/sh/Makefile | 1 - bin/sh/tests/Makefile | 1 - bin/sh/tests/builtins/Makefile | 1 - bin/sh/tests/errors/Makefile | 1 - bin/sh/tests/execution/Makefile | 1 - bin/sh/tests/expansion/Makefile | 1 - bin/sh/tests/invocation/Makefile | 1 - bin/sh/tests/parameters/Makefile | 1 - bin/sh/tests/parser/Makefile | 1 - bin/sh/tests/set-e/Makefile | 1 - bin/sleep/Makefile | 1 - bin/sleep/tests/Makefile | 1 - bin/stty/Makefile | 1 - bin/sync/Makefile | 1 - bin/test/Makefile | 1 - bin/test/tests/Makefile | 1 - bin/tests/Makefile | 1 - bin/timeout/Makefile | 1 - bin/timeout/tests/Makefile | 1 - bin/uuidgen/Makefile | 1 - cddl/Makefile | 1 - cddl/Makefile.inc | 1 - cddl/lib/Makefile | 1 - cddl/lib/Makefile.inc | 1 - cddl/lib/drti/Makefile | 1 - cddl/lib/libavl/Makefile | 1 - cddl/lib/libctf/Makefile | 1 - cddl/lib/libdtrace/Makefile | 1 - cddl/lib/libicp/Makefile | 1 - cddl/lib/libicp_rescue/Makefile | 1 - cddl/lib/libnvpair/Makefile | 1 - cddl/lib/libspl/Makefile | 1 - cddl/lib/libtpool/Makefile | 1 - cddl/lib/libumem/Makefile | 1 - cddl/lib/libuutil/Makefile | 1 - cddl/lib/libzfs/Makefile | 1 - cddl/lib/libzfs_core/Makefile | 1 - cddl/lib/libzfsbootenv/Makefile | 1 - cddl/lib/libzpool/Makefile | 1 - cddl/lib/libzutil/Makefile | 1 - cddl/lib/tests/Makefile | 1 - cddl/sbin/Makefile | 1 - cddl/sbin/Makefile.inc | 1 - cddl/sbin/tests/Makefile | 1 - cddl/sbin/zfs/Makefile | 1 - cddl/sbin/zpool/Makefile | 1 - cddl/share/Makefile | 1 - cddl/share/zfs/Makefile | 1 - cddl/share/zfs/compatibility.d/Makefile | 1 - cddl/tests/Makefile | 1 - cddl/usr.bin/Makefile | 1 - cddl/usr.bin/Makefile.inc | 1 - cddl/usr.bin/ctfconvert/Makefile | 1 - cddl/usr.bin/ctfconvert/tests/Makefile | 1 - cddl/usr.bin/ctfdump/Makefile | 1 - cddl/usr.bin/ctfmerge/Makefile | 1 - cddl/usr.bin/tests/Makefile | 1 - cddl/usr.bin/zinject/Makefile | 1 - cddl/usr.bin/zstream/Makefile | 1 - cddl/usr.bin/ztest/Makefile | 1 - cddl/usr.bin/ztest/tests/Makefile | 1 - cddl/usr.libexec/Makefile | 1 - cddl/usr.libexec/zfs_prepare_disk/Makefile | 1 - cddl/usr.libexec/zpool_influxdb/Makefile | 1 - cddl/usr.sbin/Makefile | 1 - cddl/usr.sbin/Makefile.inc | 1 - cddl/usr.sbin/dtrace/Makefile | 1 - cddl/usr.sbin/dtrace/tests/Makefile | 1 - cddl/usr.sbin/dtrace/tests/amd64/Makefile | 1 - cddl/usr.sbin/dtrace/tests/common/Makefile | 1 - cddl/usr.sbin/dtrace/tests/i386/Makefile | 1 - cddl/usr.sbin/dwatch/Makefile | 1 - cddl/usr.sbin/dwatch/examples/Makefile | 1 - cddl/usr.sbin/dwatch/libexec/Makefile | 1 - cddl/usr.sbin/lockstat/Makefile | 1 - cddl/usr.sbin/plockstat/Makefile | 1 - cddl/usr.sbin/tests/Makefile | 1 - cddl/usr.sbin/zdb/Makefile | 1 - cddl/usr.sbin/zfsd/Makefile | 1 - cddl/usr.sbin/zfsd/Makefile.common | 1 - cddl/usr.sbin/zfsd/tests/Makefile | 1 - cddl/usr.sbin/zhack/Makefile | 1 - contrib/elftoolchain/nm/Makefile | 1 - contrib/file/python/Makefile.am | 1 - contrib/sqlite3/Makefile.am | 1 - crypto/heimdal/base/Makefile.am | 1 - etc/Makefile | 1 - etc/gss/Makefile | 1 - etc/sendmail/Makefile | 1 - gnu/Makefile | 1 - gnu/Makefile.inc | 1 - gnu/lib/Makefile | 1 - gnu/lib/Makefile.inc | 1 - gnu/lib/libdialog/Makefile | 1 - gnu/lib/tests/Makefile | 1 - gnu/tests/Makefile | 1 - gnu/usr.bin/Makefile | 1 - gnu/usr.bin/Makefile.inc | 1 - gnu/usr.bin/dialog/Makefile | 1 - gnu/usr.bin/diff3/Makefile | 1 - gnu/usr.bin/tests/Makefile | 1 - include/arpa/Makefile | 1 - include/gssapi/Makefile | 1 - include/protocols/Makefile | 1 - include/rpc/Makefile | 1 - include/rpcsvc/Makefile | 1 - include/xlocale/Makefile | 1 - kerberos5/Makefile | 1 - kerberos5/Makefile.inc | 1 - kerberos5/lib/Makefile | 1 - kerberos5/lib/Makefile.inc | 1 - kerberos5/lib/libasn1/Makefile | 1 - kerberos5/lib/libgssapi_krb5/Makefile | 1 - kerberos5/lib/libgssapi_ntlm/Makefile | 1 - kerberos5/lib/libgssapi_spnego/Makefile | 1 - kerberos5/lib/libhdb/Makefile | 1 - kerberos5/lib/libheimbase/Makefile | 1 - kerberos5/lib/libheimipcc/Makefile | 1 - kerberos5/lib/libheimipcs/Makefile | 1 - kerberos5/lib/libheimntlm/Makefile | 1 - kerberos5/lib/libhx509/Makefile | 1 - kerberos5/lib/libkadm5clnt/Makefile | 1 - kerberos5/lib/libkadm5srv/Makefile | 1 - kerberos5/lib/libkafs5/Makefile | 1 - kerberos5/lib/libkdc/Makefile | 1 - kerberos5/lib/libkrb5/Makefile | 1 - kerberos5/lib/libroken/Makefile | 1 - kerberos5/lib/libsl/Makefile | 1 - kerberos5/lib/libvers/Makefile | 1 - kerberos5/lib/libwind/Makefile | 1 - kerberos5/libexec/Makefile | 1 - kerberos5/libexec/Makefile.inc | 1 - kerberos5/libexec/digest-service/Makefile | 1 - kerberos5/libexec/hprop/Makefile | 1 - kerberos5/libexec/hpropd/Makefile | 1 - kerberos5/libexec/ipropd-master/Makefile | 1 - kerberos5/libexec/ipropd-slave/Makefile | 1 - kerberos5/libexec/kadmind/Makefile | 1 - kerberos5/libexec/kcm/Makefile | 1 - kerberos5/libexec/kdc/Makefile | 1 - kerberos5/libexec/kdigest/Makefile | 1 - kerberos5/libexec/kfd/Makefile | 1 - kerberos5/libexec/kimpersonate/Makefile | 1 - kerberos5/libexec/kpasswdd/Makefile | 1 - kerberos5/tools/Makefile | 1 - kerberos5/tools/Makefile.inc | 1 - kerberos5/tools/asn1_compile/Makefile | 1 - kerberos5/tools/make-roken/Makefile | 1 - kerberos5/tools/slc/Makefile | 1 - kerberos5/usr.bin/Makefile | 1 - kerberos5/usr.bin/Makefile.inc | 1 - kerberos5/usr.bin/hxtool/Makefile | 1 - kerberos5/usr.bin/kadmin/Makefile | 1 - kerberos5/usr.bin/kcc/Makefile | 1 - kerberos5/usr.bin/kdestroy/Makefile | 1 - kerberos5/usr.bin/kf/Makefile | 1 - kerberos5/usr.bin/kgetcred/Makefile | 1 - kerberos5/usr.bin/kinit/Makefile | 1 - kerberos5/usr.bin/kpasswd/Makefile | 1 - kerberos5/usr.bin/krb5-config/Makefile | 1 - kerberos5/usr.bin/ksu/Makefile | 1 - kerberos5/usr.bin/string2key/Makefile | 1 - kerberos5/usr.bin/verify_krb5_conf/Makefile | 1 - kerberos5/usr.sbin/Makefile | 1 - kerberos5/usr.sbin/Makefile.inc | 1 - kerberos5/usr.sbin/iprop-log/Makefile | 1 - kerberos5/usr.sbin/kstash/Makefile | 1 - kerberos5/usr.sbin/ktutil/Makefile | 1 - lib/Makefile | 1 - lib/atf/libatf-c++/Makefile.inc | 1 - lib/atf/libatf-c++/tests/Makefile | 1 - lib/atf/libatf-c++/tests/Makefile.inc | 1 - lib/atf/libatf-c++/tests/detail/Makefile | 1 - lib/atf/libatf-c/Makefile.inc | 1 - lib/atf/libatf-c/tests/Makefile | 1 - lib/atf/libatf-c/tests/Makefile.inc | 1 - lib/atf/libatf-c/tests/detail/Makefile | 1 - lib/atf/tests/Makefile | 1 - lib/atf/tests/test-programs/Makefile | 1 - lib/clang/Makefile | 1 - lib/clang/Makefile.inc | 1 - lib/clang/headers/Makefile | 1 - lib/clang/libclang/Makefile | 1 - lib/clang/libclangminimal/Makefile | 1 - lib/clang/liblldb/Makefile | 1 - lib/clang/libllvm/Makefile | 1 - lib/clang/libllvmminimal/Makefile | 1 - lib/csu/Makefile | 1 - lib/csu/aarch64/Makefile | 1 - lib/csu/amd64/Makefile | 1 - lib/csu/arm/Makefile | 1 - lib/csu/i386/Makefile | 1 - lib/csu/powerpc/Makefile | 1 - lib/csu/powerpc64/Makefile | 1 - lib/csu/riscv/Makefile | 1 - lib/csu/tests/Makefile | 1 - lib/csu/tests/Makefile.inc | 1 - lib/csu/tests/Makefile.tests | 1 - lib/csu/tests/dso/Makefile | 1 - lib/csu/tests/dynamic/Makefile | 1 - lib/csu/tests/dynamiclib/Makefile | 1 - lib/csu/tests/dynamicpie/Makefile | 1 - lib/csu/tests/static/Makefile | 1 - lib/flua/libjail/Makefile | 1 - lib/geom/Makefile | 1 - lib/geom/Makefile.classes | 1 - lib/geom/Makefile.inc | 1 - lib/geom/cache/Makefile | 1 - lib/geom/concat/Makefile | 1 - lib/geom/eli/Makefile | 1 - lib/geom/journal/Makefile | 1 - lib/geom/label/Makefile | 1 - lib/geom/mirror/Makefile | 1 - lib/geom/mountver/Makefile | 1 - lib/geom/multipath/Makefile | 1 - lib/geom/nop/Makefile | 1 - lib/geom/part/Makefile | 1 - lib/geom/raid/Makefile | 1 - lib/geom/raid3/Makefile | 1 - lib/geom/shsec/Makefile | 1 - lib/geom/stripe/Makefile | 1 - lib/geom/union/Makefile | 1 - lib/geom/virstor/Makefile | 1 - lib/googletest/Makefile | 1 - lib/googletest/Makefile.inc | 1 - lib/googletest/gmock/Makefile | 1 - lib/googletest/gmock/Makefile.inc | 1 - lib/googletest/gmock_main/Makefile | 1 - lib/googletest/gmock_main/Makefile.inc | 1 - lib/googletest/gtest/Makefile | 1 - lib/googletest/gtest/Makefile.inc | 1 - lib/googletest/gtest_main/Makefile | 1 - lib/googletest/gtest_main/Makefile.inc | 1 - lib/googletest/tests/Makefile | 1 - lib/googletest/tests/Makefile.inc | 1 - lib/googletest/tests/gmock/Makefile | 1 - lib/googletest/tests/gmock_main/Makefile | 1 - lib/googletest/tests/gtest/Makefile | 1 - lib/googletest/tests/gtest_main/Makefile | 1 - lib/lib80211/Makefile | 1 - lib/lib9p/Makefile | 1 - lib/libalias/Makefile | 1 - lib/libalias/Makefile.inc | 1 - lib/libalias/libalias/Makefile | 1 - lib/libalias/modules/Makefile | 1 - lib/libalias/modules/Makefile.inc | 1 - lib/libalias/modules/dummy/Makefile | 1 - lib/libalias/modules/ftp/Makefile | 1 - lib/libalias/modules/irc/Makefile | 1 - lib/libalias/modules/nbt/Makefile | 1 - lib/libalias/modules/pptp/Makefile | 1 - lib/libalias/modules/skinny/Makefile | 1 - lib/libalias/modules/smedia/Makefile | 1 - lib/libbe/Makefile | 1 - lib/libbe/tests/Makefile | 1 - lib/libbearssl/Makefile | 1 - lib/libbearssl/Makefile.inc | 1 - lib/libbearssl/Makefile.libsa.inc | 1 - lib/libbegemot/Makefile | 1 - lib/libblacklist/Makefile | 1 - lib/libblocksruntime/Makefile | 1 - lib/libbsdstat/Makefile | 1 - lib/libbsnmp/Makefile | 1 - lib/libbsnmp/Makefile.inc | 1 - lib/libbsnmp/tests/Makefile | 1 - lib/libbz2/Makefile | 1 - lib/libc++/Makefile | 1 - lib/libc++experimental/Makefile | 1 - lib/libc/Makefile | 1 - lib/libc/aarch64/gen/Makefile.inc | 1 - lib/libc/amd64/gen/Makefile.inc | 1 - lib/libc/amd64/stdlib/Makefile.inc | 1 - lib/libc/arm/aeabi/Makefile.inc | 1 - lib/libc/arm/gen/Makefile.inc | 1 - lib/libc/arm/string/Makefile.inc | 1 - lib/libc/capability/Makefile.inc | 1 - lib/libc/compat-43/Makefile.inc | 1 - lib/libc/db/btree/Makefile.inc | 1 - lib/libc/db/db/Makefile.inc | 1 - lib/libc/db/hash/Makefile.inc | 1 - lib/libc/db/man/Makefile.inc | 1 - lib/libc/db/mpool/Makefile.inc | 1 - lib/libc/db/recno/Makefile.inc | 1 - lib/libc/db/test/Makefile | 1 - lib/libc/gdtoa/Makefile.inc | 1 - lib/libc/gen/Makefile.inc | 1 - lib/libc/gmon/Makefile.inc | 1 - lib/libc/i386/Makefile.inc | 1 - lib/libc/i386/gen/Makefile.inc | 1 - lib/libc/i386/stdlib/Makefile.inc | 1 - lib/libc/i386/string/Makefile.inc | 1 - lib/libc/iconv/Makefile.inc | 1 - lib/libc/inet/Makefile.inc | 1 - lib/libc/isc/Makefile.inc | 1 - lib/libc/locale/Makefile.inc | 1 - lib/libc/md/Makefile.inc | 1 - lib/libc/nameser/Makefile.inc | 1 - lib/libc/net/Makefile.inc | 1 - lib/libc/posix1e/Makefile.inc | 1 - lib/libc/powerpc/Makefile.inc | 1 - lib/libc/powerpc/gen/Makefile.common | 1 - lib/libc/powerpc/gen/Makefile.inc | 1 - lib/libc/powerpc64/Makefile.inc | 1 - lib/libc/powerpc64/gen/Makefile.inc | 1 - lib/libc/powerpc64/string/Makefile.inc | 1 - lib/libc/powerpcspe/Makefile.inc | 1 - lib/libc/powerpcspe/gen/Makefile.inc | 1 - lib/libc/quad/Makefile.inc | 1 - lib/libc/quad/TESTS/Makefile | 1 - lib/libc/regex/Makefile.inc | 1 - lib/libc/resolv/Makefile.inc | 1 - lib/libc/riscv/gen/Makefile.inc | 1 - lib/libc/rpc/Makefile.inc | 1 - lib/libc/stdio/Makefile.inc | 1 - lib/libc/stdlib/Makefile.inc | 1 - lib/libc/string/Makefile.inc | 1 - lib/libc/tests/Makefile | 1 - lib/libc/tests/Makefile.netbsd-tests | 1 - lib/libc/tests/c063/Makefile | 1 - lib/libc/tests/db/Makefile | 1 - lib/libc/tests/gen/Makefile | 1 - lib/libc/tests/gen/execve/Makefile | 1 - lib/libc/tests/gen/posix_spawn/Makefile | 1 - lib/libc/tests/hash/Makefile | 1 - lib/libc/tests/iconv/Makefile | 1 - lib/libc/tests/inet/Makefile | 1 - lib/libc/tests/locale/Makefile | 1 - lib/libc/tests/net/Makefile | 1 - lib/libc/tests/net/getaddrinfo/Makefile | 1 - lib/libc/tests/nss/Makefile | 1 - lib/libc/tests/regex/Makefile | 1 - lib/libc/tests/regex/Makefile.inc | 1 - lib/libc/tests/resolv/Makefile | 1 - lib/libc/tests/rpc/Makefile | 1 - lib/libc/tests/setjmp/Makefile | 1 - lib/libc/tests/ssp/Makefile | 1 - lib/libc/tests/stdio/Makefile | 1 - lib/libc/tests/stdlib/Makefile | 1 - lib/libc/tests/stdlib/dynthr_mod/Makefile | 1 - lib/libc/tests/string/Makefile | 1 - lib/libc/tests/sys/Makefile | 1 - lib/libc/tests/termios/Makefile | 1 - lib/libc/tests/time/Makefile | 1 - lib/libc/tests/tls/Makefile | 1 - lib/libc/tests/tls/dso/Makefile | 1 - lib/libc/tests/tls_dso/Makefile | 1 - lib/libc/tests/ttyio/Makefile | 1 - lib/libc/uuid/Makefile.inc | 1 - lib/libc/x86/gen/Makefile.inc | 1 - lib/libc/xdr/Makefile.inc | 1 - lib/libc/yp/Makefile.inc | 1 - lib/libc_nonshared/Makefile | 1 - lib/libc_nonshared/Makefile.iconv | 1 - lib/libcalendar/Makefile | 1 - lib/libcam/Makefile | 1 - lib/libcam/tests/Makefile | 1 - lib/libcapsicum/Makefile | 1 - lib/libcasper/Makefile | 1 - lib/libcasper/Makefile.inc | 1 - lib/libcasper/libcasper/Makefile | 1 - lib/libcasper/services/Makefile | 1 - lib/libcasper/services/Makefile.inc | 1 - lib/libcasper/services/cap_dns/Makefile | 1 - lib/libcasper/services/cap_dns/tests/Makefile | 1 - lib/libcasper/services/cap_fileargs/Makefile | 1 - lib/libcasper/services/cap_fileargs/tests/Makefile | 1 - lib/libcasper/services/cap_grp/Makefile | 1 - lib/libcasper/services/cap_grp/tests/Makefile | 1 - lib/libcasper/services/cap_net/Makefile | 1 - lib/libcasper/services/cap_net/tests/Makefile | 1 - lib/libcasper/services/cap_netdb/Makefile | 1 - lib/libcasper/services/cap_netdb/tests/Makefile | 1 - lib/libcasper/services/cap_pwd/Makefile | 1 - lib/libcasper/services/cap_pwd/tests/Makefile | 1 - lib/libcasper/services/cap_sysctl/Makefile | 1 - lib/libcasper/services/cap_sysctl/tests/Makefile | 1 - lib/libcasper/services/cap_syslog/Makefile | 1 - lib/libcasper/services/tests/Makefile | 1 - lib/libcasper/tests/Makefile | 1 - lib/libcbor/Makefile | 1 - lib/libclang_rt/Makefile | 1 - lib/libclang_rt/Makefile.inc | 1 - lib/libclang_rt/asan-preinit/Makefile | 1 - lib/libclang_rt/asan/Makefile | 1 - lib/libclang_rt/asan_cxx/Makefile | 1 - lib/libclang_rt/asan_dynamic/Makefile | 1 - lib/libclang_rt/asan_static/Makefile | 1 - lib/libclang_rt/cfi/Makefile | 1 - lib/libclang_rt/cfi_diag/Makefile | 1 - lib/libclang_rt/dd/Makefile | 1 - lib/libclang_rt/fuzzer/Makefile | 1 - lib/libclang_rt/fuzzer_interceptors/Makefile | 1 - lib/libclang_rt/fuzzer_no_main/Makefile | 1 - lib/libclang_rt/include/Makefile | 1 - lib/libclang_rt/msan/Makefile | 1 - lib/libclang_rt/msan_cxx/Makefile | 1 - lib/libclang_rt/profile/Makefile | 1 - lib/libclang_rt/safestack/Makefile | 1 - lib/libclang_rt/stats/Makefile | 1 - lib/libclang_rt/stats_client/Makefile | 1 - lib/libclang_rt/tsan/Makefile | 1 - lib/libclang_rt/tsan_cxx/Makefile | 1 - lib/libclang_rt/ubsan_minimal/Makefile | 1 - lib/libclang_rt/ubsan_standalone/Makefile | 1 - lib/libclang_rt/ubsan_standalone_cxx/Makefile | 1 - lib/libclang_rt/xray-basic/Makefile | 1 - lib/libclang_rt/xray-fdr/Makefile | 1 - lib/libclang_rt/xray-profiling/Makefile | 1 - lib/libclang_rt/xray/Makefile | 1 - lib/libcom_err/Makefile | 1 - lib/libcompat/Makefile | 1 - lib/libcompiler_rt/Makefile | 1 - lib/libcrypt/tests/Makefile | 1 - lib/libdevctl/Makefile | 1 - lib/libdevdctl/Makefile | 1 - lib/libdevdctl/tests/Makefile | 1 - lib/libdevinfo/Makefile | 1 - lib/libdevstat/Makefile | 1 - lib/libdl/Makefile | 1 - lib/libdpv/Makefile | 1 - lib/libedit/readline/Makefile | 1 - lib/libelf/Makefile | 1 - lib/libevent1/Makefile | 1 - lib/libexecinfo/Makefile | 1 - lib/libexecinfo/tests/Makefile | 1 - lib/libexpat/Makefile | 1 - lib/libfetch/Makefile | 1 - lib/libfigpar/Makefile | 1 - lib/libgcc_eh/Makefile | 1 - lib/libgcc_eh/Makefile.inc | 1 - lib/libgcc_s/Makefile | 1 - lib/libgeom/Makefile | 1 - lib/libgpio/Makefile | 1 - lib/libgssapi/Makefile | 1 - lib/libiconv_modules/BIG5/Makefile | 1 - lib/libiconv_modules/DECHanyu/Makefile | 1 - lib/libiconv_modules/EUC/Makefile | 1 - lib/libiconv_modules/EUCTW/Makefile | 1 - lib/libiconv_modules/GBK2K/Makefile | 1 - lib/libiconv_modules/HZ/Makefile | 1 - lib/libiconv_modules/ISO2022/Makefile | 1 - lib/libiconv_modules/JOHAB/Makefile | 1 - lib/libiconv_modules/MSKanji/Makefile | 1 - lib/libiconv_modules/Makefile | 1 - lib/libiconv_modules/Makefile.inc | 1 - lib/libiconv_modules/UES/Makefile | 1 - lib/libiconv_modules/UTF1632/Makefile | 1 - lib/libiconv_modules/UTF7/Makefile | 1 - lib/libiconv_modules/UTF8/Makefile | 1 - lib/libiconv_modules/VIQR/Makefile | 1 - lib/libiconv_modules/ZW/Makefile | 1 - lib/libiconv_modules/iconv_none/Makefile | 1 - lib/libiconv_modules/iconv_std/Makefile | 1 - lib/libiconv_modules/mapper_646/Makefile | 1 - lib/libiconv_modules/mapper_none/Makefile | 1 - lib/libiconv_modules/mapper_parallel/Makefile | 1 - lib/libiconv_modules/mapper_serial/Makefile | 1 - lib/libiconv_modules/mapper_std/Makefile | 1 - lib/libiconv_modules/mapper_zone/Makefile | 1 - lib/libifconfig/Makefile | 1 - lib/libipt/Makefile | 1 - lib/libjail/Makefile | 1 - lib/libkiconv/Makefile | 1 - lib/libkvm/Makefile | 1 - lib/libkvm/tests/Makefile | 1 - lib/libldns/Makefile | 1 - lib/liblua/Makefile | 1 - lib/liblutok/Makefile | 1 - lib/liblzma/Makefile | 1 - lib/libmd/Makefile | 1 - lib/libmemstat/Makefile | 1 - lib/libmilter/Makefile | 1 - lib/libmixer/Makefile | 1 - lib/libmp/Makefile | 1 - lib/libmp/tests/Makefile | 1 - lib/libmt/Makefile | 1 - lib/libnetbsd/Makefile | 1 - lib/libnv/Makefile | 1 - lib/libnv/tests/Makefile | 1 - lib/libomp/Makefile | 1 - lib/libopenbsd/Makefile | 1 - lib/libopencsd/Makefile | 1 - lib/libpam/modules/Makefile.inc | 1 - lib/libpam/modules/pam_chroot/Makefile | 1 - lib/libpam/modules/pam_echo/Makefile | 1 - lib/libpam/modules/pam_exec/Makefile | 1 - lib/libpam/modules/pam_ftpusers/Makefile | 1 - lib/libpam/modules/pam_group/Makefile | 1 - lib/libpam/modules/pam_guest/Makefile | 1 - lib/libpam/modules/pam_passwdqc/Makefile | 1 - lib/libpam/modules/pam_rhosts/Makefile | 1 - lib/libpam/modules/pam_xdg/Makefile | 1 - lib/libpam/pam.d/Makefile | 1 - lib/libpathconv/Makefile | 1 - lib/libpathconv/tests/Makefile | 1 - lib/libpfctl/Makefile | 1 - lib/libpmc/Makefile | 1 - lib/libpmc/Makefile.inc | 1 - lib/libpmc/pmu-events/Makefile | 1 - lib/libproc/Makefile | 1 - lib/libproc/Makefile.inc | 1 - lib/libproc/tests/Makefile | 1 - lib/libprocstat/Makefile | 1 - lib/libprocstat/zfs/Makefile | 1 - lib/libregex/Makefile | 1 - lib/libregex/tests/Makefile | 1 - lib/librpcsec_gss/Makefile | 1 - lib/librpcsvc/Makefile | 1 - lib/librss/Makefile | 1 - lib/librt/tests/Makefile | 1 - lib/librtld_db/Makefile | 1 - lib/libsbuf/Makefile | 1 - lib/libsbuf/tests/Makefile | 1 - lib/libsecureboot/Makefile | 1 - lib/libsecureboot/Makefile.inc | 1 - lib/libsecureboot/Makefile.libsa.inc | 1 - lib/libsecureboot/openpgp/Makefile.inc | 1 - lib/libsecureboot/tests/Makefile | 1 - lib/libsm/Makefile | 1 - lib/libsmb/Makefile | 1 - lib/libsmdb/Makefile | 1 - lib/libsmutil/Makefile | 1 - lib/libsqlite3/Makefile | 1 - lib/libssp/Makefile | 1 - lib/libssp_nonshared/Makefile | 1 - lib/libstats/Makefile | 1 - lib/libstdbuf/Makefile | 1 - lib/libstdthreads/Makefile | 1 - lib/libsysdecode/Makefile | 1 - lib/libtelnet/Makefile | 1 - lib/libthr/Makefile | 1 - lib/libthr/arch/aarch64/Makefile.inc | 1 - lib/libthr/sys/Makefile.inc | 1 - lib/libthr/tests/Makefile | 1 - lib/libthr/tests/dlopen/Makefile | 1 - lib/libthr/tests/dlopen/dso/Makefile | 1 - lib/libthr/thread/Makefile.inc | 1 - lib/libthread_db/Makefile | 1 - lib/libucl/Makefile | 1 - lib/libufs/Makefile | 1 - lib/libugidfw/Makefile | 1 - lib/libulog/Makefile | 1 - lib/libunbound/Makefile | 1 - lib/libutil/Makefile | 1 - lib/libutil/tests/Makefile | 1 - lib/libveriexec/Makefile | 1 - lib/libxo/Makefile | 1 - lib/libxo/encoder/Makefile | 1 - lib/libxo/encoder/csv/Makefile | 1 - lib/libxo/libxo/Makefile | 1 - lib/libxo/tests/Makefile | 1 - lib/libxo/tests/encoder/Makefile | 1 - lib/liby/Makefile | 1 - lib/libypclnt/Makefile | 1 - lib/libzstd/Makefile | 1 - lib/msun/aarch64/Makefile.inc | 1 - lib/msun/amd64/Makefile.inc | 1 - lib/msun/arm/Makefile.inc | 1 - lib/msun/i387/Makefile.inc | 1 - lib/msun/powerpc/Makefile.inc | 1 - lib/msun/riscv/Makefile.inc | 1 - lib/msun/tests/Makefile | 1 - lib/ncurses/Makefile | 1 - lib/ncurses/Makefile.inc | 1 - lib/ncurses/form/Makefile | 1 - lib/ncurses/menu/Makefile | 1 - lib/ncurses/ncurses/Makefile | 1 - lib/ncurses/panel/Makefile | 1 - lib/ncurses/tinfo/Makefile | 1 - lib/ofed/Makefile | 1 - lib/ofed/Makefile.inc | 1 - lib/ofed/complib/Makefile | 1 - lib/ofed/include/Makefile | 1 - lib/ofed/libcxgb4/Makefile | 1 - lib/ofed/libibcm/Makefile | 1 - lib/ofed/libibmad/Makefile | 1 - lib/ofed/libibnetdisc/Makefile | 1 - lib/ofed/libibumad/Makefile | 1 - lib/ofed/libibverbs/Makefile | 1 - lib/ofed/libmlx4/Makefile | 1 - lib/ofed/libmlx5/Makefile | 1 - lib/ofed/libopensm/Makefile | 1 - lib/ofed/librdmacm/Makefile | 1 - lib/ofed/libvendor/Makefile | 1 - lib/tests/Makefile | 1 - libexec/Makefile.inc | 1 - libexec/atf/atf-check/Makefile.inc | 1 - libexec/atf/atf-check/tests/Makefile | 1 - libexec/atf/atf-sh/tests/Makefile | 1 - libexec/atf/tests/Makefile | 1 - libexec/atrun/Makefile | 1 - libexec/blacklistd-helper/Makefile | 1 - libexec/bootpd/Makefile.inc | 1 - libexec/comsat/Makefile | 1 - libexec/dma/Makefile | 1 - libexec/dma/Makefile.inc | 1 - libexec/dma/dma-mbox-create/Makefile | 1 - libexec/dma/dmagent/Makefile | 1 - libexec/fingerd/Makefile | 1 - libexec/flua/Makefile | 1 - libexec/ftpd/Makefile | 1 - libexec/getty/Makefile | 1 - libexec/hyperv/Makefile | 1 - libexec/mail.local/Makefile | 1 - libexec/makewhatis.local/Makefile | 1 - libexec/mknetid/Makefile | 1 - libexec/phttpget/Makefile | 1 - libexec/pppoed/Makefile | 1 - libexec/rbootd/Makefile | 1 - libexec/rc/Makefile | 1 - libexec/rc/rc.d/Makefile | 1 - libexec/revnetgroup/Makefile | 1 - libexec/rpc.rquotad/Makefile | 1 - libexec/rpc.rstatd/Makefile | 1 - libexec/rpc.rusersd/Makefile | 1 - libexec/rpc.rwalld/Makefile | 1 - libexec/rpc.sprayd/Makefile | 1 - libexec/rtld-elf/Makefile | 1 - libexec/rtld-elf/amd64/Makefile.inc | 1 - libexec/rtld-elf/arm/Makefile.inc | 1 - libexec/rtld-elf/i386/Makefile.inc | 1 - libexec/rtld-elf/powerpc64/Makefile.inc | 1 - libexec/rtld-elf/tests/Makefile | 1 - libexec/rtld-elf/tests/Makefile.inc | 1 - libexec/rtld-elf/tests/libdeep/Makefile | 1 - libexec/rtld-elf/tests/libpythagoras/Makefile | 1 - libexec/rtld-elf/tests/libval/Makefile | 1 - libexec/rtld-elf/tests/libval2/Makefile | 1 - libexec/rtld-elf/tests/rtld_deepbind/Makefile | 1 - libexec/rtld-elf/tests/target/Makefile | 1 - libexec/rtld-elf32/Makefile | 1 - libexec/save-entropy/Makefile | 1 - libexec/smrsh/Makefile | 1 - libexec/talkd/Makefile | 1 - libexec/tcpd/Makefile | 1 - libexec/tests/Makefile | 1 - libexec/tftp-proxy/Makefile | 1 - libexec/tftpd/Makefile | 1 - libexec/tftpd/tests/Makefile | 1 - libexec/ulog-helper/Makefile | 1 - libexec/ypxfr/Makefile | 1 - rescue/Makefile | 1 - rescue/rescue/Makefile | 1 - sbin/Makefile | 1 - sbin/Makefile.amd64 | 1 - sbin/Makefile.arm | 1 - sbin/Makefile.i386 | 1 - sbin/Makefile.inc | 1 - sbin/Makefile.powerpc64 | 1 - sbin/adjkerntz/Makefile | 1 - sbin/bectl/Makefile | 1 - sbin/bectl/tests/Makefile | 1 - sbin/bsdlabel/Makefile | 1 - sbin/camcontrol/Makefile | 1 - sbin/ccdconfig/Makefile | 1 - sbin/clri/Makefile | 1 - sbin/comcontrol/Makefile | 1 - sbin/conscontrol/Makefile | 1 - sbin/ddb/Makefile | 1 - sbin/decryptcore/Makefile | 1 - sbin/devd/Makefile | 1 - sbin/devd/tests/Makefile | 1 - sbin/devfs/Makefile | 1 - sbin/devmatch/Makefile | 1 - sbin/dhclient/tests/Makefile | 1 - sbin/dmesg/Makefile | 1 - sbin/dump/Makefile | 1 - sbin/dumpfs/Makefile | 1 - sbin/dumpon/Makefile | 1 - sbin/etherswitchcfg/Makefile | 1 - sbin/fdisk/Makefile | 1 - sbin/fsck_ffs/Makefile | 1 - sbin/geom/Makefile | 1 - sbin/ggate/Makefile | 1 - sbin/ggate/Makefile.inc | 1 - sbin/ggate/ggatec/Makefile | 1 - sbin/ggate/ggated/Makefile | 1 - sbin/ggate/ggatel/Makefile | 1 - sbin/growfs/tests/Makefile | 1 - sbin/gvinum/Makefile | 1 - sbin/hastctl/Makefile | 1 - sbin/hastd/Makefile | 1 - sbin/ifconfig/Makefile | 1 - sbin/ifconfig/tests/Makefile | 1 - sbin/init/Makefile | 1 - sbin/ipf/Makefile | 1 - sbin/ipf/Makefile.inc | 1 - sbin/ipf/ipf/Makefile | 1 - sbin/ipf/ipfs/Makefile | 1 - sbin/ipf/ipfstat/Makefile | 1 - sbin/ipf/ipftest/Makefile | 1 - sbin/ipf/ipmon/Makefile | 1 - sbin/ipf/ipnat/Makefile | 1 - sbin/ipf/ippool/Makefile | 1 - sbin/ipf/ipresend/Makefile | 1 - sbin/ipf/ipscan/Makefile | 1 - sbin/ipf/libipf/Makefile | 1 - sbin/ipfw/Makefile | 1 - sbin/ldconfig/Makefile | 1 - sbin/md5/Makefile | 1 - sbin/md5/tests/Makefile | 1 - sbin/mdconfig/Makefile | 1 - sbin/mdconfig/tests/Makefile | 1 - sbin/mdmfs/Makefile | 1 - sbin/mknod/Makefile | 1 - sbin/mksnap_ffs/Makefile | 1 - sbin/mount/Makefile | 1 - sbin/mount_cd9660/Makefile | 1 - sbin/mount_fusefs/Makefile | 1 - sbin/mount_nfs/Makefile | 1 - sbin/mount_nullfs/Makefile | 1 - sbin/mount_udf/Makefile | 1 - sbin/mount_unionfs/Makefile | 1 - sbin/natd/Makefile | 1 - sbin/newfs/Makefile | 1 - sbin/newfs_msdos/Makefile | 1 - sbin/nfsiod/Makefile | 1 - sbin/nos-tun/Makefile | 1 - sbin/nvmecontrol/modules/Makefile | 1 - sbin/nvmecontrol/modules/Makefile.inc | 1 - sbin/nvmecontrol/modules/intel/Makefile | 1 - sbin/nvmecontrol/modules/samsung/Makefile | 1 - sbin/nvmecontrol/modules/wdc/Makefile | 1 - sbin/nvmecontrol/tests/Makefile | 1 - sbin/pfctl/Makefile | 1 - sbin/pfctl/tests/Makefile | 1 - sbin/pfctl/tests/files/Makefile | 1 - sbin/pfilctl/Makefile | 1 - sbin/pflogd/Makefile | 1 - sbin/pflowctl/Makefile | 1 - sbin/ping/Makefile | 1 - sbin/ping/tests/Makefile | 1 - sbin/quotacheck/Makefile | 1 - sbin/reboot/Makefile | 1 - sbin/recoverdisk/Makefile | 1 - sbin/resolvconf/Makefile | 1 - sbin/restore/Makefile | 1 - sbin/route/Makefile | 1 - sbin/route/tests/Makefile | 1 - sbin/routed/Makefile.inc | 1 - sbin/savecore/Makefile | 1 - sbin/shutdown/Makefile | 1 - sbin/swapon/Makefile | 1 - sbin/sysctl/Makefile | 1 - sbin/sysctl/tests/Makefile | 1 - sbin/tests/Makefile | 1 - sbin/tunefs/Makefile | 1 - sbin/umount/Makefile | 1 - sbin/veriexec/Makefile | 1 - secure/Makefile | 1 - secure/Makefile.inc | 1 - secure/caroot/Makefile | 1 - secure/caroot/Makefile.inc | 1 - secure/caroot/trusted/Makefile | 1 - secure/caroot/untrusted/Makefile | 1 - secure/lib/Makefile | 1 - secure/lib/Makefile.inc | 1 - secure/lib/libcrypto/Makefile | 1 - secure/lib/libcrypto/Makefile.common | 1 - secure/lib/libcrypto/Makefile.inc | 1 - secure/lib/libcrypto/engines/Makefile | 1 - secure/lib/libcrypto/engines/Makefile.inc | 1 - secure/lib/libcrypto/engines/capi/Makefile | 1 - secure/lib/libcrypto/engines/devcrypto/Makefile | 1 - secure/lib/libcrypto/engines/loader_attic/Makefile | 1 - secure/lib/libcrypto/engines/padlock/Makefile | 1 - secure/lib/libcrypto/modules/Makefile | 1 - secure/lib/libcrypto/modules/Makefile.inc | 1 - secure/lib/libcrypto/modules/fips/Makefile | 1 - secure/lib/libcrypto/modules/legacy/Makefile | 1 - secure/lib/libssh/Makefile | 1 - secure/lib/libssl/Makefile | 1 - secure/lib/tests/Makefile | 1 - secure/libexec/Makefile | 1 - secure/libexec/Makefile.inc | 1 - secure/libexec/sftp-server/Makefile | 1 - secure/libexec/ssh-keysign/Makefile | 1 - secure/libexec/ssh-pkcs11-helper/Makefile | 1 - secure/libexec/tests/Makefile | 1 - secure/tests/Makefile | 1 - secure/usr.bin/Makefile | 1 - secure/usr.bin/Makefile.inc | 1 - secure/usr.bin/openssl/Makefile | 1 - secure/usr.bin/scp/Makefile | 1 - secure/usr.bin/sftp/Makefile | 1 - secure/usr.bin/ssh-add/Makefile | 1 - secure/usr.bin/ssh-agent/Makefile | 1 - secure/usr.bin/ssh-keygen/Makefile | 1 - secure/usr.bin/ssh-keyscan/Makefile | 1 - secure/usr.bin/ssh/Makefile | 1 - secure/usr.bin/tests/Makefile | 1 - secure/usr.sbin/Makefile | 1 - secure/usr.sbin/Makefile.inc | 1 - secure/usr.sbin/sshd/Makefile | 1 - secure/usr.sbin/tests/Makefile | 1 - share/Makefile | 1 - share/Makefile.inc | 1 - share/colldef/Makefile | 1 - share/ctypedef/Makefile | 1 - share/dict/Makefile | 1 - share/doc/IPv6/Makefile | 1 - share/doc/Makefile | 1 - share/doc/legal/Makefile | 1 - share/doc/legal/Makefile.armv7 | 1 - share/doc/legal/imx/Makefile | 1 - share/doc/legal/intel_ipw/Makefile | 1 - share/doc/legal/intel_iwi/Makefile | 1 - share/doc/legal/intel_iwlwififw/Makefile | 1 - share/doc/legal/intel_iwn/Makefile | 1 - share/doc/legal/intel_wpi/Makefile | 1 - share/doc/legal/realtek/Makefile | 1 - share/doc/llvm/Makefile | 1 - share/doc/llvm/clang/Makefile | 1 - share/doc/papers/Makefile | 1 - share/doc/papers/beyond4.3/Makefile | 1 - share/doc/papers/bufbio/Makefile | 1 - share/doc/papers/contents/Makefile | 1 - share/doc/papers/devfs/Makefile | 1 - share/doc/papers/diskperf/Makefile | 1 - share/doc/papers/fsinterface/Makefile | 1 - share/doc/papers/jail/Makefile | 1 - share/doc/papers/kernmalloc/Makefile | 1 - share/doc/papers/kerntune/Makefile | 1 - share/doc/papers/malloc/Makefile | 1 - share/doc/papers/newvm/Makefile | 1 - share/doc/papers/relengr/Makefile | 1 - share/doc/papers/sysperf/Makefile | 1 - share/doc/papers/timecounter/Makefile | 1 - share/doc/pjdfstest/Makefile | 1 - share/doc/psd/01.cacm/Makefile | 1 - share/doc/psd/02.implement/Makefile | 1 - share/doc/psd/03.iosys/Makefile | 1 - share/doc/psd/04.uprog/Makefile | 1 - share/doc/psd/05.sysman/Makefile | 1 - share/doc/psd/06.Clang/Makefile | 1 - share/doc/psd/12.make/Makefile | 1 - share/doc/psd/15.yacc/Makefile | 1 - share/doc/psd/16.lex/Makefile | 1 - share/doc/psd/17.m4/Makefile | 1 - share/doc/psd/18.gprof/Makefile | 1 - share/doc/psd/20.ipctut/Makefile | 1 - share/doc/psd/21.ipc/Makefile | 1 - share/doc/psd/22.rpcgen/Makefile | 1 - share/doc/psd/23.rpc/Makefile | 1 - share/doc/psd/24.xdr/Makefile | 1 - share/doc/psd/25.xdrrfc/Makefile | 1 - share/doc/psd/26.rpcrfc/Makefile | 1 - share/doc/psd/27.nfsrpc/Makefile | 1 - share/doc/psd/Makefile | 1 - share/doc/psd/contents/Makefile | 1 - share/doc/psd/title/Makefile | 1 - share/doc/smm/01.setup/Makefile | 1 - share/doc/smm/02.config/Makefile | 1 - share/doc/smm/03.fsck/Makefile | 1 - share/doc/smm/04.quotas/Makefile | 1 - share/doc/smm/05.fastfs/Makefile | 1 - share/doc/smm/06.nfs/Makefile | 1 - share/doc/smm/07.lpd/Makefile | 1 - share/doc/smm/08.sendmailop/Makefile | 1 - share/doc/smm/11.timedop/Makefile | 1 - share/doc/smm/12.timed/Makefile | 1 - share/doc/smm/18.net/Makefile | 1 - share/doc/smm/Makefile | 1 - share/doc/smm/contents/Makefile | 1 - share/doc/smm/title/Makefile | 1 - share/doc/usd/04.csh/Makefile | 1 - share/doc/usd/05.dc/Makefile | 1 - share/doc/usd/06.bc/Makefile | 1 - share/doc/usd/07.mail/Makefile | 1 - share/doc/usd/10.exref/Makefile | 1 - share/doc/usd/10.exref/Makefile.inc | 1 - share/doc/usd/10.exref/exref/Makefile | 1 - share/doc/usd/10.exref/summary/Makefile | 1 - share/doc/usd/11.vitut/Makefile | 1 - share/doc/usd/12.vi/Makefile | 1 - share/doc/usd/12.vi/Makefile.inc | 1 - share/doc/usd/12.vi/summary/Makefile | 1 - share/doc/usd/12.vi/vi/Makefile | 1 - share/doc/usd/12.vi/viapwh/Makefile | 1 - share/doc/usd/13.viref/Makefile | 1 - share/doc/usd/18.msdiffs/Makefile | 1 - share/doc/usd/19.memacros/Makefile | 1 - share/doc/usd/20.meref/Makefile | 1 - share/doc/usd/21.troff/Makefile | 1 - share/doc/usd/Makefile | 1 - share/doc/usd/contents/Makefile | 1 - share/doc/usd/title/Makefile | 1 - share/examples/FreeBSD_version/Makefile | 1 - share/examples/find_interface/Makefile | 1 - share/examples/hwpmc/Makefile | 1 - share/examples/ipfilter/Makefile | 1 - share/examples/kld/cdev/Makefile | 1 - share/examples/kld/dyn_sysctl/Makefile | 1 - share/examples/kld/firmware/Makefile | 1 - share/examples/kld/firmware/fwconsumer/Makefile | 1 - share/examples/kld/firmware/fwimage/Makefile | 1 - share/examples/kld/khelp/Makefile | 1 - share/examples/kld/random_adaptor/Makefile | 1 - share/examples/kld/syscall/Makefile | 1 - share/examples/libusb20/Makefile | 1 - share/examples/libvgl/Makefile | 1 - share/examples/perfmon/Makefile | 1 - share/examples/pf/Makefile | 1 - share/examples/scsi_target/Makefile | 1 - share/examples/smbfs/Makefile | 1 - share/examples/smbfs/print/Makefile | 1 - share/examples/tests/Makefile | 1 - share/examples/tests/tests/Makefile | 1 - share/examples/tests/tests/atf/Makefile | 1 - share/examples/tests/tests/plain/Makefile | 1 - share/examples/tests/tests/tap/Makefile | 1 - share/i18n/csmapper/Makefile.inc | 1 - share/i18n/esdb/Makefile.inc | 1 - share/keys/Makefile | 1 - share/keys/pkg/Makefile | 1 - share/keys/pkg/trusted/Makefile | 1 - share/man/Makefile | 1 - share/man/man1/Makefile | 1 - share/man/man3/Makefile | 1 - share/man/man3lua/Makefile | 1 - share/man/man4/Makefile | 1 - share/man/man4/man4.aarch64/Makefile | 1 - share/man/man4/man4.arm/Makefile | 1 - share/man/man4/man4.i386/Makefile | 1 - share/man/man4/man4.powerpc/Makefile | 1 - share/man/man5/Makefile | 1 - share/man/man6/Makefile | 1 - share/man/man7/Makefile | 1 - share/man/man8/Makefile | 1 - share/man/man9/Makefile | 1 - share/misc/Makefile | 1 - share/mk/Makefile | 1 - share/numericdef/Makefile | 1 - share/security/Makefile | 1 - share/skel/Makefile | 1 - share/snmp/Makefile | 1 - share/snmp/mibs/Makefile | 1 - share/syscons/Makefile | 1 - share/syscons/Makefile.inc | 1 - share/syscons/fonts/Makefile | 1 - share/syscons/keymaps/Makefile | 1 - share/syscons/scrnmaps/Makefile | 1 - share/tabset/Makefile | 1 - share/termcap/Makefile | 1 - share/tests/Makefile | 1 - share/timedef/Makefile | 1 - share/vt/Makefile | 1 - share/vt/fonts/Makefile | 1 - share/vt/keymaps/Makefile | 1 - share/zoneinfo/Makefile | 1 - share/zoneinfo/tests/Makefile | 1 - stand/Makefile | 1 - stand/Makefile.amd64 | 1 - stand/Makefile.inc | 1 - stand/arm64/Makefile | 1 - stand/defaults/Makefile | 1 - stand/efi/Makefile | 1 - stand/efi/Makefile.inc | 1 - stand/efi/boot1/Makefile | 1 - stand/efi/fdt/Makefile | 1 - stand/efi/libefi/Makefile | 1 - stand/efi/loader/Makefile | 1 - stand/efi/loader/arch/amd64/Makefile.inc | 1 - stand/efi/loader/arch/arm/Makefile.inc | 1 - stand/efi/loader/arch/arm64/Makefile.inc | 1 - stand/efi/loader/arch/riscv/Makefile.inc | 1 - stand/efi/loader_4th/Makefile | 1 - stand/efi/loader_lua/Makefile | 1 - stand/efi/loader_simp/Makefile | 1 - stand/fdt/Makefile | 1 - stand/ficl32/Makefile | 1 - stand/fonts/Makefile | 1 - stand/forth/Makefile | 1 - stand/i386/Makefile | 1 - stand/i386/boot0/Makefile | 1 - stand/i386/boot0sio/Makefile | 1 - stand/i386/boot2/Makefile | 1 - stand/i386/btx/Makefile | 1 - stand/i386/btx/Makefile.inc | 1 - stand/i386/btx/btx/Makefile | 1 - stand/i386/btx/btxldr/Makefile | 1 - stand/i386/btx/lib/Makefile | 1 - stand/i386/cdboot/Makefile | 1 - stand/i386/gptboot/Makefile | 1 - stand/i386/gptzfsboot/Makefile | 1 - stand/i386/isoboot/Makefile | 1 - stand/i386/libi386/Makefile | 1 - stand/i386/loader_4th/Makefile | 1 - stand/i386/loader_lua/Makefile | 1 - stand/i386/loader_simp/Makefile | 1 - stand/i386/mbr/Makefile | 1 - stand/i386/pmbr/Makefile | 1 - stand/i386/pxeldr/Makefile | 1 - stand/i386/zfsboot/Makefile | 1 - stand/images/Makefile | 1 - stand/kboot/kboot/Makefile | 1 - stand/liblua/Makefile | 1 - stand/liblua32/Makefile | 1 - stand/libofw/Makefile | 1 - stand/libsa/zfs/Makefile.inc | 1 - stand/libsa32/Makefile | 1 - stand/lua/Makefile | 1 - stand/man/Makefile | 1 - stand/powerpc/Makefile | 1 - stand/powerpc/Makefile.inc | 1 - stand/powerpc/boot1.chrp/Makefile | 1 - stand/powerpc/ofw/Makefile | 1 - stand/uboot/Makefile | 1 - stand/uboot/arch/powerpc/Makefile.inc | 1 - stand/usb/tools/Makefile | 1 - stand/userboot/Makefile | 1 - stand/userboot/Makefile.inc | 1 - stand/userboot/test/Makefile | 1 - stand/userboot/userboot/Makefile | 1 - stand/userboot/userboot_4th/Makefile | 1 - stand/userboot/userboot_lua/Makefile | 1 - sys/Makefile | 1 - sys/amd64/Makefile | 1 - sys/contrib/device-tree/Makefile | 1 - sys/contrib/libsodium/contrib/Makefile.am | 1 - sys/contrib/libsodium/dist-build/Makefile.am | 1 - sys/contrib/libsodium/src/Makefile.am | 1 - sys/contrib/libsodium/src/libsodium/include/Makefile.am | 1 - sys/contrib/libsodium/test/default/Makefile.am | 1 - sys/crypto/rijndael/Makefile | 1 - sys/dts/Makefile | 1 - sys/dts/Makefile.inc | 1 - sys/dts/arm/Makefile | 1 - sys/dts/arm/Makefile.inc | 1 - sys/dts/arm/overlays/Makefile | 1 - sys/dts/arm64/Makefile | 1 - sys/dts/arm64/Makefile.inc | 1 - sys/dts/arm64/overlays/Makefile | 1 - sys/dts/powerpc/Makefile | 1 - sys/i386/Makefile | 1 - sys/modules/3dfx/Makefile | 1 - sys/modules/3dfx_linux/Makefile | 1 - sys/modules/Makefile | 1 - sys/modules/Makefile.inc | 1 - sys/modules/aac/Makefile | 1 - sys/modules/aac/Makefile.inc | 1 - sys/modules/aac/aac_linux/Makefile | 1 - sys/modules/aacraid/Makefile | 1 - sys/modules/aacraid/Makefile.inc | 1 - sys/modules/aacraid/aacraid_linux/Makefile | 1 - sys/modules/accf_data/Makefile | 1 - sys/modules/accf_dns/Makefile | 1 - sys/modules/accf_http/Makefile | 1 - sys/modules/accf_tls/Makefile | 1 - sys/modules/acl_nfs4/Makefile | 1 - sys/modules/acl_posix1e/Makefile | 1 - sys/modules/acpi/Makefile | 1 - sys/modules/acpi/Makefile.inc | 1 - sys/modules/acpi/acpi_asus/Makefile | 1 - sys/modules/acpi/acpi_asus_wmi/Makefile | 1 - sys/modules/acpi/acpi_dock/Makefile | 1 - sys/modules/acpi/acpi_fujitsu/Makefile | 1 - sys/modules/acpi/acpi_ged/Makefile | 1 - sys/modules/acpi/acpi_hp/Makefile | 1 - sys/modules/acpi/acpi_ibm/Makefile | 1 - sys/modules/acpi/acpi_panasonic/Makefile | 1 - sys/modules/acpi/acpi_rapidstart/Makefile | 1 - sys/modules/acpi/acpi_sony/Makefile | 1 - sys/modules/acpi/acpi_toshiba/Makefile | 1 - sys/modules/acpi/acpi_video/Makefile | 1 - sys/modules/acpi/acpi_wmi/Makefile | 1 - sys/modules/acpi/aibs/Makefile | 1 - sys/modules/adlink/Makefile | 1 - sys/modules/ae/Makefile | 1 - sys/modules/aesni/Makefile | 1 - sys/modules/age/Makefile | 1 - sys/modules/agp/Makefile | 1 - sys/modules/ahci/Makefile | 1 - sys/modules/aic7xxx/Makefile | 1 - sys/modules/aic7xxx/Makefile.inc | 1 - sys/modules/aic7xxx/ahc/Makefile | 1 - sys/modules/aic7xxx/ahc/Makefile.inc | 1 - sys/modules/aic7xxx/ahc/ahc_isa/Makefile | 1 - sys/modules/aic7xxx/ahc/ahc_pci/Makefile | 1 - sys/modules/aic7xxx/ahd/Makefile | 1 - sys/modules/aic7xxx/aicasm/Makefile | 1 - sys/modules/alc/Makefile | 1 - sys/modules/ale/Makefile | 1 - sys/modules/allwinner/aw_mmc/Makefile | 1 - sys/modules/allwinner/aw_pwm/Makefile | 1 - sys/modules/allwinner/aw_rsb/Makefile | 1 - sys/modules/allwinner/aw_rtc/Makefile | 1 - sys/modules/allwinner/aw_sid/Makefile | 1 - sys/modules/allwinner/aw_spi/Makefile | 1 - sys/modules/allwinner/aw_thermal/Makefile | 1 - sys/modules/allwinner/axp81x/Makefile | 1 - sys/modules/allwinner/if_awg/Makefile | 1 - sys/modules/alq/Makefile | 1 - sys/modules/am335x_dmtpps/Makefile | 1 - sys/modules/amd_ecc_inject/Makefile | 1 - sys/modules/amdgpio/Makefile | 1 - sys/modules/amdsbwd/Makefile | 1 - sys/modules/amdsmb/Makefile | 1 - sys/modules/amdsmn/Makefile | 1 - sys/modules/amdtemp/Makefile | 1 - sys/modules/aout/Makefile | 1 - sys/modules/arcmsr/Makefile | 1 - sys/modules/arm_ti/am335x_ehrpwm/Makefile | 1 - sys/modules/arm_ti/ti_i2c/Makefile | 1 - sys/modules/asmc/Makefile | 1 - sys/modules/ata/Makefile | 1 - sys/modules/ata/Makefile.inc | 1 - sys/modules/ata/atacore/Makefile | 1 - sys/modules/ata/ataisa/Makefile | 1 - sys/modules/ata/atapci/Makefile | 1 - sys/modules/ata/atapci/Makefile.inc | 1 - sys/modules/ata/atapci/chipsets/Makefile | 1 - sys/modules/ata/atapci/chipsets/Makefile.inc | 1 - sys/modules/ata/atapci/chipsets/ataacard/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataamd/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataati/Makefile | 1 - sys/modules/ata/atapci/chipsets/atacenatek/Makefile | 1 - sys/modules/ata/atapci/chipsets/atacypress/Makefile | 1 - sys/modules/ata/atapci/chipsets/atacyrix/Makefile | 1 - sys/modules/ata/atapci/chipsets/atahighpoint/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataintel/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataite/Makefile | 1 - sys/modules/ata/atapci/chipsets/atajmicron/Makefile | 1 - sys/modules/ata/atapci/chipsets/atamarvell/Makefile | 1 - sys/modules/ata/atapci/chipsets/atamicron/Makefile | 1 - sys/modules/ata/atapci/chipsets/atanational/Makefile | 1 - sys/modules/ata/atapci/chipsets/atanetcell/Makefile | 1 - sys/modules/ata/atapci/chipsets/atanvidia/Makefile | 1 - sys/modules/ata/atapci/chipsets/atapromise/Makefile | 1 - sys/modules/ata/atapci/chipsets/ataserverworks/Makefile | 1 - sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile | 1 - sys/modules/ata/atapci/chipsets/atasis/Makefile | 1 - sys/modules/ata/atapci/chipsets/atavia/Makefile | 1 - sys/modules/ath10k/Makefile | 1 - sys/modules/ath11k/Makefile | 1 - sys/modules/athk_common/Makefile | 1 - sys/modules/autofs/Makefile | 1 - sys/modules/axgbe/Makefile | 1 - sys/modules/axgbe/if_axa/Makefile | 1 - sys/modules/axgbe/if_axp/Makefile | 1 - sys/modules/backlight/Makefile | 1 - sys/modules/bcm283x_clkman/Makefile | 1 - sys/modules/bcm283x_pwm/Makefile | 1 - sys/modules/bfe/Makefile | 1 - sys/modules/bge/Makefile | 1 - sys/modules/bhnd/Makefile | 1 - sys/modules/bhnd/bcma/Makefile | 1 - sys/modules/bhnd/bcma_bhndb/Makefile | 1 - sys/modules/bhnd/bhndb/Makefile | 1 - sys/modules/bhnd/bhndb_pci/Makefile | 1 - sys/modules/bhnd/cores/Makefile | 1 - sys/modules/bhnd/cores/bhnd_pci/Makefile | 1 - sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile | 1 - sys/modules/bhnd/cores/bhnd_pcib/Makefile | 1 - sys/modules/bhnd/siba/Makefile | 1 - sys/modules/bhnd/siba_bhndb/Makefile | 1 - sys/modules/blake2/Makefile | 1 - sys/modules/bnxt/bnxt_en/Makefile | 1 - sys/modules/bridgestp/Makefile | 1 - sys/modules/bwi/Makefile | 1 - sys/modules/bwn/Makefile | 1 - sys/modules/bxe/Makefile | 1 - sys/modules/bytgpio/Makefile | 1 - sys/modules/cam/Makefile | 1 - sys/modules/cardbus/Makefile | 1 - sys/modules/carp/Makefile | 1 - sys/modules/cas/Makefile | 1 - sys/modules/cbb/Makefile | 1 - sys/modules/cc/Makefile | 1 - sys/modules/cc/cc_cdg/Makefile | 1 - sys/modules/cc/cc_chd/Makefile | 1 - sys/modules/cc/cc_cubic/Makefile | 1 - sys/modules/cc/cc_dctcp/Makefile | 1 - sys/modules/cc/cc_hd/Makefile | 1 - sys/modules/cc/cc_htcp/Makefile | 1 - sys/modules/cc/cc_newreno/Makefile | 1 - sys/modules/cc/cc_vegas/Makefile | 1 - sys/modules/ccp/Makefile | 1 - sys/modules/cd9660/Makefile | 1 - sys/modules/cd9660_iconv/Makefile | 1 - sys/modules/cfi/Makefile | 1 - sys/modules/cfiscsi/Makefile | 1 - sys/modules/chromebook_platform/Makefile | 1 - sys/modules/chvgpio/Makefile | 1 - sys/modules/ciss/Makefile | 1 - sys/modules/coretemp/Makefile | 1 - sys/modules/cpsw/Makefile | 1 - sys/modules/cpuctl/Makefile | 1 - sys/modules/cpufreq/Makefile | 1 - sys/modules/crypto/Makefile | 1 - sys/modules/cryptodev/Makefile | 1 - sys/modules/ctl/Makefile | 1 - sys/modules/cxgb/Makefile | 1 - sys/modules/cxgb/cxgb/Makefile | 1 - sys/modules/cxgb/cxgb_t3fw/Makefile | 1 - sys/modules/cxgbe/ccr/Makefile | 1 - sys/modules/cxgbe/cxgbei/Makefile | 1 - sys/modules/cxgbe/iw_cxgbe/Makefile | 1 - sys/modules/dc/Makefile | 1 - sys/modules/dpdk_lpm4/Makefile | 1 - sys/modules/dpdk_lpm6/Makefile | 1 - sys/modules/dpms/Makefile | 1 - sys/modules/dtb/sifive/Makefile | 1 - sys/modules/dtrace/Makefile | 1 - sys/modules/dtrace/Makefile.inc | 1 - sys/modules/dtrace/dtaudit/Makefile | 1 - sys/modules/dtrace/dtmalloc/Makefile | 1 - sys/modules/dtrace/dtnfscl/Makefile | 1 - sys/modules/dtrace/dtrace/Makefile | 1 - sys/modules/dtrace/dtrace_test/Makefile | 1 - sys/modules/dtrace/dtraceall/Makefile | 1 - sys/modules/dtrace/fasttrap/Makefile | 1 - sys/modules/dtrace/fbt/Makefile | 1 - sys/modules/dtrace/profile/Makefile | 1 - sys/modules/dtrace/prototype/Makefile | 1 - sys/modules/dtrace/sdt/Makefile | 1 - sys/modules/dtrace/systrace/Makefile | 1 - sys/modules/dtrace/systrace_freebsd32/Makefile | 1 - sys/modules/dtrace/systrace_linux/Makefile | 1 - sys/modules/dtrace/systrace_linux32/Makefile | 1 - sys/modules/dummynet/Makefile | 1 - sys/modules/e6000sw/Makefile | 1 - sys/modules/efirt/Makefile | 1 - sys/modules/em/Makefile | 1 - sys/modules/enetc/Makefile | 1 - sys/modules/epoch_test/Makefile | 1 - sys/modules/evdev/Makefile | 1 - sys/modules/exca/Makefile | 1 - sys/modules/ext2fs/Makefile | 1 - sys/modules/fdc/Makefile | 1 - sys/modules/fdescfs/Makefile | 1 - sys/modules/fdt/fdt_slicer/Makefile | 1 - sys/modules/ffec/Makefile | 1 - sys/modules/fib_dxr/Makefile | 1 - sys/modules/filemon/Makefile | 1 - sys/modules/firewire/Makefile | 1 - sys/modules/firewire/Makefile.inc | 1 - sys/modules/firewire/firewire/Makefile | 1 - sys/modules/firewire/fwe/Makefile | 1 - sys/modules/firewire/fwip/Makefile | 1 - sys/modules/firewire/sbp/Makefile | 1 - sys/modules/firewire/sbp_targ/Makefile | 1 - sys/modules/firmware/Makefile | 1 - sys/modules/flash/flexspi/Makefile | 1 - sys/modules/ftgpio/Makefile | 1 - sys/modules/ftwd/Makefile | 1 - sys/modules/fusefs/Makefile | 1 - sys/modules/fxp/Makefile | 1 - sys/modules/gem/Makefile | 1 - sys/modules/genet/Makefile | 1 - sys/modules/geom/Makefile | 1 - sys/modules/geom/Makefile.inc | 1 - sys/modules/geom/geom_cache/Makefile | 1 - sys/modules/geom/geom_ccd/Makefile | 1 - sys/modules/geom/geom_concat/Makefile | 1 - sys/modules/geom/geom_eli/Makefile | 1 - sys/modules/geom/geom_flashmap/Makefile | 1 - sys/modules/geom/geom_gate/Makefile | 1 - sys/modules/geom/geom_journal/Makefile | 1 - sys/modules/geom/geom_label/Makefile | 1 - sys/modules/geom/geom_linux_lvm/Makefile | 1 - sys/modules/geom/geom_mirror/Makefile | 1 - sys/modules/geom/geom_mountver/Makefile | 1 - sys/modules/geom/geom_multipath/Makefile | 1 - sys/modules/geom/geom_nop/Makefile | 1 - sys/modules/geom/geom_part/Makefile | 1 - sys/modules/geom/geom_part/geom_part_apm/Makefile | 1 - sys/modules/geom/geom_part/geom_part_bsd/Makefile | 1 - sys/modules/geom/geom_part/geom_part_bsd64/Makefile | 1 - sys/modules/geom/geom_part/geom_part_ebr/Makefile | 1 - sys/modules/geom/geom_part/geom_part_gpt/Makefile | 1 - sys/modules/geom/geom_part/geom_part_ldm/Makefile | 1 - sys/modules/geom/geom_part/geom_part_mbr/Makefile | 1 - sys/modules/geom/geom_raid/Makefile | 1 - sys/modules/geom/geom_raid3/Makefile | 1 - sys/modules/geom/geom_shsec/Makefile | 1 - sys/modules/geom/geom_stripe/Makefile | 1 - sys/modules/geom/geom_union/Makefile | 1 - sys/modules/geom/geom_uzip/Makefile | 1 - sys/modules/geom/geom_vinum/Makefile | 1 - sys/modules/geom/geom_virstor/Makefile | 1 - sys/modules/geom/geom_zero/Makefile | 1 - sys/modules/glxiic/Makefile | 1 - sys/modules/glxsb/Makefile | 1 - sys/modules/hid/Makefile | 1 - sys/modules/hid/bcm5974/Makefile | 1 - sys/modules/hid/hconf/Makefile | 1 - sys/modules/hid/hcons/Makefile | 1 - sys/modules/hid/hgame/Makefile | 1 - sys/modules/hid/hid/Makefile | 1 - sys/modules/hid/hidbus/Makefile | 1 - sys/modules/hid/hidmap/Makefile | 1 - sys/modules/hid/hidraw/Makefile | 1 - sys/modules/hid/hkbd/Makefile | 1 - sys/modules/hid/hms/Makefile | 1 - sys/modules/hid/hmt/Makefile | 1 - sys/modules/hid/hpen/Makefile | 1 - sys/modules/hid/hsctrl/Makefile | 1 - sys/modules/hid/ietp/Makefile | 1 - sys/modules/hid/ps4dshock/Makefile | 1 - sys/modules/hid/xb360gp/Makefile | 1 - sys/modules/hifn/Makefile | 1 - sys/modules/hptiop/Makefile | 1 - sys/modules/hyperv/Makefile | 1 - sys/modules/hyperv/hid/Makefile | 1 - sys/modules/hyperv/hvsock/Makefile | 1 - sys/modules/hyperv/netvsc/Makefile | 1 - sys/modules/hyperv/pcib/Makefile | 1 - sys/modules/hyperv/storvsc/Makefile | 1 - sys/modules/hyperv/utilities/Makefile | 1 - sys/modules/hyperv/vmbus/Makefile | 1 - sys/modules/i2c/Makefile | 1 - sys/modules/i2c/Makefile.inc | 1 - sys/modules/i2c/ads111x/Makefile | 1 - sys/modules/i2c/controllers/Makefile | 1 - sys/modules/i2c/controllers/Makefile.inc | 1 - sys/modules/i2c/controllers/alpm/Makefile | 1 - sys/modules/i2c/controllers/amdpm/Makefile | 1 - sys/modules/i2c/controllers/amdsmb/Makefile | 1 - sys/modules/i2c/controllers/ichiic/Makefile | 1 - sys/modules/i2c/controllers/ichsmb/Makefile | 1 - sys/modules/i2c/controllers/imcsmb/Makefile | 1 - sys/modules/i2c/controllers/intpm/Makefile | 1 - sys/modules/i2c/controllers/ismt/Makefile | 1 - sys/modules/i2c/controllers/lpbb/Makefile | 1 - sys/modules/i2c/controllers/nfsmb/Makefile | 1 - sys/modules/i2c/controllers/pcf/Makefile | 1 - sys/modules/i2c/controllers/viapm/Makefile | 1 - sys/modules/i2c/cyapa/Makefile | 1 - sys/modules/i2c/ds1307/Makefile | 1 - sys/modules/i2c/ds13rtc/Makefile | 1 - sys/modules/i2c/ds1672/Makefile | 1 - sys/modules/i2c/ds3231/Makefile | 1 - sys/modules/i2c/htu21/Makefile | 1 - sys/modules/i2c/hym8563/Makefile | 1 - sys/modules/i2c/icee/Makefile | 1 - sys/modules/i2c/if_ic/Makefile | 1 - sys/modules/i2c/iic/Makefile | 1 - sys/modules/i2c/iicbb/Makefile | 1 - sys/modules/i2c/iicbus/Makefile | 1 - sys/modules/i2c/iichid/Makefile | 1 - sys/modules/i2c/iicsmb/Makefile | 1 - sys/modules/i2c/isl/Makefile | 1 - sys/modules/i2c/isl12xx/Makefile | 1 - sys/modules/i2c/jedec_dimm/Makefile | 1 - sys/modules/i2c/max44009/Makefile | 1 - sys/modules/i2c/mux/Makefile | 1 - sys/modules/i2c/mux/iic_gpiomux/Makefile | 1 - sys/modules/i2c/mux/iicmux/Makefile | 1 - sys/modules/i2c/mux/ltc430x/Makefile | 1 - sys/modules/i2c/mux/pca954x/Makefile | 1 - sys/modules/i2c/nxprtc/Makefile | 1 - sys/modules/i2c/pcf8574/Makefile | 1 - sys/modules/i2c/pcf8591/Makefile | 1 - sys/modules/i2c/rtc8583/Makefile | 1 - sys/modules/i2c/rv3032/Makefile | 1 - sys/modules/i2c/rx8803/Makefile | 1 - sys/modules/i2c/s35390a/Makefile | 1 - sys/modules/i2c/smb/Makefile | 1 - sys/modules/i2c/smbus/Makefile | 1 - sys/modules/i2c/tmp461/Makefile | 1 - sys/modules/iavf/Makefile | 1 - sys/modules/ice/Makefile | 1 - sys/modules/ice_ddp/Makefile | 1 - sys/modules/ichwd/Makefile | 1 - sys/modules/ida/Makefile | 1 - sys/modules/if_bridge/Makefile | 1 - sys/modules/if_disc/Makefile | 1 - sys/modules/if_edsc/Makefile | 1 - sys/modules/if_enc/Makefile | 1 - sys/modules/if_epair/Makefile | 1 - sys/modules/if_gif/Makefile | 1 - sys/modules/if_gre/Makefile | 1 - sys/modules/if_infiniband/Makefile | 1 - sys/modules/if_lagg/Makefile | 1 - sys/modules/if_me/Makefile | 1 - sys/modules/if_stf/Makefile | 1 - sys/modules/if_tuntap/Makefile | 1 - sys/modules/if_vlan/Makefile | 1 - sys/modules/if_vxlan/Makefile | 1 - sys/modules/iflib/Makefile | 1 - sys/modules/igc/Makefile | 1 - sys/modules/imgact_binmisc/Makefile | 1 - sys/modules/imx/imx6_ahci/Makefile | 1 - sys/modules/imx/imx6_snvs/Makefile | 1 - sys/modules/imx/imx_i2c/Makefile | 1 - sys/modules/imx/imx_spi/Makefile | 1 - sys/modules/imx/imx_wdog/Makefile | 1 - sys/modules/intelspi/Makefile | 1 - sys/modules/io/Makefile | 1 - sys/modules/ip6_mroute_mod/Makefile | 1 - sys/modules/ip_mroute_mod/Makefile | 1 - sys/modules/ipdivert/Makefile | 1 - sys/modules/ipfilter/Makefile | 1 - sys/modules/ipfw/Makefile | 1 - sys/modules/ipfw_nat/Makefile | 1 - sys/modules/ipfw_nat64/Makefile | 1 - sys/modules/ipfw_nptv6/Makefile | 1 - sys/modules/ipfw_pmod/Makefile | 1 - sys/modules/ipmi/Makefile | 1 - sys/modules/ipmi/ipmi_linux/Makefile | 1 - sys/modules/ips/Makefile | 1 - sys/modules/ipsec/Makefile | 1 - sys/modules/ipw/Makefile | 1 - sys/modules/ipwfw/Makefile | 1 - sys/modules/ipwfw/ipw_bss/Makefile | 1 - sys/modules/ipwfw/ipw_ibss/Makefile | 1 - sys/modules/ipwfw/ipw_monitor/Makefile | 1 - sys/modules/iscsi/Makefile | 1 - sys/modules/iser/Makefile | 1 - sys/modules/isp/Makefile | 1 - sys/modules/itwd/Makefile | 1 - sys/modules/iwi/Makefile | 1 - sys/modules/iwifw/Makefile | 1 - sys/modules/iwifw/iwi_bss/Makefile | 1 - sys/modules/iwifw/iwi_ibss/Makefile | 1 - sys/modules/iwifw/iwi_monitor/Makefile | 1 - sys/modules/iwlwifi/Makefile | 1 - sys/modules/iwlwififw/Makefile | 1 - sys/modules/iwlwififw/Makefile.inc | 1 - sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile | 1 - sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile | 1 - sys/modules/iwm/Makefile | 1 - sys/modules/iwmfw/Makefile | 1 - sys/modules/iwmfw/iwm3160fw/Makefile | 1 - sys/modules/iwmfw/iwm3168fw/Makefile | 1 - sys/modules/iwmfw/iwm7260fw/Makefile | 1 - sys/modules/iwmfw/iwm7265Dfw/Makefile | 1 - sys/modules/iwmfw/iwm7265fw/Makefile | 1 - sys/modules/iwmfw/iwm8000Cfw/Makefile | 1 - sys/modules/iwmfw/iwm8265fw/Makefile | 1 - sys/modules/iwmfw/iwm9000fw/Makefile | 1 - sys/modules/iwmfw/iwm9260fw/Makefile | 1 - sys/modules/iwn/Makefile | 1 - sys/modules/iwnfw/Makefile | 1 - sys/modules/iwnfw/iwn100/Makefile | 1 - sys/modules/iwnfw/iwn1000/Makefile | 1 - sys/modules/iwnfw/iwn105/Makefile | 1 - sys/modules/iwnfw/iwn135/Makefile | 1 - sys/modules/iwnfw/iwn2000/Makefile | 1 - sys/modules/iwnfw/iwn2030/Makefile | 1 - sys/modules/iwnfw/iwn4965/Makefile | 1 - sys/modules/iwnfw/iwn5000/Makefile | 1 - sys/modules/iwnfw/iwn5150/Makefile | 1 - sys/modules/iwnfw/iwn6000/Makefile | 1 - sys/modules/iwnfw/iwn6000g2a/Makefile | 1 - sys/modules/iwnfw/iwn6000g2b/Makefile | 1 - sys/modules/iwnfw/iwn6050/Makefile | 1 - sys/modules/ix/Makefile | 1 - sys/modules/ixl/Makefile | 1 - sys/modules/ixv/Makefile | 1 - sys/modules/jme/Makefile | 1 - sys/modules/kgssapi/Makefile | 1 - sys/modules/kgssapi_krb5/Makefile | 1 - sys/modules/khelp/Makefile | 1 - sys/modules/khelp/h_ertt/Makefile | 1 - sys/modules/krpc/Makefile | 1 - sys/modules/ksyms/Makefile | 1 - sys/modules/ktest/ktest/Makefile | 1 - sys/modules/ktest/ktest_example/Makefile | 1 - sys/modules/ktest/ktest_netlink_message_writer/Makefile | 1 - sys/modules/le/Makefile | 1 - sys/modules/lge/Makefile | 1 - sys/modules/libalias/Makefile | 1 - sys/modules/libalias/libalias/Makefile | 1 - sys/modules/libalias/modules/Makefile | 1 - sys/modules/libalias/modules/Makefile.inc | 1 - sys/modules/libalias/modules/dummy/Makefile | 1 - sys/modules/libalias/modules/ftp/Makefile | 1 - sys/modules/libalias/modules/irc/Makefile | 1 - sys/modules/libalias/modules/nbt/Makefile | 1 - sys/modules/libalias/modules/pptp/Makefile | 1 - sys/modules/libalias/modules/skinny/Makefile | 1 - sys/modules/libalias/modules/smedia/Makefile | 1 - sys/modules/libiconv/Makefile | 1 - sys/modules/libmchain/Makefile | 1 - sys/modules/lindebugfs/Makefile | 1 - sys/modules/linprocfs/Makefile | 1 - sys/modules/linsysfs/Makefile | 1 - sys/modules/linux/Makefile | 1 - sys/modules/linux64/Makefile | 1 - sys/modules/linux_common/Makefile | 1 - sys/modules/lio/Makefile | 1 - sys/modules/lpt/Makefile | 1 - sys/modules/mac_biba/Makefile | 1 - sys/modules/mac_bsdextended/Makefile | 1 - sys/modules/mac_ifoff/Makefile | 1 - sys/modules/mac_ipacl/Makefile | 1 - sys/modules/mac_lomac/Makefile | 1 - sys/modules/mac_mls/Makefile | 1 - sys/modules/mac_none/Makefile | 1 - sys/modules/mac_ntpd/Makefile | 1 - sys/modules/mac_partition/Makefile | 1 - sys/modules/mac_pimd/Makefile | 1 - sys/modules/mac_portacl/Makefile | 1 - sys/modules/mac_seeotheruids/Makefile | 1 - sys/modules/mac_stub/Makefile | 1 - sys/modules/mac_test/Makefile | 1 - sys/modules/mac_veriexec/Makefile | 1 - sys/modules/mac_veriexec_sha1/Makefile | 1 - sys/modules/mac_veriexec_sha256/Makefile | 1 - sys/modules/mac_veriexec_sha384/Makefile | 1 - sys/modules/mac_veriexec_sha512/Makefile | 1 - sys/modules/malo/Makefile | 1 - sys/modules/mana/Makefile | 1 - sys/modules/md/Makefile | 1 - sys/modules/mdio/Makefile | 1 - sys/modules/mem/Makefile | 1 - sys/modules/mfi/Makefile | 1 - sys/modules/mfi/mfi_linux/Makefile | 1 - sys/modules/mfi/mfip/Makefile | 1 - sys/modules/mgb/Makefile | 1 - sys/modules/mii/Makefile | 1 - sys/modules/mlx/Makefile | 1 - sys/modules/mmc/Makefile | 1 - sys/modules/mmcnull/Makefile | 1 - sys/modules/mmcsd/Makefile | 1 - sys/modules/mpi3mr/Makefile | 1 - sys/modules/mpr/Makefile | 1 - sys/modules/mps/Makefile | 1 - sys/modules/mpt/Makefile | 1 - sys/modules/mqueue/Makefile | 1 - sys/modules/msdosfs/Makefile | 1 - sys/modules/msdosfs_iconv/Makefile | 1 - sys/modules/msk/Makefile | 1 - sys/modules/mt76/Makefile | 1 - sys/modules/mt76/Makefile.inc | 1 - sys/modules/mt76/core/Makefile | 1 - sys/modules/mt76/mt7915/Makefile | 1 - sys/modules/mt76/mt7921/Makefile | 1 - sys/modules/mvs/Makefile | 1 - sys/modules/mwlfw/Makefile | 1 - sys/modules/mxge/Makefile | 1 - sys/modules/mxge/mxge/Makefile | 1 - sys/modules/mxge/mxge_eth_z8e/Makefile | 1 - sys/modules/mxge/mxge_ethp_z8e/Makefile | 1 - sys/modules/mxge/mxge_rss_eth_z8e/Makefile | 1 - sys/modules/mxge/mxge_rss_ethp_z8e/Makefile | 1 - sys/modules/my/Makefile | 1 - sys/modules/nctgpio/Makefile | 1 - sys/modules/ncthwm/Makefile | 1 - sys/modules/neta/Makefile | 1 - sys/modules/netgraph/bluetooth/Makefile.inc | 1 - sys/modules/netgraph/bridge/Makefile | 1 - sys/modules/netgraph/car/Makefile | 1 - sys/modules/netgraph/checksum/Makefile | 1 - sys/modules/netgraph/deflate/Makefile | 1 - sys/modules/netgraph/eiface/Makefile | 1 - sys/modules/netgraph/ether/Makefile | 1 - sys/modules/netgraph/gif/Makefile | 1 - sys/modules/netgraph/gif_demux/Makefile | 1 - sys/modules/netgraph/hub/Makefile | 1 - sys/modules/netgraph/ip_input/Makefile | 1 - sys/modules/netgraph/ipfw/Makefile | 1 - sys/modules/netgraph/ksocket/Makefile | 1 - sys/modules/netgraph/l2tp/Makefile | 1 - sys/modules/netgraph/macfilter/Makefile | 1 - sys/modules/netgraph/nat/Makefile | 1 - sys/modules/netgraph/one2many/Makefile | 1 - sys/modules/netgraph/patch/Makefile | 1 - sys/modules/netgraph/pipe/Makefile | 1 - sys/modules/netgraph/pred1/Makefile | 1 - sys/modules/netgraph/sample/Makefile | 1 - sys/modules/netgraph/source/Makefile | 1 - sys/modules/netgraph/tag/Makefile | 1 - sys/modules/netgraph/tcpmss/Makefile | 1 - sys/modules/netgraph/vlan/Makefile | 1 - sys/modules/netgraph/vlan_rotate/Makefile | 1 - sys/modules/nfe/Makefile | 1 - sys/modules/nfscl/Makefile | 1 - sys/modules/nfscommon/Makefile | 1 - sys/modules/nfsd/Makefile | 1 - sys/modules/nfslockd/Makefile | 1 - sys/modules/nfssvc/Makefile | 1 - sys/modules/nge/Makefile | 1 - sys/modules/nlsysevent/Makefile | 1 - sys/modules/nmdm/Makefile | 1 - sys/modules/ntb/Makefile | 1 - sys/modules/ntb/if_ntb/Makefile | 1 - sys/modules/ntb/ntb/Makefile | 1 - sys/modules/ntb/ntb_hw_amd/Makefile | 1 - sys/modules/ntb/ntb_hw_intel/Makefile | 1 - sys/modules/ntb/ntb_hw_plx/Makefile | 1 - sys/modules/ntb/ntb_tool/Makefile | 1 - sys/modules/ntb/ntb_transport/Makefile | 1 - sys/modules/nullfs/Makefile | 1 - sys/modules/nvd/Makefile | 1 - sys/modules/nvdimm/Makefile | 1 - sys/modules/nvme/Makefile | 1 - sys/modules/nvram/Makefile | 1 - sys/modules/ocs_fc/Makefile | 1 - sys/modules/opal_nvram/Makefile | 1 - sys/modules/opensolaris/Makefile | 1 - sys/modules/ossl/Makefile | 1 - sys/modules/otus/Makefile | 1 - sys/modules/otusfw/Makefile | 1 - sys/modules/otusfw/otusfw_init/Makefile | 1 - sys/modules/otusfw/otusfw_main/Makefile | 1 - sys/modules/ow/Makefile | 1 - sys/modules/ow/ow/Makefile | 1 - sys/modules/ow/ow_temp/Makefile | 1 - sys/modules/ow/owc/Makefile | 1 - sys/modules/padlock/Makefile | 1 - sys/modules/padlock_rng/Makefile | 1 - sys/modules/pcfclock/Makefile | 1 - sys/modules/pchtherm/Makefile | 1 - sys/modules/pf/Makefile | 1 - sys/modules/pflog/Makefile | 1 - sys/modules/pfsync/Makefile | 1 - sys/modules/plip/Makefile | 1 - sys/modules/pms/Makefile.inc | 1 - sys/modules/powermac_nvram/Makefile | 1 - sys/modules/ppbus/Makefile | 1 - sys/modules/ppc/Makefile | 1 - sys/modules/ppi/Makefile | 1 - sys/modules/pps/Makefile | 1 - sys/modules/procfs/Makefile | 1 - sys/modules/proto/Makefile | 1 - sys/modules/pseudofs/Makefile | 1 - sys/modules/pst/Makefile | 1 - sys/modules/pty/Makefile | 1 - sys/modules/puc/Makefile | 1 - sys/modules/pwm/Makefile | 1 - sys/modules/pwm/pwm_backlight/Makefile | 1 - sys/modules/pwm/pwmbus/Makefile | 1 - sys/modules/pwm/pwmc/Makefile | 1 - sys/modules/qat_c2xxx/Makefile | 1 - sys/modules/qat_c2xxxfw/Makefile | 1 - sys/modules/ral/Makefile | 1 - sys/modules/ralfw/Makefile | 1 - sys/modules/ralfw/Makefile.inc | 1 - sys/modules/ralfw/rt2561/Makefile | 1 - sys/modules/ralfw/rt2561s/Makefile | 1 - sys/modules/ralfw/rt2661/Makefile | 1 - sys/modules/ralfw/rt2860/Makefile | 1 - sys/modules/random_fortuna/Makefile | 1 - sys/modules/random_other/Makefile | 1 - sys/modules/rc4/Makefile | 1 - sys/modules/rccgpio/Makefile | 1 - sys/modules/rdma/Makefile | 1 - sys/modules/rdrand_rng/Makefile | 1 - sys/modules/re/Makefile | 1 - sys/modules/rl/Makefile | 1 - sys/modules/rndtest/Makefile | 1 - sys/modules/rockchip/rk805/Makefile | 1 - sys/modules/rockchip/rk808/Makefile | 1 - sys/modules/rockchip/rk_dwmmc/Makefile | 1 - sys/modules/rockchip/rk_i2c/Makefile | 1 - sys/modules/rockchip/rk_spi/Makefile | 1 - sys/modules/rpi_ft5406/Makefile | 1 - sys/modules/rtsx/Makefile | 1 - sys/modules/rtw88/Makefile | 1 - sys/modules/rtw88fw/Makefile | 1 - sys/modules/rtw88fw/rtw8723d/Makefile | 1 - sys/modules/rtw88fw/rtw8821c/Makefile | 1 - sys/modules/rtw88fw/rtw8822b/Makefile | 1 - sys/modules/rtw88fw/rtw8822c/Makefile | 1 - sys/modules/rtw88fw/rtw8822c_wow/Makefile | 1 - sys/modules/rtw89/Makefile | 1 - sys/modules/rtw89fw/Makefile | 1 - sys/modules/rtw89fw/rtw8852a/Makefile | 1 - sys/modules/rtw89fw/rtw8852c/Makefile | 1 - sys/modules/rtwn/Makefile | 1 - sys/modules/rtwn_pci/Makefile | 1 - sys/modules/rtwn_usb/Makefile | 1 - sys/modules/rtwnfw/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8188ee/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8188eu/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8192cE/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8192cEB/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8192cT/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8192cU/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8192eu/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8812au/Makefile | 1 - sys/modules/rtwnfw/rtwnrtl8821au/Makefile | 1 - sys/modules/s3/Makefile | 1 - sys/modules/sbni/Makefile | 1 - sys/modules/scc/Makefile | 1 - sys/modules/sctp/Makefile | 1 - sys/modules/sdhci/Makefile | 1 - sys/modules/sdhci_acpi/Makefile | 1 - sys/modules/sdhci_pci/Makefile | 1 - sys/modules/sdio/Makefile | 1 - sys/modules/sem/Makefile | 1 - sys/modules/sfxge/Makefile | 1 - sys/modules/sge/Makefile | 1 - sys/modules/sgx/Makefile | 1 - sys/modules/sgx_linux/Makefile | 1 - sys/modules/siftr/Makefile | 1 - sys/modules/siis/Makefile | 1 - sys/modules/sis/Makefile | 1 - sys/modules/sk/Makefile | 1 - sys/modules/smbfs/Makefile | 1 - sys/modules/snp/Makefile | 1 - sys/modules/sound/Makefile | 1 - sys/modules/sound/Makefile.inc | 1 - sys/modules/sound/driver/Makefile | 1 - sys/modules/sound/driver/Makefile.inc | 1 - sys/modules/sound/driver/ai2s/Makefile | 1 - sys/modules/sound/driver/als4000/Makefile | 1 - sys/modules/sound/driver/atiixp/Makefile | 1 - sys/modules/sound/driver/cmi/Makefile | 1 - sys/modules/sound/driver/cs4281/Makefile | 1 - sys/modules/sound/driver/csa/Makefile | 1 - sys/modules/sound/driver/davbus/Makefile | 1 - sys/modules/sound/driver/driver/Makefile | 1 - sys/modules/sound/driver/emu10k1/Makefile | 1 - sys/modules/sound/driver/envy24/Makefile | 1 - sys/modules/sound/driver/envy24ht/Makefile | 1 - sys/modules/sound/driver/es137x/Makefile | 1 - sys/modules/sound/driver/fm801/Makefile | 1 - sys/modules/sound/driver/hda/Makefile | 1 - sys/modules/sound/driver/hdspe/Makefile | 1 - sys/modules/sound/driver/ich/Makefile | 1 - sys/modules/sound/driver/maestro3/Makefile | 1 - sys/modules/sound/driver/neomagic/Makefile | 1 - sys/modules/sound/driver/solo/Makefile | 1 - sys/modules/sound/driver/spicds/Makefile | 1 - sys/modules/sound/driver/t4dwave/Makefile | 1 - sys/modules/sound/driver/uaudio/Makefile | 1 - sys/modules/sound/driver/via8233/Makefile | 1 - sys/modules/sound/driver/via82c686/Makefile | 1 - sys/modules/sound/driver/vibes/Makefile | 1 - sys/modules/sound/sound/Makefile | 1 - sys/modules/speaker/Makefile | 1 - sys/modules/spi/Makefile | 1 - sys/modules/spi/at45d/Makefile | 1 - sys/modules/spi/mx25l/Makefile | 1 - sys/modules/spi/spibus/Makefile | 1 - sys/modules/spigen/Makefile | 1 - sys/modules/splash/Makefile | 1 - sys/modules/splash/Makefile.inc | 1 - sys/modules/splash/bmp/Makefile | 1 - sys/modules/splash/pcx/Makefile | 1 - sys/modules/ste/Makefile | 1 - sys/modules/stge/Makefile | 1 - sys/modules/sume/Makefile | 1 - sys/modules/superio/Makefile | 1 - sys/modules/sym/Makefile | 1 - sys/modules/syscons/Makefile | 1 - sys/modules/syscons/Makefile.inc | 1 - sys/modules/syscons/beastie/Makefile | 1 - sys/modules/syscons/blank/Makefile | 1 - sys/modules/syscons/daemon/Makefile | 1 - sys/modules/syscons/dragon/Makefile | 1 - sys/modules/syscons/fade/Makefile | 1 - sys/modules/syscons/fire/Makefile | 1 - sys/modules/syscons/green/Makefile | 1 - sys/modules/syscons/logo/Makefile | 1 - sys/modules/syscons/plasma/Makefile | 1 - sys/modules/syscons/rain/Makefile | 1 - sys/modules/syscons/snake/Makefile | 1 - sys/modules/syscons/star/Makefile | 1 - sys/modules/syscons/warp/Makefile | 1 - sys/modules/sysvipc/Makefile | 1 - sys/modules/sysvipc/Makefile.inc | 1 - sys/modules/sysvipc/sysvmsg/Makefile | 1 - sys/modules/sysvipc/sysvsem/Makefile | 1 - sys/modules/sysvipc/sysvshm/Makefile | 1 - sys/modules/tarfs/Makefile | 1 - sys/modules/tcp/tcpmd5/Makefile | 1 - sys/modules/tests/Makefile | 1 - sys/modules/tests/fib_lookup/Makefile | 1 - sys/modules/tmpfs/Makefile | 1 - sys/modules/toecore/Makefile | 1 - sys/modules/tpm/Makefile | 1 - sys/modules/tsec/Makefile | 1 - sys/modules/uart/Makefile | 1 - sys/modules/ubser/Makefile | 1 - sys/modules/uchcom/Makefile | 1 - sys/modules/ucycom/Makefile | 1 - sys/modules/udf/Makefile | 1 - sys/modules/udf_iconv/Makefile | 1 - sys/modules/ufs/Makefile | 1 - sys/modules/uinput/Makefile | 1 - sys/modules/unionfs/Makefile | 1 - sys/modules/usb/atp/Makefile | 1 - sys/modules/usb/axge/Makefile | 1 - sys/modules/usb/cfumass/Makefile | 1 - sys/modules/usb/muge/Makefile | 1 - sys/modules/usb/rsu/Makefile | 1 - sys/modules/usb/rsufw/Makefile | 1 - sys/modules/usb/rsufw/rsurtl8712fw/Makefile | 1 - sys/modules/usb/runfw/Makefile | 1 - sys/modules/usb/uath/Makefile | 1 - sys/modules/usb/udl/Makefile | 1 - sys/modules/usb/uep/Makefile | 1 - sys/modules/usb/upgt/Makefile | 1 - sys/modules/usb/ure/Makefile | 1 - sys/modules/usb/urtw/Makefile | 1 - sys/modules/usb/usbhid/Makefile | 1 - sys/modules/usb/wmt/Makefile | 1 - sys/modules/veriexec/Makefile | 1 - sys/modules/vesa/Makefile | 1 - sys/modules/vge/Makefile | 1 - sys/modules/viawd/Makefile | 1 - sys/modules/vmd/Makefile | 1 - sys/modules/vmm/Makefile | 1 - sys/modules/vmware/pvscsi/Makefile | 1 - sys/modules/vmware/vmci/Makefile | 1 - sys/modules/vnic/Makefile | 1 - sys/modules/vnic/mrmlbus/Makefile | 1 - sys/modules/vnic/thunder_bgx/Makefile | 1 - sys/modules/vnic/thunder_mdio/Makefile | 1 - sys/modules/vnic/vnicpf/Makefile | 1 - sys/modules/vnic/vnicvf/Makefile | 1 - sys/modules/vr/Makefile | 1 - sys/modules/vte/Makefile | 1 - sys/modules/wbwd/Makefile | 1 - sys/modules/wdatwd/Makefile | 1 - sys/modules/wlan/Makefile | 1 - sys/modules/wlan_acl/Makefile | 1 - sys/modules/wlan_amrr/Makefile | 1 - sys/modules/wlan_ccmp/Makefile | 1 - sys/modules/wlan_rssadapt/Makefile | 1 - sys/modules/wlan_tkip/Makefile | 1 - sys/modules/wlan_wep/Makefile | 1 - sys/modules/wlan_xauth/Makefile | 1 - sys/modules/wpi/Makefile | 1 - sys/modules/wpifw/Makefile | 1 - sys/modules/wtap/Makefile | 1 - sys/modules/x86bios/Makefile | 1 - sys/modules/xdr/Makefile | 1 - sys/modules/xl/Makefile | 1 - sys/modules/xz/Makefile | 1 - sys/modules/zfs/Makefile | 1 - sys/modules/zlib/Makefile | 1 - sys/teken/demo/Makefile | 1 - sys/teken/libteken/Makefile | 1 - sys/teken/stress/Makefile | 1 - targets/Makefile | 1 - targets/Makefile.inc | 1 - targets/pseudo/Makefile.inc | 1 - targets/pseudo/bootstrap-tools/Makefile | 1 - targets/pseudo/bootstrap-tools/Makefile.depend.host | 1 - targets/pseudo/clang/Makefile | 1 - targets/pseudo/clang/Makefile.depend | 1 - targets/pseudo/gcc/Makefile | 1 - targets/pseudo/gcc/Makefile.depend | 1 - targets/pseudo/hosttools/Makefile | 1 - targets/pseudo/hosttools/Makefile.depend.host | 1 - targets/pseudo/kernel/Makefile | 1 - targets/pseudo/kernel/Makefile.depend | 1 - targets/pseudo/stage/Makefile | 1 - targets/pseudo/tests/Makefile | 1 - targets/pseudo/tests/Makefile.depend | 1 - targets/pseudo/the-lot/Makefile | 1 - targets/pseudo/the-lot/Makefile.depend | 1 - targets/pseudo/toolchain/Makefile | 1 - targets/pseudo/toolchain/Makefile.depend | 1 - targets/pseudo/universe/Makefile | 1 - targets/pseudo/universe/Makefile.depend | 1 - targets/pseudo/userland/Makefile | 1 - targets/pseudo/userland/Makefile.depend | 1 - targets/pseudo/userland/Makefile.inc | 1 - targets/pseudo/userland/cddl/Makefile | 1 - targets/pseudo/userland/cddl/Makefile.depend | 1 - targets/pseudo/userland/games/Makefile | 1 - targets/pseudo/userland/games/Makefile.depend | 1 - targets/pseudo/userland/gnu/Makefile | 1 - targets/pseudo/userland/gnu/Makefile.depend | 1 - targets/pseudo/userland/include/Makefile | 1 - targets/pseudo/userland/include/Makefile.depend | 1 - targets/pseudo/userland/kerberos5/Makefile | 1 - targets/pseudo/userland/kerberos5/Makefile.depend | 1 - targets/pseudo/userland/lib/Makefile | 1 - targets/pseudo/userland/lib/Makefile.depend | 1 - targets/pseudo/userland/libexec/Makefile | 1 - targets/pseudo/userland/libexec/Makefile.depend | 1 - targets/pseudo/userland/misc/Makefile | 1 - targets/pseudo/userland/misc/Makefile.depend | 1 - targets/pseudo/userland/secure/Makefile | 1 - targets/pseudo/userland/secure/Makefile.depend | 1 - targets/pseudo/userland/share/Makefile | 1 - targets/pseudo/userland/share/Makefile.depend | 1 - tests/Makefile | 1 - tests/Makefile.inc0 | 1 - tests/etc/Makefile | 1 - tests/etc/Makefile.inc | 1 - tests/etc/rc.d/Makefile | 1 - tests/examples/Makefile | 1 - tests/sys/Makefile | 1 - tests/sys/Makefile.inc | 1 - tests/sys/acl/Makefile | 1 - tests/sys/aio/Makefile | 1 - tests/sys/audit/Makefile | 1 - tests/sys/auditpipe/Makefile | 1 - tests/sys/capsicum/Makefile | 1 - tests/sys/cddl/Makefile | 1 - tests/sys/cddl/zfs/Makefile | 1 - tests/sys/cddl/zfs/bin/Makefile | 1 - tests/sys/cddl/zfs/include/Makefile | 1 - tests/sys/cddl/zfs/tests/Makefile | 1 - tests/sys/cddl/zfs/tests/Makefile.inc | 1 - tests/sys/cddl/zfs/tests/acl/Makefile | 1 - tests/sys/cddl/zfs/tests/acl/cifs/Makefile | 1 - tests/sys/cddl/zfs/tests/acl/nontrivial/Makefile | 1 - tests/sys/cddl/zfs/tests/acl/trivial/Makefile | 1 - tests/sys/cddl/zfs/tests/atime/Makefile | 1 - tests/sys/cddl/zfs/tests/bootfs/Makefile | 1 - tests/sys/cddl/zfs/tests/cache/Makefile | 1 - tests/sys/cddl/zfs/tests/cachefile/Makefile | 1 - tests/sys/cddl/zfs/tests/clean_mirror/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zdb/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_clone/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_copies/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_create/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_get/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_mount/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_promote/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_property/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_receive/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_rename/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_send/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_set/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_share/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_attach/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_create/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_detach/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_expand/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_export/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_get/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_history/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile | 1 - .../sys/cddl/zfs/tests/cli_root/zpool_import/blockfiles/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_offline/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_online/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_remove/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_replace/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_set/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_status/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/Makefile | 1 - .../cddl/zfs/tests/cli_root/zpool_upgrade/blockfiles/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_user/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_user/misc/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_user/zfs_list/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/Makefile | 1 - tests/sys/cddl/zfs/tests/cli_user/zpool_list/Makefile | 1 - tests/sys/cddl/zfs/tests/compression/Makefile | 1 - tests/sys/cddl/zfs/tests/ctime/Makefile | 1 - tests/sys/cddl/zfs/tests/delegate/Makefile | 1 - tests/sys/cddl/zfs/tests/devices/Makefile | 1 - tests/sys/cddl/zfs/tests/exec/Makefile | 1 - tests/sys/cddl/zfs/tests/grow_pool/Makefile | 1 - tests/sys/cddl/zfs/tests/grow_replicas/Makefile | 1 - tests/sys/cddl/zfs/tests/history/Makefile | 1 - tests/sys/cddl/zfs/tests/hotplug/Makefile | 1 - tests/sys/cddl/zfs/tests/hotspare/Makefile | 1 - tests/sys/cddl/zfs/tests/inheritance/Makefile | 1 - tests/sys/cddl/zfs/tests/interop/Makefile | 1 - tests/sys/cddl/zfs/tests/inuse/Makefile | 1 - tests/sys/cddl/zfs/tests/iscsi/Makefile | 1 - tests/sys/cddl/zfs/tests/large_files/Makefile | 1 - tests/sys/cddl/zfs/tests/largest_pool/Makefile | 1 - tests/sys/cddl/zfs/tests/link_count/Makefile | 1 - tests/sys/cddl/zfs/tests/migration/Makefile | 1 - tests/sys/cddl/zfs/tests/mmap/Makefile | 1 - tests/sys/cddl/zfs/tests/mount/Makefile | 1 - tests/sys/cddl/zfs/tests/mv_files/Makefile | 1 - tests/sys/cddl/zfs/tests/nestedfs/Makefile | 1 - tests/sys/cddl/zfs/tests/no_space/Makefile | 1 - tests/sys/cddl/zfs/tests/online_offline/Makefile | 1 - tests/sys/cddl/zfs/tests/pool_names/Makefile | 1 - tests/sys/cddl/zfs/tests/poolversion/Makefile | 1 - tests/sys/cddl/zfs/tests/quota/Makefile | 1 - tests/sys/cddl/zfs/tests/redundancy/Makefile | 1 - tests/sys/cddl/zfs/tests/refquota/Makefile | 1 - tests/sys/cddl/zfs/tests/refreserv/Makefile | 1 - tests/sys/cddl/zfs/tests/rename_dirs/Makefile | 1 - tests/sys/cddl/zfs/tests/replacement/Makefile | 1 - tests/sys/cddl/zfs/tests/reservation/Makefile | 1 - tests/sys/cddl/zfs/tests/rootpool/Makefile | 1 - tests/sys/cddl/zfs/tests/rsend/Makefile | 1 - tests/sys/cddl/zfs/tests/scrub_mirror/Makefile | 1 - tests/sys/cddl/zfs/tests/slog/Makefile | 1 - tests/sys/cddl/zfs/tests/snapshot/Makefile | 1 - tests/sys/cddl/zfs/tests/snapused/Makefile | 1 - tests/sys/cddl/zfs/tests/sparse/Makefile | 1 - tests/sys/cddl/zfs/tests/threadsappend/Makefile | 1 - tests/sys/cddl/zfs/tests/truncate/Makefile | 1 - tests/sys/cddl/zfs/tests/txg_integrity/Makefile | 1 - tests/sys/cddl/zfs/tests/userquota/Makefile | 1 - tests/sys/cddl/zfs/tests/utils_test/Makefile | 1 - tests/sys/cddl/zfs/tests/write_dirs/Makefile | 1 - tests/sys/cddl/zfs/tests/xattr/Makefile | 1 - tests/sys/cddl/zfs/tests/zfsd/Makefile | 1 - tests/sys/cddl/zfs/tests/zil/Makefile | 1 - tests/sys/cddl/zfs/tests/zinject/Makefile | 1 - tests/sys/cddl/zfs/tests/zones/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol/zvol_cli/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol/zvol_misc/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol/zvol_swap/Makefile | 1 - tests/sys/cddl/zfs/tests/zvol_thrash/Makefile | 1 - tests/sys/common/Makefile | 1 - tests/sys/compat32/Makefile | 1 - tests/sys/compat32/Makefile.inc | 1 - tests/sys/devrandom/Makefile | 1 - tests/sys/fifo/Makefile | 1 - tests/sys/file/Makefile | 1 - tests/sys/fs/Makefile | 1 - tests/sys/fs/Makefile.inc | 1 - tests/sys/fs/fusefs/Makefile | 1 - tests/sys/fs/tmpfs/Makefile | 1 - tests/sys/geom/Makefile | 1 - tests/sys/geom/class/Makefile | 1 - tests/sys/geom/class/Makefile.inc | 1 - tests/sys/geom/class/concat/Makefile | 1 - tests/sys/geom/class/eli/Makefile | 1 - tests/sys/geom/class/gate/Makefile | 1 - tests/sys/geom/class/mirror/Makefile | 1 - tests/sys/geom/class/multipath/Makefile | 1 - tests/sys/geom/class/nop/Makefile | 1 - tests/sys/geom/class/part/Makefile | 1 - tests/sys/geom/class/raid3/Makefile | 1 - tests/sys/geom/class/shsec/Makefile | 1 - tests/sys/geom/class/stripe/Makefile | 1 - tests/sys/kern/Makefile | 1 - tests/sys/kern/Makefile.inc | 1 - tests/sys/kern/acct/Makefile | 1 - tests/sys/kern/execve/Makefile | 1 - tests/sys/kern/pipe/Makefile | 1 - tests/sys/kqueue/Makefile.inc | 1 - tests/sys/kqueue/libkqueue/Makefile | 1 - tests/sys/mac/Makefile | 1 - tests/sys/mac/Makefile.inc | 1 - tests/sys/mac/bsdextended/Makefile | 1 - tests/sys/mac/ipacl/Makefile | 1 - tests/sys/mac/portacl/Makefile | 1 - tests/sys/mqueue/Makefile | 1 - tests/sys/net/routing/Makefile | 1 - tests/sys/netgraph/Makefile | 1 - tests/sys/netinet/Makefile | 1 - tests/sys/netinet/libalias/Makefile | 1 - tests/sys/netinet6/Makefile | 1 - tests/sys/netinet6/frag6/Makefile | 1 - tests/sys/netipsec/Makefile | 1 - tests/sys/netipsec/tunnel/Makefile | 1 - tests/sys/netlink/Makefile | 1 - tests/sys/netmap/Makefile | 1 - tests/sys/netpfil/Makefile | 1 - tests/sys/netpfil/common/Makefile | 1 - tests/sys/netpfil/pf/Makefile | 1 - tests/sys/netpfil/pf/ioctl/Makefile | 1 - tests/sys/opencrypto/Makefile | 1 - tests/sys/pjdfstest/Makefile | 1 - tests/sys/pjdfstest/Makefile.inc | 1 - tests/sys/pjdfstest/pjdfstest/Makefile | 1 - tests/sys/pjdfstest/tests/Makefile | 1 - tests/sys/pjdfstest/tests/Makefile.inc | 1 - tests/sys/pjdfstest/tests/chflags/Makefile | 1 - tests/sys/pjdfstest/tests/chmod/Makefile | 1 - tests/sys/pjdfstest/tests/chown/Makefile | 1 - tests/sys/pjdfstest/tests/ftruncate/Makefile | 1 - tests/sys/pjdfstest/tests/granular/Makefile | 1 - tests/sys/pjdfstest/tests/link/Makefile | 1 - tests/sys/pjdfstest/tests/mkdir/Makefile | 1 - tests/sys/pjdfstest/tests/mkfifo/Makefile | 1 - tests/sys/pjdfstest/tests/mknod/Makefile | 1 - tests/sys/pjdfstest/tests/open/Makefile | 1 - tests/sys/pjdfstest/tests/rename/Makefile | 1 - tests/sys/pjdfstest/tests/rmdir/Makefile | 1 - tests/sys/pjdfstest/tests/symlink/Makefile | 1 - tests/sys/pjdfstest/tests/truncate/Makefile | 1 - tests/sys/pjdfstest/tests/unlink/Makefile | 1 - tests/sys/pjdfstest/tests/utimensat/Makefile | 1 - tests/sys/posixshm/Makefile | 1 - tests/sys/sys/Makefile | 1 - tests/sys/vfs/Makefile | 1 - tests/sys/vm/Makefile | 1 - tests/sys/vm/soxstack/Makefile | 1 - tests/sys/vm/stack/Makefile | 1 - tools/boot/smbios/Makefile | 1 - tools/bsdbox/Makefile | 1 - tools/build/Makefile | 1 - tools/build/bootstrap-m4/Makefile | 1 - tools/build/cross-build/Makefile | 1 - tools/build/cross-build/fake_chflags/Makefile | 1 - tools/build/cross-build/mkimg/Makefile | 1 - tools/build/make_check/Makefile | 1 - tools/build/mk/Makefile.boot | 1 - tools/build/mk/Makefile.boot.pre | 1 - tools/bus_space/C/Makefile | 1 - tools/bus_space/Makefile | 1 - tools/bus_space/Makefile.inc | 1 - tools/bus_space/Python/Makefile | 1 - tools/diag/dumpvfscache/Makefile | 1 - tools/diag/localeck/Makefile | 1 - tools/diag/prtblknos/Makefile | 1 - tools/kerneldoc/Makefile | 1 - tools/regression/aio/aiop/Makefile | 1 - tools/regression/bpf/Makefile | 1 - tools/regression/bpf/bpf_filter/Makefile | 1 - tools/regression/capsicum/syscalls/Makefile | 1 - tools/regression/doat/Makefile | 1 - tools/regression/ethernet/ethermulti/Makefile | 1 - tools/regression/fsx/Makefile | 1 - tools/regression/gaithrstress/Makefile | 1 - tools/regression/geom/ConfCmp/Makefile | 1 - tools/regression/geom/MdLoad/Makefile | 1 - tools/regression/geom_gpt/Makefile | 1 - tools/regression/include/stdatomic/Makefile | 1 - tools/regression/include/tgmath/Makefile | 1 - tools/regression/kgssapi/Makefile | 1 - tools/regression/kthread/kld/Makefile | 1 - tools/regression/lib/libc/regex/Makefile | 1 - tools/regression/mlock/Makefile | 1 - tools/regression/net80211/ccmp/Makefile | 1 - tools/regression/net80211/tkip/Makefile | 1 - tools/regression/net80211/wep/Makefile | 1 - tools/regression/netinet/arphold/Makefile | 1 - tools/regression/netinet/msocket/Makefile | 1 - tools/regression/netinet/msocket_ifnet_remove/Makefile | 1 - tools/regression/netinet/tcpfullwindowrst/Makefile | 1 - tools/regression/netinet/udpconnectjail/Makefile | 1 - tools/regression/netinet/udpzerobyte/Makefile | 1 - tools/regression/nfsmmap/Makefile | 1 - tools/regression/nfsmmap/test1/Makefile | 1 - tools/regression/nfsmmap/test2/Makefile | 1 - tools/regression/p1003_1b/Makefile | 1 - tools/regression/posixsem/Makefile | 1 - tools/regression/posixsem2/Makefile | 1 - tools/regression/pthread/cv_cancel1/Makefile | 1 - tools/regression/pthread/mutex_isowned_np/Makefile | 1 - tools/regression/redzone9/Makefile | 1 - tools/regression/rpcsec_gss/Makefile | 1 - tools/regression/security/access/Makefile | 1 - tools/regression/security/cap_test/Makefile | 1 - tools/regression/security/open_to_operation/Makefile | 1 - tools/regression/security/proc_to_proc/Makefile | 1 - tools/regression/sigqueue/Makefile | 1 - tools/regression/sigqueue/sigqtest1/Makefile | 1 - tools/regression/sigqueue/sigqtest2/Makefile | 1 - tools/regression/sockets/listen_backlog/Makefile | 1 - tools/regression/sockets/listen_kqueue/Makefile | 1 - tools/regression/sockets/pr_atomic/Makefile | 1 - tools/regression/sockets/rtsocket/Makefile | 1 - tools/regression/sockets/so_setfib/Makefile | 1 - tools/regression/sockets/udp_pingpong/Makefile | 1 - tools/regression/sockets/unix_bindconnect/Makefile | 1 - tools/regression/sockets/unix_close_race/Makefile | 1 - tools/regression/sockets/unix_cmsg/Makefile | 1 - tools/regression/sockets/unix_gc/Makefile | 1 - tools/regression/sockets/unix_sendtorace/Makefile | 1 - tools/regression/sockets/unix_socket/Makefile | 1 - tools/regression/sockets/unix_sorflush/Makefile | 1 - tools/regression/sockets/zerosend/Makefile | 1 - tools/regression/tls/Makefile | 1 - tools/regression/tls/libxx/Makefile | 1 - tools/regression/tls/libyy/Makefile | 1 - tools/regression/tls/ttls1/Makefile | 1 - tools/regression/tls/ttls2/Makefile | 1 - tools/regression/tls/ttls3/Makefile | 1 - tools/regression/tls/ttls4/Makefile | 1 - tools/regression/ufs/uprintf/Makefile | 1 - tools/regression/usr.bin/cc/Makefile | 1 - tools/regression/usr.bin/env/Makefile | 1 - tools/test/auxinfo/Makefile | 1 - tools/test/bsnmp/Makefile | 1 - tools/test/callout_free/Makefile | 1 - tools/test/gpioevents/Makefile | 1 - tools/test/iconv/Makefile | 1 - tools/test/iconv/gnu/Makefile | 1 - tools/test/iconv/posix/Makefile | 1 - tools/test/iconv/refgen/Makefile | 1 - tools/test/iconv/tablegen/Makefile | 1 - tools/test/net/Makefile | 1 - tools/test/netfibs/Makefile | 1 - tools/test/ppsapi/Makefile | 1 - tools/test/ptrace/Makefile | 1 - tools/test/sort/regression/Makefile | 1 - tools/test/upsdl/Makefile | 1 - tools/test/vm86/Makefile | 1 - tools/test/xregs_sig/Makefile | 1 - tools/tools/aac/Makefile | 1 - tools/tools/ansify/Makefile | 1 - tools/tools/ath/Makefile | 1 - tools/tools/ath/Makefile.inc | 1 - tools/tools/ath/arcode/Makefile | 1 - tools/tools/ath/ath_ee_9287_print/Makefile | 1 - tools/tools/ath/ath_ee_9300_print/Makefile | 1 - tools/tools/ath/ath_ee_v14_print/Makefile | 1 - tools/tools/ath/ath_ee_v4k_print/Makefile | 1 - tools/tools/ath/ath_prom_read/Makefile | 1 - tools/tools/ath/athaggrstats/Makefile | 1 - tools/tools/ath/athalq/Makefile | 1 - tools/tools/ath/athani/Makefile | 1 - tools/tools/ath/athdebug/Makefile | 1 - tools/tools/ath/athkey/Makefile | 1 - tools/tools/ath/athpoke/Makefile | 1 - tools/tools/ath/athpow/Makefile | 1 - tools/tools/ath/athprom/Makefile | 1 - tools/tools/ath/athradar/Makefile | 1 - tools/tools/ath/athratestats/Makefile | 1 - tools/tools/ath/athrd/Makefile | 1 - tools/tools/ath/athregs/Makefile | 1 - tools/tools/ath/athspectral/Makefile | 1 - tools/tools/ath/athstats/Makefile | 1 - tools/tools/ath/athsurvey/Makefile | 1 - tools/tools/bootparttest/Makefile | 1 - tools/tools/cfi/Makefile | 1 - tools/tools/cxgbtool/Makefile | 1 - tools/tools/decioctl/Makefile | 1 - tools/tools/dmardump/Makefile | 1 - tools/tools/drm/radeon/mkregtable/Makefile | 1 - tools/tools/find-sb/Makefile | 1 - tools/tools/fixwhite/Makefile | 1 - tools/tools/genericize/Makefile | 1 - tools/tools/hcomp/Makefile | 1 - tools/tools/ifinfo/Makefile | 1 - tools/tools/ifpifa/Makefile | 1 - tools/tools/intel-ucode-split/Makefile | 1 - tools/tools/ioat/Makefile | 1 - tools/tools/ipw/Makefile | 1 - tools/tools/iwi/Makefile | 1 - tools/tools/iwn/Makefile | 1 - tools/tools/iwn/iwnstats/Makefile | 1 - tools/tools/kttcp/Makefile | 1 - tools/tools/kttcp/sys/Makefile | 1 - tools/tools/makeroot/Makefile | 1 - tools/tools/mcgrab/Makefile | 1 - tools/tools/mctest/Makefile | 1 - tools/tools/mfi/Makefile | 1 - tools/tools/mwl/Makefile | 1 - tools/tools/mwl/mwldebug/Makefile | 1 - tools/tools/mwl/mwlstats/Makefile | 1 - tools/tools/ncpus/Makefile | 1 - tools/tools/net80211/Makefile | 1 - tools/tools/net80211/stumbler/Makefile | 1 - tools/tools/net80211/w00t/Makefile | 1 - tools/tools/net80211/w00t/Makefile.inc | 1 - tools/tools/net80211/w00t/ap/Makefile | 1 - tools/tools/net80211/w00t/assoc/Makefile | 1 - tools/tools/net80211/w00t/expand/Makefile | 1 - tools/tools/net80211/w00t/libw00t/Makefile | 1 - tools/tools/net80211/w00t/prga/Makefile | 1 - tools/tools/net80211/w00t/redir/Makefile | 1 - tools/tools/net80211/wesside/Makefile | 1 - tools/tools/net80211/wesside/dics/Makefile | 1 - tools/tools/net80211/wesside/udps/Makefile | 1 - tools/tools/net80211/wesside/wesside/Makefile | 1 - tools/tools/net80211/wlaninject/Makefile | 1 - tools/tools/net80211/wlanstats/Makefile | 1 - tools/tools/net80211/wlantxtime/Makefile | 1 - tools/tools/net80211/wlanwatch/Makefile | 1 - tools/tools/net80211/wlanwds/Makefile | 1 - tools/tools/netrate/Makefile.inc | 1 - tools/tools/netrate/http/Makefile | 1 - tools/tools/netrate/httpd/Makefile | 1 - tools/tools/netrate/juggle/Makefile | 1 - tools/tools/netrate/tcpconnect/Makefile | 1 - tools/tools/netrate/tcpp/Makefile | 1 - tools/tools/netrate/tcpreceive/Makefile | 1 - tools/tools/notescheck/Makefile | 1 - tools/tools/npe/Makefile | 1 - tools/tools/npe/npestats/Makefile | 1 - tools/tools/pirtool/Makefile | 1 - tools/tools/shlib-compat/Makefile.sysfake | 1 - tools/tools/shlib-compat/test/Makefile | 1 - tools/tools/shlib-compat/test/Makefile.inc | 1 - tools/tools/shlib-compat/test/libtest1/Makefile | 1 - tools/tools/shlib-compat/test/libtest2/Makefile | 1 - tools/tools/shlib-compat/test/libtest3/Makefile | 1 - tools/tools/shlib-compat/test/libtestsys/Makefile | 1 - tools/tools/sortbench/Makefile | 1 - tools/tools/switch_tls/Makefile | 1 - tools/tools/sysdoc/Makefile | 1 - tools/tools/tionxcl/Makefile | 1 - tools/tools/track/Makefile | 1 - tools/tools/tscdrift/Makefile | 1 - tools/tools/umastat/Makefile | 1 - tools/tools/vimage/Makefile | 1 - tools/tools/vt/mkkfont/Makefile | 1 - tools/tools/whereintheworld/Makefile | 1 - tools/tools/wtap/Makefile | 1 - tools/tools/wtap/vis_map/Makefile | 1 - tools/tools/wtap/wtap/Makefile | 1 - tools/tools/zfsboottest/Makefile | 1 - usr.bin/Makefile | 1 - usr.bin/Makefile.amd64 | 1 - usr.bin/Makefile.arm | 1 - usr.bin/Makefile.i386 | 1 - usr.bin/Makefile.inc | 1 - usr.bin/Makefile.powerpc | 1 - usr.bin/addr2line/Makefile | 1 - usr.bin/alias/Makefile | 1 - usr.bin/apply/Makefile | 1 - usr.bin/apply/tests/Makefile | 1 - usr.bin/ar/Makefile | 1 - usr.bin/at/Makefile | 1 - usr.bin/at/Makefile.inc | 1 - usr.bin/awk/Makefile | 1 - usr.bin/awk/tests/Makefile | 1 - usr.bin/awk/tests/bugs-fixed/Makefile | 1 - usr.bin/awk/tests/netbsd/Makefile | 1 - usr.bin/backlight/Makefile | 1 - usr.bin/banner/Makefile | 1 - usr.bin/basename/Makefile | 1 - usr.bin/basename/tests/Makefile | 1 - usr.bin/beep/Makefile | 1 - usr.bin/biff/Makefile | 1 - usr.bin/bintrans/Makefile | 1 - usr.bin/bintrans/tests/Makefile | 1 - usr.bin/bluetooth/Makefile.inc | 1 - usr.bin/bmake/Makefile.inc | 1 - usr.bin/bmake/tests/Makefile | 1 - usr.bin/bmake/tests/Makefile.inc | 1 - usr.bin/bmake/tests/archives/Makefile | 1 - usr.bin/bmake/tests/archives/fmt_44bsd/Makefile | 1 - usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile | 1 - usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile | 1 - usr.bin/bmake/tests/basic/Makefile | 1 - usr.bin/bmake/tests/basic/t0/Makefile | 1 - usr.bin/bmake/tests/basic/t1/Makefile | 1 - usr.bin/bmake/tests/basic/t2/Makefile | 1 - usr.bin/bmake/tests/basic/t3/Makefile | 1 - usr.bin/bmake/tests/execution/Makefile | 1 - usr.bin/bmake/tests/execution/ellipsis/Makefile | 1 - usr.bin/bmake/tests/execution/ellipsis/Makefile.test | 1 - usr.bin/bmake/tests/execution/empty/Makefile | 1 - usr.bin/bmake/tests/execution/empty/Makefile.test | 1 - usr.bin/bmake/tests/execution/joberr/Makefile | 1 - usr.bin/bmake/tests/execution/joberr/Makefile.test | 1 - usr.bin/bmake/tests/execution/plus/Makefile | 1 - usr.bin/bmake/tests/execution/plus/Makefile.test | 1 - usr.bin/bmake/tests/shell/Makefile | 1 - usr.bin/bmake/tests/shell/builtin/Makefile | 1 - usr.bin/bmake/tests/shell/meta/Makefile | 1 - usr.bin/bmake/tests/shell/path/Makefile | 1 - usr.bin/bmake/tests/shell/path_select/Makefile | 1 - usr.bin/bmake/tests/shell/replace/Makefile | 1 - usr.bin/bmake/tests/shell/select/Makefile | 1 - usr.bin/bmake/tests/suffixes/Makefile | 1 - usr.bin/bmake/tests/suffixes/basic/Makefile | 1 - usr.bin/bmake/tests/suffixes/src_wild1/Makefile | 1 - usr.bin/bmake/tests/suffixes/src_wild1/Makefile.test | 1 - usr.bin/bmake/tests/suffixes/src_wild2/Makefile | 1 - usr.bin/bmake/tests/syntax/Makefile | 1 - usr.bin/bmake/tests/syntax/directive-t0/Makefile | 1 - usr.bin/bmake/tests/syntax/enl/Makefile | 1 - usr.bin/bmake/tests/syntax/funny-targets/Makefile | 1 - usr.bin/bmake/tests/syntax/semi/Makefile | 1 - usr.bin/bmake/tests/sysmk/Makefile | 1 - usr.bin/bmake/tests/sysmk/t0/2/1/Makefile | 1 - usr.bin/bmake/tests/sysmk/t0/2/Makefile | 1 - usr.bin/bmake/tests/sysmk/t0/Makefile | 1 - usr.bin/bmake/tests/sysmk/t0/mk/Makefile | 1 - usr.bin/bmake/tests/sysmk/t1/2/1/Makefile | 1 - usr.bin/bmake/tests/sysmk/t1/2/Makefile | 1 - usr.bin/bmake/tests/sysmk/t1/Makefile | 1 - usr.bin/bmake/tests/sysmk/t1/mk/Makefile | 1 - usr.bin/bmake/tests/sysmk/t2/2/1/Makefile | 1 - usr.bin/bmake/tests/sysmk/t2/2/Makefile | 1 - usr.bin/bmake/tests/sysmk/t2/Makefile | 1 - usr.bin/bmake/tests/sysmk/t2/mk/Makefile | 1 - usr.bin/bmake/tests/variables/Makefile | 1 - usr.bin/bmake/tests/variables/modifier_M/Makefile | 1 - usr.bin/bmake/tests/variables/modifier_t/Makefile | 1 - usr.bin/bmake/tests/variables/opt_V/Makefile | 1 - usr.bin/bmake/tests/variables/t0/Makefile | 1 - usr.bin/brandelf/Makefile | 1 - usr.bin/bsdcat/Makefile | 1 - usr.bin/bsdcat/tests/Makefile | 1 - usr.bin/bsdiff/Makefile | 1 - usr.bin/bsdiff/Makefile.inc | 1 - usr.bin/bsdiff/bsdiff/Makefile | 1 - usr.bin/bsdiff/bspatch/Makefile | 1 - usr.bin/bzip2/Makefile | 1 - usr.bin/bzip2recover/Makefile | 1 - usr.bin/c89/Makefile | 1 - usr.bin/c99/Makefile | 1 - usr.bin/caesar/Makefile | 1 - usr.bin/calendar/Makefile | 1 - usr.bin/calendar/tests/Makefile | 1 - usr.bin/cap_mkdb/Makefile | 1 - usr.bin/chat/Makefile | 1 - usr.bin/chkey/Makefile | 1 - usr.bin/chpass/Makefile | 1 - usr.bin/cksum/Makefile | 1 - usr.bin/clang/Makefile | 1 - usr.bin/clang/Makefile.inc | 1 - usr.bin/clang/bugpoint/Makefile | 1 - usr.bin/clang/clang-format/Makefile | 1 - usr.bin/clang/clang-tblgen/Makefile | 1 - usr.bin/clang/clang/Makefile | 1 - usr.bin/clang/llc/Makefile | 1 - usr.bin/clang/lld/Makefile | 1 - usr.bin/clang/lldb-server/Makefile | 1 - usr.bin/clang/lldb-tblgen/Makefile | 1 - usr.bin/clang/lldb/Makefile | 1 - usr.bin/clang/lli/Makefile | 1 - usr.bin/clang/llvm-ar/Makefile | 1 - usr.bin/clang/llvm-as/Makefile | 1 - usr.bin/clang/llvm-bcanalyzer/Makefile | 1 - usr.bin/clang/llvm-cov/Makefile | 1 - usr.bin/clang/llvm-cxxdump/Makefile | 1 - usr.bin/clang/llvm-cxxfilt/Makefile | 1 - usr.bin/clang/llvm-diff/Makefile | 1 - usr.bin/clang/llvm-dis/Makefile | 1 - usr.bin/clang/llvm-dwarfdump/Makefile | 1 - usr.bin/clang/llvm-dwarfutil/Makefile | 1 - usr.bin/clang/llvm-dwp/Makefile | 1 - usr.bin/clang/llvm-extract/Makefile | 1 - usr.bin/clang/llvm-link/Makefile | 1 - usr.bin/clang/llvm-lto/Makefile | 1 - usr.bin/clang/llvm-lto2/Makefile | 1 - usr.bin/clang/llvm-mc/Makefile | 1 - usr.bin/clang/llvm-mca/Makefile | 1 - usr.bin/clang/llvm-min-tblgen/Makefile | 1 - usr.bin/clang/llvm-modextract/Makefile | 1 - usr.bin/clang/llvm-nm/Makefile | 1 - usr.bin/clang/llvm-objcopy/Makefile | 1 - usr.bin/clang/llvm-objdump/Makefile | 1 - usr.bin/clang/llvm-pdbutil/Makefile | 1 - usr.bin/clang/llvm-profdata/Makefile | 1 - usr.bin/clang/llvm-readobj/Makefile | 1 - usr.bin/clang/llvm-rtdyld/Makefile | 1 - usr.bin/clang/llvm-size/Makefile | 1 - usr.bin/clang/llvm-strings/Makefile | 1 - usr.bin/clang/llvm-symbolizer/Makefile | 1 - usr.bin/clang/llvm-tblgen/Makefile | 1 - usr.bin/clang/llvm-xray/Makefile | 1 - usr.bin/clang/opt/Makefile | 1 - usr.bin/cmp/Makefile | 1 - usr.bin/cmp/tests/Makefile | 1 - usr.bin/col/Makefile | 1 - usr.bin/col/tests/Makefile | 1 - usr.bin/colrm/Makefile | 1 - usr.bin/column/Makefile | 1 - usr.bin/comm/Makefile | 1 - usr.bin/comm/tests/Makefile | 1 - usr.bin/compile_et/Makefile | 1 - usr.bin/compress/Makefile | 1 - usr.bin/compress/tests/Makefile | 1 - usr.bin/cpio/Makefile | 1 - usr.bin/cpio/tests/Makefile | 1 - usr.bin/csplit/Makefile | 1 - usr.bin/csplit/tests/Makefile | 1 - usr.bin/ctags/Makefile | 1 - usr.bin/ctlstat/Makefile | 1 - usr.bin/cut/Makefile | 1 - usr.bin/cut/tests/Makefile | 1 - usr.bin/cxxfilt/Makefile | 1 - usr.bin/dc/tests/Makefile | 1 - usr.bin/diff/tests/Makefile | 1 - usr.bin/diff3/Makefile | 1 - usr.bin/diff3/tests/Makefile | 1 - usr.bin/dirname/Makefile | 1 - usr.bin/dirname/tests/Makefile | 1 - usr.bin/dpv/Makefile | 1 - usr.bin/drill/Makefile | 1 - usr.bin/du/Makefile | 1 - usr.bin/du/tests/Makefile | 1 - usr.bin/ee/Makefile | 1 - usr.bin/elfctl/Makefile | 1 - usr.bin/elfdump/Makefile | 1 - usr.bin/enigma/Makefile | 1 - usr.bin/env/Makefile | 1 - usr.bin/etdump/Makefile | 1 - usr.bin/expand/Makefile | 1 - usr.bin/factor/Makefile | 1 - usr.bin/false/Makefile | 1 - usr.bin/fetch/Makefile | 1 - usr.bin/file2c/Makefile | 1 - usr.bin/file2c/tests/Makefile | 1 - usr.bin/find/Makefile | 1 - usr.bin/find/tests/Makefile | 1 - usr.bin/finger/Makefile | 1 - usr.bin/fmt/Makefile | 1 - usr.bin/fold/Makefile | 1 - usr.bin/fold/tests/Makefile | 1 - usr.bin/fortune/Makefile | 1 - usr.bin/fortune/Makefile.inc | 1 - usr.bin/fortune/datfiles/Makefile | 1 - usr.bin/fortune/fortune/Makefile | 1 - usr.bin/fortune/strfile/Makefile | 1 - usr.bin/fortune/unstr/Makefile | 1 - usr.bin/from/Makefile | 1 - usr.bin/fstat/Makefile | 1 - usr.bin/fsync/Makefile | 1 - usr.bin/gcore/Makefile | 1 - usr.bin/gencat/Makefile | 1 - usr.bin/getconf/Makefile | 1 - usr.bin/getconf/tests/Makefile | 1 - usr.bin/getent/Makefile | 1 - usr.bin/gh-bc/Makefile | 1 - usr.bin/gh-bc/tests/Makefile | 1 - usr.bin/gprof/Makefile | 1 - usr.bin/grdc/Makefile | 1 - usr.bin/grep/tests/Makefile | 1 - usr.bin/gzip/tests/Makefile | 1 - usr.bin/head/Makefile | 1 - usr.bin/head/tests/Makefile | 1 - usr.bin/hesinfo/Makefile | 1 - usr.bin/hexdump/Makefile | 1 - usr.bin/hexdump/tests/Makefile | 1 - usr.bin/host/Makefile | 1 - usr.bin/id/Makefile | 1 - usr.bin/ident/Makefile | 1 - usr.bin/ident/tests/Makefile | 1 - usr.bin/indent/Makefile | 1 - usr.bin/indent/tests/Makefile | 1 - usr.bin/ipcrm/Makefile | 1 - usr.bin/ipcs/Makefile | 1 - usr.bin/iscsictl/Makefile | 1 - usr.bin/join/Makefile | 1 - usr.bin/join/tests/Makefile | 1 - usr.bin/jot/Makefile | 1 - usr.bin/jot/tests/Makefile | 1 - usr.bin/kdump/Makefile | 1 - usr.bin/keylogin/Makefile | 1 - usr.bin/keylogout/Makefile | 1 - usr.bin/killall/Makefile | 1 - usr.bin/ktrace/Makefile | 1 - usr.bin/ktrdump/Makefile | 1 - usr.bin/kyua/Makefile | 1 - usr.bin/lam/Makefile | 1 - usr.bin/last/Makefile | 1 - usr.bin/lastcomm/Makefile | 1 - usr.bin/lastcomm/tests/Makefile | 1 - usr.bin/ldd/Makefile | 1 - usr.bin/ldd32/Makefile | 1 - usr.bin/leave/Makefile | 1 - usr.bin/less/Makefile | 1 - usr.bin/less/Makefile.common | 1 - usr.bin/lessecho/Makefile | 1 - usr.bin/lesskey/Makefile | 1 - usr.bin/lex/lib/Makefile | 1 - usr.bin/limits/Makefile | 1 - usr.bin/limits/tests/Makefile | 1 - usr.bin/locale/Makefile | 1 - usr.bin/locale/tests/Makefile | 1 - usr.bin/localedef/Makefile | 1 - usr.bin/locate/Makefile | 1 - usr.bin/locate/Makefile.inc | 1 - usr.bin/locate/bigram/Makefile | 1 - usr.bin/locate/code/Makefile | 1 - usr.bin/locate/locate/Makefile | 1 - usr.bin/lock/Makefile | 1 - usr.bin/lockf/Makefile | 1 - usr.bin/lockf/tests/Makefile | 1 - usr.bin/logger/Makefile | 1 - usr.bin/login/Makefile | 1 - usr.bin/logins/Makefile | 1 - usr.bin/logname/Makefile | 1 - usr.bin/look/Makefile | 1 - usr.bin/lsvfs/Makefile | 1 - usr.bin/lzmainfo/Makefile | 1 - usr.bin/m4/tests/Makefile | 1 - usr.bin/mail/Makefile | 1 - usr.bin/man/Makefile | 1 - usr.bin/mandoc/Makefile | 1 - usr.bin/mesg/Makefile | 1 - usr.bin/mkcsmapper/Makefile | 1 - usr.bin/mkcsmapper/Makefile.inc | 1 - usr.bin/mkcsmapper_static/Makefile | 1 - usr.bin/mkdep/Makefile | 1 - usr.bin/mkesdb/Makefile | 1 - usr.bin/mkesdb/Makefile.inc | 1 - usr.bin/mkesdb_static/Makefile | 1 - usr.bin/mkfifo/Makefile | 1 - usr.bin/mkimg/Makefile | 1 - usr.bin/mkimg/tests/Makefile | 1 - usr.bin/mkstr/Makefile | 1 - usr.bin/mktemp/Makefile | 1 - usr.bin/mktemp/tests/Makefile | 1 - usr.bin/mkuzip/Makefile | 1 - usr.bin/morse/Makefile | 1 - usr.bin/msgs/Makefile | 1 - usr.bin/mt/Makefile | 1 - usr.bin/nc/Makefile | 1 - usr.bin/ncal/Makefile | 1 - usr.bin/ncal/tests/Makefile | 1 - usr.bin/netstat/Makefile | 1 - usr.bin/newgrp/Makefile | 1 - usr.bin/newkey/Makefile | 1 - usr.bin/nfsstat/Makefile | 1 - usr.bin/nice/Makefile | 1 - usr.bin/nl/Makefile | 1 - usr.bin/nm/Makefile | 1 - usr.bin/nohup/Makefile | 1 - usr.bin/number/Makefile | 1 - usr.bin/objcopy/Makefile | 1 - usr.bin/ofed/Makefile | 1 - usr.bin/ofed/infiniband-diags/Makefile | 1 - usr.bin/ofed/infiniband-diags/Makefile.inc | 1 - usr.bin/ofed/infiniband-diags/dump_fts/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibaddr/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibccconfig/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibccquery/Makefile | 1 - usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibmirror/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibping/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibportstate/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibroute/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibstat/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibsysstat/Makefile | 1 - usr.bin/ofed/infiniband-diags/ibtracert/Makefile | 1 - usr.bin/ofed/infiniband-diags/perfquery/Makefile | 1 - usr.bin/ofed/infiniband-diags/saquery/Makefile | 1 - usr.bin/ofed/infiniband-diags/sminfo/Makefile | 1 - usr.bin/ofed/infiniband-diags/smpdump/Makefile | 1 - usr.bin/ofed/infiniband-diags/smpquery/Makefile | 1 - usr.bin/ofed/infiniband-diags/vendstat/Makefile | 1 - usr.bin/ofed/libibverbs/Makefile | 1 - usr.bin/ofed/libibverbs/Makefile.inc | 1 - usr.bin/ofed/libibverbs/asyncwatch/Makefile | 1 - usr.bin/ofed/libibverbs/devices/Makefile | 1 - usr.bin/ofed/libibverbs/devinfo/Makefile | 1 - usr.bin/ofed/libibverbs/rc_pingpong/Makefile | 1 - usr.bin/ofed/libibverbs/srq_pingpong/Makefile | 1 - usr.bin/ofed/libibverbs/uc_pingpong/Makefile | 1 - usr.bin/ofed/libibverbs/ud_pingpong/Makefile | 1 - usr.bin/ofed/librdmacm/Makefile | 1 - usr.bin/ofed/librdmacm/Makefile.inc | 1 - usr.bin/ofed/librdmacm/mckey/Makefile | 1 - usr.bin/ofed/librdmacm/rping/Makefile | 1 - usr.bin/ofed/librdmacm/ucmatose/Makefile | 1 - usr.bin/ofed/librdmacm/udaddy/Makefile | 1 - usr.bin/ofed/opensm/Makefile | 1 - usr.bin/pagesize/Makefile | 1 - usr.bin/pamtest/Makefile | 1 - usr.bin/passwd/Makefile | 1 - usr.bin/paste/Makefile | 1 - usr.bin/patch/tests/Makefile | 1 - usr.bin/pathchk/Makefile | 1 - usr.bin/perror/Makefile | 1 - usr.bin/pom/Makefile | 1 - usr.bin/posixshmcontrol/Makefile | 1 - usr.bin/pr/Makefile | 1 - usr.bin/pr/tests/Makefile | 1 - usr.bin/primes/Makefile | 1 - usr.bin/printenv/Makefile | 1 - usr.bin/printf/Makefile | 1 - usr.bin/printf/tests/Makefile | 1 - usr.bin/proccontrol/Makefile | 1 - usr.bin/procstat/Makefile | 1 - usr.bin/procstat/tests/Makefile | 1 - usr.bin/protect/Makefile | 1 - usr.bin/quota/Makefile | 1 - usr.bin/random/Makefile | 1 - usr.bin/rctl/Makefile | 1 - usr.bin/readelf/Makefile | 1 - usr.bin/renice/Makefile | 1 - usr.bin/resizewin/Makefile | 1 - usr.bin/rev/Makefile | 1 - usr.bin/revoke/Makefile | 1 - usr.bin/rpcgen/Makefile | 1 - usr.bin/rpcinfo/Makefile | 1 - usr.bin/rs/Makefile | 1 - usr.bin/rs/tests/Makefile | 1 - usr.bin/rup/Makefile | 1 - usr.bin/ruptime/Makefile | 1 - usr.bin/rusers/Makefile | 1 - usr.bin/rwall/Makefile | 1 - usr.bin/rwho/Makefile | 1 - usr.bin/script/Makefile | 1 - usr.bin/sdiff/Makefile | 1 - usr.bin/sdiff/tests/Makefile | 1 - usr.bin/sdiotool/Makefile | 1 - usr.bin/sed/Makefile | 1 - usr.bin/sed/tests/Makefile | 1 - usr.bin/sed/tests/regress.multitest.out/Makefile | 1 - usr.bin/seq/tests/Makefile | 1 - usr.bin/shar/Makefile | 1 - usr.bin/showmount/Makefile | 1 - usr.bin/size/Makefile | 1 - usr.bin/smbutil/Makefile | 1 - usr.bin/sockstat/Makefile | 1 - usr.bin/soelim/Makefile | 1 - usr.bin/soelim/tests/Makefile | 1 - usr.bin/sort/Makefile | 1 - usr.bin/sort/tests/Makefile | 1 - usr.bin/split/Makefile | 1 - usr.bin/split/tests/Makefile | 1 - usr.bin/ssh-copy-id/Makefile | 1 - usr.bin/stat/Makefile | 1 - usr.bin/stat/tests/Makefile | 1 - usr.bin/stdbuf/Makefile | 1 - usr.bin/strings/Makefile | 1 - usr.bin/su/Makefile | 1 - usr.bin/systat/Makefile | 1 - usr.bin/tabs/Makefile | 1 - usr.bin/tail/Makefile | 1 - usr.bin/tail/tests/Makefile | 1 - usr.bin/talk/Makefile | 1 - usr.bin/tar/tests/Makefile | 1 - usr.bin/tcopy/Makefile | 1 - usr.bin/tee/Makefile | 1 - usr.bin/telnet/Makefile | 1 - usr.bin/tests/Makefile | 1 - usr.bin/tftp/Makefile | 1 - usr.bin/tftp/tests/Makefile | 1 - usr.bin/time/Makefile | 1 - usr.bin/tip/Makefile | 1 - usr.bin/tip/Makefile.inc | 1 - usr.bin/top/Makefile | 1 - usr.bin/tr/Makefile | 1 - usr.bin/tr/tests/Makefile | 1 - usr.bin/true/Makefile | 1 - usr.bin/truncate/Makefile | 1 - usr.bin/truncate/tests/Makefile | 1 - usr.bin/truss/Makefile | 1 - usr.bin/tsort/Makefile | 1 - usr.bin/tty/Makefile | 1 - usr.bin/ul/Makefile | 1 - usr.bin/uname/Makefile | 1 - usr.bin/unexpand/Makefile | 1 - usr.bin/unifdef/tests/Makefile | 1 - usr.bin/uniq/Makefile | 1 - usr.bin/units/Makefile | 1 - usr.bin/units/tests/Makefile | 1 - usr.bin/unvis/Makefile | 1 - usr.bin/unzip/Makefile | 1 - usr.bin/unzip/tests/Makefile | 1 - usr.bin/users/Makefile | 1 - usr.bin/vacation/Makefile | 1 - usr.bin/vgrind/Makefile | 1 - usr.bin/vis/Makefile | 1 - usr.bin/vmstat/Makefile | 1 - usr.bin/vmstat/tests/Makefile | 1 - usr.bin/vtfontcvt/Makefile | 1 - usr.bin/w/Makefile | 1 - usr.bin/wall/Makefile | 1 - usr.bin/wc/Makefile | 1 - usr.bin/wc/tests/Makefile | 1 - usr.bin/wg/Makefile | 1 - usr.bin/what/Makefile | 1 - usr.bin/whereis/Makefile | 1 - usr.bin/which/Makefile | 1 - usr.bin/who/Makefile | 1 - usr.bin/whois/Makefile | 1 - usr.bin/write/Makefile | 1 - usr.bin/xargs/Makefile | 1 - usr.bin/xargs/tests/Makefile | 1 - usr.bin/xinstall/Makefile | 1 - usr.bin/xinstall/tests/Makefile | 1 - usr.bin/xo/Makefile | 1 - usr.bin/xo/tests/Makefile | 1 - usr.bin/xohtml/Makefile | 1 - usr.bin/xolint/Makefile | 1 - usr.bin/xopo/Makefile | 1 - usr.bin/xstr/Makefile | 1 - usr.bin/xzdec/Makefile | 1 - usr.bin/yacc/Makefile | 1 - usr.bin/yacc/tests/Makefile | 1 - usr.bin/yes/Makefile | 1 - usr.bin/ypcat/Makefile | 1 - usr.bin/ypmatch/Makefile | 1 - usr.bin/ypwhich/Makefile | 1 - usr.bin/zstd/Makefile | 1 - usr.sbin/Makefile | 1 - usr.sbin/Makefile.amd64 | 1 - usr.sbin/Makefile.i386 | 1 - usr.sbin/Makefile.inc | 1 - usr.sbin/Makefile.powerpc | 1 - usr.sbin/ac/Makefile | 1 - usr.sbin/accton/Makefile | 1 - usr.sbin/acpi/acpidb/Makefile | 1 - usr.sbin/acpi/acpidump/Makefile | 1 - usr.sbin/acpi/iasl/Makefile | 1 - usr.sbin/adduser/Makefile | 1 - usr.sbin/apm/Makefile | 1 - usr.sbin/apmd/Makefile | 1 - usr.sbin/arp/Makefile | 1 - usr.sbin/authpf/Makefile | 1 - usr.sbin/autofs/Makefile | 1 - usr.sbin/autofs/autofs/Makefile | 1 - usr.sbin/bhyve/kbdlayout/Makefile | 1 - usr.sbin/bhyveload/Makefile | 1 - usr.sbin/blacklistctl/Makefile | 1 - usr.sbin/blacklistd/Makefile | 1 - usr.sbin/bluetooth/Makefile.inc | 1 - usr.sbin/bluetooth/ath3kfw/Makefile | 1 - usr.sbin/bluetooth/bluetooth-config/Makefile | 1 - usr.sbin/bluetooth/iwmbtfw/Makefile | 1 - usr.sbin/boot0cfg/Makefile | 1 - usr.sbin/bootparamd/Makefile | 1 - usr.sbin/bootparamd/Makefile.inc | 1 - usr.sbin/bootparamd/bootparamd/Makefile | 1 - usr.sbin/bootparamd/callbootd/Makefile | 1 - usr.sbin/bsdconfig/Makefile | 1 - usr.sbin/bsdconfig/console/Makefile | 1 - usr.sbin/bsdconfig/console/include/Makefile | 1 - usr.sbin/bsdconfig/diskmgmt/Makefile | 1 - usr.sbin/bsdconfig/diskmgmt/include/Makefile | 1 - usr.sbin/bsdconfig/docsinstall/Makefile | 1 - usr.sbin/bsdconfig/docsinstall/include/Makefile | 1 - usr.sbin/bsdconfig/dot/Makefile | 1 - usr.sbin/bsdconfig/dot/include/Makefile | 1 - usr.sbin/bsdconfig/examples/Makefile | 1 - usr.sbin/bsdconfig/include/Makefile | 1 - usr.sbin/bsdconfig/includes/Makefile | 1 - usr.sbin/bsdconfig/includes/include/Makefile | 1 - usr.sbin/bsdconfig/mouse/Makefile | 1 - usr.sbin/bsdconfig/mouse/include/Makefile | 1 - usr.sbin/bsdconfig/networking/Makefile | 1 - usr.sbin/bsdconfig/networking/include/Makefile | 1 - usr.sbin/bsdconfig/networking/share/Makefile | 1 - usr.sbin/bsdconfig/packages/Makefile | 1 - usr.sbin/bsdconfig/packages/include/Makefile | 1 - usr.sbin/bsdconfig/password/Makefile | 1 - usr.sbin/bsdconfig/password/include/Makefile | 1 - usr.sbin/bsdconfig/password/share/Makefile | 1 - usr.sbin/bsdconfig/security/Makefile | 1 - usr.sbin/bsdconfig/security/include/Makefile | 1 - usr.sbin/bsdconfig/share/Makefile | 1 - usr.sbin/bsdconfig/share/media/Makefile | 1 - usr.sbin/bsdconfig/share/packages/Makefile | 1 - usr.sbin/bsdconfig/startup/Makefile | 1 - usr.sbin/bsdconfig/startup/include/Makefile | 1 - usr.sbin/bsdconfig/startup/share/Makefile | 1 - usr.sbin/bsdconfig/timezone/Makefile | 1 - usr.sbin/bsdconfig/timezone/include/Makefile | 1 - usr.sbin/bsdconfig/timezone/share/Makefile | 1 - usr.sbin/bsdconfig/ttys/Makefile | 1 - usr.sbin/bsdconfig/ttys/include/Makefile | 1 - usr.sbin/bsdconfig/usermgmt/Makefile | 1 - usr.sbin/bsdconfig/usermgmt/include/Makefile | 1 - usr.sbin/bsdconfig/usermgmt/share/Makefile | 1 - usr.sbin/bsdinstall/Makefile | 1 - usr.sbin/bsdinstall/distextract/Makefile | 1 - usr.sbin/bsdinstall/distfetch/Makefile | 1 - usr.sbin/bsdinstall/partedit/Makefile | 1 - usr.sbin/bsdinstall/scripts/Makefile | 1 - usr.sbin/bsnmpd/Makefile | 1 - usr.sbin/bsnmpd/Makefile.inc | 1 - usr.sbin/bsnmpd/modules/Makefile | 1 - usr.sbin/bsnmpd/modules/Makefile.inc | 1 - usr.sbin/bsnmpd/modules/snmp_hast/Makefile | 1 - usr.sbin/bsnmpd/modules/snmp_lm75/Makefile | 1 - usr.sbin/btxld/Makefile | 1 - usr.sbin/camdd/Makefile | 1 - usr.sbin/cdcontrol/Makefile | 1 - usr.sbin/certctl/Makefile | 1 - usr.sbin/chkgrp/Makefile | 1 - usr.sbin/chown/Makefile | 1 - usr.sbin/chown/tests/Makefile | 1 - usr.sbin/chroot/Makefile | 1 - usr.sbin/ckdist/Makefile | 1 - usr.sbin/clear_locks/Makefile | 1 - usr.sbin/config/Makefile | 1 - usr.sbin/cpucontrol/Makefile | 1 - usr.sbin/crashinfo/Makefile | 1 - usr.sbin/cron/Makefile | 1 - usr.sbin/cron/Makefile.inc | 1 - usr.sbin/cron/cron/Makefile | 1 - usr.sbin/cron/crontab/Makefile | 1 - usr.sbin/cron/lib/Makefile | 1 - usr.sbin/crunch/Makefile | 1 - usr.sbin/crunch/Makefile.inc | 1 - usr.sbin/crunch/crunchgen/Makefile | 1 - usr.sbin/crunch/crunchide/Makefile | 1 - usr.sbin/crunch/examples/Makefile | 1 - usr.sbin/ctladm/Makefile | 1 - usr.sbin/ctladm/tests/Makefile | 1 - usr.sbin/ctld/Makefile | 1 - usr.sbin/cxgbetool/Makefile | 1 - usr.sbin/daemon/Makefile | 1 - usr.sbin/daemon/tests/Makefile | 1 - usr.sbin/dconschat/Makefile | 1 - usr.sbin/devctl/Makefile | 1 - usr.sbin/devinfo/Makefile | 1 - usr.sbin/diskinfo/Makefile | 1 - usr.sbin/editmap/Makefile | 1 - usr.sbin/edquota/Makefile | 1 - usr.sbin/efidp/Makefile | 1 - usr.sbin/efitable/Makefile | 1 - usr.sbin/efivar/Makefile | 1 - usr.sbin/efiwake/Makefile | 1 - usr.sbin/etcupdate/Makefile | 1 - usr.sbin/etcupdate/tests/Makefile | 1 - usr.sbin/extattr/Makefile | 1 - usr.sbin/extattr/tests/Makefile | 1 - usr.sbin/extattrctl/Makefile | 1 - usr.sbin/fdcontrol/Makefile | 1 - usr.sbin/fdformat/Makefile | 1 - usr.sbin/fdread/Makefile | 1 - usr.sbin/fifolog/Makefile | 1 - usr.sbin/fifolog/Makefile.inc | 1 - usr.sbin/fifolog/fifolog_create/Makefile | 1 - usr.sbin/fifolog/fifolog_reader/Makefile | 1 - usr.sbin/fifolog/fifolog_writer/Makefile | 1 - usr.sbin/fifolog/lib/Makefile | 1 - usr.sbin/freebsd-update/Makefile | 1 - usr.sbin/fstyp/Makefile | 1 - usr.sbin/fstyp/tests/Makefile | 1 - usr.sbin/ftp-proxy/Makefile | 1 - usr.sbin/fwcontrol/Makefile | 1 - usr.sbin/getfmac/Makefile | 1 - usr.sbin/getpmac/Makefile | 1 - usr.sbin/gpioctl/Makefile | 1 - usr.sbin/gssd/Makefile | 1 - usr.sbin/gstat/Makefile | 1 - usr.sbin/hyperv/Makefile | 1 - usr.sbin/hyperv/Makefile.inc | 1 - usr.sbin/hyperv/tools/Makefile.inc | 1 - usr.sbin/hyperv/tools/kvp/Makefile | 1 - usr.sbin/i2c/Makefile | 1 - usr.sbin/ifmcstat/Makefile | 1 - usr.sbin/inetd/Makefile | 1 - usr.sbin/iostat/Makefile | 1 - usr.sbin/iovctl/Makefile | 1 - usr.sbin/ip6addrctl/Makefile | 1 - usr.sbin/iscsid/Makefile | 1 - usr.sbin/jail/Makefile | 1 - usr.sbin/jail/tests/Makefile | 1 - usr.sbin/jexec/Makefile | 1 - usr.sbin/jls/Makefile | 1 - usr.sbin/kbdcontrol/Makefile | 1 - usr.sbin/kbdmap/Makefile | 1 - usr.sbin/keyserv/Makefile | 1 - usr.sbin/kldxref/Makefile | 1 - usr.sbin/lastlogin/Makefile | 1 - usr.sbin/lpr/Makefile | 1 - usr.sbin/lpr/Makefile.inc | 1 - usr.sbin/lpr/chkprintcap/Makefile | 1 - usr.sbin/lpr/common_source/Makefile | 1 - usr.sbin/lpr/filters.ru/Makefile | 1 - usr.sbin/lpr/filters.ru/Makefile.inc | 1 - usr.sbin/lpr/filters.ru/koi2855/Makefile | 1 - usr.sbin/lpr/filters.ru/koi2alt/Makefile | 1 - usr.sbin/lpr/filters/Makefile | 1 - usr.sbin/lpr/lp/Makefile | 1 - usr.sbin/lpr/lpc/Makefile | 1 - usr.sbin/lpr/lpd/Makefile | 1 - usr.sbin/lpr/lpq/Makefile | 1 - usr.sbin/lpr/lpr/Makefile | 1 - usr.sbin/lpr/lprm/Makefile | 1 - usr.sbin/lpr/lptest/Makefile | 1 - usr.sbin/lpr/pac/Makefile | 1 - usr.sbin/lptcontrol/Makefile | 1 - usr.sbin/mailstats/Makefile | 1 - usr.sbin/mailwrapper/Makefile | 1 - usr.sbin/makefs/Makefile | 1 - usr.sbin/makefs/tests/Makefile | 1 - usr.sbin/makemap/Makefile | 1 - usr.sbin/manctl/Makefile | 1 - usr.sbin/memcontrol/Makefile | 1 - usr.sbin/mergemaster/Makefile | 1 - usr.sbin/mixer/Makefile | 1 - usr.sbin/mlx5tool/Makefile | 1 - usr.sbin/mlxcontrol/Makefile | 1 - usr.sbin/mount_smbfs/Makefile | 1 - usr.sbin/mountd/Makefile | 1 - usr.sbin/moused/Makefile | 1 - usr.sbin/mptable/Makefile | 1 - usr.sbin/mptutil/Makefile | 1 - usr.sbin/mtest/Makefile | 1 - usr.sbin/newsyslog/Makefile | 1 - usr.sbin/newsyslog/newsyslog.conf.d/Makefile | 1 - usr.sbin/newsyslog/tests/Makefile | 1 - usr.sbin/nfscbd/Makefile | 1 - usr.sbin/nfsd/Makefile | 1 - usr.sbin/nfsdumpstate/Makefile | 1 - usr.sbin/nfsrevoke/Makefile | 1 - usr.sbin/nfsuserd/Makefile | 1 - usr.sbin/nmtree/Makefile | 1 - usr.sbin/nmtree/tests/Makefile | 1 - usr.sbin/nologin/Makefile | 1 - usr.sbin/nscd/Makefile | 1 - usr.sbin/nscd/agents/Makefile.inc | 1 - usr.sbin/ntp/Makefile.inc | 1 - usr.sbin/ntp/doc/Makefile | 1 - usr.sbin/ntp/doc/drivers/Makefile | 1 - usr.sbin/ntp/doc/drivers/icons/Makefile | 1 - usr.sbin/ntp/doc/drivers/scripts/Makefile | 1 - usr.sbin/ntp/doc/hints/Makefile | 1 - usr.sbin/ntp/doc/icons/Makefile | 1 - usr.sbin/ntp/doc/pic/Makefile | 1 - usr.sbin/ntp/doc/scripts/Makefile | 1 - usr.sbin/ntp/libntp/Makefile | 1 - usr.sbin/ntp/libntpevent/Makefile | 1 - usr.sbin/ntp/libopts/Makefile | 1 - usr.sbin/ntp/libparse/Makefile | 1 - usr.sbin/ntp/ntp-keygen/Makefile | 1 - usr.sbin/ntp/ntpd/Makefile | 1 - usr.sbin/ntp/ntpdate/Makefile | 1 - usr.sbin/ntp/ntpdc/Makefile | 1 - usr.sbin/ntp/ntpq/Makefile | 1 - usr.sbin/ntp/ntptime/Makefile | 1 - usr.sbin/ntp/sntp/Makefile | 1 - usr.sbin/nvram/Makefile | 1 - usr.sbin/ofwdump/Makefile | 1 - usr.sbin/periodic/Makefile | 1 - usr.sbin/periodic/etc/Makefile | 1 - usr.sbin/periodic/etc/Makefile.inc | 1 - usr.sbin/periodic/etc/daily/Makefile | 1 - usr.sbin/periodic/etc/monthly/Makefile | 1 - usr.sbin/periodic/etc/security/Makefile | 1 - usr.sbin/periodic/etc/weekly/Makefile | 1 - usr.sbin/pkg/Makefile | 1 - usr.sbin/pmcstudy/Makefile | 1 - usr.sbin/pnfsdscopymr/Makefile | 1 - usr.sbin/pnfsdsfile/Makefile | 1 - usr.sbin/pnfsdskill/Makefile | 1 - usr.sbin/pnpinfo/Makefile | 1 - usr.sbin/powerd/Makefile | 1 - usr.sbin/ppp/Makefile | 1 - usr.sbin/pppctl/Makefile | 1 - usr.sbin/praliases/Makefile | 1 - usr.sbin/praudit/tests/Makefile | 1 - usr.sbin/prometheus_sysctl_exporter/Makefile | 1 - usr.sbin/pstat/Makefile | 1 - usr.sbin/pw/Makefile | 1 - usr.sbin/pw/tests/Makefile | 1 - usr.sbin/pwd_mkdb/Makefile | 1 - usr.sbin/pwm/Makefile | 1 - usr.sbin/quot/Makefile | 1 - usr.sbin/quotaon/Makefile | 1 - usr.sbin/rarpd/Makefile | 1 - usr.sbin/repquota/Makefile | 1 - usr.sbin/rip6query/Makefile | 1 - usr.sbin/rmt/Makefile | 1 - usr.sbin/route6d/Makefile | 1 - usr.sbin/rpc.statd/Makefile | 1 - usr.sbin/rpc.tlsclntd/Makefile | 1 - usr.sbin/rpc.tlsservd/Makefile | 1 - usr.sbin/rpc.umntall/Makefile | 1 - usr.sbin/rpc.yppasswdd/Makefile | 1 - usr.sbin/rpc.ypupdated/Makefile | 1 - usr.sbin/rpc.ypxfrd/Makefile | 1 - usr.sbin/rpcbind/tests/Makefile | 1 - usr.sbin/rtprio/Makefile | 1 - usr.sbin/rwhod/Makefile | 1 - usr.sbin/sa/Makefile | 1 - usr.sbin/sa/tests/Makefile | 1 - usr.sbin/sendmail/Makefile | 1 - usr.sbin/service/Makefile | 1 - usr.sbin/services_mkdb/Makefile | 1 - usr.sbin/sesutil/Makefile | 1 - usr.sbin/setfib/Makefile | 1 - usr.sbin/setfmac/Makefile | 1 - usr.sbin/setpmac/Makefile | 1 - usr.sbin/spi/Makefile | 1 - usr.sbin/spkrtest/Makefile | 1 - usr.sbin/spray/Makefile | 1 - usr.sbin/syslogd/Makefile | 1 - usr.sbin/sysrc/Makefile | 1 - usr.sbin/tcpdchk/Makefile | 1 - usr.sbin/tcpdmatch/Makefile | 1 - usr.sbin/tcpdump/Makefile | 1 - usr.sbin/tcpdump/Makefile.inc | 1 - usr.sbin/tcpdump/tcpdump/Makefile | 1 - usr.sbin/tests/Makefile | 1 - usr.sbin/traceroute/Makefile | 1 - usr.sbin/trim/Makefile | 1 - usr.sbin/tzsetup/Makefile | 1 - usr.sbin/uathload/Makefile | 1 - usr.sbin/uefisign/Makefile | 1 - usr.sbin/ugidfw/Makefile | 1 - usr.sbin/uhsoctl/Makefile | 1 - usr.sbin/unbound/Makefile | 1 - usr.sbin/unbound/Makefile.inc | 1 - usr.sbin/unbound/anchor/Makefile | 1 - usr.sbin/unbound/checkconf/Makefile | 1 - usr.sbin/unbound/control/Makefile | 1 - usr.sbin/unbound/daemon/Makefile | 1 - usr.sbin/unbound/setup/Makefile | 1 - usr.sbin/usbdump/Makefile | 1 - usr.sbin/utx/Makefile | 1 - usr.sbin/valectl/Makefile | 1 - usr.sbin/vidcontrol/Makefile | 1 - usr.sbin/vigr/Makefile | 1 - usr.sbin/vipw/Makefile | 1 - usr.sbin/wake/Makefile | 1 - usr.sbin/watch/Makefile | 1 - usr.sbin/watchdogd/Makefile | 1 - usr.sbin/wlandebug/Makefile | 1 - usr.sbin/wpa/Makefile | 1 - usr.sbin/wpa/Makefile.crypto | 1 - usr.sbin/wpa/Makefile.inc | 1 - usr.sbin/wpa/hostapd/Makefile | 1 - usr.sbin/wpa/hostapd_cli/Makefile | 1 - usr.sbin/wpa/wpa_cli/Makefile | 1 - usr.sbin/wpa/wpa_passphrase/Makefile | 1 - usr.sbin/wpa/wpa_priv/Makefile | 1 - usr.sbin/wpa/wpa_supplicant/Makefile | 1 - usr.sbin/yp_mkdb/Makefile | 1 - usr.sbin/ypbind/Makefile | 1 - usr.sbin/yppoll/Makefile | 1 - usr.sbin/yppush/Makefile | 1 - usr.sbin/ypserv/Makefile | 1 - usr.sbin/ypset/Makefile | 1 - usr.sbin/zdump/Makefile | 1 - usr.sbin/zic/Makefile | 1 - usr.sbin/zonectl/Makefile | 1 - usr.sbin/zzz/Makefile | 1 - 3184 files changed, 3184 deletions(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index a957c47598e6..7054cf9ee0bb 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -1,4 +1,3 @@ - .if !targets(__<${_this:T}>__) __<${_this:T}>__: diff --git a/bin/Makefile b/bin/Makefile index bf352b4d78da..3c37336b25e6 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= cat \ diff --git a/bin/Makefile.inc b/bin/Makefile.inc index 8f9ef366e9a4..f154d70ab9d5 100644 --- a/bin/Makefile.inc +++ b/bin/Makefile.inc @@ -1,4 +1,3 @@ - .include BINDIR?= /bin diff --git a/bin/cat/Makefile b/bin/cat/Makefile index 97b19e701e4f..e8b5ac7c0706 100644 --- a/bin/cat/Makefile +++ b/bin/cat/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/cat/tests/Makefile b/bin/cat/tests/Makefile index 83f93f5fc2db..2f48c7d4e0cf 100644 --- a/bin/cat/tests/Makefile +++ b/bin/cat/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests NETBSD_ATF_TESTS_SH= cat_test diff --git a/bin/chflags/Makefile b/bin/chflags/Makefile index fd19a4e4f848..f0ced5d381dc 100644 --- a/bin/chflags/Makefile +++ b/bin/chflags/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/chflags/tests/Makefile b/bin/chflags/tests/Makefile index eb2f870fd6aa..cd83b67852ad 100644 --- a/bin/chflags/tests/Makefile +++ b/bin/chflags/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= chflags_test .include diff --git a/bin/chio/Makefile b/bin/chio/Makefile index 0783e1d8372d..817c200a1c81 100644 --- a/bin/chio/Makefile +++ b/bin/chio/Makefile @@ -1,4 +1,3 @@ - PACKAGE=utilities PROG= chio diff --git a/bin/chmod/Makefile b/bin/chmod/Makefile index e6de3a834c45..6ad01ed4b716 100644 --- a/bin/chmod/Makefile +++ b/bin/chmod/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/chmod/tests/Makefile b/bin/chmod/tests/Makefile index ebd96181cee4..a27b7c3aec48 100644 --- a/bin/chmod/tests/Makefile +++ b/bin/chmod/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= chmod_test .include diff --git a/bin/cp/Makefile b/bin/cp/Makefile index 6da92d982f63..ae8770154408 100644 --- a/bin/cp/Makefile +++ b/bin/cp/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/cp/tests/Makefile b/bin/cp/tests/Makefile index 36cf247ceae1..3fa9ae8f0685 100644 --- a/bin/cp/tests/Makefile +++ b/bin/cp/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= cp_test diff --git a/bin/cpuset/Makefile b/bin/cpuset/Makefile index 6e88614a6a6e..d6f58db62901 100644 --- a/bin/cpuset/Makefile +++ b/bin/cpuset/Makefile @@ -1,4 +1,3 @@ - PROG= cpuset LIBADD= jail diff --git a/bin/date/Makefile b/bin/date/Makefile index 85c269aa10b1..6f2e7b7cf900 100644 --- a/bin/date/Makefile +++ b/bin/date/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/date/tests/Makefile b/bin/date/tests/Makefile index 02675a3dc8a5..98625c4b1b34 100644 --- a/bin/date/tests/Makefile +++ b/bin/date/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= format_string_test .include diff --git a/bin/dd/Makefile b/bin/dd/Makefile index fde8e08db42a..1f8462aef5fa 100644 --- a/bin/dd/Makefile +++ b/bin/dd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/dd/tests/Makefile b/bin/dd/tests/Makefile index e0d924f6d13f..70ce32336f91 100644 --- a/bin/dd/tests/Makefile +++ b/bin/dd/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= dd2_test NETBSD_ATF_TESTS_SH= dd_test diff --git a/bin/df/Makefile b/bin/df/Makefile index 6584f8901cfc..d00b17c6df54 100644 --- a/bin/df/Makefile +++ b/bin/df/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= df diff --git a/bin/domainname/Makefile b/bin/domainname/Makefile index 7f68f14eccd6..e0fdcfe8bbf1 100644 --- a/bin/domainname/Makefile +++ b/bin/domainname/Makefile @@ -1,4 +1,3 @@ - PACKAGE=yp PROG= domainname diff --git a/bin/echo/Makefile b/bin/echo/Makefile index 385e459f81cb..e730e0a44a63 100644 --- a/bin/echo/Makefile +++ b/bin/echo/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/echo/tests/Makefile b/bin/echo/tests/Makefile index 1725e32671a3..18fa46816770 100644 --- a/bin/echo/tests/Makefile +++ b/bin/echo/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= echo_test .include diff --git a/bin/ed/Makefile b/bin/ed/Makefile index 776979f04e47..cad48082f186 100644 --- a/bin/ed/Makefile +++ b/bin/ed/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/ed/test/Makefile b/bin/ed/test/Makefile index 4a339d030291..bd89a3d1d7c7 100644 --- a/bin/ed/test/Makefile +++ b/bin/ed/test/Makefile @@ -1,4 +1,3 @@ - SHELL= /bin/sh ED= ${.OBJDIR}/ed diff --git a/bin/expr/Makefile b/bin/expr/Makefile index 5386ec538684..7239e82631b0 100644 --- a/bin/expr/Makefile +++ b/bin/expr/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/expr/tests/Makefile b/bin/expr/tests/Makefile index 8f32a5ea560f..27f7438ba7d0 100644 --- a/bin/expr/tests/Makefile +++ b/bin/expr/tests/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_SH= expr_test ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g' diff --git a/bin/freebsd-version/Makefile b/bin/freebsd-version/Makefile index 6efe04a196c2..2ce39610e094 100644 --- a/bin/freebsd-version/Makefile +++ b/bin/freebsd-version/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime SCRIPTS = freebsd-version MAN = freebsd-version.1 diff --git a/bin/getfacl/Makefile b/bin/getfacl/Makefile index 803c0cb2f07a..6bc37f05b3fd 100644 --- a/bin/getfacl/Makefile +++ b/bin/getfacl/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= getfacl diff --git a/bin/kenv/Makefile b/bin/kenv/Makefile index 5727aab93da2..b5bc75c61e77 100644 --- a/bin/kenv/Makefile +++ b/bin/kenv/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= kenv diff --git a/bin/kill/Makefile b/bin/kill/Makefile index 4023586d2aa7..44054b8a44a7 100644 --- a/bin/kill/Makefile +++ b/bin/kill/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= kill diff --git a/bin/ln/Makefile b/bin/ln/Makefile index 141aa57aab5b..0220ac3ba459 100644 --- a/bin/ln/Makefile +++ b/bin/ln/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/ln/tests/Makefile b/bin/ln/tests/Makefile index 5da5c54adfad..13ae71b73143 100644 --- a/bin/ln/tests/Makefile +++ b/bin/ln/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= ln_test .include diff --git a/bin/ls/Makefile b/bin/ls/Makefile index b9aa06775e7f..574ab0d71a45 100644 --- a/bin/ls/Makefile +++ b/bin/ls/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/ls/tests/Makefile b/bin/ls/tests/Makefile index f7121982a7b8..e750910cc91d 100644 --- a/bin/ls/tests/Makefile +++ b/bin/ls/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= ls_tests # This seems like overkill, but the idea in mind is that all of the testcases # should be runnable as !root diff --git a/bin/mkdir/Makefile b/bin/mkdir/Makefile index 8bf3cfb0e081..0550f769e6f7 100644 --- a/bin/mkdir/Makefile +++ b/bin/mkdir/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/mkdir/tests/Makefile b/bin/mkdir/tests/Makefile index 64ac0d723529..d6b025b660bf 100644 --- a/bin/mkdir/tests/Makefile +++ b/bin/mkdir/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= mkdir_test .include diff --git a/bin/mv/Makefile b/bin/mv/Makefile index 2413f572874f..6dbba5dba453 100644 --- a/bin/mv/Makefile +++ b/bin/mv/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/mv/tests/Makefile b/bin/mv/tests/Makefile index 1785fa6c5149..0e8da4c0981d 100644 --- a/bin/mv/tests/Makefile +++ b/bin/mv/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_SH= legacy_test diff --git a/bin/pax/Makefile b/bin/pax/Makefile index 6b40986ce3a9..abcfe61c7da6 100644 --- a/bin/pax/Makefile +++ b/bin/pax/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/pax/tests/Makefile b/bin/pax/tests/Makefile index 622e59c57d10..1ebe2e3f7c9d 100644 --- a/bin/pax/tests/Makefile +++ b/bin/pax/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_PERL= legacy_test diff --git a/bin/pkill/tests/Makefile b/bin/pkill/tests/Makefile index d92b08724561..aaf165521304 100644 --- a/bin/pkill/tests/Makefile +++ b/bin/pkill/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/bin/ps/Makefile b/bin/ps/Makefile index 23183e4e66b7..a25b6a796ed0 100644 --- a/bin/ps/Makefile +++ b/bin/ps/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= ps SRCS= fmt.c keyword.c nlist.c print.c ps.c diff --git a/bin/pwait/Makefile b/bin/pwait/Makefile index de3d5481fd40..99e6534034dc 100644 --- a/bin/pwait/Makefile +++ b/bin/pwait/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/pwait/tests/Makefile b/bin/pwait/tests/Makefile index 8e916ae47b38..4e355ccfe787 100644 --- a/bin/pwait/tests/Makefile +++ b/bin/pwait/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= pwait_test .include diff --git a/bin/pwd/Makefile b/bin/pwd/Makefile index b46f7c19f6a0..f6065e1d5b9f 100644 --- a/bin/pwd/Makefile +++ b/bin/pwd/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= pwd diff --git a/bin/realpath/Makefile b/bin/realpath/Makefile index bda6bff8a66b..e5868f95f466 100644 --- a/bin/realpath/Makefile +++ b/bin/realpath/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= realpath diff --git a/bin/rm/Makefile b/bin/rm/Makefile index 777254eb548a..dac3bee2247c 100644 --- a/bin/rm/Makefile +++ b/bin/rm/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/rm/tests/Makefile b/bin/rm/tests/Makefile index 7ff149da0ab1..4145756fd3aa 100644 --- a/bin/rm/tests/Makefile +++ b/bin/rm/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= rm_test .include diff --git a/bin/rmail/Makefile b/bin/rmail/Makefile index 1d0b26eb66d4..c9cd44596dfe 100644 --- a/bin/rmail/Makefile +++ b/bin/rmail/Makefile @@ -1,4 +1,3 @@ - PACKAGE=sendmail SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/rmail diff --git a/bin/rmdir/Makefile b/bin/rmdir/Makefile index 319d89ff7117..c51640af3b6f 100644 --- a/bin/rmdir/Makefile +++ b/bin/rmdir/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/rmdir/tests/Makefile b/bin/rmdir/tests/Makefile index b8be667b83a0..00c885b2949b 100644 --- a/bin/rmdir/tests/Makefile +++ b/bin/rmdir/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= rmdir_test .include diff --git a/bin/setfacl/Makefile b/bin/setfacl/Makefile index 5b9d615caf80..128077aa16a0 100644 --- a/bin/setfacl/Makefile +++ b/bin/setfacl/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= setfacl SRCS= file.c mask.c merge.c remove.c setfacl.c util.c diff --git a/bin/sh/Makefile b/bin/sh/Makefile index d2043ecad269..087dbf40c3bd 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -1,4 +1,3 @@ - .include CONFGROUPS= ETC ROOT diff --git a/bin/sh/tests/Makefile b/bin/sh/tests/Makefile index ea28b9d39bd8..c97779911e6c 100644 --- a/bin/sh/tests/Makefile +++ b/bin/sh/tests/Makefile @@ -1,4 +1,3 @@ - .include TESTS_SUBDIRS+= builtins diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index c3ed122791b5..ac959b17c639 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .include diff --git a/bin/sh/tests/errors/Makefile b/bin/sh/tests/errors/Makefile index 27e4f7143de5..26b1ccbef4ee 100644 --- a/bin/sh/tests/errors/Makefile +++ b/bin/sh/tests/errors/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/execution/Makefile b/bin/sh/tests/execution/Makefile index 2b4f88db989c..53cb97db9393 100644 --- a/bin/sh/tests/execution/Makefile +++ b/bin/sh/tests/execution/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/expansion/Makefile b/bin/sh/tests/expansion/Makefile index d38fd49e14ee..af4b36991569 100644 --- a/bin/sh/tests/expansion/Makefile +++ b/bin/sh/tests/expansion/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/invocation/Makefile b/bin/sh/tests/invocation/Makefile index 6c892026ec75..e1d0601e57ac 100644 --- a/bin/sh/tests/invocation/Makefile +++ b/bin/sh/tests/invocation/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/parameters/Makefile b/bin/sh/tests/parameters/Makefile index 0d6722b1d65a..50352c91b6f0 100644 --- a/bin/sh/tests/parameters/Makefile +++ b/bin/sh/tests/parameters/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile index 812edafa7ca8..afeb604710e4 100644 --- a/bin/sh/tests/parser/Makefile +++ b/bin/sh/tests/parser/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sh/tests/set-e/Makefile b/bin/sh/tests/set-e/Makefile index 0d72e148da2c..6b5b9a228022 100644 --- a/bin/sh/tests/set-e/Makefile +++ b/bin/sh/tests/set-e/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} diff --git a/bin/sleep/Makefile b/bin/sleep/Makefile index 8cece2dbc312..d0310fc4bead 100644 --- a/bin/sleep/Makefile +++ b/bin/sleep/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/sleep/tests/Makefile b/bin/sleep/tests/Makefile index 0f15dd5a4b9d..1712dc1ecef6 100644 --- a/bin/sleep/tests/Makefile +++ b/bin/sleep/tests/Makefile @@ -1,4 +1,3 @@ - .include NETBSD_ATF_TESTS_SH= sleep_test diff --git a/bin/stty/Makefile b/bin/stty/Makefile index d0fb28137ce4..1b81c938f8b3 100644 --- a/bin/stty/Makefile +++ b/bin/stty/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= stty SRCS= cchar.c gfmt.c key.c modes.c print.c stty.c util.c diff --git a/bin/sync/Makefile b/bin/sync/Makefile index 8da077108aec..dd3460afcbe8 100644 --- a/bin/sync/Makefile +++ b/bin/sync/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= sync MAN= sync.8 diff --git a/bin/test/Makefile b/bin/test/Makefile index 4cdebcb5054c..da1cccbb7f2e 100644 --- a/bin/test/Makefile +++ b/bin/test/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/bin/test/tests/Makefile b/bin/test/tests/Makefile index 232ae04c0cb5..3aaebb693011 100644 --- a/bin/test/tests/Makefile +++ b/bin/test/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_SH= legacy_test diff --git a/bin/tests/Makefile b/bin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/bin/tests/Makefile +++ b/bin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/bin/timeout/Makefile b/bin/timeout/Makefile index fa6741afb1dc..0b06ca57c847 100644 --- a/bin/timeout/Makefile +++ b/bin/timeout/Makefile @@ -1,4 +1,3 @@ - .include PROG= timeout diff --git a/bin/timeout/tests/Makefile b/bin/timeout/tests/Makefile index 7a2fd60db436..bf5dddd77baa 100644 --- a/bin/timeout/tests/Makefile +++ b/bin/timeout/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= timeout_test .include diff --git a/bin/uuidgen/Makefile b/bin/uuidgen/Makefile index 234ee20300eb..8d389e7659a7 100644 --- a/bin/uuidgen/Makefile +++ b/bin/uuidgen/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= uuidgen diff --git a/cddl/Makefile b/cddl/Makefile index c83acca43119..ab0d9896d2ec 100644 --- a/cddl/Makefile +++ b/cddl/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= lib .WAIT \ diff --git a/cddl/Makefile.inc b/cddl/Makefile.inc index f07baf295b89..63768ae44a7d 100644 --- a/cddl/Makefile.inc +++ b/cddl/Makefile.inc @@ -1,4 +1,3 @@ - OPENSOLARIS_USR_DISTDIR= ${.CURDIR}/../../../cddl/contrib/opensolaris OPENSOLARIS_SYS_DISTDIR= ${.CURDIR}/../../../sys/cddl/contrib/opensolaris diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index e6a0763544f7..892798be347d 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -1,4 +1,3 @@ - .include .if ${MK_DTRACE} == yes || ${MK_ZFS} == yes diff --git a/cddl/lib/Makefile.inc b/cddl/lib/Makefile.inc index 3e83ba423f35..ebcc06f3e956 100644 --- a/cddl/lib/Makefile.inc +++ b/cddl/lib/Makefile.inc @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib SHLIB_MAJOR?= 2 diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile index b9023202f0fb..4a7a8350cac8 100644 --- a/cddl/lib/drti/Makefile +++ b/cddl/lib/drti/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common PACKAGE= dtrace diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 5b47d42d7575..c816f07df223 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl PACKAGE= zfs diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile index 3b91a97bc3ee..10854482cd21 100644 --- a/cddl/lib/libctf/Makefile +++ b/cddl/lib/libctf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/common/ctf .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/ctf diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index d5c857bc06a0..d086fffb07bc 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 1dbe4ace88ed..b1d926d65368 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp PACKAGE= zfs diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index 196f96b1fcf8..c969b209a785 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp PACKAGE= utilities diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index a93ffcbd00de..9ae081b7a96e 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair .PATH: ${SRCTOP}/sys/contrib/openzfs/include diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 6c43e1750c3c..efeba68e4f03 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,4 +1,3 @@ - .include .include diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile index 6e85a8f82e9a..94b29c9ae72d 100644 --- a/cddl/lib/libtpool/Makefile +++ b/cddl/lib/libtpool/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libtpool .PATH: ${SRCTOP}/sys/contrib/openzfs/include diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile index 1330ba0d94bd..f955e306c62c 100644 --- a/cddl/lib/libumem/Makefile +++ b/cddl/lib/libumem/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem PACKAGE= zfs diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 333c581ccb90..547078504103 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil PACKAGE= zfs diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index c05fe0c1c12b..0b31fcb04b07 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index 9797f004d10f..4cd978e99a7d 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core .PATH: ${SRCTOP}/sys/contrib/openzfs/include .PATH: ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs diff --git a/cddl/lib/libzfsbootenv/Makefile b/cddl/lib/libzfsbootenv/Makefile index 9579fb7dcf18..5f5dbfb6f108 100644 --- a/cddl/lib/libzfsbootenv/Makefile +++ b/cddl/lib/libzfsbootenv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv .PATH: ${SRCTOP}/sys/contrib/openzfs/include diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 149c14919028..95038f4e5638 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs # ZFS_COMMON_SRCS diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index 83f08960d533..4d9794c32dda 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzutil .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzutil/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs diff --git a/cddl/lib/tests/Makefile b/cddl/lib/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/cddl/lib/tests/Makefile +++ b/cddl/lib/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile index b0e1448c6455..80862bbf8e7d 100644 --- a/cddl/sbin/Makefile +++ b/cddl/sbin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_TESTS}+= tests diff --git a/cddl/sbin/Makefile.inc b/cddl/sbin/Makefile.inc index 9f2b933fcf06..12d1247d4e9c 100644 --- a/cddl/sbin/Makefile.inc +++ b/cddl/sbin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /sbin .include "../Makefile.inc" diff --git a/cddl/sbin/tests/Makefile b/cddl/sbin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/cddl/sbin/tests/Makefile +++ b/cddl/sbin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile index a47302c709d5..b6ecfbe33ba3 100644 --- a/cddl/sbin/zfs/Makefile +++ b/cddl/sbin/zfs/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zfs diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile index 5a47890e58f4..ffe180ae1f9c 100644 --- a/cddl/sbin/zpool/Makefile +++ b/cddl/sbin/zpool/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/man/man4 diff --git a/cddl/share/Makefile b/cddl/share/Makefile index 2e291b9425ed..4fdb0cba9ba6 100644 --- a/cddl/share/Makefile +++ b/cddl/share/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_ZFS}+= zfs diff --git a/cddl/share/zfs/Makefile b/cddl/share/zfs/Makefile index a1fc04899b6e..6e10ede77d07 100644 --- a/cddl/share/zfs/Makefile +++ b/cddl/share/zfs/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= compatibility.d diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index 13d88fef184d..5b30adf4863a 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zpool/compatibility.d diff --git a/cddl/tests/Makefile b/cddl/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/cddl/tests/Makefile +++ b/cddl/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index ccf441cbabeb..571d1c59a544 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_DTRACE}+= \ diff --git a/cddl/usr.bin/Makefile.inc b/cddl/usr.bin/Makefile.inc index 78a3af23f3cc..b87015c546ca 100644 --- a/cddl/usr.bin/Makefile.inc +++ b/cddl/usr.bin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/bin .include "../Makefile.inc" diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile index 5dd38fbb5329..cd9f850f480c 100644 --- a/cddl/usr.bin/ctfconvert/Makefile +++ b/cddl/usr.bin/ctfconvert/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common diff --git a/cddl/usr.bin/ctfconvert/tests/Makefile b/cddl/usr.bin/ctfconvert/tests/Makefile index 101282261dd0..d86ddbcd635f 100644 --- a/cddl/usr.bin/ctfconvert/tests/Makefile +++ b/cddl/usr.bin/ctfconvert/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= ctfconvert_test .include diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile index 60ae9a0033b7..23ded7458bed 100644 --- a/cddl/usr.bin/ctfdump/Makefile +++ b/cddl/usr.bin/ctfdump/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/dump diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile index e7ad35ab097d..4cd9511f911c 100644 --- a/cddl/usr.bin/ctfmerge/Makefile +++ b/cddl/usr.bin/ctfmerge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt diff --git a/cddl/usr.bin/tests/Makefile b/cddl/usr.bin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/cddl/usr.bin/tests/Makefile +++ b/cddl/usr.bin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile index 71cd4776d339..395ba395a84b 100644 --- a/cddl/usr.bin/zinject/Makefile +++ b/cddl/usr.bin/zinject/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zinject diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index 4444973b2211..96a46cdf1cf9 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zstream diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile index 2913349eccc1..dec4eb9ab398 100644 --- a/cddl/usr.bin/ztest/Makefile +++ b/cddl/usr.bin/ztest/Makefile @@ -1,4 +1,3 @@ - .include ZFSTOP= ${SRCTOP}/sys/contrib/openzfs diff --git a/cddl/usr.bin/ztest/tests/Makefile b/cddl/usr.bin/ztest/tests/Makefile index 824497940b20..88bcfc3ccf72 100644 --- a/cddl/usr.bin/ztest/tests/Makefile +++ b/cddl/usr.bin/ztest/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_SH+= ztest diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile index 9eb4872b69d5..ab4c4cb6741c 100644 --- a/cddl/usr.libexec/Makefile +++ b/cddl/usr.libexec/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_ZFS}+= \ diff --git a/cddl/usr.libexec/zfs_prepare_disk/Makefile b/cddl/usr.libexec/zfs_prepare_disk/Makefile index e75484c6dc59..0d3f9b56b28c 100644 --- a/cddl/usr.libexec/zfs_prepare_disk/Makefile +++ b/cddl/usr.libexec/zfs_prepare_disk/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/scripts diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile index bd50df9e3c4c..064ac9b23e4a 100644 --- a/cddl/usr.libexec/zpool_influxdb/Makefile +++ b/cddl/usr.libexec/zpool_influxdb/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zpool_influxdb diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile index b3bf139feaef..b7f43ffd23bf 100644 --- a/cddl/usr.sbin/Makefile +++ b/cddl/usr.sbin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_DTRACE}+= \ diff --git a/cddl/usr.sbin/Makefile.inc b/cddl/usr.sbin/Makefile.inc index 5c01baa093b7..b660f1cc6638 100644 --- a/cddl/usr.sbin/Makefile.inc +++ b/cddl/usr.sbin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/sbin .include "../Makefile.inc" diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index 0a1ad0b81da0..c72b55cc4903 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace diff --git a/cddl/usr.sbin/dtrace/tests/Makefile b/cddl/usr.sbin/dtrace/tests/Makefile index c7391dec2416..7aa8600bf702 100644 --- a/cddl/usr.sbin/dtrace/tests/Makefile +++ b/cddl/usr.sbin/dtrace/tests/Makefile @@ -1,4 +1,3 @@ - .include TESTS_SUBDIRS+= common diff --git a/cddl/usr.sbin/dtrace/tests/amd64/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/Makefile index 049692a46cd5..100a66fa744c 100644 --- a/cddl/usr.sbin/dtrace/tests/amd64/Makefile +++ b/cddl/usr.sbin/dtrace/tests/amd64/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/amd64 TESTS_SUBDIRS+= arrays diff --git a/cddl/usr.sbin/dtrace/tests/common/Makefile b/cddl/usr.sbin/dtrace/tests/common/Makefile index 9f694cabf99a..a7c3aac9c6f5 100644 --- a/cddl/usr.sbin/dtrace/tests/common/Makefile +++ b/cddl/usr.sbin/dtrace/tests/common/Makefile @@ -1,4 +1,3 @@ - # We exclude several subdirectories: nfs and sysevent do not compile on # FreeBSD, and docsExamples doesn't seem amenable to automated testing. diff --git a/cddl/usr.sbin/dtrace/tests/i386/Makefile b/cddl/usr.sbin/dtrace/tests/i386/Makefile index 9501fd7f3cc2..4150a33adde9 100644 --- a/cddl/usr.sbin/dtrace/tests/i386/Makefile +++ b/cddl/usr.sbin/dtrace/tests/i386/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/i386 TESTS_SUBDIRS+= arrays \ funcs \ diff --git a/cddl/usr.sbin/dwatch/Makefile b/cddl/usr.sbin/dwatch/Makefile index e146e744e844..a50774d56039 100644 --- a/cddl/usr.sbin/dwatch/Makefile +++ b/cddl/usr.sbin/dwatch/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= dwatch diff --git a/cddl/usr.sbin/dwatch/examples/Makefile b/cddl/usr.sbin/dwatch/examples/Makefile index 185f57d8cfe2..a0bfd3c5cd39 100644 --- a/cddl/usr.sbin/dwatch/examples/Makefile +++ b/cddl/usr.sbin/dwatch/examples/Makefile @@ -1,4 +1,3 @@ - PACKAGE= dwatch FILESDIR= ${SHAREDIR}/examples/dwatch FILES= profile_template diff --git a/cddl/usr.sbin/dwatch/libexec/Makefile b/cddl/usr.sbin/dwatch/libexec/Makefile index e8df567eb205..72ea5be686fb 100644 --- a/cddl/usr.sbin/dwatch/libexec/Makefile +++ b/cddl/usr.sbin/dwatch/libexec/Makefile @@ -1,4 +1,3 @@ - PACKAGE= dwatch FILESDIR= ${LIBEXECDIR}/dwatch FILES= chmod \ diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index e0e3f40ccda9..c87a37ef1504 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/lockstat diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index e83fae8f305c..3e35c5c5b8f7 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/cddl/contrib/opensolaris/cmd/plockstat diff --git a/cddl/usr.sbin/tests/Makefile b/cddl/usr.sbin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/cddl/usr.sbin/tests/Makefile +++ b/cddl/usr.sbin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index e41f4afce82f..22ab4421b30a 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -1,4 +1,3 @@ - ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/cmd/zdb diff --git a/cddl/usr.sbin/zfsd/Makefile b/cddl/usr.sbin/zfsd/Makefile index 93426c0320af..2f8134098b35 100644 --- a/cddl/usr.sbin/zfsd/Makefile +++ b/cddl/usr.sbin/zfsd/Makefile @@ -1,4 +1,3 @@ - .include .include "Makefile.common" diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index c1ed4bba9289..72bda687c2da 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -1,4 +1,3 @@ - SRCS= callout.cc \ case_file.cc \ zfsd_event.cc \ diff --git a/cddl/usr.sbin/zfsd/tests/Makefile b/cddl/usr.sbin/zfsd/tests/Makefile index a4613e4cb1e8..fdda8011b21d 100644 --- a/cddl/usr.sbin/zfsd/tests/Makefile +++ b/cddl/usr.sbin/zfsd/tests/Makefile @@ -1,4 +1,3 @@ - .include "${.CURDIR}/../Makefile.common" .PATH: ${.CURDIR:H} diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile index b2fa0e98b7e5..a7c08fa818d5 100644 --- a/cddl/usr.sbin/zhack/Makefile +++ b/cddl/usr.sbin/zhack/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/openzfs/cmd PACKAGE= zfs diff --git a/contrib/elftoolchain/nm/Makefile b/contrib/elftoolchain/nm/Makefile index 6177c61221eb..e202668e0c3a 100644 --- a/contrib/elftoolchain/nm/Makefile +++ b/contrib/elftoolchain/nm/Makefile @@ -1,4 +1,3 @@ - # $Id: Makefile 2076 2011-10-27 03:50:33Z jkoshy $ TOP= .. diff --git a/contrib/file/python/Makefile.am b/contrib/file/python/Makefile.am index 9588f085df0f..fb7d40c21eea 100644 --- a/contrib/file/python/Makefile.am +++ b/contrib/file/python/Makefile.am @@ -1,4 +1,3 @@ - EXTRA_DIST = LICENSE CHANGELOG.md README.md example.py magic.py setup.py \ tests.py file_magic/__init__.py diff --git a/contrib/sqlite3/Makefile.am b/contrib/sqlite3/Makefile.am index 1eaa560ff884..09f83086b1ea 100644 --- a/contrib/sqlite3/Makefile.am +++ b/contrib/sqlite3/Makefile.am @@ -1,4 +1,3 @@ - AM_CFLAGS = @BUILD_CFLAGS@ lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c diff --git a/crypto/heimdal/base/Makefile.am b/crypto/heimdal/base/Makefile.am index 639136f79c3f..3d06e813f28b 100644 --- a/crypto/heimdal/base/Makefile.am +++ b/crypto/heimdal/base/Makefile.am @@ -1,4 +1,3 @@ - include $(top_srcdir)/Makefile.am.common lib_LTLIBRARIES = libheimbase.la diff --git a/etc/Makefile b/etc/Makefile index f2b37fb02817..fdcad75911c8 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,3 @@ - .include .include diff --git a/etc/gss/Makefile b/etc/gss/Makefile index d57a8b914b42..301a8e074e8c 100644 --- a/etc/gss/Makefile +++ b/etc/gss/Makefile @@ -1,4 +1,3 @@ - FILES= mech qop NO_OBJ= FILESDIR= /etc/gss diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 5135bf326e65..17e96519a491 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -1,4 +1,3 @@ - M4= m4 CHMOD= chmod ROMODE= 444 diff --git a/gnu/Makefile b/gnu/Makefile index 6a264d80e6a6..301faa1c8670 100644 --- a/gnu/Makefile +++ b/gnu/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= lib .WAIT \ diff --git a/gnu/Makefile.inc b/gnu/Makefile.inc index 0c24247f8925..6ceebdef9d59 100644 --- a/gnu/Makefile.inc +++ b/gnu/Makefile.inc @@ -1,4 +1,3 @@ - # Do not lint the GNU stuff. It is all externally maintained and # lint output is wasteful noise here. diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 0b5e328601f2..1f92672b49b1 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= diff --git a/gnu/lib/Makefile.inc b/gnu/lib/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/gnu/lib/Makefile.inc +++ b/gnu/lib/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile index 4b18683e853d..0b32a75e4a23 100644 --- a/gnu/lib/libdialog/Makefile +++ b/gnu/lib/libdialog/Makefile @@ -1,4 +1,3 @@ - DIALOG= ${SRCTOP}/contrib/dialog LIB= dialog diff --git a/gnu/lib/tests/Makefile b/gnu/lib/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/gnu/lib/tests/Makefile +++ b/gnu/lib/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/gnu/tests/Makefile b/gnu/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/gnu/tests/Makefile +++ b/gnu/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 84fe2f2f3b80..e12fc0ccc403 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.${MK_DIALOG}+= dialog diff --git a/gnu/usr.bin/Makefile.inc b/gnu/usr.bin/Makefile.inc index 78a3af23f3cc..b87015c546ca 100644 --- a/gnu/usr.bin/Makefile.inc +++ b/gnu/usr.bin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/bin .include "../Makefile.inc" diff --git a/gnu/usr.bin/dialog/Makefile b/gnu/usr.bin/dialog/Makefile index 8cf4976eee0e..a4a109e112f2 100644 --- a/gnu/usr.bin/dialog/Makefile +++ b/gnu/usr.bin/dialog/Makefile @@ -1,4 +1,3 @@ - DIALOG= ${SRCTOP}/contrib/dialog PROG= dialog diff --git a/gnu/usr.bin/diff3/Makefile b/gnu/usr.bin/diff3/Makefile index 9d325c4418ca..4d7bb8a82e1c 100644 --- a/gnu/usr.bin/diff3/Makefile +++ b/gnu/usr.bin/diff3/Makefile @@ -1,4 +1,3 @@ - DIFFSRC=${SRCTOP}/contrib/diff/src .PATH: ${DIFFSRC} \ ${SRCTOP}/contrib/diff/lib \ diff --git a/gnu/usr.bin/tests/Makefile b/gnu/usr.bin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/gnu/usr.bin/tests/Makefile +++ b/gnu/usr.bin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/include/arpa/Makefile b/include/arpa/Makefile index 25bf83516844..ba589cc192fd 100644 --- a/include/arpa/Makefile +++ b/include/arpa/Makefile @@ -1,4 +1,3 @@ - .include INCS= ftp.h inet.h nameser.h nameser_compat.h tftp.h diff --git a/include/gssapi/Makefile b/include/gssapi/Makefile index c0b18ae7a646..fb6cd7ee7dab 100644 --- a/include/gssapi/Makefile +++ b/include/gssapi/Makefile @@ -1,4 +1,3 @@ - INCS= gssapi.h INCSDIR= ${INCLUDEDIR}/gssapi diff --git a/include/protocols/Makefile b/include/protocols/Makefile index bdcbbae48a35..9817add2e9f1 100644 --- a/include/protocols/Makefile +++ b/include/protocols/Makefile @@ -1,4 +1,3 @@ - INCS= dumprestore.h routed.h rwhod.h talkd.h timed.h INCSDIR=${INCLUDEDIR}/protocols diff --git a/include/rpc/Makefile b/include/rpc/Makefile index 0c8434ee3473..b6e3ab53adb4 100644 --- a/include/rpc/Makefile +++ b/include/rpc/Makefile @@ -1,4 +1,3 @@ - .SUFFIXES: .x RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C diff --git a/include/rpcsvc/Makefile b/include/rpcsvc/Makefile index 8ede7636f50e..bc2b74561422 100644 --- a/include/rpcsvc/Makefile +++ b/include/rpcsvc/Makefile @@ -1,4 +1,3 @@ - .SUFFIXES: .x RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C diff --git a/include/xlocale/Makefile b/include/xlocale/Makefile index d862483ef4eb..fc2569c36502 100644 --- a/include/xlocale/Makefile +++ b/include/xlocale/Makefile @@ -1,4 +1,3 @@ - INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\ _stdlib.h _string.h _strings.h _time.h _uchar.h _wchar.h INCSDIR=${INCLUDEDIR}/xlocale diff --git a/kerberos5/Makefile b/kerberos5/Makefile index 72707a36f941..39cd3307afd5 100644 --- a/kerberos5/Makefile +++ b/kerberos5/Makefile @@ -1,4 +1,3 @@ - SUBDIR= lib .WAIT \ libexec tools usr.bin usr.sbin SUBDIR_PARALLEL= diff --git a/kerberos5/Makefile.inc b/kerberos5/Makefile.inc index 4cb7e6dca4ef..71bd19c0b895 100644 --- a/kerberos5/Makefile.inc +++ b/kerberos5/Makefile.inc @@ -1,4 +1,3 @@ - .include NO_LINT= diff --git a/kerberos5/lib/Makefile b/kerberos5/lib/Makefile index 73395b86c814..7b63da16e360 100644 --- a/kerberos5/lib/Makefile +++ b/kerberos5/lib/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= libasn1 libhdb \ diff --git a/kerberos5/lib/Makefile.inc b/kerberos5/lib/Makefile.inc index 6d0bed2058ec..7c74af1e9742 100644 --- a/kerberos5/lib/Makefile.inc +++ b/kerberos5/lib/Makefile.inc @@ -1,4 +1,3 @@ - SHLIB_MAJOR?= 11 .include "../Makefile.inc" diff --git a/kerberos5/lib/libasn1/Makefile b/kerberos5/lib/libasn1/Makefile index 095c7089dc85..58fde4ded382 100644 --- a/kerberos5/lib/libasn1/Makefile +++ b/kerberos5/lib/libasn1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= asn1 diff --git a/kerberos5/lib/libgssapi_krb5/Makefile b/kerberos5/lib/libgssapi_krb5/Makefile index 2a47f35a12d6..630cb11ad6ca 100644 --- a/kerberos5/lib/libgssapi_krb5/Makefile +++ b/kerberos5/lib/libgssapi_krb5/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= gssapi_krb5 diff --git a/kerberos5/lib/libgssapi_ntlm/Makefile b/kerberos5/lib/libgssapi_ntlm/Makefile index 591efcaff1dc..8698c5c2e3e1 100644 --- a/kerberos5/lib/libgssapi_ntlm/Makefile +++ b/kerberos5/lib/libgssapi_ntlm/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= gssapi_ntlm diff --git a/kerberos5/lib/libgssapi_spnego/Makefile b/kerberos5/lib/libgssapi_spnego/Makefile index c6d92389db23..421c3fecce7c 100644 --- a/kerberos5/lib/libgssapi_spnego/Makefile +++ b/kerberos5/lib/libgssapi_spnego/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= gssapi_spnego diff --git a/kerberos5/lib/libhdb/Makefile b/kerberos5/lib/libhdb/Makefile index 27e246e1bee3..be18779a047e 100644 --- a/kerberos5/lib/libhdb/Makefile +++ b/kerberos5/lib/libhdb/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= hdb diff --git a/kerberos5/lib/libheimbase/Makefile b/kerberos5/lib/libheimbase/Makefile index 99c637ee3c3e..e3cb2fc6c770 100644 --- a/kerberos5/lib/libheimbase/Makefile +++ b/kerberos5/lib/libheimbase/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= heimbase diff --git a/kerberos5/lib/libheimipcc/Makefile b/kerberos5/lib/libheimipcc/Makefile index a8b5846128f4..8eb2b2b3756a 100644 --- a/kerberos5/lib/libheimipcc/Makefile +++ b/kerberos5/lib/libheimipcc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= heimipcc diff --git a/kerberos5/lib/libheimipcs/Makefile b/kerberos5/lib/libheimipcs/Makefile index 582298b0e772..e689ac06a601 100644 --- a/kerberos5/lib/libheimipcs/Makefile +++ b/kerberos5/lib/libheimipcs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= heimipcs diff --git a/kerberos5/lib/libheimntlm/Makefile b/kerberos5/lib/libheimntlm/Makefile index f669be55b1cc..f68a3d498d20 100644 --- a/kerberos5/lib/libheimntlm/Makefile +++ b/kerberos5/lib/libheimntlm/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= heimntlm diff --git a/kerberos5/lib/libhx509/Makefile b/kerberos5/lib/libhx509/Makefile index e74e442b636b..0e82a79d9a8a 100644 --- a/kerberos5/lib/libhx509/Makefile +++ b/kerberos5/lib/libhx509/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= hx509 diff --git a/kerberos5/lib/libkadm5clnt/Makefile b/kerberos5/lib/libkadm5clnt/Makefile index 76e934991470..dee95b0c8b4b 100644 --- a/kerberos5/lib/libkadm5clnt/Makefile +++ b/kerberos5/lib/libkadm5clnt/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= kadm5clnt diff --git a/kerberos5/lib/libkadm5srv/Makefile b/kerberos5/lib/libkadm5srv/Makefile index df5c9b99f1a0..9905668c529a 100644 --- a/kerberos5/lib/libkadm5srv/Makefile +++ b/kerberos5/lib/libkadm5srv/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= kadm5srv diff --git a/kerberos5/lib/libkafs5/Makefile b/kerberos5/lib/libkafs5/Makefile index 28d9ca50822c..ba83533bd84e 100644 --- a/kerberos5/lib/libkafs5/Makefile +++ b/kerberos5/lib/libkafs5/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= kafs5 diff --git a/kerberos5/lib/libkdc/Makefile b/kerberos5/lib/libkdc/Makefile index 19c508c9c4fe..58355fd6d810 100644 --- a/kerberos5/lib/libkdc/Makefile +++ b/kerberos5/lib/libkdc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= kdc diff --git a/kerberos5/lib/libkrb5/Makefile b/kerberos5/lib/libkrb5/Makefile index 160643e36b25..edc14556dc59 100644 --- a/kerberos5/lib/libkrb5/Makefile +++ b/kerberos5/lib/libkrb5/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= krb5 diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile index ca6d090e64f0..2299beed67a1 100644 --- a/kerberos5/lib/libroken/Makefile +++ b/kerberos5/lib/libroken/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= roken diff --git a/kerberos5/lib/libsl/Makefile b/kerberos5/lib/libsl/Makefile index 771a7c70d06d..159e16089294 100644 --- a/kerberos5/lib/libsl/Makefile +++ b/kerberos5/lib/libsl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= sl diff --git a/kerberos5/lib/libvers/Makefile b/kerberos5/lib/libvers/Makefile index 52f025bc50ab..d7fe0a001659 100644 --- a/kerberos5/lib/libvers/Makefile +++ b/kerberos5/lib/libvers/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= vers diff --git a/kerberos5/lib/libwind/Makefile b/kerberos5/lib/libwind/Makefile index 542ea662515c..2ce6947dce7d 100644 --- a/kerberos5/lib/libwind/Makefile +++ b/kerberos5/lib/libwind/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= wind diff --git a/kerberos5/libexec/Makefile b/kerberos5/libexec/Makefile index 0d3c4875a7f9..543331d5029b 100644 --- a/kerberos5/libexec/Makefile +++ b/kerberos5/libexec/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= digest-service ipropd-master ipropd-slave hprop hpropd kdc \ diff --git a/kerberos5/libexec/Makefile.inc b/kerberos5/libexec/Makefile.inc index 7f4404e6b98d..068f9e01f1f1 100644 --- a/kerberos5/libexec/Makefile.inc +++ b/kerberos5/libexec/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR= /usr/libexec .include "../Makefile.inc" diff --git a/kerberos5/libexec/digest-service/Makefile b/kerberos5/libexec/digest-service/Makefile index d7d5d76352b0..521e3b294709 100644 --- a/kerberos5/libexec/digest-service/Makefile +++ b/kerberos5/libexec/digest-service/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= digest-service diff --git a/kerberos5/libexec/hprop/Makefile b/kerberos5/libexec/hprop/Makefile index ff46512216f4..96ac9205d040 100644 --- a/kerberos5/libexec/hprop/Makefile +++ b/kerberos5/libexec/hprop/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= hprop diff --git a/kerberos5/libexec/hpropd/Makefile b/kerberos5/libexec/hpropd/Makefile index 2811e2d9363a..20619c070aa8 100644 --- a/kerberos5/libexec/hpropd/Makefile +++ b/kerberos5/libexec/hpropd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= hpropd diff --git a/kerberos5/libexec/ipropd-master/Makefile b/kerberos5/libexec/ipropd-master/Makefile index c4bddbd07c96..640de69120a1 100644 --- a/kerberos5/libexec/ipropd-master/Makefile +++ b/kerberos5/libexec/ipropd-master/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= ipropd-master diff --git a/kerberos5/libexec/ipropd-slave/Makefile b/kerberos5/libexec/ipropd-slave/Makefile index a927d82d37cd..748183eb09b9 100644 --- a/kerberos5/libexec/ipropd-slave/Makefile +++ b/kerberos5/libexec/ipropd-slave/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= ipropd-slave diff --git a/kerberos5/libexec/kadmind/Makefile b/kerberos5/libexec/kadmind/Makefile index 4578266fe78e..b228b653b021 100644 --- a/kerberos5/libexec/kadmind/Makefile +++ b/kerberos5/libexec/kadmind/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kadmind diff --git a/kerberos5/libexec/kcm/Makefile b/kerberos5/libexec/kcm/Makefile index 2b3267a09c12..f62e39a920f4 100644 --- a/kerberos5/libexec/kcm/Makefile +++ b/kerberos5/libexec/kcm/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kcm diff --git a/kerberos5/libexec/kdc/Makefile b/kerberos5/libexec/kdc/Makefile index 41fde9115c00..587f850d5953 100644 --- a/kerberos5/libexec/kdc/Makefile +++ b/kerberos5/libexec/kdc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kdc diff --git a/kerberos5/libexec/kdigest/Makefile b/kerberos5/libexec/kdigest/Makefile index 85b2e7a4f46a..81d3a8780648 100644 --- a/kerberos5/libexec/kdigest/Makefile +++ b/kerberos5/libexec/kdigest/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kdigest diff --git a/kerberos5/libexec/kfd/Makefile b/kerberos5/libexec/kfd/Makefile index edd2a5ad4316..29ddabb81269 100644 --- a/kerberos5/libexec/kfd/Makefile +++ b/kerberos5/libexec/kfd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kfd diff --git a/kerberos5/libexec/kimpersonate/Makefile b/kerberos5/libexec/kimpersonate/Makefile index c7ba44e7bf70..ceb79bc79499 100644 --- a/kerberos5/libexec/kimpersonate/Makefile +++ b/kerberos5/libexec/kimpersonate/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kimpersonate diff --git a/kerberos5/libexec/kpasswdd/Makefile b/kerberos5/libexec/kpasswdd/Makefile index 17a8fa731aed..8b09c0eea5cc 100644 --- a/kerberos5/libexec/kpasswdd/Makefile +++ b/kerberos5/libexec/kpasswdd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kpasswdd diff --git a/kerberos5/tools/Makefile b/kerberos5/tools/Makefile index f4f908e3d6d8..95c6103d2f75 100644 --- a/kerberos5/tools/Makefile +++ b/kerberos5/tools/Makefile @@ -1,4 +1,3 @@ - SUBDIR= make-roken asn1_compile slc SUBDIR_PARALLEL= diff --git a/kerberos5/tools/Makefile.inc b/kerberos5/tools/Makefile.inc index 78a3af23f3cc..b87015c546ca 100644 --- a/kerberos5/tools/Makefile.inc +++ b/kerberos5/tools/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/bin .include "../Makefile.inc" diff --git a/kerberos5/tools/asn1_compile/Makefile b/kerberos5/tools/asn1_compile/Makefile index 39ba5a43f9d7..cdeed7da2f62 100644 --- a/kerberos5/tools/asn1_compile/Makefile +++ b/kerberos5/tools/asn1_compile/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= asn1_compile diff --git a/kerberos5/tools/make-roken/Makefile b/kerberos5/tools/make-roken/Makefile index 19957373e6aa..a6c6cd9104a4 100644 --- a/kerberos5/tools/make-roken/Makefile +++ b/kerberos5/tools/make-roken/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= make-roken diff --git a/kerberos5/tools/slc/Makefile b/kerberos5/tools/slc/Makefile index 82fe68d50bef..749e20c8cc29 100644 --- a/kerberos5/tools/slc/Makefile +++ b/kerberos5/tools/slc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= slc diff --git a/kerberos5/usr.bin/Makefile b/kerberos5/usr.bin/Makefile index be3ff31455af..e7292e7cd721 100644 --- a/kerberos5/usr.bin/Makefile +++ b/kerberos5/usr.bin/Makefile @@ -1,4 +1,3 @@ - SUBDIR= hxtool kadmin kcc kdestroy kgetcred kf kinit kpasswd krb5-config ksu \ string2key verify_krb5_conf SUBDIR_PARALLEL= diff --git a/kerberos5/usr.bin/Makefile.inc b/kerberos5/usr.bin/Makefile.inc index 6ce10a5357a4..18e54db392b9 100644 --- a/kerberos5/usr.bin/Makefile.inc +++ b/kerberos5/usr.bin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR= /usr/bin .include "../Makefile.inc" diff --git a/kerberos5/usr.bin/hxtool/Makefile b/kerberos5/usr.bin/hxtool/Makefile index e03dc848ef4a..98db4f6a77d8 100644 --- a/kerberos5/usr.bin/hxtool/Makefile +++ b/kerberos5/usr.bin/hxtool/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= hxtool diff --git a/kerberos5/usr.bin/kadmin/Makefile b/kerberos5/usr.bin/kadmin/Makefile index 73ec415aa53d..3ff90ff1e1d9 100644 --- a/kerberos5/usr.bin/kadmin/Makefile +++ b/kerberos5/usr.bin/kadmin/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kadmin diff --git a/kerberos5/usr.bin/kcc/Makefile b/kerberos5/usr.bin/kcc/Makefile index 8dbd733aa908..b305f442f78f 100644 --- a/kerberos5/usr.bin/kcc/Makefile +++ b/kerberos5/usr.bin/kcc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kcc diff --git a/kerberos5/usr.bin/kdestroy/Makefile b/kerberos5/usr.bin/kdestroy/Makefile index 4e231e33b9be..dde1366dfcd6 100644 --- a/kerberos5/usr.bin/kdestroy/Makefile +++ b/kerberos5/usr.bin/kdestroy/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kdestroy diff --git a/kerberos5/usr.bin/kf/Makefile b/kerberos5/usr.bin/kf/Makefile index cdb4c7b3424a..5f9d46502b83 100644 --- a/kerberos5/usr.bin/kf/Makefile +++ b/kerberos5/usr.bin/kf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kf diff --git a/kerberos5/usr.bin/kgetcred/Makefile b/kerberos5/usr.bin/kgetcred/Makefile index 80be56620d82..d3d6a485f463 100644 --- a/kerberos5/usr.bin/kgetcred/Makefile +++ b/kerberos5/usr.bin/kgetcred/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kgetcred diff --git a/kerberos5/usr.bin/kinit/Makefile b/kerberos5/usr.bin/kinit/Makefile index 5481ba169c51..46729aec0f12 100644 --- a/kerberos5/usr.bin/kinit/Makefile +++ b/kerberos5/usr.bin/kinit/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kinit diff --git a/kerberos5/usr.bin/kpasswd/Makefile b/kerberos5/usr.bin/kpasswd/Makefile index b0d20ac1146e..d8da1baadf39 100644 --- a/kerberos5/usr.bin/kpasswd/Makefile +++ b/kerberos5/usr.bin/kpasswd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kpasswd diff --git a/kerberos5/usr.bin/krb5-config/Makefile b/kerberos5/usr.bin/krb5-config/Makefile index a6ad2cc58570..45166de3e48e 100644 --- a/kerberos5/usr.bin/krb5-config/Makefile +++ b/kerberos5/usr.bin/krb5-config/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos SCRIPTS=krb5-config diff --git a/kerberos5/usr.bin/ksu/Makefile b/kerberos5/usr.bin/ksu/Makefile index a6d9043c1b91..55f42db74e84 100644 --- a/kerberos5/usr.bin/ksu/Makefile +++ b/kerberos5/usr.bin/ksu/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= ksu diff --git a/kerberos5/usr.bin/string2key/Makefile b/kerberos5/usr.bin/string2key/Makefile index e8cb00c77eef..2e470cb5d7f1 100644 --- a/kerberos5/usr.bin/string2key/Makefile +++ b/kerberos5/usr.bin/string2key/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= string2key diff --git a/kerberos5/usr.bin/verify_krb5_conf/Makefile b/kerberos5/usr.bin/verify_krb5_conf/Makefile index c93093eeb24b..26d8961e6b02 100644 --- a/kerberos5/usr.bin/verify_krb5_conf/Makefile +++ b/kerberos5/usr.bin/verify_krb5_conf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= verify_krb5_conf diff --git a/kerberos5/usr.sbin/Makefile b/kerberos5/usr.sbin/Makefile index 46fe55b4913b..3a3e719751c4 100644 --- a/kerberos5/usr.sbin/Makefile +++ b/kerberos5/usr.sbin/Makefile @@ -1,4 +1,3 @@ - SUBDIR= iprop-log kstash ktutil SUBDIR_PARALLEL= diff --git a/kerberos5/usr.sbin/Makefile.inc b/kerberos5/usr.sbin/Makefile.inc index d2495e22de27..d19ea22b6db2 100644 --- a/kerberos5/usr.sbin/Makefile.inc +++ b/kerberos5/usr.sbin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR= /usr/sbin .include "../Makefile.inc" diff --git a/kerberos5/usr.sbin/iprop-log/Makefile b/kerberos5/usr.sbin/iprop-log/Makefile index dc6a605e017c..e4e7964cd009 100644 --- a/kerberos5/usr.sbin/iprop-log/Makefile +++ b/kerberos5/usr.sbin/iprop-log/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= iprop-log diff --git a/kerberos5/usr.sbin/kstash/Makefile b/kerberos5/usr.sbin/kstash/Makefile index 0f4d1be2a7bd..f2e2ce691cac 100644 --- a/kerberos5/usr.sbin/kstash/Makefile +++ b/kerberos5/usr.sbin/kstash/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= kstash diff --git a/kerberos5/usr.sbin/ktutil/Makefile b/kerberos5/usr.sbin/ktutil/Makefile index a3a0bf2929db..a79222791c41 100644 --- a/kerberos5/usr.sbin/ktutil/Makefile +++ b/kerberos5/usr.sbin/ktutil/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos PROG= ktutil diff --git a/lib/Makefile b/lib/Makefile index 5696fa4aa593..ee5419ae0f93 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,4 +1,3 @@ - .include # The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many diff --git a/lib/atf/libatf-c++/Makefile.inc b/lib/atf/libatf-c++/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/atf/libatf-c++/Makefile.inc +++ b/lib/atf/libatf-c++/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile index 570e9845a14a..dc052c19df67 100644 --- a/lib/atf/libatf-c++/tests/Makefile +++ b/lib/atf/libatf-c++/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/lib/atf/libatf-c++/tests/Makefile.inc b/lib/atf/libatf-c++/tests/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/atf/libatf-c++/tests/Makefile.inc +++ b/lib/atf/libatf-c++/tests/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/atf/libatf-c++/tests/detail/Makefile b/lib/atf/libatf-c++/tests/detail/Makefile index 63e7489e5720..4b95f8dbd663 100644 --- a/lib/atf/libatf-c++/tests/detail/Makefile +++ b/lib/atf/libatf-c++/tests/detail/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail diff --git a/lib/atf/libatf-c/Makefile.inc b/lib/atf/libatf-c/Makefile.inc index 692761e886b3..bb4b9697d845 100644 --- a/lib/atf/libatf-c/Makefile.inc +++ b/lib/atf/libatf-c/Makefile.inc @@ -1,4 +1,3 @@ - .include "../Makefile.inc" CFLAGS+= -DATF_BUILD_CC='"cc"' diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile index 4cba59485f31..c81c18a91f00 100644 --- a/lib/atf/libatf-c/tests/Makefile +++ b/lib/atf/libatf-c/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/lib/atf/libatf-c/tests/Makefile.inc b/lib/atf/libatf-c/tests/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/atf/libatf-c/tests/Makefile.inc +++ b/lib/atf/libatf-c/tests/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/atf/libatf-c/tests/detail/Makefile b/lib/atf/libatf-c/tests/detail/Makefile index fb014b3497ad..5123f6f4d796 100644 --- a/lib/atf/libatf-c/tests/detail/Makefile +++ b/lib/atf/libatf-c/tests/detail/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail diff --git a/lib/atf/tests/Makefile b/lib/atf/tests/Makefile index 3c4e525aa46f..500ff0f20c3b 100644 --- a/lib/atf/tests/Makefile +++ b/lib/atf/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/lib/atf/tests/test-programs/Makefile b/lib/atf/tests/test-programs/Makefile index a1999e236cec..b0b04f5fe988 100644 --- a/lib/atf/tests/test-programs/Makefile +++ b/lib/atf/tests/test-programs/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/lib/atf/test-programs diff --git a/lib/clang/Makefile b/lib/clang/Makefile index adbf15828f80..52093dd7cb26 100644 --- a/lib/clang/Makefile +++ b/lib/clang/Makefile @@ -1,4 +1,3 @@ - .include # These have to be built in order. diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 37da7ac759b1..3678060fdec0 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -1,4 +1,3 @@ - .include PACKAGE= clang diff --git a/lib/clang/headers/Makefile b/lib/clang/headers/Makefile index 16683a039b28..e3197c7822a9 100644 --- a/lib/clang/headers/Makefile +++ b/lib/clang/headers/Makefile @@ -1,4 +1,3 @@ - .include .include "../clang.pre.mk" diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile index 3dc82612089d..3c92e4599eca 100644 --- a/lib/clang/libclang/Makefile +++ b/lib/clang/libclang/Makefile @@ -1,4 +1,3 @@ - .include .include "../clang.pre.mk" diff --git a/lib/clang/libclangminimal/Makefile b/lib/clang/libclangminimal/Makefile index 22faa7b98aeb..c55dae8896ac 100644 --- a/lib/clang/libclangminimal/Makefile +++ b/lib/clang/libclangminimal/Makefile @@ -1,4 +1,3 @@ - .include .include "../clang.pre.mk" diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index fdf30bfba12d..68740883f7fa 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -1,4 +1,3 @@ - .include .include "../lldb.pre.mk" diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 528551aab852..6c9becbd4b6f 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -1,4 +1,3 @@ - .include .include "../llvm.pre.mk" diff --git a/lib/clang/libllvmminimal/Makefile b/lib/clang/libllvmminimal/Makefile index aeae260bf185..ae40dc75d89f 100644 --- a/lib/clang/libllvmminimal/Makefile +++ b/lib/clang/libllvmminimal/Makefile @@ -1,4 +1,3 @@ - .include .include "../llvm.pre.mk" diff --git a/lib/csu/Makefile b/lib/csu/Makefile index 1f8a403eb2c5..1e7a17bd35e9 100644 --- a/lib/csu/Makefile +++ b/lib/csu/Makefile @@ -1,4 +1,3 @@ - .include .if exists(${.CURDIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) diff --git a/lib/csu/aarch64/Makefile b/lib/csu/aarch64/Makefile index 0ea681ced6b4..24abd0b47585 100644 --- a/lib/csu/aarch64/Makefile +++ b/lib/csu/aarch64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common CFLAGS+= -I${.CURDIR} diff --git a/lib/csu/amd64/Makefile b/lib/csu/amd64/Makefile index 8dd4084f8633..80ae5484d662 100644 --- a/lib/csu/amd64/Makefile +++ b/lib/csu/amd64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common CFLAGS+= -I${.CURDIR} diff --git a/lib/csu/arm/Makefile b/lib/csu/arm/Makefile index 96b361b0656c..5f5de9f9c61a 100644 --- a/lib/csu/arm/Makefile +++ b/lib/csu/arm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common CRT1OBJS+= crt1_s.o diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile index 0ea681ced6b4..24abd0b47585 100644 --- a/lib/csu/i386/Makefile +++ b/lib/csu/i386/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common CFLAGS+= -I${.CURDIR} diff --git a/lib/csu/powerpc/Makefile b/lib/csu/powerpc/Makefile index 5e0cc7ff6ed5..b6928446d005 100644 --- a/lib/csu/powerpc/Makefile +++ b/lib/csu/powerpc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common OBJS+= crtsavres.o diff --git a/lib/csu/powerpc64/Makefile b/lib/csu/powerpc64/Makefile index 763cebbaa483..97df3f389115 100644 --- a/lib/csu/powerpc64/Makefile +++ b/lib/csu/powerpc64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common OBJS+= crtsavres.o diff --git a/lib/csu/riscv/Makefile b/lib/csu/riscv/Makefile index 96b361b0656c..5f5de9f9c61a 100644 --- a/lib/csu/riscv/Makefile +++ b/lib/csu/riscv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common CRT1OBJS+= crt1_s.o diff --git a/lib/csu/tests/Makefile b/lib/csu/tests/Makefile index 3f95193420ea..946d293973db 100644 --- a/lib/csu/tests/Makefile +++ b/lib/csu/tests/Makefile @@ -1,4 +1,3 @@ - SUBDIR= dso TESTS_SUBDIRS= dynamic TESTS_SUBDIRS+= dynamiclib diff --git a/lib/csu/tests/Makefile.inc b/lib/csu/tests/Makefile.inc index 9904a82f1baf..2cb85b8d5d43 100644 --- a/lib/csu/tests/Makefile.inc +++ b/lib/csu/tests/Makefile.inc @@ -1,2 +1 @@ - TESTSDIR:= ${TESTSBASE}/${RELDIR:C/csu\/tests/csu/} diff --git a/lib/csu/tests/Makefile.tests b/lib/csu/tests/Makefile.tests index 12926d5e38a6..52179057b2a3 100644 --- a/lib/csu/tests/Makefile.tests +++ b/lib/csu/tests/Makefile.tests @@ -1,4 +1,3 @@ - ATF_TESTS_C+= init_test ATF_TESTS_C+= fini_test ATF_TESTS_CXX+= cxx_constructors diff --git a/lib/csu/tests/dso/Makefile b/lib/csu/tests/dso/Makefile index 6975e64c5dfe..2f2b8c90ac29 100644 --- a/lib/csu/tests/dso/Makefile +++ b/lib/csu/tests/dso/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} SHLIB= h_csu SHLIB_NAME= libh_csu.so diff --git a/lib/csu/tests/dynamic/Makefile b/lib/csu/tests/dynamic/Makefile index 1ceeb385b5e9..e9e57201cb9a 100644 --- a/lib/csu/tests/dynamic/Makefile +++ b/lib/csu/tests/dynamic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} .include diff --git a/lib/csu/tests/dynamiclib/Makefile b/lib/csu/tests/dynamiclib/Makefile index ced5bbb4e935..13a9b837684e 100644 --- a/lib/csu/tests/dynamiclib/Makefile +++ b/lib/csu/tests/dynamiclib/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} CFLAGS+= -DDSO_BASE DPADD+= ${.OBJDIR:H}/dso/libh_csu.so diff --git a/lib/csu/tests/dynamicpie/Makefile b/lib/csu/tests/dynamicpie/Makefile index b5c0356001db..204bef0c7d10 100644 --- a/lib/csu/tests/dynamicpie/Makefile +++ b/lib/csu/tests/dynamicpie/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} .include diff --git a/lib/csu/tests/static/Makefile b/lib/csu/tests/static/Makefile index c3f87641c8ef..e76c49c93a1a 100644 --- a/lib/csu/tests/static/Makefile +++ b/lib/csu/tests/static/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} NO_SHARED= diff --git a/lib/flua/libjail/Makefile b/lib/flua/libjail/Makefile index c7649c724c0a..2b9b6c777cbb 100644 --- a/lib/flua/libjail/Makefile +++ b/lib/flua/libjail/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME= jail.so SHLIBDIR= ${LIBDIR}/flua diff --git a/lib/geom/Makefile b/lib/geom/Makefile index 8352b4f2c5ab..a6274d43e7e1 100644 --- a/lib/geom/Makefile +++ b/lib/geom/Makefile @@ -1,4 +1,3 @@ - SUBDIR=${GEOM_CLASSES} .include "Makefile.inc" diff --git a/lib/geom/Makefile.classes b/lib/geom/Makefile.classes index a924bf71c297..1852e35be15f 100644 --- a/lib/geom/Makefile.classes +++ b/lib/geom/Makefile.classes @@ -1,4 +1,3 @@ - .if !defined(COMPAT_libcompat) GEOM_CLASS_DIR?=/lib/geom .else diff --git a/lib/geom/Makefile.inc b/lib/geom/Makefile.inc index 3f2e2b541050..35163127538d 100644 --- a/lib/geom/Makefile.inc +++ b/lib/geom/Makefile.inc @@ -1,4 +1,3 @@ - .include SHLIBDIR=${GEOM_CLASS_DIR} diff --git a/lib/geom/cache/Makefile b/lib/geom/cache/Makefile index db3f667a0977..850a237d6827 100644 --- a/lib/geom/cache/Makefile +++ b/lib/geom/cache/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/concat/Makefile b/lib/geom/concat/Makefile index f8801db9c61c..e30eeb247569 100644 --- a/lib/geom/concat/Makefile +++ b/lib/geom/concat/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/eli/Makefile b/lib/geom/eli/Makefile index 1bc31a5f66b2..f4a0e6f5ad9f 100644 --- a/lib/geom/eli/Makefile +++ b/lib/geom/eli/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/eli ${SRCTOP}/sys/crypto/sha2 diff --git a/lib/geom/journal/Makefile b/lib/geom/journal/Makefile index b3e23df91768..7d5282ff762a 100644 --- a/lib/geom/journal/Makefile +++ b/lib/geom/journal/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/label/Makefile b/lib/geom/label/Makefile index d281b3c40e76..ed35777cf479 100644 --- a/lib/geom/label/Makefile +++ b/lib/geom/label/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/mirror/Makefile b/lib/geom/mirror/Makefile index fd7608accc9e..2e86b099fea8 100644 --- a/lib/geom/mirror/Makefile +++ b/lib/geom/mirror/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/mountver/Makefile b/lib/geom/mountver/Makefile index 24caa75636e3..b60e355bed65 100644 --- a/lib/geom/mountver/Makefile +++ b/lib/geom/mountver/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/multipath/Makefile b/lib/geom/multipath/Makefile index 550d1969ee45..805ac93dfcbd 100644 --- a/lib/geom/multipath/Makefile +++ b/lib/geom/multipath/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/nop/Makefile b/lib/geom/nop/Makefile index 939f56e9567e..d7d1329697ba 100644 --- a/lib/geom/nop/Makefile +++ b/lib/geom/nop/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/part/Makefile b/lib/geom/part/Makefile index 00840df1da23..a8f0c6ac5f7f 100644 --- a/lib/geom/part/Makefile +++ b/lib/geom/part/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/raid/Makefile b/lib/geom/raid/Makefile index 9d804fd437a2..338a305b7ab9 100644 --- a/lib/geom/raid/Makefile +++ b/lib/geom/raid/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/raid3/Makefile b/lib/geom/raid3/Makefile index b4843bd50345..f6e5e5ef92fa 100644 --- a/lib/geom/raid3/Makefile +++ b/lib/geom/raid3/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/shsec/Makefile b/lib/geom/shsec/Makefile index b67b9c8b6b6f..47981da7df9d 100644 --- a/lib/geom/shsec/Makefile +++ b/lib/geom/shsec/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/stripe/Makefile b/lib/geom/stripe/Makefile index 9168ecf30466..a63568ae35ef 100644 --- a/lib/geom/stripe/Makefile +++ b/lib/geom/stripe/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/union/Makefile b/lib/geom/union/Makefile index 9f2deca840e8..7dfe3be205ae 100644 --- a/lib/geom/union/Makefile +++ b/lib/geom/union/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc diff --git a/lib/geom/virstor/Makefile b/lib/geom/virstor/Makefile index c8f728904f24..e596e83ec186 100644 --- a/lib/geom/virstor/Makefile +++ b/lib/geom/virstor/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom .PATH: ${.CURDIR:H:H}/misc ${SRCTOP}/sys/geom/virstor diff --git a/lib/googletest/Makefile b/lib/googletest/Makefile index 7b56a6c216d1..2cbc40829d13 100644 --- a/lib/googletest/Makefile +++ b/lib/googletest/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR+= gtest diff --git a/lib/googletest/Makefile.inc b/lib/googletest/Makefile.inc index f40428f77542..231d7545f364 100644 --- a/lib/googletest/Makefile.inc +++ b/lib/googletest/Makefile.inc @@ -1,4 +1,3 @@ - .include GTEST_DIR= ${SRCTOP}/contrib/googletest diff --git a/lib/googletest/gmock/Makefile b/lib/googletest/gmock/Makefile index b896c789a8bc..b6f8b69e356a 100644 --- a/lib/googletest/gmock/Makefile +++ b/lib/googletest/gmock/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLEMOCK_SRCROOT}/include ${GOOGLEMOCK_SRCROOT}/src diff --git a/lib/googletest/gmock/Makefile.inc b/lib/googletest/gmock/Makefile.inc index 22f1f7384010..f77e46b3451a 100644 --- a/lib/googletest/gmock/Makefile.inc +++ b/lib/googletest/gmock/Makefile.inc @@ -1,2 +1 @@ - include ../Makefile.inc diff --git a/lib/googletest/gmock_main/Makefile b/lib/googletest/gmock_main/Makefile index 4978aa7af4a6..34b87a054269 100644 --- a/lib/googletest/gmock_main/Makefile +++ b/lib/googletest/gmock_main/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLEMOCK_SRCROOT}/include ${GOOGLEMOCK_SRCROOT}/src diff --git a/lib/googletest/gmock_main/Makefile.inc b/lib/googletest/gmock_main/Makefile.inc index 22f1f7384010..f77e46b3451a 100644 --- a/lib/googletest/gmock_main/Makefile.inc +++ b/lib/googletest/gmock_main/Makefile.inc @@ -1,2 +1 @@ - include ../Makefile.inc diff --git a/lib/googletest/gtest/Makefile b/lib/googletest/gtest/Makefile index fbfcfb5e1b3c..6475fd2e0430 100644 --- a/lib/googletest/gtest/Makefile +++ b/lib/googletest/gtest/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLETEST_SRCROOT}/include ${GOOGLETEST_SRCROOT}/src diff --git a/lib/googletest/gtest/Makefile.inc b/lib/googletest/gtest/Makefile.inc index 22f1f7384010..f77e46b3451a 100644 --- a/lib/googletest/gtest/Makefile.inc +++ b/lib/googletest/gtest/Makefile.inc @@ -1,2 +1 @@ - include ../Makefile.inc diff --git a/lib/googletest/gtest_main/Makefile b/lib/googletest/gtest_main/Makefile index 0aea71a41b75..1a4eb5d71393 100644 --- a/lib/googletest/gtest_main/Makefile +++ b/lib/googletest/gtest_main/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLETEST_SRCROOT}/include ${GOOGLETEST_SRCROOT}/src diff --git a/lib/googletest/gtest_main/Makefile.inc b/lib/googletest/gtest_main/Makefile.inc index 22f1f7384010..f77e46b3451a 100644 --- a/lib/googletest/gtest_main/Makefile.inc +++ b/lib/googletest/gtest_main/Makefile.inc @@ -1,2 +1 @@ - include ../Makefile.inc diff --git a/lib/googletest/tests/Makefile b/lib/googletest/tests/Makefile index 8e3299029da0..886b1a2fe49d 100644 --- a/lib/googletest/tests/Makefile +++ b/lib/googletest/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/lib/googletest/tests/Makefile.inc b/lib/googletest/tests/Makefile.inc index 03ee799eb611..9691aaa93ded 100644 --- a/lib/googletest/tests/Makefile.inc +++ b/lib/googletest/tests/Makefile.inc @@ -1,4 +1,3 @@ - .include "../Makefile.inc" # Keep the existing tests directory structure (with subdirs per component) # rather than installing all of them to /usr/tests/lib/googletest diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile index 5df1f48c0e4a..493567100630 100644 --- a/lib/googletest/tests/gmock/Makefile +++ b/lib/googletest/tests/gmock/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test diff --git a/lib/googletest/tests/gmock_main/Makefile b/lib/googletest/tests/gmock_main/Makefile index 7523b585ac2c..1b191924fb9d 100644 --- a/lib/googletest/tests/gmock_main/Makefile +++ b/lib/googletest/tests/gmock_main/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile index 0000167dfe70..5834ca788985 100644 --- a/lib/googletest/tests/gtest/Makefile +++ b/lib/googletest/tests/gtest/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile index 3124042f8b95..de9bc2f4a78a 100644 --- a/lib/googletest/tests/gtest_main/Makefile +++ b/lib/googletest/tests/gtest_main/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test diff --git a/lib/lib80211/Makefile b/lib/lib80211/Makefile index 0d3cd3619c6d..78819cb9cfac 100644 --- a/lib/lib80211/Makefile +++ b/lib/lib80211/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime CONFS= regdomain.xml LIB= 80211 diff --git a/lib/lib9p/Makefile b/lib/lib9p/Makefile index 349900a9c53a..a8e0c74301e0 100644 --- a/lib/lib9p/Makefile +++ b/lib/lib9p/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${.CURDIR}/../../contrib/lib9p diff --git a/lib/libalias/Makefile b/lib/libalias/Makefile index 02fd37c62a1c..c847f55e8e00 100644 --- a/lib/libalias/Makefile +++ b/lib/libalias/Makefile @@ -1,4 +1,3 @@ - SUBDIR= libalias modules .include diff --git a/lib/libalias/Makefile.inc b/lib/libalias/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/libalias/Makefile.inc +++ b/lib/libalias/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/libalias/libalias/Makefile b/lib/libalias/libalias/Makefile index 7a2004ed43fd..e6fed2355d82 100644 --- a/lib/libalias/libalias/Makefile +++ b/lib/libalias/libalias/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/libalias PACKAGE= natd diff --git a/lib/libalias/modules/Makefile b/lib/libalias/modules/Makefile index f7d4c3e8e8b4..cf2ce73397c6 100644 --- a/lib/libalias/modules/Makefile +++ b/lib/libalias/modules/Makefile @@ -1,4 +1,3 @@ - .include "${SRCTOP}/sys/modules/libalias/modules/modules.inc" SUBDIR= ${MODULES} diff --git a/lib/libalias/modules/Makefile.inc b/lib/libalias/modules/Makefile.inc index 4be1feb6e745..9d1c9bac3ff0 100644 --- a/lib/libalias/modules/Makefile.inc +++ b/lib/libalias/modules/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/libalias SHLIBDIR?= /lib diff --git a/lib/libalias/modules/dummy/Makefile b/lib/libalias/modules/dummy/Makefile index 8795962cc42f..4762582b9441 100644 --- a/lib/libalias/modules/dummy/Makefile +++ b/lib/libalias/modules/dummy/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= dummy SRCS= alias_dummy.c diff --git a/lib/libalias/modules/ftp/Makefile b/lib/libalias/modules/ftp/Makefile index 84dac1758aa2..4e90d1aeea0a 100644 --- a/lib/libalias/modules/ftp/Makefile +++ b/lib/libalias/modules/ftp/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= ftp SRCS= alias_ftp.c diff --git a/lib/libalias/modules/irc/Makefile b/lib/libalias/modules/irc/Makefile index e954208c256f..0400cbeb53a8 100644 --- a/lib/libalias/modules/irc/Makefile +++ b/lib/libalias/modules/irc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= irc SRCS= alias_irc.c diff --git a/lib/libalias/modules/nbt/Makefile b/lib/libalias/modules/nbt/Makefile index 5176d49b7afc..7c8b0487530a 100644 --- a/lib/libalias/modules/nbt/Makefile +++ b/lib/libalias/modules/nbt/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= nbt SRCS= alias_nbt.c diff --git a/lib/libalias/modules/pptp/Makefile b/lib/libalias/modules/pptp/Makefile index 7db0d8597600..ad32569d0c07 100644 --- a/lib/libalias/modules/pptp/Makefile +++ b/lib/libalias/modules/pptp/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= pptp SRCS= alias_pptp.c diff --git a/lib/libalias/modules/skinny/Makefile b/lib/libalias/modules/skinny/Makefile index a120ac2f1c78..5d914c6f79aa 100644 --- a/lib/libalias/modules/skinny/Makefile +++ b/lib/libalias/modules/skinny/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= skinny SRCS= alias_skinny.c diff --git a/lib/libalias/modules/smedia/Makefile b/lib/libalias/modules/smedia/Makefile index 0fbda73b3950..9fa766b7d7d3 100644 --- a/lib/libalias/modules/smedia/Makefile +++ b/lib/libalias/modules/smedia/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd NAME= smedia SRCS= alias_smedia.c diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index 099efed52d9f..10bcabea7324 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libbe/tests/Makefile b/lib/libbe/tests/Makefile index 7a16bc486d70..20a4e1ddfeb7 100644 --- a/lib/libbe/tests/Makefile +++ b/lib/libbe/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= be_create diff --git a/lib/libbearssl/Makefile b/lib/libbearssl/Makefile index 1fa57f372596..2c649bb80e9e 100644 --- a/lib/libbearssl/Makefile +++ b/lib/libbearssl/Makefile @@ -1,4 +1,3 @@ - # This is a reach over build of BearSSL (www.BearSSL.org) .include diff --git a/lib/libbearssl/Makefile.inc b/lib/libbearssl/Makefile.inc index 453630d038cd..75365bb98be7 100644 --- a/lib/libbearssl/Makefile.inc +++ b/lib/libbearssl/Makefile.inc @@ -1,4 +1,3 @@ - BEARSSL?= ${SRCTOP}/contrib/bearssl BEARSSL_SRC= ${BEARSSL}/src BEARSSL_TOOLS= ${BEARSSL}/tools diff --git a/lib/libbearssl/Makefile.libsa.inc b/lib/libbearssl/Makefile.libsa.inc index c171e141f0db..827ce82d1304 100644 --- a/lib/libbearssl/Makefile.libsa.inc +++ b/lib/libbearssl/Makefile.libsa.inc @@ -1,4 +1,3 @@ - # This file is included by libsa # It contains SRCS needed for loader diff --git a/lib/libbegemot/Makefile b/lib/libbegemot/Makefile index a58881ff2ac9..99f61c67f085 100644 --- a/lib/libbegemot/Makefile +++ b/lib/libbegemot/Makefile @@ -1,4 +1,3 @@ - LIBBEGEMOT_DIR=${SRCTOP}/contrib/libbegemot PACKAGE=lib${LIB} diff --git a/lib/libblacklist/Makefile b/lib/libblacklist/Makefile index 9d85d1eff82c..bfd9edb9614c 100644 --- a/lib/libblacklist/Makefile +++ b/lib/libblacklist/Makefile @@ -1,4 +1,3 @@ - BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist .PATH: ${BLOCKLIST_DIR}/lib ${BLOCKLIST_DIR}/include diff --git a/lib/libblocksruntime/Makefile b/lib/libblocksruntime/Makefile index 6c7bb3c55144..baadcfd0f95c 100644 --- a/lib/libblocksruntime/Makefile +++ b/lib/libblocksruntime/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB:tl} LIB= BlocksRuntime SHLIB_MAJOR=0 diff --git a/lib/libbsdstat/Makefile b/lib/libbsdstat/Makefile index 46fa76adb28b..403c11cce586 100644 --- a/lib/libbsdstat/Makefile +++ b/lib/libbsdstat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= lib${LIB} LIB= bsdstat SHLIB_MAJOR= 1 diff --git a/lib/libbsnmp/Makefile b/lib/libbsnmp/Makefile index 5dc4e084dd00..7b25928ba611 100644 --- a/lib/libbsnmp/Makefile +++ b/lib/libbsnmp/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= libbsnmp diff --git a/lib/libbsnmp/Makefile.inc b/lib/libbsnmp/Makefile.inc index 80478f392410..ea77a5f420d3 100644 --- a/lib/libbsnmp/Makefile.inc +++ b/lib/libbsnmp/Makefile.inc @@ -1,4 +1,3 @@ - INCSDIR= ${INCLUDEDIR}/bsnmp PACKAGE= bsnmp diff --git a/lib/libbsnmp/tests/Makefile b/lib/libbsnmp/tests/Makefile index 529622104449..fdd5484ec075 100644 --- a/lib/libbsnmp/tests/Makefile +++ b/lib/libbsnmp/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= bsnmpd_test diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index 832ec15487b8..f7ea21b1a085 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -1,4 +1,3 @@ - PACKAGE= lib${LIB} BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index ea93913e3585..aec8ebc5a97a 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libc++experimental/Makefile b/lib/libc++experimental/Makefile index ddc34e8756c9..733bb8946900 100644 --- a/lib/libc++experimental/Makefile +++ b/lib/libc++experimental/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= clibs diff --git a/lib/libc/Makefile b/lib/libc/Makefile index c70e57498771..ae059e53144c 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/libc/aarch64/gen/Makefile.inc b/lib/libc/aarch64/gen/Makefile.inc index 4f4fb3d199bf..1efdb0e9f8be 100644 --- a/lib/libc/aarch64/gen/Makefile.inc +++ b/lib/libc/aarch64/gen/Makefile.inc @@ -1,4 +1,3 @@ - CFLAGS+= -DNO_COMPAT7 SRCS+= _ctx_start.S \ diff --git a/lib/libc/amd64/gen/Makefile.inc b/lib/libc/amd64/gen/Makefile.inc index 583418c4620e..aaffcb0481f1 100644 --- a/lib/libc/amd64/gen/Makefile.inc +++ b/lib/libc/amd64/gen/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= _setjmp.S setjmp.S sigsetjmp.S \ fabs.S \ infinity.c ldexp.c makecontext.c signalcontext.c \ diff --git a/lib/libc/amd64/stdlib/Makefile.inc b/lib/libc/amd64/stdlib/Makefile.inc index f0abf7ce8254..568f8eb4afa7 100644 --- a/lib/libc/amd64/stdlib/Makefile.inc +++ b/lib/libc/amd64/stdlib/Makefile.inc @@ -1,2 +1 @@ - MDSRCS+=div.S ldiv.S lldiv.S diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc index 08158f1d8e63..ef9ff746060f 100644 --- a/lib/libc/arm/aeabi/Makefile.inc +++ b/lib/libc/arm/aeabi/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/arm/aeabi SRCS+= aeabi_atexit.c \ diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc index 3a76c1de4e7d..dfb83da20a1f 100644 --- a/lib/libc/arm/gen/Makefile.inc +++ b/lib/libc/arm/gen/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= \ __aeabi_read_tp.S \ _ctx_start.S \ diff --git a/lib/libc/arm/string/Makefile.inc b/lib/libc/arm/string/Makefile.inc index 9f0d10f70c9c..fc886645b0c8 100644 --- a/lib/libc/arm/string/Makefile.inc +++ b/lib/libc/arm/string/Makefile.inc @@ -1,4 +1,3 @@ - MDSRCS+= \ bcopy.S \ bzero.S \ diff --git a/lib/libc/capability/Makefile.inc b/lib/libc/capability/Makefile.inc index cf214d7f5627..e4c2350a7318 100644 --- a/lib/libc/capability/Makefile.inc +++ b/lib/libc/capability/Makefile.inc @@ -1,4 +1,3 @@ - # capability sources .PATH: ${SRCTOP}/sys/kern ${LIBC_SRCTOP}/capability diff --git a/lib/libc/compat-43/Makefile.inc b/lib/libc/compat-43/Makefile.inc index b0fcd0d4af8b..288fb04e5926 100644 --- a/lib/libc/compat-43/Makefile.inc +++ b/lib/libc/compat-43/Makefile.inc @@ -1,4 +1,3 @@ - # compat-43 sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/compat-43 ${LIBC_SRCTOP}/compat-43 diff --git a/lib/libc/db/btree/Makefile.inc b/lib/libc/db/btree/Makefile.inc index 44c4d16275e9..fb1cf2314677 100644 --- a/lib/libc/db/btree/Makefile.inc +++ b/lib/libc/db/btree/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/btree SRCS+= bt_close.c bt_conv.c bt_debug.c bt_delete.c bt_get.c bt_open.c \ diff --git a/lib/libc/db/db/Makefile.inc b/lib/libc/db/db/Makefile.inc index 0597b4e60290..7447ec41ca87 100644 --- a/lib/libc/db/db/Makefile.inc +++ b/lib/libc/db/db/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/db SRCS+= db.c diff --git a/lib/libc/db/hash/Makefile.inc b/lib/libc/db/hash/Makefile.inc index 369985d55ed2..0d58e60796a1 100644 --- a/lib/libc/db/hash/Makefile.inc +++ b/lib/libc/db/hash/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/hash SRCS+= hash.c hash_bigkey.c hash_buf.c hash_func.c hash_log2.c \ diff --git a/lib/libc/db/man/Makefile.inc b/lib/libc/db/man/Makefile.inc index c3045ca980b2..312fd0467078 100644 --- a/lib/libc/db/man/Makefile.inc +++ b/lib/libc/db/man/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/man MAN+= btree.3 dbm.3 dbopen.3 hash.3 mpool.3 recno.3 diff --git a/lib/libc/db/mpool/Makefile.inc b/lib/libc/db/mpool/Makefile.inc index 526d70cc2364..e9c9795add3d 100644 --- a/lib/libc/db/mpool/Makefile.inc +++ b/lib/libc/db/mpool/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/mpool SRCS+= mpool.c \ diff --git a/lib/libc/db/recno/Makefile.inc b/lib/libc/db/recno/Makefile.inc index 0a4da32314bf..b3cb3c412f10 100644 --- a/lib/libc/db/recno/Makefile.inc +++ b/lib/libc/db/recno/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/db/recno SRCS+= rec_close.c rec_delete.c rec_get.c rec_open.c rec_put.c rec_search.c \ diff --git a/lib/libc/db/test/Makefile b/lib/libc/db/test/Makefile index 0e1c295a61a6..b8930e951e13 100644 --- a/lib/libc/db/test/Makefile +++ b/lib/libc/db/test/Makefile @@ -1,4 +1,3 @@ - PROG= dbtest OBJS= dbtest.o strerror.o diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc index 5a7bc9fab150..ce0ddfc46162 100644 --- a/lib/libc/gdtoa/Makefile.inc +++ b/lib/libc/gdtoa/Makefile.inc @@ -1,4 +1,3 @@ - # netlib gdtoa sources .PATH: ${LIBC_SRCTOP}/gdtoa diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 2f034e7d476a..8111b0d24345 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,4 +1,3 @@ - # machine-independent gen sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen ${SRCTOP}/etc diff --git a/lib/libc/gmon/Makefile.inc b/lib/libc/gmon/Makefile.inc index 92db74d48888..f70dc5692f8e 100644 --- a/lib/libc/gmon/Makefile.inc +++ b/lib/libc/gmon/Makefile.inc @@ -1,4 +1,3 @@ - # gmon sources .PATH: ${LIBC_SRCTOP}/gmon diff --git a/lib/libc/i386/Makefile.inc b/lib/libc/i386/Makefile.inc index 79ecb7597547..5268afe685f5 100644 --- a/lib/libc/i386/Makefile.inc +++ b/lib/libc/i386/Makefile.inc @@ -1,4 +1,3 @@ - # Long double is 80 bits GDTOASRCS+=strtorx.c SRCS+=machdep_ldisx.c diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc index 1c4eb2a9981f..e3d36c0a1ade 100644 --- a/lib/libc/i386/gen/Makefile.inc +++ b/lib/libc/i386/gen/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= _ctx_start.S _setjmp.S fabs.S \ flt_rounds.c infinity.c ldexp.c makecontext.c \ setjmp.S signalcontext.c sigsetjmp.S diff --git a/lib/libc/i386/stdlib/Makefile.inc b/lib/libc/i386/stdlib/Makefile.inc index 072bcb2ace0b..21e1af04fd8d 100644 --- a/lib/libc/i386/stdlib/Makefile.inc +++ b/lib/libc/i386/stdlib/Makefile.inc @@ -1,2 +1 @@ - MDSRCS+=div.S ldiv.S diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc index 391b81be4d68..bbb4320a5b05 100644 --- a/lib/libc/i386/string/Makefile.inc +++ b/lib/libc/i386/string/Makefile.inc @@ -1,4 +1,3 @@ - MDSRCS+= \ bcmp.S \ bcopy.S \ diff --git a/lib/libc/iconv/Makefile.inc b/lib/libc/iconv/Makefile.inc index 1e23f1a6fc94..08c2763c8f0d 100644 --- a/lib/libc/iconv/Makefile.inc +++ b/lib/libc/iconv/Makefile.inc @@ -1,4 +1,3 @@ - # iconv sources .PATH: ${LIBC_SRCTOP}/iconv diff --git a/lib/libc/inet/Makefile.inc b/lib/libc/inet/Makefile.inc index 9cc1b6547261..8175bfef6772 100644 --- a/lib/libc/inet/Makefile.inc +++ b/lib/libc/inet/Makefile.inc @@ -1,4 +1,3 @@ - # inet sources .PATH: ${LIBC_SRCTOP}/inet diff --git a/lib/libc/isc/Makefile.inc b/lib/libc/isc/Makefile.inc index 11b3da0a1b45..30729e96ef16 100644 --- a/lib/libc/isc/Makefile.inc +++ b/lib/libc/isc/Makefile.inc @@ -1,4 +1,3 @@ - # isc sources .PATH: ${LIBC_SRCTOP}/isc diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc index ad00b38a1baf..33caafc5c10a 100644 --- a/lib/libc/locale/Makefile.inc +++ b/lib/libc/locale/Makefile.inc @@ -1,4 +1,3 @@ - # locale sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/locale ${LIBC_SRCTOP}/locale diff --git a/lib/libc/md/Makefile.inc b/lib/libc/md/Makefile.inc index e7bf932c1ffe..346fb93017a6 100644 --- a/lib/libc/md/Makefile.inc +++ b/lib/libc/md/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libmd SRCS+= md5c.c diff --git a/lib/libc/nameser/Makefile.inc b/lib/libc/nameser/Makefile.inc index f91cccbc1713..c60371e2ca93 100644 --- a/lib/libc/nameser/Makefile.inc +++ b/lib/libc/nameser/Makefile.inc @@ -1,4 +1,3 @@ - # nameser sources .PATH: ${LIBC_SRCTOP}/nameser diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index cd4ccaefac92..558cf7be5771 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -1,4 +1,3 @@ - # machine-independent net sources .PATH: ${LIBC_SRCTOP}/net diff --git a/lib/libc/posix1e/Makefile.inc b/lib/libc/posix1e/Makefile.inc index 0b738ef7e239..934998cdd092 100644 --- a/lib/libc/posix1e/Makefile.inc +++ b/lib/libc/posix1e/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/posix1e CFLAGS+=-D_ACL_PRIVATE diff --git a/lib/libc/powerpc/Makefile.inc b/lib/libc/powerpc/Makefile.inc index 80ac23a9947c..1d1fadd21330 100644 --- a/lib/libc/powerpc/Makefile.inc +++ b/lib/libc/powerpc/Makefile.inc @@ -1,4 +1,3 @@ - # Long double is 64-bits SRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/powerpc/Symbol.map diff --git a/lib/libc/powerpc/gen/Makefile.common b/lib/libc/powerpc/gen/Makefile.common index d0d78197ca63..70aa9ea5d9c3 100644 --- a/lib/libc/powerpc/gen/Makefile.common +++ b/lib/libc/powerpc/gen/Makefile.common @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/powerpc/gen SRCS += _ctx_start.S eabi.S infinity.c ldexp.c makecontext.c \ diff --git a/lib/libc/powerpc/gen/Makefile.inc b/lib/libc/powerpc/gen/Makefile.inc index efdc778e8999..502f3dc231bf 100644 --- a/lib/libc/powerpc/gen/Makefile.inc +++ b/lib/libc/powerpc/gen/Makefile.inc @@ -1,4 +1,3 @@ - .include "${LIBC_SRCTOP}/powerpc/gen/Makefile.common" SRCS += fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ diff --git a/lib/libc/powerpc64/Makefile.inc b/lib/libc/powerpc64/Makefile.inc index 4aac4e3a6e68..734afe95f243 100644 --- a/lib/libc/powerpc64/Makefile.inc +++ b/lib/libc/powerpc64/Makefile.inc @@ -1,4 +1,3 @@ - # Long double is 64-bits SRCS+=machdep_ldisd.c SYM_MAPS+=${LIBC_SRCTOP}/powerpc64/Symbol.map diff --git a/lib/libc/powerpc64/gen/Makefile.inc b/lib/libc/powerpc64/gen/Makefile.inc index 26265df5fbd2..c48ff05ae552 100644 --- a/lib/libc/powerpc64/gen/Makefile.inc +++ b/lib/libc/powerpc64/gen/Makefile.inc @@ -1,4 +1,3 @@ - SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ fpgetsticky.c fpsetmask.c fpsetround.c \ infinity.c ldexp.c makecontext.c _setjmp.S \ diff --git a/lib/libc/powerpc64/string/Makefile.inc b/lib/libc/powerpc64/string/Makefile.inc index d1918ff027c3..c9d7c9d71676 100644 --- a/lib/libc/powerpc64/string/Makefile.inc +++ b/lib/libc/powerpc64/string/Makefile.inc @@ -1,4 +1,3 @@ - MDSRCS+= \ bcopy.S \ bcopy_vsx.S \ diff --git a/lib/libc/powerpcspe/Makefile.inc b/lib/libc/powerpcspe/Makefile.inc index 6962e107ed4d..0b5879574480 100644 --- a/lib/libc/powerpcspe/Makefile.inc +++ b/lib/libc/powerpcspe/Makefile.inc @@ -1,4 +1,3 @@ - CFLAGS+= -I${LIBC_SRCTOP}/powerpc # Long double is 64-bits diff --git a/lib/libc/powerpcspe/gen/Makefile.inc b/lib/libc/powerpcspe/gen/Makefile.inc index efdc778e8999..502f3dc231bf 100644 --- a/lib/libc/powerpcspe/gen/Makefile.inc +++ b/lib/libc/powerpcspe/gen/Makefile.inc @@ -1,4 +1,3 @@ - .include "${LIBC_SRCTOP}/powerpc/gen/Makefile.common" SRCS += fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ diff --git a/lib/libc/quad/Makefile.inc b/lib/libc/quad/Makefile.inc index d70c2596f3f7..680b58ab2226 100644 --- a/lib/libc/quad/Makefile.inc +++ b/lib/libc/quad/Makefile.inc @@ -1,4 +1,3 @@ - # Quad support, if needed .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/quad ${LIBC_SRCTOP}/quad diff --git a/lib/libc/quad/TESTS/Makefile b/lib/libc/quad/TESTS/Makefile index 7bcbe4655059..9cb440158029 100644 --- a/lib/libc/quad/TESTS/Makefile +++ b/lib/libc/quad/TESTS/Makefile @@ -1,4 +1,3 @@ - all: mul divrem MUL= mul.c ../muldi3.c diff --git a/lib/libc/regex/Makefile.inc b/lib/libc/regex/Makefile.inc index 9fa541ab4cd0..89468f1317f6 100644 --- a/lib/libc/regex/Makefile.inc +++ b/lib/libc/regex/Makefile.inc @@ -1,4 +1,3 @@ - # regex sources .PATH: ${LIBC_SRCTOP}/regex diff --git a/lib/libc/resolv/Makefile.inc b/lib/libc/resolv/Makefile.inc index ea5e1927a9c2..be900e942435 100644 --- a/lib/libc/resolv/Makefile.inc +++ b/lib/libc/resolv/Makefile.inc @@ -1,4 +1,3 @@ - # resolv sources .PATH: ${LIBC_SRCTOP}/resolv diff --git a/lib/libc/riscv/gen/Makefile.inc b/lib/libc/riscv/gen/Makefile.inc index 71bb6a42bbd1..443e029946bf 100644 --- a/lib/libc/riscv/gen/Makefile.inc +++ b/lib/libc/riscv/gen/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= _ctx_start.S \ fabs.S \ flt_rounds.c \ diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc index 274f780755a7..021b7390ca54 100644 --- a/lib/libc/rpc/Makefile.inc +++ b/lib/libc/rpc/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/rpc ${LIBC_SRCTOP}/. CONFS+= rpc/netconfig rpc/rpc SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ diff --git a/lib/libc/stdio/Makefile.inc b/lib/libc/stdio/Makefile.inc index 52497254ac86..a3d76c0ea795 100644 --- a/lib/libc/stdio/Makefile.inc +++ b/lib/libc/stdio/Makefile.inc @@ -1,4 +1,3 @@ - # stdio sources .PATH: ${LIBC_SRCTOP}/stdio diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 5e273d5d5a21..bea82445304d 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -1,4 +1,3 @@ - # machine-independent stdlib sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index f32bcde5ba5e..c5ded194c78a 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -1,4 +1,3 @@ - .if ${MK_MACHDEP_OPTIMIZATIONS} != "no" .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string .endif diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile index 7f72fb619004..76a79a9f578b 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= tls_dso diff --git a/lib/libc/tests/Makefile.netbsd-tests b/lib/libc/tests/Makefile.netbsd-tests index 98ff48bde5c8..43710d39aca2 100644 --- a/lib/libc/tests/Makefile.netbsd-tests +++ b/lib/libc/tests/Makefile.netbsd-tests @@ -1,4 +1,3 @@ - TESTSRC:= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:C/libc\/tests/libc/} TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/} diff --git a/lib/libc/tests/c063/Makefile b/lib/libc/tests/c063/Makefile index d71ddad1f5f4..c1d8b01c1abd 100644 --- a/lib/libc/tests/c063/Makefile +++ b/lib/libc/tests/c063/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_C= faccessat_test NETBSD_ATF_TESTS_C+= fchmodat_test NETBSD_ATF_TESTS_C+= fchownat_test diff --git a/lib/libc/tests/db/Makefile b/lib/libc/tests/db/Makefile index 617295b8b145..f1f33bd2bafc 100644 --- a/lib/libc/tests/db/Makefile +++ b/lib/libc/tests/db/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests BINDIR= ${TESTSDIR} diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index edffdc98b35e..87f2b8320d25 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= arc4random_test diff --git a/lib/libc/tests/gen/execve/Makefile b/lib/libc/tests/gen/execve/Makefile index 5f563dc8e3cd..7bf911d1cb47 100644 --- a/lib/libc/tests/gen/execve/Makefile +++ b/lib/libc/tests/gen/execve/Makefile @@ -1,4 +1,3 @@ - .include NETBSD_ATF_TESTS_C= execve_test diff --git a/lib/libc/tests/gen/posix_spawn/Makefile b/lib/libc/tests/gen/posix_spawn/Makefile index 7a13fdf501c5..df428876708b 100644 --- a/lib/libc/tests/gen/posix_spawn/Makefile +++ b/lib/libc/tests/gen/posix_spawn/Makefile @@ -1,4 +1,3 @@ - .include BINDIR= ${TESTSDIR} diff --git a/lib/libc/tests/hash/Makefile b/lib/libc/tests/hash/Makefile index 009b7d1c5239..d09d87b7cd8b 100644 --- a/lib/libc/tests/hash/Makefile +++ b/lib/libc/tests/hash/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .include diff --git a/lib/libc/tests/iconv/Makefile b/lib/libc/tests/iconv/Makefile index fd4ab284ebe3..dc2dc5a925b9 100644 --- a/lib/libc/tests/iconv/Makefile +++ b/lib/libc/tests/iconv/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/lib/libc/iconv ATF_TESTS_C+= iconvctl_test diff --git a/lib/libc/tests/inet/Makefile b/lib/libc/tests/inet/Makefile index 0c5a1674237d..3ceadfb8868c 100644 --- a/lib/libc/tests/inet/Makefile +++ b/lib/libc/tests/inet/Makefile @@ -1,4 +1,3 @@ - .include NETBSD_ATF_TESTS_C+= inet_addr_test diff --git a/lib/libc/tests/locale/Makefile b/lib/libc/tests/locale/Makefile index 03e89571aacd..70905cc58d24 100644 --- a/lib/libc/tests/locale/Makefile +++ b/lib/libc/tests/locale/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= btowc_test diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index 6e90f22b98f5..0a49683ea3d1 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_C+= ether_test diff --git a/lib/libc/tests/net/getaddrinfo/Makefile b/lib/libc/tests/net/getaddrinfo/Makefile index c9c9fba7d53c..5d98aa31a86a 100644 --- a/lib/libc/tests/net/getaddrinfo/Makefile +++ b/lib/libc/tests/net/getaddrinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T} diff --git a/lib/libc/tests/nss/Makefile b/lib/libc/tests/nss/Makefile index df85dd463937..790af8c6312c 100644 --- a/lib/libc/tests/nss/Makefile +++ b/lib/libc/tests/nss/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/resolv PACKAGE= tests diff --git a/lib/libc/tests/regex/Makefile b/lib/libc/tests/regex/Makefile index 00f681c0751f..65675d94c59c 100644 --- a/lib/libc/tests/regex/Makefile +++ b/lib/libc/tests/regex/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests # local test cases diff --git a/lib/libc/tests/regex/Makefile.inc b/lib/libc/tests/regex/Makefile.inc index 1af987faa15e..aca7ae47be18 100644 --- a/lib/libc/tests/regex/Makefile.inc +++ b/lib/libc/tests/regex/Makefile.inc @@ -1,4 +1,3 @@ - .include BINDIR?= ${TESTSDIR} diff --git a/lib/libc/tests/resolv/Makefile b/lib/libc/tests/resolv/Makefile index f1c00f7ea5c9..25c659d56685 100644 --- a/lib/libc/tests/resolv/Makefile +++ b/lib/libc/tests/resolv/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/lib/libc/resolv diff --git a/lib/libc/tests/rpc/Makefile b/lib/libc/tests/rpc/Makefile index 8c908ce40c6f..621af96eb954 100644 --- a/lib/libc/tests/rpc/Makefile +++ b/lib/libc/tests/rpc/Makefile @@ -1,4 +1,3 @@ - SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} \ h_testbits.h diff --git a/lib/libc/tests/setjmp/Makefile b/lib/libc/tests/setjmp/Makefile index 309a5c82c462..8ea8550dfba0 100644 --- a/lib/libc/tests/setjmp/Makefile +++ b/lib/libc/tests/setjmp/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_C= setjmp_test NETBSD_ATF_TESTS_C+= threadjmp_test diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile index 0f5b56505134..644d5a6d64a2 100644 --- a/lib/libc/tests/ssp/Makefile +++ b/lib/libc/tests/ssp/Makefile @@ -1,4 +1,3 @@ - .include MK_WERROR= no diff --git a/lib/libc/tests/stdio/Makefile b/lib/libc/tests/stdio/Makefile index f0822601e34b..6dca927c4fb7 100644 --- a/lib/libc/tests/stdio/Makefile +++ b/lib/libc/tests/stdio/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= eintr_test diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 860e530389df..cf1a204cfb4a 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= clearenv_test diff --git a/lib/libc/tests/stdlib/dynthr_mod/Makefile b/lib/libc/tests/stdlib/dynthr_mod/Makefile index 1db3a3c9d571..3602e81e5be1 100644 --- a/lib/libc/tests/stdlib/dynthr_mod/Makefile +++ b/lib/libc/tests/stdlib/dynthr_mod/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME= dynthr_mod.so SHLIBDIR= ${TESTSDIR} SRCS= dynthr_mod.c diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile index c71a83eede61..f46076619352 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -1,4 +1,3 @@ - # ensure libc functions are tested, not clang's builtins CFLAGS+= -fno-builtin diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile index 380b3b511049..89d341ff400a 100644 --- a/lib/libc/tests/sys/Makefile +++ b/lib/libc/tests/sys/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .include diff --git a/lib/libc/tests/termios/Makefile b/lib/libc/tests/termios/Makefile index 4900f0067ce0..76879b805035 100644 --- a/lib/libc/tests/termios/Makefile +++ b/lib/libc/tests/termios/Makefile @@ -1,4 +1,3 @@ - .include NETBSD_ATF_TESTS_C= tcsetpgrp_test diff --git a/lib/libc/tests/time/Makefile b/lib/libc/tests/time/Makefile index ac6d3bc55be0..9e0230a70f54 100644 --- a/lib/libc/tests/time/Makefile +++ b/lib/libc/tests/time/Makefile @@ -1,4 +1,3 @@ - .include NETBSD_ATF_TESTS_C= mktime_test diff --git a/lib/libc/tests/tls/Makefile b/lib/libc/tests/tls/Makefile index dc0fbb4c90aa..6d53493f56f5 100644 --- a/lib/libc/tests/tls/Makefile +++ b/lib/libc/tests/tls/Makefile @@ -1,4 +1,3 @@ - .include .if !defined(NO_PIC) diff --git a/lib/libc/tests/tls/dso/Makefile b/lib/libc/tests/tls/dso/Makefile index 2e08d6899d63..5efd8b29a6bd 100644 --- a/lib/libc/tests/tls/dso/Makefile +++ b/lib/libc/tests/tls/dso/Makefile @@ -1,4 +1,3 @@ - TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/tls/${.CURDIR:T} LIB= h_tls_dlopen diff --git a/lib/libc/tests/tls_dso/Makefile b/lib/libc/tests/tls_dso/Makefile index bae78739708d..89296c643695 100644 --- a/lib/libc/tests/tls_dso/Makefile +++ b/lib/libc/tests/tls_dso/Makefile @@ -1,4 +1,3 @@ - .include LIB= h_tls_dynamic diff --git a/lib/libc/tests/ttyio/Makefile b/lib/libc/tests/ttyio/Makefile index 79ec9a4039e5..2d2dda2f854f 100644 --- a/lib/libc/tests/ttyio/Makefile +++ b/lib/libc/tests/ttyio/Makefile @@ -1,4 +1,3 @@ - .include # TODO: ptm_test diff --git a/lib/libc/uuid/Makefile.inc b/lib/libc/uuid/Makefile.inc index d9c8b0a6083d..d887bf816262 100644 --- a/lib/libc/uuid/Makefile.inc +++ b/lib/libc/uuid/Makefile.inc @@ -1,4 +1,3 @@ - # DCE 1.1 UUID implementation sources .PATH: ${LIBC_SRCTOP}/uuid diff --git a/lib/libc/x86/gen/Makefile.inc b/lib/libc/x86/gen/Makefile.inc index 7449ef52fa61..c2ff1ffb0014 100644 --- a/lib/libc/x86/gen/Makefile.inc +++ b/lib/libc/x86/gen/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/x86/gen SRCS+= \ diff --git a/lib/libc/xdr/Makefile.inc b/lib/libc/xdr/Makefile.inc index bbbd09d1e262..559ed5ed044e 100644 --- a/lib/libc/xdr/Makefile.inc +++ b/lib/libc/xdr/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${LIBC_SRCTOP}/xdr ${LIBC_SRCTOP}/. SRCS+= xdr.c xdr_array.c xdr_float.c xdr_mem.c \ xdr_rec.c xdr_reference.c xdr_sizeof.c \ diff --git a/lib/libc/yp/Makefile.inc b/lib/libc/yp/Makefile.inc index 887a29d51f09..7aeac84090e7 100644 --- a/lib/libc/yp/Makefile.inc +++ b/lib/libc/yp/Makefile.inc @@ -1,4 +1,3 @@ - # yp sources .PATH: ${LIBC_SRCTOP}/yp diff --git a/lib/libc_nonshared/Makefile b/lib/libc_nonshared/Makefile index 0f6cf561a7c6..840dc3b8c291 100644 --- a/lib/libc_nonshared/Makefile +++ b/lib/libc_nonshared/Makefile @@ -1,4 +1,3 @@ - # We're actually creating a libc_noshared.a that is PIC along side libc.so.* # It is used exclusively with libc.so.* - there is no need for any other # compile modes. diff --git a/lib/libc_nonshared/Makefile.iconv b/lib/libc_nonshared/Makefile.iconv index 3fbd06f1b6a6..a17d3436f999 100644 --- a/lib/libc_nonshared/Makefile.iconv +++ b/lib/libc_nonshared/Makefile.iconv @@ -1,4 +1,3 @@ - .if ${MK_ICONV} == "yes" LIBC_NONSHARED_SRCS+= \ __iconv.c __iconv_free_list.c __iconv_get_list.c \ diff --git a/lib/libcalendar/Makefile b/lib/libcalendar/Makefile index aac15461b84b..e28e7ef08ea6 100644 --- a/lib/libcalendar/Makefile +++ b/lib/libcalendar/Makefile @@ -1,4 +1,3 @@ - LIB= calendar SRCS= calendar.c easter.c diff --git a/lib/libcam/Makefile b/lib/libcam/Makefile index f3f43a90d4bc..c2f7b75bc878 100644 --- a/lib/libcam/Makefile +++ b/lib/libcam/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= cam diff --git a/lib/libcam/tests/Makefile b/lib/libcam/tests/Makefile index f762332b0c73..a1726638fdc9 100644 --- a/lib/libcam/tests/Makefile +++ b/lib/libcam/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C+= libcam_test ATF_TESTS_C+= cam_test diff --git a/lib/libcapsicum/Makefile b/lib/libcapsicum/Makefile index 48577bb7fb5f..3cb476e67e28 100644 --- a/lib/libcapsicum/Makefile +++ b/lib/libcapsicum/Makefile @@ -1,4 +1,3 @@ - INCS= capsicum_helpers.h MAN+= capsicum_helpers.3 diff --git a/lib/libcasper/Makefile b/lib/libcasper/Makefile index ce6bfb941160..0a1074d4613d 100644 --- a/lib/libcasper/Makefile +++ b/lib/libcasper/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= libcasper diff --git a/lib/libcasper/Makefile.inc b/lib/libcasper/Makefile.inc index ca5f4a2b3606..00bd221feb27 100644 --- a/lib/libcasper/Makefile.inc +++ b/lib/libcasper/Makefile.inc @@ -1,4 +1,3 @@ - .include .if ${MK_CASPER} != "no" diff --git a/lib/libcasper/libcasper/Makefile b/lib/libcasper/libcasper/Makefile index 8d7e49bf94af..4db26f665f19 100644 --- a/lib/libcasper/libcasper/Makefile +++ b/lib/libcasper/libcasper/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime SHLIBDIR?= /lib diff --git a/lib/libcasper/services/Makefile b/lib/libcasper/services/Makefile index f51531d12b22..c86b199f879b 100644 --- a/lib/libcasper/services/Makefile +++ b/lib/libcasper/services/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= cap_dns diff --git a/lib/libcasper/services/Makefile.inc b/lib/libcasper/services/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/libcasper/services/Makefile.inc +++ b/lib/libcasper/services/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/libcasper/services/cap_dns/Makefile b/lib/libcasper/services/cap_dns/Makefile index eec1ac9d7d70..4b11c97d29e5 100644 --- a/lib/libcasper/services/cap_dns/Makefile +++ b/lib/libcasper/services/cap_dns/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_dns/tests/Makefile b/lib/libcasper/services/cap_dns/tests/Makefile index b11586df6a85..c7306581a803 100644 --- a/lib/libcasper/services/cap_dns/tests/Makefile +++ b/lib/libcasper/services/cap_dns/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= dns_test diff --git a/lib/libcasper/services/cap_fileargs/Makefile b/lib/libcasper/services/cap_fileargs/Makefile index 31febd080962..2c52d0887a48 100644 --- a/lib/libcasper/services/cap_fileargs/Makefile +++ b/lib/libcasper/services/cap_fileargs/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_fileargs/tests/Makefile b/lib/libcasper/services/cap_fileargs/tests/Makefile index 46059698aa07..02f02cceab8e 100644 --- a/lib/libcasper/services/cap_fileargs/tests/Makefile +++ b/lib/libcasper/services/cap_fileargs/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= fileargs_test diff --git a/lib/libcasper/services/cap_grp/Makefile b/lib/libcasper/services/cap_grp/Makefile index 0f722e3979f9..a921dfa87e7c 100644 --- a/lib/libcasper/services/cap_grp/Makefile +++ b/lib/libcasper/services/cap_grp/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_grp/tests/Makefile b/lib/libcasper/services/cap_grp/tests/Makefile index 18074380b7f0..f57d58972c52 100644 --- a/lib/libcasper/services/cap_grp/tests/Makefile +++ b/lib/libcasper/services/cap_grp/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_C= grp_test diff --git a/lib/libcasper/services/cap_net/Makefile b/lib/libcasper/services/cap_net/Makefile index 365d5bb63e9d..1ba35a674a05 100644 --- a/lib/libcasper/services/cap_net/Makefile +++ b/lib/libcasper/services/cap_net/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_net/tests/Makefile b/lib/libcasper/services/cap_net/tests/Makefile index 7b0b98f869bf..5798d7385440 100644 --- a/lib/libcasper/services/cap_net/tests/Makefile +++ b/lib/libcasper/services/cap_net/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= net_test diff --git a/lib/libcasper/services/cap_netdb/Makefile b/lib/libcasper/services/cap_netdb/Makefile index 653aa21c9b32..853052e78d04 100644 --- a/lib/libcasper/services/cap_netdb/Makefile +++ b/lib/libcasper/services/cap_netdb/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_netdb/tests/Makefile b/lib/libcasper/services/cap_netdb/tests/Makefile index a2f90206488f..bc5e04578323 100644 --- a/lib/libcasper/services/cap_netdb/tests/Makefile +++ b/lib/libcasper/services/cap_netdb/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= netdb_test diff --git a/lib/libcasper/services/cap_pwd/Makefile b/lib/libcasper/services/cap_pwd/Makefile index 4e0e6db6f86d..a1e97845c736 100644 --- a/lib/libcasper/services/cap_pwd/Makefile +++ b/lib/libcasper/services/cap_pwd/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_pwd/tests/Makefile b/lib/libcasper/services/cap_pwd/tests/Makefile index dcda3ad94828..79df81416d45 100644 --- a/lib/libcasper/services/cap_pwd/tests/Makefile +++ b/lib/libcasper/services/cap_pwd/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_C= pwd_test diff --git a/lib/libcasper/services/cap_sysctl/Makefile b/lib/libcasper/services/cap_sysctl/Makefile index 73da70acaeb6..522313df4ffc 100644 --- a/lib/libcasper/services/cap_sysctl/Makefile +++ b/lib/libcasper/services/cap_sysctl/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/cap_sysctl/tests/Makefile b/lib/libcasper/services/cap_sysctl/tests/Makefile index 820018513621..85bb0d28c389 100644 --- a/lib/libcasper/services/cap_sysctl/tests/Makefile +++ b/lib/libcasper/services/cap_sysctl/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= sysctl_test diff --git a/lib/libcasper/services/cap_syslog/Makefile b/lib/libcasper/services/cap_syslog/Makefile index 4c20f697019f..88979d8bed23 100644 --- a/lib/libcasper/services/cap_syslog/Makefile +++ b/lib/libcasper/services/cap_syslog/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libcasper/services/tests/Makefile b/lib/libcasper/services/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/lib/libcasper/services/tests/Makefile +++ b/lib/libcasper/services/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/lib/libcasper/tests/Makefile b/lib/libcasper/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/lib/libcasper/tests/Makefile +++ b/lib/libcasper/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/lib/libcbor/Makefile b/lib/libcbor/Makefile index c9d86c0b95ad..ddc064562fc5 100644 --- a/lib/libcbor/Makefile +++ b/lib/libcbor/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ssh LIB= cbor PRIVATELIB= diff --git a/lib/libclang_rt/Makefile b/lib/libclang_rt/Makefile index 79ccd288a845..7d9ad9191b74 100644 --- a/lib/libclang_rt/Makefile +++ b/lib/libclang_rt/Makefile @@ -1,4 +1,3 @@ - SD_ASAN+= asan SD_ASAN+= asan-preinit SD_ASAN+= asan_cxx diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 4be3c667462f..e351d6ebef9d 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -1,4 +1,3 @@ - .include PACKAGE= clang diff --git a/lib/libclang_rt/asan-preinit/Makefile b/lib/libclang_rt/asan-preinit/Makefile index ce99dfa2d50c..1f2fade866ac 100644 --- a/lib/libclang_rt/asan-preinit/Makefile +++ b/lib/libclang_rt/asan-preinit/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.asan-preinit-${CRTARCH} diff --git a/lib/libclang_rt/asan/Makefile b/lib/libclang_rt/asan/Makefile index 630b2d4ea065..b87d7a0bb1ad 100644 --- a/lib/libclang_rt/asan/Makefile +++ b/lib/libclang_rt/asan/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.asan-${CRTARCH} diff --git a/lib/libclang_rt/asan_cxx/Makefile b/lib/libclang_rt/asan_cxx/Makefile index c26690aedfb1..804e6ffd43db 100644 --- a/lib/libclang_rt/asan_cxx/Makefile +++ b/lib/libclang_rt/asan_cxx/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.asan_cxx-${CRTARCH} diff --git a/lib/libclang_rt/asan_dynamic/Makefile b/lib/libclang_rt/asan_dynamic/Makefile index ed70c7c3dc34..198a61bfbb6a 100644 --- a/lib/libclang_rt/asan_dynamic/Makefile +++ b/lib/libclang_rt/asan_dynamic/Makefile @@ -1,4 +1,3 @@ - .include SHLIB_NAME= libclang_rt.asan-${CRTARCH}.so diff --git a/lib/libclang_rt/asan_static/Makefile b/lib/libclang_rt/asan_static/Makefile index 099ef64b37e2..158228051d9f 100644 --- a/lib/libclang_rt/asan_static/Makefile +++ b/lib/libclang_rt/asan_static/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.asan_static-${CRTARCH} diff --git a/lib/libclang_rt/cfi/Makefile b/lib/libclang_rt/cfi/Makefile index 5fdbb9fd6cc3..d101ff0296c4 100644 --- a/lib/libclang_rt/cfi/Makefile +++ b/lib/libclang_rt/cfi/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.cfi-${CRTARCH} diff --git a/lib/libclang_rt/cfi_diag/Makefile b/lib/libclang_rt/cfi_diag/Makefile index 66a5d2c88e8d..0ac9a46c7a96 100644 --- a/lib/libclang_rt/cfi_diag/Makefile +++ b/lib/libclang_rt/cfi_diag/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.cfi_diag-${CRTARCH} diff --git a/lib/libclang_rt/dd/Makefile b/lib/libclang_rt/dd/Makefile index 558d7cfb6982..c0f0b3d3694e 100644 --- a/lib/libclang_rt/dd/Makefile +++ b/lib/libclang_rt/dd/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.dd-${CRTARCH} diff --git a/lib/libclang_rt/fuzzer/Makefile b/lib/libclang_rt/fuzzer/Makefile index 73e69616d8a1..00287482f3f2 100644 --- a/lib/libclang_rt/fuzzer/Makefile +++ b/lib/libclang_rt/fuzzer/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.fuzzer-${CRTARCH} diff --git a/lib/libclang_rt/fuzzer_interceptors/Makefile b/lib/libclang_rt/fuzzer_interceptors/Makefile index 52f8425e429a..bb58f71bf685 100644 --- a/lib/libclang_rt/fuzzer_interceptors/Makefile +++ b/lib/libclang_rt/fuzzer_interceptors/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.fuzzer_interceptors-${CRTARCH} diff --git a/lib/libclang_rt/fuzzer_no_main/Makefile b/lib/libclang_rt/fuzzer_no_main/Makefile index 088f0f2e79ab..7f88a585dea2 100644 --- a/lib/libclang_rt/fuzzer_no_main/Makefile +++ b/lib/libclang_rt/fuzzer_no_main/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.fuzzer_no_main-${CRTARCH} diff --git a/lib/libclang_rt/include/Makefile b/lib/libclang_rt/include/Makefile index ab881db3da76..7fe850fca57d 100644 --- a/lib/libclang_rt/include/Makefile +++ b/lib/libclang_rt/include/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${CRTSRC}/include/sanitizer diff --git a/lib/libclang_rt/msan/Makefile b/lib/libclang_rt/msan/Makefile index 18afe7e474f1..1c1911f2236f 100644 --- a/lib/libclang_rt/msan/Makefile +++ b/lib/libclang_rt/msan/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.msan-${CRTARCH} diff --git a/lib/libclang_rt/msan_cxx/Makefile b/lib/libclang_rt/msan_cxx/Makefile index 59ad2120111f..3e024e7c6c79 100644 --- a/lib/libclang_rt/msan_cxx/Makefile +++ b/lib/libclang_rt/msan_cxx/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.msan_cxx-${CRTARCH} diff --git a/lib/libclang_rt/profile/Makefile b/lib/libclang_rt/profile/Makefile index ac4e9d66d332..d03b640b025d 100644 --- a/lib/libclang_rt/profile/Makefile +++ b/lib/libclang_rt/profile/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.profile-${CRTARCH} diff --git a/lib/libclang_rt/safestack/Makefile b/lib/libclang_rt/safestack/Makefile index bbf4a665c37f..8c99724ec3db 100644 --- a/lib/libclang_rt/safestack/Makefile +++ b/lib/libclang_rt/safestack/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.safestack-${CRTARCH} diff --git a/lib/libclang_rt/stats/Makefile b/lib/libclang_rt/stats/Makefile index 63ed5eb22c5f..7124ab7c9682 100644 --- a/lib/libclang_rt/stats/Makefile +++ b/lib/libclang_rt/stats/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.stats-${CRTARCH} diff --git a/lib/libclang_rt/stats_client/Makefile b/lib/libclang_rt/stats_client/Makefile index 010763a9e25a..775152fc77ab 100644 --- a/lib/libclang_rt/stats_client/Makefile +++ b/lib/libclang_rt/stats_client/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.stats_client-${CRTARCH} diff --git a/lib/libclang_rt/tsan/Makefile b/lib/libclang_rt/tsan/Makefile index 906156a48204..573688dfac1e 100644 --- a/lib/libclang_rt/tsan/Makefile +++ b/lib/libclang_rt/tsan/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.tsan-${CRTARCH} diff --git a/lib/libclang_rt/tsan_cxx/Makefile b/lib/libclang_rt/tsan_cxx/Makefile index b556699c9115..a95ee30701d8 100644 --- a/lib/libclang_rt/tsan_cxx/Makefile +++ b/lib/libclang_rt/tsan_cxx/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.tsan_cxx-${CRTARCH} diff --git a/lib/libclang_rt/ubsan_minimal/Makefile b/lib/libclang_rt/ubsan_minimal/Makefile index 5edbad5df89f..9a56a1896889 100644 --- a/lib/libclang_rt/ubsan_minimal/Makefile +++ b/lib/libclang_rt/ubsan_minimal/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.ubsan_minimal-${CRTARCH} diff --git a/lib/libclang_rt/ubsan_standalone/Makefile b/lib/libclang_rt/ubsan_standalone/Makefile index 6b4964715b5a..935c03d2005f 100644 --- a/lib/libclang_rt/ubsan_standalone/Makefile +++ b/lib/libclang_rt/ubsan_standalone/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.ubsan_standalone-${CRTARCH} diff --git a/lib/libclang_rt/ubsan_standalone_cxx/Makefile b/lib/libclang_rt/ubsan_standalone_cxx/Makefile index bfca7e1bd693..f533df169ab0 100644 --- a/lib/libclang_rt/ubsan_standalone_cxx/Makefile +++ b/lib/libclang_rt/ubsan_standalone_cxx/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.ubsan_standalone_cxx-${CRTARCH} diff --git a/lib/libclang_rt/xray-basic/Makefile b/lib/libclang_rt/xray-basic/Makefile index f5421f59679b..8e4d97497b85 100644 --- a/lib/libclang_rt/xray-basic/Makefile +++ b/lib/libclang_rt/xray-basic/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.xray-basic-${CRTARCH} diff --git a/lib/libclang_rt/xray-fdr/Makefile b/lib/libclang_rt/xray-fdr/Makefile index 43bfd97b0dec..50822c79d155 100644 --- a/lib/libclang_rt/xray-fdr/Makefile +++ b/lib/libclang_rt/xray-fdr/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.xray-fdr-${CRTARCH} diff --git a/lib/libclang_rt/xray-profiling/Makefile b/lib/libclang_rt/xray-profiling/Makefile index 4e609b777799..0aa0dbb602ee 100644 --- a/lib/libclang_rt/xray-profiling/Makefile +++ b/lib/libclang_rt/xray-profiling/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.xray-profiling-${CRTARCH} diff --git a/lib/libclang_rt/xray/Makefile b/lib/libclang_rt/xray/Makefile index 91abbb743667..a2a0afb5895e 100644 --- a/lib/libclang_rt/xray/Makefile +++ b/lib/libclang_rt/xray/Makefile @@ -1,4 +1,3 @@ - .include LIB= clang_rt.xray-${CRTARCH} diff --git a/lib/libcom_err/Makefile b/lib/libcom_err/Makefile index 72b715bbf83b..2bfd26bae968 100644 --- a/lib/libcom_err/Makefile +++ b/lib/libcom_err/Makefile @@ -1,4 +1,3 @@ - PACKAGE= kerberos-lib LIB= com_err diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile index 884941b3a139..2612568a9da7 100644 --- a/lib/libcompat/Makefile +++ b/lib/libcompat/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= compat CFLAGS+=-I${SRCTOP}/lib/libc/locale diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index f894d68e6478..3543ce5728d7 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= lib${LIB} diff --git a/lib/libcrypt/tests/Makefile b/lib/libcrypt/tests/Makefile index 8e97c95f95f2..f64fafe3c8cb 100644 --- a/lib/libcrypt/tests/Makefile +++ b/lib/libcrypt/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C+= crypt_tests NETBSD_ATF_TESTS_C+= crypt_test diff --git a/lib/libdevctl/Makefile b/lib/libdevctl/Makefile index 4e1993428d80..6e32151aeb12 100644 --- a/lib/libdevctl/Makefile +++ b/lib/libdevctl/Makefile @@ -1,4 +1,3 @@ - LIB= devctl SRCS= devctl.c INCS= devctl.h diff --git a/lib/libdevdctl/Makefile b/lib/libdevdctl/Makefile index 619c15a9285e..32cede96df4e 100644 --- a/lib/libdevdctl/Makefile +++ b/lib/libdevdctl/Makefile @@ -1,4 +1,3 @@ - LIB_CXX= devdctl INCS= consumer.h \ event.h \ diff --git a/lib/libdevdctl/tests/Makefile b/lib/libdevdctl/tests/Makefile index a8019b468284..a77fff5c6108 100644 --- a/lib/libdevdctl/tests/Makefile +++ b/lib/libdevdctl/tests/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/lib/libdevdctl .PATH: ${.CURDIR:H} diff --git a/lib/libdevinfo/Makefile b/lib/libdevinfo/Makefile index e11e7a61af2d..41e17f7de0be 100644 --- a/lib/libdevinfo/Makefile +++ b/lib/libdevinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE= devmatch LIB= devinfo SRCS= devinfo.c diff --git a/lib/libdevstat/Makefile b/lib/libdevstat/Makefile index 0f3caef96b87..1531717d2fef 100644 --- a/lib/libdevstat/Makefile +++ b/lib/libdevstat/Makefile @@ -1,4 +1,3 @@ - LIB= devstat SHLIBDIR?= /lib # Bump DEVSTAT_USER_API_VER in devstat.h every time this is incremented. diff --git a/lib/libdl/Makefile b/lib/libdl/Makefile index 3432e244a5d1..d958dec85990 100644 --- a/lib/libdl/Makefile +++ b/lib/libdl/Makefile @@ -1,4 +1,3 @@ - PACKAGE=clibs LIB=dl SHLIB_MAJOR=1 diff --git a/lib/libdpv/Makefile b/lib/libdpv/Makefile index 80b3e8620042..31f1186fa31b 100644 --- a/lib/libdpv/Makefile +++ b/lib/libdpv/Makefile @@ -1,4 +1,3 @@ - PACKAGE= dpv LIB= dpv SHLIB_MAJOR= 3 diff --git a/lib/libedit/readline/Makefile b/lib/libedit/readline/Makefile index 0f771e647458..b717846de0a5 100644 --- a/lib/libedit/readline/Makefile +++ b/lib/libedit/readline/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/libedit/readline INCS= readline.h history.h tilde.h diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile index 9704405a8a36..c15ce2798a91 100644 --- a/lib/libelf/Makefile +++ b/lib/libelf/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libevent1/Makefile b/lib/libevent1/Makefile index 6ca16cc03c16..9e48707bc444 100644 --- a/lib/libevent1/Makefile +++ b/lib/libevent1/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} .PATH: ${SRCTOP}/contrib/pf/libevent diff --git a/lib/libexecinfo/Makefile b/lib/libexecinfo/Makefile index 3b44ca15bc36..3010a5be5894 100644 --- a/lib/libexecinfo/Makefile +++ b/lib/libexecinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} .include diff --git a/lib/libexecinfo/tests/Makefile b/lib/libexecinfo/tests/Makefile index 5dbf25cf4e17..281074e34a67 100644 --- a/lib/libexecinfo/tests/Makefile +++ b/lib/libexecinfo/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libexecinfo diff --git a/lib/libexpat/Makefile b/lib/libexpat/Makefile index 08c8604e74c5..92ba6b671488 100644 --- a/lib/libexpat/Makefile +++ b/lib/libexpat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime EXPAT= ${SRCTOP}/contrib/expat diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile index 44234db1b19a..37767cb5ec89 100644 --- a/lib/libfetch/Makefile +++ b/lib/libfetch/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= fetch diff --git a/lib/libfigpar/Makefile b/lib/libfigpar/Makefile index 350abdf7dfd3..66a1d61c7016 100644 --- a/lib/libfigpar/Makefile +++ b/lib/libfigpar/Makefile @@ -1,4 +1,3 @@ - PACKAGE= dpv LIB= figpar SHLIB_MAJOR= 0 diff --git a/lib/libgcc_eh/Makefile b/lib/libgcc_eh/Makefile index ceac35b518d9..ace27ce69b8f 100644 --- a/lib/libgcc_eh/Makefile +++ b/lib/libgcc_eh/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= clibs diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 75e7d743a720..af59ee7aaa65 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -1,4 +1,3 @@ - COMPILERRTDIR= ${SRCTOP}/contrib/llvm-project/compiler-rt UNWINDINCDIR= ${SRCTOP}/contrib/llvm-project/libunwind/include UNWINDSRCDIR= ${SRCTOP}/contrib/llvm-project/libunwind/src diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index fdf5a67d8045..992fc930ee9f 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIB_NAME= libgcc_s.so.1 SHLIBDIR?= /lib diff --git a/lib/libgeom/Makefile b/lib/libgeom/Makefile index e75261fffa81..ac8a056d25b5 100644 --- a/lib/libgeom/Makefile +++ b/lib/libgeom/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= geom diff --git a/lib/libgpio/Makefile b/lib/libgpio/Makefile index f19ec87572de..42f822e97ba0 100644 --- a/lib/libgpio/Makefile +++ b/lib/libgpio/Makefile @@ -1,4 +1,3 @@ - LIB= gpio SHLIB_MAJOR= 0 diff --git a/lib/libgssapi/Makefile b/lib/libgssapi/Makefile index 87ae164faffa..000abc4f5eeb 100644 --- a/lib/libgssapi/Makefile +++ b/lib/libgssapi/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= gssapi SHLIB_MAJOR= 10 diff --git a/lib/libiconv_modules/BIG5/Makefile b/lib/libiconv_modules/BIG5/Makefile index f236c203678a..ebc0f9d03334 100644 --- a/lib/libiconv_modules/BIG5/Makefile +++ b/lib/libiconv_modules/BIG5/Makefile @@ -1,4 +1,3 @@ - SHLIB= BIG5 SRCS+= citrus_big5.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/DECHanyu/Makefile b/lib/libiconv_modules/DECHanyu/Makefile index fd09592edda3..ace1b5ca73f1 100644 --- a/lib/libiconv_modules/DECHanyu/Makefile +++ b/lib/libiconv_modules/DECHanyu/Makefile @@ -1,4 +1,3 @@ - SHLIB= DECHanyu SRCS+= citrus_dechanyu.c diff --git a/lib/libiconv_modules/EUC/Makefile b/lib/libiconv_modules/EUC/Makefile index 5e9401f4a8dd..b0f54fe2c88b 100644 --- a/lib/libiconv_modules/EUC/Makefile +++ b/lib/libiconv_modules/EUC/Makefile @@ -1,4 +1,3 @@ - SHLIB= EUC SRCS+= citrus_euc.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/EUCTW/Makefile b/lib/libiconv_modules/EUCTW/Makefile index a7fecc8acbdc..a357d00b5d8c 100644 --- a/lib/libiconv_modules/EUCTW/Makefile +++ b/lib/libiconv_modules/EUCTW/Makefile @@ -1,4 +1,3 @@ - SHLIB= EUCTW SRCS+= citrus_euctw.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/GBK2K/Makefile b/lib/libiconv_modules/GBK2K/Makefile index 7c821c9aaf50..2173f6de00e7 100644 --- a/lib/libiconv_modules/GBK2K/Makefile +++ b/lib/libiconv_modules/GBK2K/Makefile @@ -1,4 +1,3 @@ - SHLIB= GBK2K SRCS+= citrus_gbk2k.c CFLAGS.gcc+= --param max-inline-insns-single=16 diff --git a/lib/libiconv_modules/HZ/Makefile b/lib/libiconv_modules/HZ/Makefile index f998f3db26cf..109aa9f90104 100644 --- a/lib/libiconv_modules/HZ/Makefile +++ b/lib/libiconv_modules/HZ/Makefile @@ -1,4 +1,3 @@ - SHLIB= HZ SRCS+= citrus_hz.c diff --git a/lib/libiconv_modules/ISO2022/Makefile b/lib/libiconv_modules/ISO2022/Makefile index 422e6c986212..f666cb7bbac0 100644 --- a/lib/libiconv_modules/ISO2022/Makefile +++ b/lib/libiconv_modules/ISO2022/Makefile @@ -1,4 +1,3 @@ - SHLIB= ISO2022 SRCS+= citrus_iso2022.c CFLAGS.gcc+= --param max-inline-insns-single=128 diff --git a/lib/libiconv_modules/JOHAB/Makefile b/lib/libiconv_modules/JOHAB/Makefile index 8f7bb07fa8fb..e700f8b7ef4d 100644 --- a/lib/libiconv_modules/JOHAB/Makefile +++ b/lib/libiconv_modules/JOHAB/Makefile @@ -1,4 +1,3 @@ - SHLIB= JOHAB SRCS+= citrus_johab.c CFLAGS.gcc+= --param max-inline-insns-single=16 diff --git a/lib/libiconv_modules/MSKanji/Makefile b/lib/libiconv_modules/MSKanji/Makefile index 4294d4dbffbf..11ae1809bb3b 100644 --- a/lib/libiconv_modules/MSKanji/Makefile +++ b/lib/libiconv_modules/MSKanji/Makefile @@ -1,4 +1,3 @@ - SHLIB= MSKanji SRCS+= citrus_mskanji.c diff --git a/lib/libiconv_modules/Makefile b/lib/libiconv_modules/Makefile index 9811e59761e1..52344d5a8377 100644 --- a/lib/libiconv_modules/Makefile +++ b/lib/libiconv_modules/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ diff --git a/lib/libiconv_modules/Makefile.inc b/lib/libiconv_modules/Makefile.inc index 729c973a0d6a..ba2ccb0dd270 100644 --- a/lib/libiconv_modules/Makefile.inc +++ b/lib/libiconv_modules/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/iconv SHLIB_MAJOR= 5 diff --git a/lib/libiconv_modules/UES/Makefile b/lib/libiconv_modules/UES/Makefile index 65e4be5f71e2..bcdae77adbdc 100644 --- a/lib/libiconv_modules/UES/Makefile +++ b/lib/libiconv_modules/UES/Makefile @@ -1,4 +1,3 @@ - SHLIB= UES SRCS+= citrus_ues.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/UTF1632/Makefile b/lib/libiconv_modules/UTF1632/Makefile index 7033fb22a1ef..88fe285d97a2 100644 --- a/lib/libiconv_modules/UTF1632/Makefile +++ b/lib/libiconv_modules/UTF1632/Makefile @@ -1,4 +1,3 @@ - SHLIB= UTF1632 SRCS+= citrus_utf1632.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/UTF7/Makefile b/lib/libiconv_modules/UTF7/Makefile index 19aa59181fe6..969e001fc2e3 100644 --- a/lib/libiconv_modules/UTF7/Makefile +++ b/lib/libiconv_modules/UTF7/Makefile @@ -1,4 +1,3 @@ - SHLIB= UTF7 SRCS+= citrus_utf7.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/UTF8/Makefile b/lib/libiconv_modules/UTF8/Makefile index cb7c4c669263..ec9c85cce4d8 100644 --- a/lib/libiconv_modules/UTF8/Makefile +++ b/lib/libiconv_modules/UTF8/Makefile @@ -1,4 +1,3 @@ - SHLIB= UTF8 SRCS+= citrus_utf8.c diff --git a/lib/libiconv_modules/VIQR/Makefile b/lib/libiconv_modules/VIQR/Makefile index 7300f6fb1c3a..67fc707ab308 100644 --- a/lib/libiconv_modules/VIQR/Makefile +++ b/lib/libiconv_modules/VIQR/Makefile @@ -1,4 +1,3 @@ - SHLIB= VIQR SRCS+= citrus_viqr.c diff --git a/lib/libiconv_modules/ZW/Makefile b/lib/libiconv_modules/ZW/Makefile index d7e24bd24ca3..ca2bd7cc89c4 100644 --- a/lib/libiconv_modules/ZW/Makefile +++ b/lib/libiconv_modules/ZW/Makefile @@ -1,4 +1,3 @@ - SHLIB= ZW SRCS+= citrus_zw.c diff --git a/lib/libiconv_modules/iconv_none/Makefile b/lib/libiconv_modules/iconv_none/Makefile index bb5b5a790eaf..c0b3b7a776f7 100644 --- a/lib/libiconv_modules/iconv_none/Makefile +++ b/lib/libiconv_modules/iconv_none/Makefile @@ -1,4 +1,3 @@ - SHLIB= iconv_none SRCS+= citrus_iconv_none.c diff --git a/lib/libiconv_modules/iconv_std/Makefile b/lib/libiconv_modules/iconv_std/Makefile index 49c63f14f41f..1ab46cf162ca 100644 --- a/lib/libiconv_modules/iconv_std/Makefile +++ b/lib/libiconv_modules/iconv_std/Makefile @@ -1,4 +1,3 @@ - SHLIB= iconv_std SRCS+= citrus_iconv_std.c CFLAGS.gcc+= --param max-inline-insns-single=64 diff --git a/lib/libiconv_modules/mapper_646/Makefile b/lib/libiconv_modules/mapper_646/Makefile index 3740eff8b75f..6695d1c1c969 100644 --- a/lib/libiconv_modules/mapper_646/Makefile +++ b/lib/libiconv_modules/mapper_646/Makefile @@ -1,4 +1,3 @@ - SHLIB= mapper_646 SRCS= citrus_mapper_646.c diff --git a/lib/libiconv_modules/mapper_none/Makefile b/lib/libiconv_modules/mapper_none/Makefile index fd7c22617efa..e0891e957af1 100644 --- a/lib/libiconv_modules/mapper_none/Makefile +++ b/lib/libiconv_modules/mapper_none/Makefile @@ -1,4 +1,3 @@ - SHLIB= mapper_none SRCS+= citrus_mapper_none.c diff --git a/lib/libiconv_modules/mapper_parallel/Makefile b/lib/libiconv_modules/mapper_parallel/Makefile index 36390b580664..823260aca5be 100644 --- a/lib/libiconv_modules/mapper_parallel/Makefile +++ b/lib/libiconv_modules/mapper_parallel/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/mapper_serial SHLIB= mapper_parallel diff --git a/lib/libiconv_modules/mapper_serial/Makefile b/lib/libiconv_modules/mapper_serial/Makefile index bc64c58d1605..931d7c0943e2 100644 --- a/lib/libiconv_modules/mapper_serial/Makefile +++ b/lib/libiconv_modules/mapper_serial/Makefile @@ -1,4 +1,3 @@ - SHLIB= mapper_serial SRCS+= citrus_mapper_serial.c CFLAGS.gcc+= --param max-inline-insns-single=32 diff --git a/lib/libiconv_modules/mapper_std/Makefile b/lib/libiconv_modules/mapper_std/Makefile index 8ffd114fe860..2765525f4cec 100644 --- a/lib/libiconv_modules/mapper_std/Makefile +++ b/lib/libiconv_modules/mapper_std/Makefile @@ -1,4 +1,3 @@ - SHLIB= mapper_std SRCS+= citrus_mapper_std.c CFLAGS.gcc+= --param max-inline-insns-single=8 diff --git a/lib/libiconv_modules/mapper_zone/Makefile b/lib/libiconv_modules/mapper_zone/Makefile index e33dea95e67a..55e17d3b2fba 100644 --- a/lib/libiconv_modules/mapper_zone/Makefile +++ b/lib/libiconv_modules/mapper_zone/Makefile @@ -1,4 +1,3 @@ - SHLIB= mapper_zone SRCS+= citrus_mapper_zone.c CFLAGS.gcc+= --param max-inline-insns-single=8 diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile index 6bdb202bec1d..e8e0651dc0d6 100644 --- a/lib/libifconfig/Makefile +++ b/lib/libifconfig/Makefile @@ -1,4 +1,3 @@ - PACKAGE= lib${LIB} LIB= ifconfig INTERNALLIB= true diff --git a/lib/libipt/Makefile b/lib/libipt/Makefile index 07cdfd0417d9..68809f32da05 100644 --- a/lib/libipt/Makefile +++ b/lib/libipt/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} SHLIBDIR?= /lib diff --git a/lib/libjail/Makefile b/lib/libjail/Makefile index eef14e89e161..2c7bc157c827 100644 --- a/lib/libjail/Makefile +++ b/lib/libjail/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= jail SHLIBDIR?= /lib diff --git a/lib/libkiconv/Makefile b/lib/libkiconv/Makefile index 687e3586b8b0..f359f9215a28 100644 --- a/lib/libkiconv/Makefile +++ b/lib/libkiconv/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile index 775896c1fcdd..94a1173010a4 100644 --- a/lib/libkvm/Makefile +++ b/lib/libkvm/Makefile @@ -1,4 +1,3 @@ - LIB= kvm PACKAGE= runtime diff --git a/lib/libkvm/tests/Makefile b/lib/libkvm/tests/Makefile index c3c94c690565..5b4220327670 100644 --- a/lib/libkvm/tests/Makefile +++ b/lib/libkvm/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C+= kvm_close_test diff --git a/lib/libldns/Makefile b/lib/libldns/Makefile index 68ee26076f6b..71519aa7f70d 100644 --- a/lib/libldns/Makefile +++ b/lib/libldns/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR = ${SRCTOP}/contrib/ldns diff --git a/lib/liblua/Makefile b/lib/liblua/Makefile index c15174b39726..1fb4a9b85e77 100644 --- a/lib/liblua/Makefile +++ b/lib/liblua/Makefile @@ -1,4 +1,3 @@ - LUASRC?= ${SRCTOP}/contrib/lua/src .PATH: ${LUASRC} diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile index 656cf7850f2e..abb6ecd13ad4 100644 --- a/lib/liblutok/Makefile +++ b/lib/liblutok/Makefile @@ -1,4 +1,3 @@ - LIB_CXX= lutok INTERNALLIB= diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index e656ddd9bb45..9f8ac443a8fc 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= lzma LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile index bafcd5b46c19..4c2ed2f7f9c7 100644 --- a/lib/libmd/Makefile +++ b/lib/libmd/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libmemstat/Makefile b/lib/libmemstat/Makefile index e60b322e2228..4deeaf3a9520 100644 --- a/lib/libmemstat/Makefile +++ b/lib/libmemstat/Makefile @@ -1,4 +1,3 @@ - WARNS?= 3 LIB= memstat SHLIB_MAJOR= 3 diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile index 0b0896fad43d..dd6a481d1a15 100644 --- a/lib/libmilter/Makefile +++ b/lib/libmilter/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=sendmail diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile index 3f8a4dad4a65..a0bb37a85fb8 100644 --- a/lib/libmixer/Makefile +++ b/lib/libmixer/Makefile @@ -1,4 +1,3 @@ - LIB= mixer SRCS= ${LIB}.c INCS= ${LIB}.h diff --git a/lib/libmp/Makefile b/lib/libmp/Makefile index 532d4bd64bbe..3ef85cee79c0 100644 --- a/lib/libmp/Makefile +++ b/lib/libmp/Makefile @@ -1,4 +1,3 @@ - .include LIB= mp diff --git a/lib/libmp/tests/Makefile b/lib/libmp/tests/Makefile index bb7ad32f42e6..4d66ca659376 100644 --- a/lib/libmp/tests/Makefile +++ b/lib/libmp/tests/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_C+= legacy_test WARNS?= 3 diff --git a/lib/libmt/Makefile b/lib/libmt/Makefile index 92c5469a2c85..44382a923408 100644 --- a/lib/libmt/Makefile +++ b/lib/libmt/Makefile @@ -1,4 +1,3 @@ - LIB= mt SHLIBDIR?= /lib SRCS= mtlib.c diff --git a/lib/libnetbsd/Makefile b/lib/libnetbsd/Makefile index c89b74b12283..1639caf20d6b 100644 --- a/lib/libnetbsd/Makefile +++ b/lib/libnetbsd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=lib${LIB} diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index c9bf45e02050..f4225df297d6 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile index fc377e38ce83..2e6563a83077 100644 --- a/lib/libnv/tests/Makefile +++ b/lib/libnv/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C= \ nvlist_send_recv_test diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile index 2be8a207a219..6c14c7d21077 100644 --- a/lib/libomp/Makefile +++ b/lib/libomp/Makefile @@ -1,4 +1,3 @@ - # z_Linux_asm.S is missing BTI support MK_BRANCH_PROTECTION=no diff --git a/lib/libopenbsd/Makefile b/lib/libopenbsd/Makefile index 24fd62e58873..675ed476c51d 100644 --- a/lib/libopenbsd/Makefile +++ b/lib/libopenbsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= openbsd SRCS= imsg-buffer.c \ diff --git a/lib/libopencsd/Makefile b/lib/libopencsd/Makefile index d6d648ef1e32..aae0b795c216 100644 --- a/lib/libopencsd/Makefile +++ b/lib/libopencsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} SHLIBDIR?= /lib diff --git a/lib/libpam/modules/Makefile.inc b/lib/libpam/modules/Makefile.inc index 955ee5224198..dc701f921077 100644 --- a/lib/libpam/modules/Makefile.inc +++ b/lib/libpam/modules/Makefile.inc @@ -1,4 +1,3 @@ - PAMDIR= ${SRCTOP}/contrib/openpam MK_INSTALLLIB= no diff --git a/lib/libpam/modules/pam_chroot/Makefile b/lib/libpam/modules/pam_chroot/Makefile index ca4f3cc17443..206f8fa40a09 100644 --- a/lib/libpam/modules/pam_chroot/Makefile +++ b/lib/libpam/modules/pam_chroot/Makefile @@ -1,4 +1,3 @@ - LIB= pam_chroot SRCS= pam_chroot.c MAN= pam_chroot.8 diff --git a/lib/libpam/modules/pam_echo/Makefile b/lib/libpam/modules/pam_echo/Makefile index 58aae0053be9..532d0a51b58e 100644 --- a/lib/libpam/modules/pam_echo/Makefile +++ b/lib/libpam/modules/pam_echo/Makefile @@ -1,4 +1,3 @@ - LIB= pam_echo SRCS= pam_echo.c MAN= pam_echo.8 diff --git a/lib/libpam/modules/pam_exec/Makefile b/lib/libpam/modules/pam_exec/Makefile index 1902d10789b5..c2327a2860cd 100644 --- a/lib/libpam/modules/pam_exec/Makefile +++ b/lib/libpam/modules/pam_exec/Makefile @@ -1,4 +1,3 @@ - LIB= pam_exec SRCS= pam_exec.c MAN= pam_exec.8 diff --git a/lib/libpam/modules/pam_ftpusers/Makefile b/lib/libpam/modules/pam_ftpusers/Makefile index e92b752309b5..07d37c8b17a8 100644 --- a/lib/libpam/modules/pam_ftpusers/Makefile +++ b/lib/libpam/modules/pam_ftpusers/Makefile @@ -1,4 +1,3 @@ - LIB= pam_ftpusers SRCS= pam_ftpusers.c MAN= pam_ftpusers.8 diff --git a/lib/libpam/modules/pam_group/Makefile b/lib/libpam/modules/pam_group/Makefile index dca723748174..0395b3a8f355 100644 --- a/lib/libpam/modules/pam_group/Makefile +++ b/lib/libpam/modules/pam_group/Makefile @@ -1,4 +1,3 @@ - LIB= pam_group SRCS= pam_group.c MAN= pam_group.8 diff --git a/lib/libpam/modules/pam_guest/Makefile b/lib/libpam/modules/pam_guest/Makefile index c168513b98ee..7128b513afbc 100644 --- a/lib/libpam/modules/pam_guest/Makefile +++ b/lib/libpam/modules/pam_guest/Makefile @@ -1,4 +1,3 @@ - LIB= pam_guest SRCS= pam_guest.c MAN= pam_guest.8 diff --git a/lib/libpam/modules/pam_passwdqc/Makefile b/lib/libpam/modules/pam_passwdqc/Makefile index 60d27529dd19..91ce72928a66 100644 --- a/lib/libpam/modules/pam_passwdqc/Makefile +++ b/lib/libpam/modules/pam_passwdqc/Makefile @@ -1,4 +1,3 @@ - SRCDIR= ${SRCTOP}/contrib/pam_modules/pam_passwdqc .PATH: ${SRCDIR} diff --git a/lib/libpam/modules/pam_rhosts/Makefile b/lib/libpam/modules/pam_rhosts/Makefile index af94a24599ab..4cd25fe5dfa5 100644 --- a/lib/libpam/modules/pam_rhosts/Makefile +++ b/lib/libpam/modules/pam_rhosts/Makefile @@ -1,4 +1,3 @@ - LIB= pam_rhosts SRCS= pam_rhosts.c MAN= pam_rhosts.8 diff --git a/lib/libpam/modules/pam_xdg/Makefile b/lib/libpam/modules/pam_xdg/Makefile index 2a470e0850bf..df3948987da6 100644 --- a/lib/libpam/modules/pam_xdg/Makefile +++ b/lib/libpam/modules/pam_xdg/Makefile @@ -1,4 +1,3 @@ - LIB= pam_xdg SRCS= pam_xdg.c MAN= pam_xdg.8 diff --git a/lib/libpam/pam.d/Makefile b/lib/libpam/pam.d/Makefile index d2cc192f3599..5dccf590ee4e 100644 --- a/lib/libpam/pam.d/Makefile +++ b/lib/libpam/pam.d/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/lib/libpathconv/Makefile b/lib/libpathconv/Makefile index 5d39b84a11c3..2d6d5b47b0bd 100644 --- a/lib/libpathconv/Makefile +++ b/lib/libpathconv/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=lib${LIB} diff --git a/lib/libpathconv/tests/Makefile b/lib/libpathconv/tests/Makefile index 1289999a62fe..92b4bffdfecf 100644 --- a/lib/libpathconv/tests/Makefile +++ b/lib/libpathconv/tests/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_C+= abs2rel TAP_TESTS_C+= rel2abs diff --git a/lib/libpfctl/Makefile b/lib/libpfctl/Makefile index 24684b919430..d301d7850b44 100644 --- a/lib/libpfctl/Makefile +++ b/lib/libpfctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= lib${LIB} LIB= pfctl INTERNALLIB= true diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 34993a428fbd..8728b0c1c76d 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -1,4 +1,3 @@ - LIB_CXX= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc diff --git a/lib/libpmc/Makefile.inc b/lib/libpmc/Makefile.inc index 04846e847467..35f9588b6080 100644 --- a/lib/libpmc/Makefile.inc +++ b/lib/libpmc/Makefile.inc @@ -1,2 +1 @@ - WARNS?= 3 diff --git a/lib/libpmc/pmu-events/Makefile b/lib/libpmc/pmu-events/Makefile index c21a8dfba2af..3f7fc7e1e543 100644 --- a/lib/libpmc/pmu-events/Makefile +++ b/lib/libpmc/pmu-events/Makefile @@ -1,4 +1,3 @@ - PROG= jevents SRCS= jevents.c jsmn.c json.c CFLAGS+= -Wno-cast-qual diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile index ae00bdc4ba90..785007188255 100644 --- a/lib/libproc/Makefile +++ b/lib/libproc/Makefile @@ -1,4 +1,3 @@ - .include LIB= proc diff --git a/lib/libproc/Makefile.inc b/lib/libproc/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/lib/libproc/Makefile.inc +++ b/lib/libproc/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/lib/libproc/tests/Makefile b/lib/libproc/tests/Makefile index 8e1d7c4d91c7..9467cc634884 100644 --- a/lib/libproc/tests/Makefile +++ b/lib/libproc/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C+= proc_test PROGS= target_prog diff --git a/lib/libprocstat/Makefile b/lib/libprocstat/Makefile index 0c8d1b63488b..d1b15b47eb83 100644 --- a/lib/libprocstat/Makefile +++ b/lib/libprocstat/Makefile @@ -1,4 +1,3 @@ - .include LIB= procstat diff --git a/lib/libprocstat/zfs/Makefile b/lib/libprocstat/zfs/Makefile index 3fa6f985c694..9efe8918492c 100644 --- a/lib/libprocstat/zfs/Makefile +++ b/lib/libprocstat/zfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} SRCS= zfs_defs.c diff --git a/lib/libregex/Makefile b/lib/libregex/Makefile index 555559b9db58..beffa476ca98 100644 --- a/lib/libregex/Makefile +++ b/lib/libregex/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/lib/libregex/tests/Makefile b/lib/libregex/tests/Makefile index 9c4a1aac89e8..7c6820f70a45 100644 --- a/lib/libregex/tests/Makefile +++ b/lib/libregex/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/regex diff --git a/lib/librpcsec_gss/Makefile b/lib/librpcsec_gss/Makefile index eca805e7dae9..9b04340c8eb0 100644 --- a/lib/librpcsec_gss/Makefile +++ b/lib/librpcsec_gss/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= rpcsec_gss SHLIB_MAJOR= 1 diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile index 94c933af64cb..bdd01c91adab 100644 --- a/lib/librpcsvc/Makefile +++ b/lib/librpcsvc/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/include/rpcsvc diff --git a/lib/librss/Makefile b/lib/librss/Makefile index 57caa2bb81ab..b851485a9239 100644 --- a/lib/librss/Makefile +++ b/lib/librss/Makefile @@ -1,4 +1,3 @@ - PACKAGE= lib${LIB} SHLIBDIR?= /lib diff --git a/lib/librt/tests/Makefile b/lib/librt/tests/Makefile index 1be361d603c3..abbd439fb9e3 100644 --- a/lib/librt/tests/Makefile +++ b/lib/librt/tests/Makefile @@ -1,4 +1,3 @@ - LIBADD= rt NETBSD_ATF_TESTS_C= sched_test diff --git a/lib/librtld_db/Makefile b/lib/librtld_db/Makefile index 7a30d55bec7c..a79a32f57157 100644 --- a/lib/librtld_db/Makefile +++ b/lib/librtld_db/Makefile @@ -1,4 +1,3 @@ - .include LIB= rtld_db diff --git a/lib/libsbuf/Makefile b/lib/libsbuf/Makefile index bf800265031a..cc0fef31be43 100644 --- a/lib/libsbuf/Makefile +++ b/lib/libsbuf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= sbuf diff --git a/lib/libsbuf/tests/Makefile b/lib/libsbuf/tests/Makefile index 07b93f67fed6..512ca678cac3 100644 --- a/lib/libsbuf/tests/Makefile +++ b/lib/libsbuf/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C+= sbuf_core_test ATF_TESTS_C+= sbuf_stdio_test ATF_TESTS_C+= sbuf_string_test diff --git a/lib/libsecureboot/Makefile b/lib/libsecureboot/Makefile index 3ae4d5e69a52..85167e57abf2 100644 --- a/lib/libsecureboot/Makefile +++ b/lib/libsecureboot/Makefile @@ -1,4 +1,3 @@ - .include LIB= secureboot diff --git a/lib/libsecureboot/Makefile.inc b/lib/libsecureboot/Makefile.inc index b09e44edc1b0..b9d986cdc6b3 100644 --- a/lib/libsecureboot/Makefile.inc +++ b/lib/libsecureboot/Makefile.inc @@ -1,4 +1,3 @@ - .if empty(BEARSSL) .include "../libbearssl/Makefile.inc" .endif diff --git a/lib/libsecureboot/Makefile.libsa.inc b/lib/libsecureboot/Makefile.libsa.inc index 907c8e8f7533..7397d0fc1144 100644 --- a/lib/libsecureboot/Makefile.libsa.inc +++ b/lib/libsecureboot/Makefile.libsa.inc @@ -1,4 +1,3 @@ - BRSSL_CFLAGS+= -DNO_STDIO .include "Makefile.inc" diff --git a/lib/libsecureboot/openpgp/Makefile.inc b/lib/libsecureboot/openpgp/Makefile.inc index 0d9a01a80369..3a216d205fe3 100644 --- a/lib/libsecureboot/openpgp/Makefile.inc +++ b/lib/libsecureboot/openpgp/Makefile.inc @@ -1,4 +1,3 @@ - # decode OpenPGP signatures per rfc4880 .PATH: ${.PARSEDIR} diff --git a/lib/libsecureboot/tests/Makefile b/lib/libsecureboot/tests/Makefile index 70e10bb4f984..b3de2b6ce5b9 100644 --- a/lib/libsecureboot/tests/Makefile +++ b/lib/libsecureboot/tests/Makefile @@ -1,4 +1,3 @@ - .include PROG= tvo diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile index b6485bbc2b0c..448abad59192 100644 --- a/lib/libsm/Makefile +++ b/lib/libsm/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=sendmail diff --git a/lib/libsmb/Makefile b/lib/libsmb/Makefile index f8fa30e39603..777f2a65e671 100644 --- a/lib/libsmb/Makefile +++ b/lib/libsmb/Makefile @@ -1,4 +1,3 @@ - .include CONFS= nsmb.conf diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile index fef1466299e7..898af78d6101 100644 --- a/lib/libsmdb/Makefile +++ b/lib/libsmdb/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libsmdb diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile index 5ef7959c1d45..ef526ff8656d 100644 --- a/lib/libsmutil/Makefile +++ b/lib/libsmutil/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=lib${LIB} diff --git a/lib/libsqlite3/Makefile b/lib/libsqlite3/Makefile index bb2c939c5cf7..73ba8951a797 100644 --- a/lib/libsqlite3/Makefile +++ b/lib/libsqlite3/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} PRIVATELIB= yes LIB= sqlite3 diff --git a/lib/libssp/Makefile b/lib/libssp/Makefile index 1a95c4b49844..c481839ee324 100644 --- a/lib/libssp/Makefile +++ b/lib/libssp/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIBDIR?= /lib SHLIB= ssp diff --git a/lib/libssp_nonshared/Makefile b/lib/libssp_nonshared/Makefile index 209f969b6c3d..8bad8722a5b9 100644 --- a/lib/libssp_nonshared/Makefile +++ b/lib/libssp_nonshared/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs LIB= ssp_nonshared NO_PIC= diff --git a/lib/libstats/Makefile b/lib/libstats/Makefile index d25745b57f76..77a4770ff2f7 100644 --- a/lib/libstats/Makefile +++ b/lib/libstats/Makefile @@ -1,4 +1,3 @@ - LIB= stats SHLIBDIR?= /lib SHLIB_MAJOR= 0 diff --git a/lib/libstdbuf/Makefile b/lib/libstdbuf/Makefile index aa0ed7b4e18a..102c6745c593 100644 --- a/lib/libstdbuf/Makefile +++ b/lib/libstdbuf/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=lib${LIB} diff --git a/lib/libstdthreads/Makefile b/lib/libstdthreads/Makefile index 72ebd988df16..49d024052420 100644 --- a/lib/libstdthreads/Makefile +++ b/lib/libstdthreads/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= stdthreads SHLIB_MAJOR= 0 diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index ccff95af741d..b01877bb8bb8 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -1,4 +1,3 @@ - .include LIB= sysdecode diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile index e87ea8ac25de..69e63af4e272 100644 --- a/lib/libtelnet/Makefile +++ b/lib/libtelnet/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=lib${LIB} diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index d3c69a7dc8b7..88ccecdeba29 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/libthr/arch/aarch64/Makefile.inc b/lib/libthr/arch/aarch64/Makefile.inc index 8b137891791f..e69de29bb2d1 100644 --- a/lib/libthr/arch/aarch64/Makefile.inc +++ b/lib/libthr/arch/aarch64/Makefile.inc @@ -1 +0,0 @@ - diff --git a/lib/libthr/sys/Makefile.inc b/lib/libthr/sys/Makefile.inc index 7043b2e7c62d..98d7b2ac7bd3 100644 --- a/lib/libthr/sys/Makefile.inc +++ b/lib/libthr/sys/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/sys SRCS+= thr_error.c diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index d882ccfd877c..aadf0a4d80ca 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests WARNS?= 3 diff --git a/lib/libthr/tests/dlopen/Makefile b/lib/libthr/tests/dlopen/Makefile index acc565056f4a..3427f67025b2 100644 --- a/lib/libthr/tests/dlopen/Makefile +++ b/lib/libthr/tests/dlopen/Makefile @@ -1,4 +1,3 @@ - TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen WARNS?= 2 diff --git a/lib/libthr/tests/dlopen/dso/Makefile b/lib/libthr/tests/dlopen/dso/Makefile index c2052e82c0ed..0dac101f7186 100644 --- a/lib/libthr/tests/dlopen/dso/Makefile +++ b/lib/libthr/tests/dlopen/dso/Makefile @@ -1,4 +1,3 @@ - TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso WARNS?= 3 diff --git a/lib/libthr/thread/Makefile.inc b/lib/libthr/thread/Makefile.inc index c75322d6be95..c7442284bd51 100644 --- a/lib/libthr/thread/Makefile.inc +++ b/lib/libthr/thread/Makefile.inc @@ -1,4 +1,3 @@ - # thr sources .PATH: ${.CURDIR}/thread diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile index 8b2d835531d6..faef7051f46e 100644 --- a/lib/libthread_db/Makefile +++ b/lib/libthread_db/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} PACKAGE=lib${LIB} diff --git a/lib/libucl/Makefile b/lib/libucl/Makefile index 98ec1f6993b6..d4ee3e599df4 100644 --- a/lib/libucl/Makefile +++ b/lib/libucl/Makefile @@ -1,4 +1,3 @@ - LIBUCL_DIR= ${SRCTOP}/contrib/libucl PACKAGE=lib${LIB} diff --git a/lib/libufs/Makefile b/lib/libufs/Makefile index 42d76c6061d2..12c742e6b871 100644 --- a/lib/libufs/Makefile +++ b/lib/libufs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ufs LIB= ufs SHLIBDIR?= /lib diff --git a/lib/libugidfw/Makefile b/lib/libugidfw/Makefile index e5a0b2e6cb21..bf3ecd04699e 100644 --- a/lib/libugidfw/Makefile +++ b/lib/libugidfw/Makefile @@ -1,4 +1,3 @@ - LIB= ugidfw SHLIB_MAJOR= 5 SRCS= ugidfw.c diff --git a/lib/libulog/Makefile b/lib/libulog/Makefile index 5c073ef1d6a8..22138a09a9fa 100644 --- a/lib/libulog/Makefile +++ b/lib/libulog/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?=/lib .include diff --git a/lib/libunbound/Makefile b/lib/libunbound/Makefile index 5031470a4efd..cdc965c20763 100644 --- a/lib/libunbound/Makefile +++ b/lib/libunbound/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index eb5907ac183a..8178d33b7ba8 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libutil/tests/Makefile b/lib/libutil/tests/Makefile index d29045d78a10..cdcf3466aec8 100644 --- a/lib/libutil/tests/Makefile +++ b/lib/libutil/tests/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_C+= flopen_test TAP_TESTS_C+= grp_test TAP_TESTS_C+= humanize_number_test diff --git a/lib/libveriexec/Makefile b/lib/libveriexec/Makefile index 154605142074..9cef42a7cf58 100644 --- a/lib/libveriexec/Makefile +++ b/lib/libveriexec/Makefile @@ -1,4 +1,3 @@ - .include LIB= veriexec diff --git a/lib/libxo/Makefile b/lib/libxo/Makefile index 051dce646286..97172d0e8637 100644 --- a/lib/libxo/Makefile +++ b/lib/libxo/Makefile @@ -1,4 +1,3 @@ - .include HAS_TESTS= diff --git a/lib/libxo/encoder/Makefile b/lib/libxo/encoder/Makefile index 8b70fbed97b8..1b479d065d90 100644 --- a/lib/libxo/encoder/Makefile +++ b/lib/libxo/encoder/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libxo/encoder/csv/Makefile b/lib/libxo/encoder/csv/Makefile index b828e64c8143..442883a61998 100644 --- a/lib/libxo/encoder/csv/Makefile +++ b/lib/libxo/encoder/csv/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/lib/libxo/libxo/Makefile b/lib/libxo/libxo/Makefile index f51ec506da45..5b40d1e26880 100644 --- a/lib/libxo/libxo/Makefile +++ b/lib/libxo/libxo/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .include diff --git a/lib/libxo/tests/Makefile b/lib/libxo/tests/Makefile index 74af945b7244..a53dbea685a6 100644 --- a/lib/libxo/tests/Makefile +++ b/lib/libxo/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/lib/libxo/tests/encoder/Makefile b/lib/libxo/tests/encoder/Makefile index 81d6e0a051d6..7522328b0818 100644 --- a/lib/libxo/tests/encoder/Makefile +++ b/lib/libxo/tests/encoder/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/lib/liby/Makefile b/lib/liby/Makefile index bb53c79cd05c..93f72ee440f8 100644 --- a/lib/liby/Makefile +++ b/lib/liby/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lib${LIB} LIB= y SRCS= main.c yyerror.c diff --git a/lib/libypclnt/Makefile b/lib/libypclnt/Makefile index 74d18d4b77ee..899e301f4608 100644 --- a/lib/libypclnt/Makefile +++ b/lib/libypclnt/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime LIB= ypclnt SHLIB_MAJOR= 4 diff --git a/lib/libzstd/Makefile b/lib/libzstd/Makefile index 080b6247fee8..0e25f01d4881 100644 --- a/lib/libzstd/Makefile +++ b/lib/libzstd/Makefile @@ -1,4 +1,3 @@ - LIB= zstd SRCS= entropy_common.c \ error_private.c \ diff --git a/lib/msun/aarch64/Makefile.inc b/lib/msun/aarch64/Makefile.inc index 82463110f1bb..fcc744878220 100644 --- a/lib/msun/aarch64/Makefile.inc +++ b/lib/msun/aarch64/Makefile.inc @@ -1,4 +1,3 @@ - LDBL_PREC = 113 # Use a builtin when it generates the needed instruction diff --git a/lib/msun/amd64/Makefile.inc b/lib/msun/amd64/Makefile.inc index 6a99005f6701..dcdc2495d690 100644 --- a/lib/msun/amd64/Makefile.inc +++ b/lib/msun/amd64/Makefile.inc @@ -1,4 +1,3 @@ - ARCH_SRCS = e_fmod.S e_fmodf.S e_fmodl.S \ e_remainder.S e_remainderf.S e_remainderl.S \ e_sqrt.S e_sqrtf.S e_sqrtl.S \ diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc index a52552766e36..6e3ddb351dd3 100644 --- a/lib/msun/arm/Makefile.inc +++ b/lib/msun/arm/Makefile.inc @@ -1,4 +1,3 @@ - LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/arm/Symbol.map diff --git a/lib/msun/i387/Makefile.inc b/lib/msun/i387/Makefile.inc index d0f22572b36d..73feb52de6a2 100644 --- a/lib/msun/i387/Makefile.inc +++ b/lib/msun/i387/Makefile.inc @@ -1,4 +1,3 @@ - ARCH_SRCS = e_exp.S e_fmod.S e_log.S e_log10.S \ e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \ s_finite.S s_floor.S s_llrint.S s_logb.S s_lrint.S \ diff --git a/lib/msun/powerpc/Makefile.inc b/lib/msun/powerpc/Makefile.inc index c1088659f2b0..35747abb7087 100644 --- a/lib/msun/powerpc/Makefile.inc +++ b/lib/msun/powerpc/Makefile.inc @@ -1,3 +1,2 @@ - LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/powerpc/Symbol.map diff --git a/lib/msun/riscv/Makefile.inc b/lib/msun/riscv/Makefile.inc index e83e57a743ac..6262cfd6981e 100644 --- a/lib/msun/riscv/Makefile.inc +++ b/lib/msun/riscv/Makefile.inc @@ -1,3 +1,2 @@ - LDBL_PREC = 113 SYM_MAPS += ${.CURDIR}/riscv/Symbol.map diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index ccea2ad82fc3..d2a3ebffadb3 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -1,4 +1,3 @@ - .include TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm diff --git a/lib/ncurses/Makefile b/lib/ncurses/Makefile index b6b416138a18..862a6aba0bb7 100644 --- a/lib/ncurses/Makefile +++ b/lib/ncurses/Makefile @@ -1,4 +1,3 @@ - SUBDIR= tinfo ncurses form menu panel SUBDIR_PARALLEL= diff --git a/lib/ncurses/Makefile.inc b/lib/ncurses/Makefile.inc index 666f8a74396f..f2ed84e2e38f 100644 --- a/lib/ncurses/Makefile.inc +++ b/lib/ncurses/Makefile.inc @@ -1,4 +1,3 @@ - # This is to include src/lib/Makefile.inc WARNS?= 3 diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile index 0c163e05e07f..aaa3be9f3c0f 100644 --- a/lib/ncurses/form/Makefile +++ b/lib/ncurses/form/Makefile @@ -1,4 +1,3 @@ - .include .include "${.CURDIR:H}/config.mk" diff --git a/lib/ncurses/menu/Makefile b/lib/ncurses/menu/Makefile index 840a41e80224..0864da644bdf 100644 --- a/lib/ncurses/menu/Makefile +++ b/lib/ncurses/menu/Makefile @@ -1,4 +1,3 @@ - .include .include "${.CURDIR:H}/config.mk" diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index e1a3dbf61e49..ad3f20f5f72c 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile index 808b31105979..93b07bf9b7d6 100644 --- a/lib/ncurses/panel/Makefile +++ b/lib/ncurses/panel/Makefile @@ -1,4 +1,3 @@ - .include .include "${.CURDIR:H}/config.mk" diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index 54044119a907..55b24cd3bc97 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/ofed/Makefile b/lib/ofed/Makefile index ea3ecabf95bb..a16e93adc149 100644 --- a/lib/ofed/Makefile +++ b/lib/ofed/Makefile @@ -1,4 +1,3 @@ - SUBDIR= \ include \ libibverbs \ diff --git a/lib/ofed/Makefile.inc b/lib/ofed/Makefile.inc index 069272ab8104..1b911c451c01 100644 --- a/lib/ofed/Makefile.inc +++ b/lib/ofed/Makefile.inc @@ -1,2 +1 @@ - WARNS?= 0 diff --git a/lib/ofed/complib/Makefile b/lib/ofed/complib/Makefile index c0e333afc5d7..e900bc2b9a3f 100644 --- a/lib/ofed/complib/Makefile +++ b/lib/ofed/complib/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/opensm/complib .PATH: ${_spath} diff --git a/lib/ofed/include/Makefile b/lib/ofed/include/Makefile index a7ed635a4881..dc6271de734d 100644 --- a/lib/ofed/include/Makefile +++ b/lib/ofed/include/Makefile @@ -1,4 +1,3 @@ - OFEDINCS= ${SRCTOP}/contrib/ofed/include IBVERBS= ${SRCTOP}/contrib/ofed/libibverbs IBMAD= ${SRCTOP}/contrib/ofed/libibmad diff --git a/lib/ofed/libcxgb4/Makefile b/lib/ofed/libcxgb4/Makefile index 7d184308fea0..da831be6ebba 100644 --- a/lib/ofed/libcxgb4/Makefile +++ b/lib/ofed/libcxgb4/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libcxgb4 .PATH: ${_spath} diff --git a/lib/ofed/libibcm/Makefile b/lib/ofed/libibcm/Makefile index d684811a311b..ba8c2e8adf11 100644 --- a/lib/ofed/libibcm/Makefile +++ b/lib/ofed/libibcm/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libibcm .PATH: ${_spath} diff --git a/lib/ofed/libibmad/Makefile b/lib/ofed/libibmad/Makefile index 0a1e40096d90..985efda634f1 100644 --- a/lib/ofed/libibmad/Makefile +++ b/lib/ofed/libibmad/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libibmad .PATH: ${_spath} diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile index 47470132a2b6..d471189cb7c9 100644 --- a/lib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -1,4 +1,3 @@ - .include _spath= ${SRCTOP}/contrib/ofed/libibnetdisc diff --git a/lib/ofed/libibumad/Makefile b/lib/ofed/libibumad/Makefile index 3097ac846c46..7d12e5cfa388 100644 --- a/lib/ofed/libibumad/Makefile +++ b/lib/ofed/libibumad/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libibumad .PATH: ${_spath} diff --git a/lib/ofed/libibverbs/Makefile b/lib/ofed/libibverbs/Makefile index 6a5f6a50bbb7..d336c40363d2 100644 --- a/lib/ofed/libibverbs/Makefile +++ b/lib/ofed/libibverbs/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libibverbs .PATH: ${_spath} ${_spath}/man diff --git a/lib/ofed/libmlx4/Makefile b/lib/ofed/libmlx4/Makefile index 09571f159dca..cd4dccb99168 100644 --- a/lib/ofed/libmlx4/Makefile +++ b/lib/ofed/libmlx4/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libmlx4 .PATH: ${_spath} diff --git a/lib/ofed/libmlx5/Makefile b/lib/ofed/libmlx5/Makefile index 57959a1cd027..38700bb7b9ee 100644 --- a/lib/ofed/libmlx5/Makefile +++ b/lib/ofed/libmlx5/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/libmlx5 .PATH: ${_spath} diff --git a/lib/ofed/libopensm/Makefile b/lib/ofed/libopensm/Makefile index 8ba51f034aaa..11179a758609 100644 --- a/lib/ofed/libopensm/Makefile +++ b/lib/ofed/libopensm/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/opensm/opensm .PATH: ${_spath} diff --git a/lib/ofed/librdmacm/Makefile b/lib/ofed/librdmacm/Makefile index cb37008f5851..37b79d56513c 100644 --- a/lib/ofed/librdmacm/Makefile +++ b/lib/ofed/librdmacm/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/librdmacm .PATH: ${_spath} ${_spath}/man diff --git a/lib/ofed/libvendor/Makefile b/lib/ofed/libvendor/Makefile index baa50ff8cab7..8082a866e9fb 100644 --- a/lib/ofed/libvendor/Makefile +++ b/lib/ofed/libvendor/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/opensm/libvendor .PATH: ${_spath} diff --git a/lib/tests/Makefile b/lib/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/lib/tests/Makefile +++ b/lib/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/libexec/Makefile.inc b/libexec/Makefile.inc index ee76f0719dfa..8cf924798785 100644 --- a/libexec/Makefile.inc +++ b/libexec/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/libexec WFORMAT?= 1 diff --git a/libexec/atf/atf-check/Makefile.inc b/libexec/atf/atf-check/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/libexec/atf/atf-check/Makefile.inc +++ b/libexec/atf/atf-check/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/libexec/atf/atf-check/tests/Makefile b/libexec/atf/atf-check/tests/Makefile index 90d3fce7ea42..e98f82d941cd 100644 --- a/libexec/atf/atf-check/tests/Makefile +++ b/libexec/atf/atf-check/tests/Makefile @@ -1,4 +1,3 @@ - ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/atf-sh diff --git a/libexec/atf/atf-sh/tests/Makefile b/libexec/atf/atf-sh/tests/Makefile index b3c336b7c56d..d358ed403a47 100644 --- a/libexec/atf/atf-sh/tests/Makefile +++ b/libexec/atf/atf-sh/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF= ${SRCTOP}/contrib/atf diff --git a/libexec/atf/tests/Makefile b/libexec/atf/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/libexec/atf/tests/Makefile +++ b/libexec/atf/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/libexec/atrun/Makefile b/libexec/atrun/Makefile index ce3e1eeb2f4d..7c44a8ae3d8b 100644 --- a/libexec/atrun/Makefile +++ b/libexec/atrun/Makefile @@ -1,4 +1,3 @@ - PACKAGE=at MAINSRC=${SRCTOP}/usr.bin/at diff --git a/libexec/blacklistd-helper/Makefile b/libexec/blacklistd-helper/Makefile index c0eb25489052..50fd3b5c982b 100644 --- a/libexec/blacklistd-helper/Makefile +++ b/libexec/blacklistd-helper/Makefile @@ -1,4 +1,3 @@ - BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist SCRIPTS= ${BLOCKLIST_DIR}/libexec/blacklistd-helper diff --git a/libexec/bootpd/Makefile.inc b/libexec/bootpd/Makefile.inc index 88e1d3cf4e23..338eb907e37d 100644 --- a/libexec/bootpd/Makefile.inc +++ b/libexec/bootpd/Makefile.inc @@ -1,4 +1,3 @@ - WARNS?= 1 .include "../Makefile.inc" diff --git a/libexec/comsat/Makefile b/libexec/comsat/Makefile index 848577f178be..3f349abbde22 100644 --- a/libexec/comsat/Makefile +++ b/libexec/comsat/Makefile @@ -1,4 +1,3 @@ - PROG= comsat MAN= comsat.8 diff --git a/libexec/dma/Makefile b/libexec/dma/Makefile index 5c9281f41d56..6150359b2c0b 100644 --- a/libexec/dma/Makefile +++ b/libexec/dma/Makefile @@ -1,4 +1,3 @@ - SUBDIR= dmagent \ dma-mbox-create diff --git a/libexec/dma/Makefile.inc b/libexec/dma/Makefile.inc index 2a24ef6b787d..e4eb86c4b039 100644 --- a/libexec/dma/Makefile.inc +++ b/libexec/dma/Makefile.inc @@ -1,4 +1,3 @@ - .sinclude "${.CURDIR:H:H}/Makefile.inc" DMA_SOURCES= ${SRCTOP}/contrib/dma .PATH: ${DMA_SOURCES} diff --git a/libexec/dma/dma-mbox-create/Makefile b/libexec/dma/dma-mbox-create/Makefile index 0b74fcb42e22..26f669e2e0b6 100644 --- a/libexec/dma/dma-mbox-create/Makefile +++ b/libexec/dma/dma-mbox-create/Makefile @@ -1,4 +1,3 @@ - MAN= WARNS?= 2 diff --git a/libexec/dma/dmagent/Makefile b/libexec/dma/dmagent/Makefile index 0b38c5dca6b5..5f7deeea0b05 100644 --- a/libexec/dma/dmagent/Makefile +++ b/libexec/dma/dmagent/Makefile @@ -1,4 +1,3 @@ - .include LIBADD= ssl crypto diff --git a/libexec/fingerd/Makefile b/libexec/fingerd/Makefile index 5a170379e326..296cb504bab1 100644 --- a/libexec/fingerd/Makefile +++ b/libexec/fingerd/Makefile @@ -1,4 +1,3 @@ - .include PROG= fingerd diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 7a58b2265a5a..e324ca993711 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -1,4 +1,3 @@ - .include LUASRC?= ${SRCTOP}/contrib/lua/src diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index 2cbd14912009..a040fa57f7d7 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ftpd diff --git a/libexec/getty/Makefile b/libexec/getty/Makefile index 1661a3a1512f..18668bee6aa0 100644 --- a/libexec/getty/Makefile +++ b/libexec/getty/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime CONFS= gettytab diff --git a/libexec/hyperv/Makefile b/libexec/hyperv/Makefile index eacb74582d03..ed0f91c79420 100644 --- a/libexec/hyperv/Makefile +++ b/libexec/hyperv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/hyperv/tools/scripts BINDIR= ${LIBEXECDIR}/hyperv diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index 8a2b211cf7c9..d41469068c3b 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -1,4 +1,3 @@ - PACKAGE=sendmail SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/mail.local diff --git a/libexec/makewhatis.local/Makefile b/libexec/makewhatis.local/Makefile index 14d7b80b78e6..765036623d49 100644 --- a/libexec/makewhatis.local/Makefile +++ b/libexec/makewhatis.local/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= makewhatis.local.sh MAN= makewhatis.local.8 SCRIPTSDIR= ${LIBEXECDIR} diff --git a/libexec/mknetid/Makefile b/libexec/mknetid/Makefile index e9ff69a27838..c872abd74b9c 100644 --- a/libexec/mknetid/Makefile +++ b/libexec/mknetid/Makefile @@ -1,4 +1,3 @@ - PROG= mknetid SRCS= mknetid.c hash.c parse_group.c diff --git a/libexec/phttpget/Makefile b/libexec/phttpget/Makefile index e16288dabbcc..ef231fa634db 100644 --- a/libexec/phttpget/Makefile +++ b/libexec/phttpget/Makefile @@ -1,4 +1,3 @@ - PROG= phttpget MAN= phttpget.8 diff --git a/libexec/pppoed/Makefile b/libexec/pppoed/Makefile index b9127fba779a..b1b88c4c1b6c 100644 --- a/libexec/pppoed/Makefile +++ b/libexec/pppoed/Makefile @@ -1,4 +1,3 @@ - PROG= pppoed LIBADD= netgraph MAN= pppoed.8 diff --git a/libexec/rbootd/Makefile b/libexec/rbootd/Makefile index f204de7397d6..7df1ecee3278 100644 --- a/libexec/rbootd/Makefile +++ b/libexec/rbootd/Makefile @@ -1,4 +1,3 @@ - PROG= rbootd SRCS= bpf.c conf.c parseconf.c rbootd.c rmpproto.c utils.c MAN= rbootd.8 diff --git a/libexec/rc/Makefile b/libexec/rc/Makefile index 48115d873fe3..9a5aa11424ae 100644 --- a/libexec/rc/Makefile +++ b/libexec/rc/Makefile @@ -1,4 +1,3 @@ - .include CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 331f0edf44bc..69a643a248ef 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -1,4 +1,3 @@ - .include CONFDIR= /etc/rc.d diff --git a/libexec/revnetgroup/Makefile b/libexec/revnetgroup/Makefile index 2b3978416e5f..d764028e5768 100644 --- a/libexec/revnetgroup/Makefile +++ b/libexec/revnetgroup/Makefile @@ -1,4 +1,3 @@ - PROG= revnetgroup SRCS= revnetgroup.c hash.c parse_netgroup.c diff --git a/libexec/rpc.rquotad/Makefile b/libexec/rpc.rquotad/Makefile index df3d003aaf50..f232a73b8b87 100644 --- a/libexec/rpc.rquotad/Makefile +++ b/libexec/rpc.rquotad/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG = rpc.rquotad diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile index 49eade455d3b..1be4bd27c2c0 100644 --- a/libexec/rpc.rstatd/Makefile +++ b/libexec/rpc.rstatd/Makefile @@ -1,4 +1,3 @@ - PROG = rpc.rstatd SRCS = rstatd.c rstat_proc.c MAN = rpc.rstatd.8 diff --git a/libexec/rpc.rusersd/Makefile b/libexec/rpc.rusersd/Makefile index 586d971ae404..49d155c969b5 100644 --- a/libexec/rpc.rusersd/Makefile +++ b/libexec/rpc.rusersd/Makefile @@ -1,4 +1,3 @@ - PROG = rpc.rusersd SRCS = rusersd.c rusers_proc.c extern.h MAN = rpc.rusersd.8 diff --git a/libexec/rpc.rwalld/Makefile b/libexec/rpc.rwalld/Makefile index ff0117547640..38a9646166d0 100644 --- a/libexec/rpc.rwalld/Makefile +++ b/libexec/rpc.rwalld/Makefile @@ -1,4 +1,3 @@ - PROG = rpc.rwalld SRCS = rwalld.c MAN = rpc.rwalld.8 diff --git a/libexec/rpc.sprayd/Makefile b/libexec/rpc.sprayd/Makefile index 8d0269b74a1f..ed4b25615b09 100644 --- a/libexec/rpc.sprayd/Makefile +++ b/libexec/rpc.sprayd/Makefile @@ -1,4 +1,3 @@ - PROG = rpc.sprayd SRCS = sprayd.c MAN = rpc.sprayd.8 diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 864448ad782a..0dbd2b8aa935 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -1,4 +1,3 @@ - # Use the following command to build local debug version of dynamic # linker: # make DEBUG_FLAGS=-g WITHOUT_TESTS=yes all diff --git a/libexec/rtld-elf/amd64/Makefile.inc b/libexec/rtld-elf/amd64/Makefile.inc index 9bc8509b37e3..c1036df29a0e 100644 --- a/libexec/rtld-elf/amd64/Makefile.inc +++ b/libexec/rtld-elf/amd64/Makefile.inc @@ -1,2 +1 @@ - CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float -fvisibility=hidden diff --git a/libexec/rtld-elf/arm/Makefile.inc b/libexec/rtld-elf/arm/Makefile.inc index 9710db498890..b92dedb0285f 100644 --- a/libexec/rtld-elf/arm/Makefile.inc +++ b/libexec/rtld-elf/arm/Makefile.inc @@ -1,2 +1 @@ - CFLAGS+= -mfpu=none diff --git a/libexec/rtld-elf/i386/Makefile.inc b/libexec/rtld-elf/i386/Makefile.inc index 9bc8509b37e3..c1036df29a0e 100644 --- a/libexec/rtld-elf/i386/Makefile.inc +++ b/libexec/rtld-elf/i386/Makefile.inc @@ -1,2 +1 @@ - CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float -fvisibility=hidden diff --git a/libexec/rtld-elf/powerpc64/Makefile.inc b/libexec/rtld-elf/powerpc64/Makefile.inc index 592bac9ef4dd..641336724894 100644 --- a/libexec/rtld-elf/powerpc64/Makefile.inc +++ b/libexec/rtld-elf/powerpc64/Makefile.inc @@ -1,2 +1 @@ - RTLD_ENTRY= _rtld_start diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile index e380e9850fc1..c4b3baab4cb8 100644 --- a/libexec/rtld-elf/tests/Makefile +++ b/libexec/rtld-elf/tests/Makefile @@ -1,4 +1,3 @@ - SUBDIR+= libpythagoras libdeep libval libval2 target TESTS_SUBDIRS+= rtld_deepbind diff --git a/libexec/rtld-elf/tests/Makefile.inc b/libexec/rtld-elf/tests/Makefile.inc index dfba72a51ce7..01cf83634239 100644 --- a/libexec/rtld-elf/tests/Makefile.inc +++ b/libexec/rtld-elf/tests/Makefile.inc @@ -1,3 +1,2 @@ - PACKAGE?= tests TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf diff --git a/libexec/rtld-elf/tests/libdeep/Makefile b/libexec/rtld-elf/tests/libdeep/Makefile index 9324b6f25efe..5b8e47e12291 100644 --- a/libexec/rtld-elf/tests/libdeep/Makefile +++ b/libexec/rtld-elf/tests/libdeep/Makefile @@ -1,4 +1,3 @@ - SHLIB?= deep SHLIB_MAJOR= 0 diff --git a/libexec/rtld-elf/tests/libpythagoras/Makefile b/libexec/rtld-elf/tests/libpythagoras/Makefile index 0b000d1b8365..0e3fa37acf8a 100644 --- a/libexec/rtld-elf/tests/libpythagoras/Makefile +++ b/libexec/rtld-elf/tests/libpythagoras/Makefile @@ -1,4 +1,3 @@ - .include LIB= pythagoras diff --git a/libexec/rtld-elf/tests/libval/Makefile b/libexec/rtld-elf/tests/libval/Makefile index 66728c01dc9b..913564e9ad0f 100644 --- a/libexec/rtld-elf/tests/libval/Makefile +++ b/libexec/rtld-elf/tests/libval/Makefile @@ -1,4 +1,3 @@ - SHLIB?= val SHLIB_MAJOR= 0 diff --git a/libexec/rtld-elf/tests/libval2/Makefile b/libexec/rtld-elf/tests/libval2/Makefile index 2b5cf5342092..f353a248b1b8 100644 --- a/libexec/rtld-elf/tests/libval2/Makefile +++ b/libexec/rtld-elf/tests/libval2/Makefile @@ -1,4 +1,3 @@ - LIBVAL= ${.CURDIR}/../libval # Just rebuild libval diff --git a/libexec/rtld-elf/tests/rtld_deepbind/Makefile b/libexec/rtld-elf/tests/rtld_deepbind/Makefile index bcc55d945c7e..7054a846449d 100644 --- a/libexec/rtld-elf/tests/rtld_deepbind/Makefile +++ b/libexec/rtld-elf/tests/rtld_deepbind/Makefile @@ -1,4 +1,3 @@ - TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf/rtld_deepbind ATF_TESTS_C= rtld_deepbind diff --git a/libexec/rtld-elf/tests/target/Makefile b/libexec/rtld-elf/tests/target/Makefile index aa4875b6748d..8069229dedd8 100644 --- a/libexec/rtld-elf/tests/target/Makefile +++ b/libexec/rtld-elf/tests/target/Makefile @@ -1,4 +1,3 @@ - .include PROG= target diff --git a/libexec/rtld-elf32/Makefile b/libexec/rtld-elf32/Makefile index 16659993dd4b..9854223d6f78 100644 --- a/libexec/rtld-elf32/Makefile +++ b/libexec/rtld-elf32/Makefile @@ -1,4 +1,3 @@ - NEED_COMPAT= 32 .include diff --git a/libexec/save-entropy/Makefile b/libexec/save-entropy/Makefile index 0c541606411f..5d7e9726b786 100644 --- a/libexec/save-entropy/Makefile +++ b/libexec/save-entropy/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= save-entropy.sh MAN= save-entropy.8 diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile index 2f4f62131d7d..345937df2dfe 100644 --- a/libexec/smrsh/Makefile +++ b/libexec/smrsh/Makefile @@ -1,4 +1,3 @@ - PACKAGE=sendmail SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/smrsh diff --git a/libexec/talkd/Makefile b/libexec/talkd/Makefile index f39a0b2ca579..2cdafd5216e0 100644 --- a/libexec/talkd/Makefile +++ b/libexec/talkd/Makefile @@ -1,4 +1,3 @@ - PROG= ntalkd SRCS= talkd.c announce.c process.c table.c print.c ttymsg.c .PATH: ${SRCTOP}/usr.bin/wall diff --git a/libexec/tcpd/Makefile b/libexec/tcpd/Makefile index 408db9c39744..bb8f09ca13ac 100644 --- a/libexec/tcpd/Makefile +++ b/libexec/tcpd/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/tcp_wrappers diff --git a/libexec/tests/Makefile b/libexec/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/libexec/tests/Makefile +++ b/libexec/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/libexec/tftp-proxy/Makefile b/libexec/tftp-proxy/Makefile index 88029fae413a..9b28b2d8aa4b 100644 --- a/libexec/tftp-proxy/Makefile +++ b/libexec/tftp-proxy/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/pf/tftp-proxy PROG= tftp-proxy diff --git a/libexec/tftpd/Makefile b/libexec/tftpd/Makefile index e804ff4d0f35..1cea8178ae07 100644 --- a/libexec/tftpd/Makefile +++ b/libexec/tftpd/Makefile @@ -1,4 +1,3 @@ - .include PROG= tftpd diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile index 938d2129d988..661120335ace 100644 --- a/libexec/tftpd/tests/Makefile +++ b/libexec/tftpd/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_C= functional diff --git a/libexec/ulog-helper/Makefile b/libexec/ulog-helper/Makefile index 12d498537343..61a88fb62692 100644 --- a/libexec/ulog-helper/Makefile +++ b/libexec/ulog-helper/Makefile @@ -1,4 +1,3 @@ - PROG= ulog-helper BINOWN= root BINMODE=4555 diff --git a/libexec/ypxfr/Makefile b/libexec/ypxfr/Makefile index e0feee7a80f1..e93df9a8b5ec 100644 --- a/libexec/ypxfr/Makefile +++ b/libexec/ypxfr/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= ypxfr SRCS= yp_dblookup.c yp_dbwrite.c yp_error.c \ diff --git a/rescue/Makefile b/rescue/Makefile index e16f74080abf..cdd545a12a40 100644 --- a/rescue/Makefile +++ b/rescue/Makefile @@ -1,4 +1,3 @@ - SUBDIR= librescue \ rescue diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index c3604c6e22ad..4474a0af050f 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -1,4 +1,3 @@ - .include .include diff --git a/sbin/Makefile b/sbin/Makefile index 303e29e9e124..790112b05f6f 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR=adjkerntz \ diff --git a/sbin/Makefile.amd64 b/sbin/Makefile.amd64 index 4904b2ebfe87..a7cb39976324 100644 --- a/sbin/Makefile.amd64 +++ b/sbin/Makefile.amd64 @@ -1,3 +1,2 @@ - SUBDIR += bsdlabel SUBDIR += fdisk diff --git a/sbin/Makefile.arm b/sbin/Makefile.arm index 4904b2ebfe87..a7cb39976324 100644 --- a/sbin/Makefile.arm +++ b/sbin/Makefile.arm @@ -1,3 +1,2 @@ - SUBDIR += bsdlabel SUBDIR += fdisk diff --git a/sbin/Makefile.i386 b/sbin/Makefile.i386 index 4904b2ebfe87..a7cb39976324 100644 --- a/sbin/Makefile.i386 +++ b/sbin/Makefile.i386 @@ -1,3 +1,2 @@ - SUBDIR += bsdlabel SUBDIR += fdisk diff --git a/sbin/Makefile.inc b/sbin/Makefile.inc index a9e857c046de..7034747d22e7 100644 --- a/sbin/Makefile.inc +++ b/sbin/Makefile.inc @@ -1,4 +1,3 @@ - .include BINDIR?= /sbin diff --git a/sbin/Makefile.powerpc64 b/sbin/Makefile.powerpc64 index 4904b2ebfe87..a7cb39976324 100644 --- a/sbin/Makefile.powerpc64 +++ b/sbin/Makefile.powerpc64 @@ -1,3 +1,2 @@ - SUBDIR += bsdlabel SUBDIR += fdisk diff --git a/sbin/adjkerntz/Makefile b/sbin/adjkerntz/Makefile index 1fa9b74b90bc..54980c3a57fb 100644 --- a/sbin/adjkerntz/Makefile +++ b/sbin/adjkerntz/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= adjkerntz MAN= adjkerntz.8 diff --git a/sbin/bectl/Makefile b/sbin/bectl/Makefile index 531f54cca18d..c11426c57e45 100644 --- a/sbin/bectl/Makefile +++ b/sbin/bectl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=zfs diff --git a/sbin/bectl/tests/Makefile b/sbin/bectl/tests/Makefile index 5da29657bea1..3a35a5263a69 100644 --- a/sbin/bectl/tests/Makefile +++ b/sbin/bectl/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= bectl_test diff --git a/sbin/bsdlabel/Makefile b/sbin/bsdlabel/Makefile index 9bfa0fad6573..d2be16efa544 100644 --- a/sbin/bsdlabel/Makefile +++ b/sbin/bsdlabel/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom CONFS= disktab diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile index 64703f656a89..2b0c2c9dbc14 100644 --- a/sbin/camcontrol/Makefile +++ b/sbin/camcontrol/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/ccdconfig/Makefile b/sbin/ccdconfig/Makefile index 6a27bb7e7cf4..8972945ed072 100644 --- a/sbin/ccdconfig/Makefile +++ b/sbin/ccdconfig/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ccdconfig PROG= ccdconfig MAN= ccdconfig.8 diff --git a/sbin/clri/Makefile b/sbin/clri/Makefile index ac3eda4cd597..51f4e9a914dc 100644 --- a/sbin/clri/Makefile +++ b/sbin/clri/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ufs PROG= clri MAN= clri.8 diff --git a/sbin/comcontrol/Makefile b/sbin/comcontrol/Makefile index 809f1060d183..6c868dcfb1ae 100644 --- a/sbin/comcontrol/Makefile +++ b/sbin/comcontrol/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= comcontrol MAN= comcontrol.8 diff --git a/sbin/conscontrol/Makefile b/sbin/conscontrol/Makefile index 072edf04a5c4..33665536167c 100644 --- a/sbin/conscontrol/Makefile +++ b/sbin/conscontrol/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= conscontrol MAN= conscontrol.8 diff --git a/sbin/ddb/Makefile b/sbin/ddb/Makefile index d8d67602c3ef..8d527ad5259a 100644 --- a/sbin/ddb/Makefile +++ b/sbin/ddb/Makefile @@ -1,4 +1,3 @@ - CONFS= ddb.conf PACKAGE=runtime PROG= ddb diff --git a/sbin/decryptcore/Makefile b/sbin/decryptcore/Makefile index 885766f5cfc6..97421fe5cd3c 100644 --- a/sbin/decryptcore/Makefile +++ b/sbin/decryptcore/Makefile @@ -1,4 +1,3 @@ - PROG= decryptcore CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index 09a8ed5898e1..4ff0187a5a22 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -1,4 +1,3 @@ - .include WARNS?= 6 diff --git a/sbin/devd/tests/Makefile b/sbin/devd/tests/Makefile index 7a51f488ac68..fba7176d5ae1 100644 --- a/sbin/devd/tests/Makefile +++ b/sbin/devd/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C= client_test TEST_METADATA.client_test= required_files="/var/run/devd.pid" TEST_METADATA.client_test+= required_programs="devd" diff --git a/sbin/devfs/Makefile b/sbin/devfs/Makefile index dc823abcaf18..0a20cee8241c 100644 --- a/sbin/devfs/Makefile +++ b/sbin/devfs/Makefile @@ -1,4 +1,3 @@ - CONFS= devfs.conf devfs.rules CONFSDIR_devfs.rules= /etc/defaults CONFSMODE_devfs.rules= 600 diff --git a/sbin/devmatch/Makefile b/sbin/devmatch/Makefile index bc0b2a7cba55..20da7231206f 100644 --- a/sbin/devmatch/Makefile +++ b/sbin/devmatch/Makefile @@ -1,4 +1,3 @@ - PACKAGE= devmatch PROG= devmatch MAN= devmatch.8 diff --git a/sbin/dhclient/tests/Makefile b/sbin/dhclient/tests/Makefile index 7d4359d4b762..2cca8635fa13 100644 --- a/sbin/dhclient/tests/Makefile +++ b/sbin/dhclient/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H} ATF_TESTS_SH= pcp diff --git a/sbin/dmesg/Makefile b/sbin/dmesg/Makefile index d1863f2b448c..b0bd864fd09d 100644 --- a/sbin/dmesg/Makefile +++ b/sbin/dmesg/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= dmesg MAN= dmesg.8 diff --git a/sbin/dump/Makefile b/sbin/dump/Makefile index d982e5bc033e..6f0dbf3f478f 100644 --- a/sbin/dump/Makefile +++ b/sbin/dump/Makefile @@ -1,4 +1,3 @@ - # dump.h header file # itime.c reads /etc/dumpdates # main.c driver diff --git a/sbin/dumpfs/Makefile b/sbin/dumpfs/Makefile index b416eb1cd588..1e7fa4f150d3 100644 --- a/sbin/dumpfs/Makefile +++ b/sbin/dumpfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ufs PROG= dumpfs WARNS?= 2 diff --git a/sbin/dumpon/Makefile b/sbin/dumpon/Makefile index 346951f12b3c..03a72bcba41f 100644 --- a/sbin/dumpon/Makefile +++ b/sbin/dumpon/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/etherswitchcfg/Makefile b/sbin/etherswitchcfg/Makefile index 6312f07b09d3..00f9c3089323 100644 --- a/sbin/etherswitchcfg/Makefile +++ b/sbin/etherswitchcfg/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= etherswitchcfg MAN= etherswitchcfg.8 diff --git a/sbin/fdisk/Makefile b/sbin/fdisk/Makefile index 322dfa33043c..85cea684a883 100644 --- a/sbin/fdisk/Makefile +++ b/sbin/fdisk/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= fdisk SRCS= fdisk.c fdisk_mbr_enc.c diff --git a/sbin/fsck_ffs/Makefile b/sbin/fsck_ffs/Makefile index 59805dbbf3d6..7b0f0ed822bf 100644 --- a/sbin/fsck_ffs/Makefile +++ b/sbin/fsck_ffs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ufs PROG= fsck_ffs LINKS+= ${BINDIR}/fsck_ffs ${BINDIR}/fsck_ufs diff --git a/sbin/geom/Makefile b/sbin/geom/Makefile index b311a9e8e8fb..078503d3ae67 100644 --- a/sbin/geom/Makefile +++ b/sbin/geom/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${.CURDIR}/core ${.CURDIR}/misc diff --git a/sbin/ggate/Makefile b/sbin/ggate/Makefile index 9aa1d5115505..753e0bd0ddbb 100644 --- a/sbin/ggate/Makefile +++ b/sbin/ggate/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= ggatec \ diff --git a/sbin/ggate/Makefile.inc b/sbin/ggate/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sbin/ggate/Makefile.inc +++ b/sbin/ggate/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sbin/ggate/ggatec/Makefile b/sbin/ggate/ggatec/Makefile index 5591b2a3a8ba..9ea38ceb87d4 100644 --- a/sbin/ggate/ggatec/Makefile +++ b/sbin/ggate/ggatec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/shared PROG= ggatec diff --git a/sbin/ggate/ggated/Makefile b/sbin/ggate/ggated/Makefile index 2939e4de49eb..629d6aded308 100644 --- a/sbin/ggate/ggated/Makefile +++ b/sbin/ggate/ggated/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/shared PROG= ggated diff --git a/sbin/ggate/ggatel/Makefile b/sbin/ggate/ggatel/Makefile index ec1302bf9cda..eb9ff9a675ce 100644 --- a/sbin/ggate/ggatel/Makefile +++ b/sbin/ggate/ggatel/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/shared PROG= ggatel diff --git a/sbin/growfs/tests/Makefile b/sbin/growfs/tests/Makefile index 270eb46ce958..a23b430f58fa 100644 --- a/sbin/growfs/tests/Makefile +++ b/sbin/growfs/tests/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_PERL= legacy_test .include diff --git a/sbin/gvinum/Makefile b/sbin/gvinum/Makefile index 8ffabc694c31..7e7066964514 100644 --- a/sbin/gvinum/Makefile +++ b/sbin/gvinum/Makefile @@ -1,4 +1,3 @@ - PACKAGE=geom PROG= gvinum SRCS= gvinum.c gvinum.h geom_vinum_share.c diff --git a/sbin/hastctl/Makefile b/sbin/hastctl/Makefile index 3f42f6ecdda7..36152dc835a6 100644 --- a/sbin/hastctl/Makefile +++ b/sbin/hastctl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=hast diff --git a/sbin/hastd/Makefile b/sbin/hastd/Makefile index 64f35483c5d7..8a79320fb665 100644 --- a/sbin/hastd/Makefile +++ b/sbin/hastd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=hast diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile index e5701fbcdbba..2553e61b5e9e 100644 --- a/sbin/ifconfig/Makefile +++ b/sbin/ifconfig/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/ifconfig/tests/Makefile b/sbin/ifconfig/tests/Makefile index 9b29983afc7c..ff545f603085 100644 --- a/sbin/ifconfig/tests/Makefile +++ b/sbin/ifconfig/tests/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_SH= nonexistent_test .include diff --git a/sbin/init/Makefile b/sbin/init/Makefile index 965608065291..124a9f77dede 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -1,4 +1,3 @@ - CONFGROUPS= CONFTTYS PACKAGE=runtime PROG= init diff --git a/sbin/ipf/Makefile b/sbin/ipf/Makefile index 32cead444f77..1b0a18d3d9c3 100644 --- a/sbin/ipf/Makefile +++ b/sbin/ipf/Makefile @@ -1,4 +1,3 @@ - SUBDIR= libipf .WAIT SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool # XXX Temporarily disconnected. diff --git a/sbin/ipf/Makefile.inc b/sbin/ipf/Makefile.inc index 39bdc3674b2b..cb3a3df50e0c 100644 --- a/sbin/ipf/Makefile.inc +++ b/sbin/ipf/Makefile.inc @@ -1,4 +1,3 @@ - .include WARNS?= 2 diff --git a/sbin/ipf/ipf/Makefile b/sbin/ipf/ipf/Makefile index 981be4acd99e..00cabf50cd89 100644 --- a/sbin/ipf/ipf/Makefile +++ b/sbin/ipf/ipf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipf SRCS= ${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c diff --git a/sbin/ipf/ipfs/Makefile b/sbin/ipf/ipfs/Makefile index 56eb92edec09..09bf881deca3 100644 --- a/sbin/ipf/ipfs/Makefile +++ b/sbin/ipf/ipfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ipf PROG= ipfs MAN= ipfs.8 diff --git a/sbin/ipf/ipfstat/Makefile b/sbin/ipf/ipfstat/Makefile index 7d03f282f672..795e89e0a14f 100644 --- a/sbin/ipf/ipfstat/Makefile +++ b/sbin/ipf/ipfstat/Makefile @@ -1,4 +1,3 @@ - NOGCCERROR= # defined PACKAGE= ipf diff --git a/sbin/ipf/ipftest/Makefile b/sbin/ipf/ipftest/Makefile index 3ff410e8f225..d446ab9d22be 100644 --- a/sbin/ipf/ipftest/Makefile +++ b/sbin/ipf/ipftest/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipftest SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \ diff --git a/sbin/ipf/ipmon/Makefile b/sbin/ipf/ipmon/Makefile index 11506d8a85e8..257e3b999777 100644 --- a/sbin/ipf/ipmon/Makefile +++ b/sbin/ipf/ipmon/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipmon SRCS= ${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c diff --git a/sbin/ipf/ipnat/Makefile b/sbin/ipf/ipnat/Makefile index e4015e34c4e3..869a399bd44f 100644 --- a/sbin/ipf/ipnat/Makefile +++ b/sbin/ipf/ipnat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipnat SRCS= ${GENHDRS} ipnat.c ipnat_y.c ipnat_l.c diff --git a/sbin/ipf/ippool/Makefile b/sbin/ipf/ippool/Makefile index d9b267a58580..8ed864ee9267 100644 --- a/sbin/ipf/ippool/Makefile +++ b/sbin/ipf/ippool/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ippool SRCS= ${GENHDRS} ippool_y.c ippool_l.c ippool.c diff --git a/sbin/ipf/ipresend/Makefile b/sbin/ipf/ipresend/Makefile index fc655c5423d7..f866891c4c97 100644 --- a/sbin/ipf/ipresend/Makefile +++ b/sbin/ipf/ipresend/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipresend SRCS= ipresend.c ip.c resend.c sbpf.c sock.c 44arp.c diff --git a/sbin/ipf/ipscan/Makefile b/sbin/ipf/ipscan/Makefile index 1169e7dcade5..1f62d796076e 100644 --- a/sbin/ipf/ipscan/Makefile +++ b/sbin/ipf/ipscan/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf PROG= ipscan SRCS= ${GENHDRS} ipscan_y.c diff --git a/sbin/ipf/libipf/Makefile b/sbin/ipf/libipf/Makefile index 8971e014faef..bdd56876dadd 100644 --- a/sbin/ipf/libipf/Makefile +++ b/sbin/ipf/libipf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ipf LIB= ipf INTERNALLIB= diff --git a/sbin/ipfw/Makefile b/sbin/ipfw/Makefile index a800ec86b0cf..bfbe70130de7 100644 --- a/sbin/ipfw/Makefile +++ b/sbin/ipfw/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=ipfw diff --git a/sbin/ldconfig/Makefile b/sbin/ldconfig/Makefile index 2ed58431fc03..621be3937ec0 100644 --- a/sbin/ldconfig/Makefile +++ b/sbin/ldconfig/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= ldconfig SRCS= elfhints.c ldconfig.c diff --git a/sbin/md5/Makefile b/sbin/md5/Makefile index f91e84323b04..ed87ff84876b 100644 --- a/sbin/md5/Makefile +++ b/sbin/md5/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= md5 diff --git a/sbin/md5/tests/Makefile b/sbin/md5/tests/Makefile index 236e8433fd43..03c4da684eba 100644 --- a/sbin/md5/tests/Makefile +++ b/sbin/md5/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/sbin/mdconfig/Makefile b/sbin/mdconfig/Makefile index 5e102d635e93..bd835df0daec 100644 --- a/sbin/mdconfig/Makefile +++ b/sbin/mdconfig/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/mdconfig/tests/Makefile b/sbin/mdconfig/tests/Makefile index 674536a33d74..a3841f8f0dd0 100644 --- a/sbin/mdconfig/tests/Makefile +++ b/sbin/mdconfig/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= mdconfig_test TEST_METADATA.mdconfig_test+= required_user="root" diff --git a/sbin/mdmfs/Makefile b/sbin/mdmfs/Makefile index 592ceaa152c2..0665dfcc20a3 100644 --- a/sbin/mdmfs/Makefile +++ b/sbin/mdmfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mdmfs LINKS= ${BINDIR}/${PROG} ${BINDIR}/mount_mfs diff --git a/sbin/mknod/Makefile b/sbin/mknod/Makefile index ce2c8d0cd97d..2182f31ca247 100644 --- a/sbin/mknod/Makefile +++ b/sbin/mknod/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mknod MAN= mknod.8 diff --git a/sbin/mksnap_ffs/Makefile b/sbin/mksnap_ffs/Makefile index b11bf0a25fa5..591fd6adcc22 100644 --- a/sbin/mksnap_ffs/Makefile +++ b/sbin/mksnap_ffs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/mount PACKAGE=ufs diff --git a/sbin/mount/Makefile b/sbin/mount/Makefile index ad5a27f7d76d..9b5c9b9e593d 100644 --- a/sbin/mount/Makefile +++ b/sbin/mount/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mount SRCS= mount.c mount_fs.c getmntopts.c vfslist.c diff --git a/sbin/mount_cd9660/Makefile b/sbin/mount_cd9660/Makefile index ae9cde8080a4..3a8f9cd45cb4 100644 --- a/sbin/mount_cd9660/Makefile +++ b/sbin/mount_cd9660/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mount_cd9660 SRCS= mount_cd9660.c getmntopts.c diff --git a/sbin/mount_fusefs/Makefile b/sbin/mount_fusefs/Makefile index 741cbed1dd5e..0c173bf1b687 100644 --- a/sbin/mount_fusefs/Makefile +++ b/sbin/mount_fusefs/Makefile @@ -1,4 +1,3 @@ - .if defined(DEBUG) DEBUG_FLAGS+= -D_DEBUG -g .endif diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile index 2af94bff3a97..3e61a9f680e0 100644 --- a/sbin/mount_nfs/Makefile +++ b/sbin/mount_nfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=nfs PROG= mount_nfs SRCS= mount_nfs.c getmntopts.c mounttab.c diff --git a/sbin/mount_nullfs/Makefile b/sbin/mount_nullfs/Makefile index 591ee9a9e240..12e87308ed13 100644 --- a/sbin/mount_nullfs/Makefile +++ b/sbin/mount_nullfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mount_nullfs SRCS= mount_nullfs.c getmntopts.c diff --git a/sbin/mount_udf/Makefile b/sbin/mount_udf/Makefile index bf165eb28ffe..c41c051fc315 100644 --- a/sbin/mount_udf/Makefile +++ b/sbin/mount_udf/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mount_udf SRCS= mount_udf.c getmntopts.c diff --git a/sbin/mount_unionfs/Makefile b/sbin/mount_unionfs/Makefile index a548429b03c6..2096386a3784 100644 --- a/sbin/mount_unionfs/Makefile +++ b/sbin/mount_unionfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mount_unionfs SRCS= mount_unionfs.c getmntopts.c diff --git a/sbin/natd/Makefile b/sbin/natd/Makefile index 39e3fd708bc7..b8d54c780bfa 100644 --- a/sbin/natd/Makefile +++ b/sbin/natd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= natd PROG = natd SRCS = natd.c icmp.c diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile index b8070d90257e..1138e819055f 100644 --- a/sbin/newfs/Makefile +++ b/sbin/newfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom PACKAGE= ufs diff --git a/sbin/newfs_msdos/Makefile b/sbin/newfs_msdos/Makefile index f4efc6490675..a3ea6a6a6750 100644 --- a/sbin/newfs_msdos/Makefile +++ b/sbin/newfs_msdos/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/nfsiod/Makefile b/sbin/nfsiod/Makefile index c75b1075c4e0..974c7de3362b 100644 --- a/sbin/nfsiod/Makefile +++ b/sbin/nfsiod/Makefile @@ -1,4 +1,3 @@ - PROG= nfsiod MAN= nfsiod.8 diff --git a/sbin/nos-tun/Makefile b/sbin/nos-tun/Makefile index 8934e138b49d..bef6878b7f25 100644 --- a/sbin/nos-tun/Makefile +++ b/sbin/nos-tun/Makefile @@ -1,4 +1,3 @@ - PROG= nos-tun MAN= nos-tun.8 WARNS?= 3 diff --git a/sbin/nvmecontrol/modules/Makefile b/sbin/nvmecontrol/modules/Makefile index f89b8dc84ab6..70d1ba40a1e2 100644 --- a/sbin/nvmecontrol/modules/Makefile +++ b/sbin/nvmecontrol/modules/Makefile @@ -1,4 +1,3 @@ - SUBDIR= intel wdc samsung .include diff --git a/sbin/nvmecontrol/modules/Makefile.inc b/sbin/nvmecontrol/modules/Makefile.inc index f949af979454..d88927501437 100644 --- a/sbin/nvmecontrol/modules/Makefile.inc +++ b/sbin/nvmecontrol/modules/Makefile.inc @@ -1,4 +1,3 @@ - PACKAGE=nvme-tools NVMECONTROLDIR= ${SRCTOP}/sbin/nvmecontrol diff --git a/sbin/nvmecontrol/modules/intel/Makefile b/sbin/nvmecontrol/modules/intel/Makefile index 3191980c5623..9e4eafa0feec 100644 --- a/sbin/nvmecontrol/modules/intel/Makefile +++ b/sbin/nvmecontrol/modules/intel/Makefile @@ -1,4 +1,3 @@ - LIB= intel SRCS= intel.c diff --git a/sbin/nvmecontrol/modules/samsung/Makefile b/sbin/nvmecontrol/modules/samsung/Makefile index 353a2d141508..750dd07cbeb4 100644 --- a/sbin/nvmecontrol/modules/samsung/Makefile +++ b/sbin/nvmecontrol/modules/samsung/Makefile @@ -1,4 +1,3 @@ - LIB= samsung SRCS= samsung.c diff --git a/sbin/nvmecontrol/modules/wdc/Makefile b/sbin/nvmecontrol/modules/wdc/Makefile index 9a71b2b2a802..8f8185d5f7ad 100644 --- a/sbin/nvmecontrol/modules/wdc/Makefile +++ b/sbin/nvmecontrol/modules/wdc/Makefile @@ -1,4 +1,3 @@ - LIB= wdc SRCS= wdc.c diff --git a/sbin/nvmecontrol/tests/Makefile b/sbin/nvmecontrol/tests/Makefile index eebe8819339e..5754dbd743b8 100644 --- a/sbin/nvmecontrol/tests/Makefile +++ b/sbin/nvmecontrol/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= basic diff --git a/sbin/pfctl/Makefile b/sbin/pfctl/Makefile index c9108f702f29..08ca9a7af81b 100644 --- a/sbin/pfctl/Makefile +++ b/sbin/pfctl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=pf diff --git a/sbin/pfctl/tests/Makefile b/sbin/pfctl/tests/Makefile index db41a445903f..ed5f52758145 100644 --- a/sbin/pfctl/tests/Makefile +++ b/sbin/pfctl/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_C= pfctl_test diff --git a/sbin/pfctl/tests/files/Makefile b/sbin/pfctl/tests/files/Makefile index c676a42f62b8..27cf512d81c5 100644 --- a/sbin/pfctl/tests/files/Makefile +++ b/sbin/pfctl/tests/files/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sbin/pfctl/files diff --git a/sbin/pfilctl/Makefile b/sbin/pfilctl/Makefile index fb67b5ea6490..d5efad642bfd 100644 --- a/sbin/pfilctl/Makefile +++ b/sbin/pfilctl/Makefile @@ -1,4 +1,3 @@ - PROG= pfilctl SRCS= pfilctl.c diff --git a/sbin/pflogd/Makefile b/sbin/pflogd/Makefile index 17077a4f825f..7b4a636843e0 100644 --- a/sbin/pflogd/Makefile +++ b/sbin/pflogd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/pf/pflogd PACKAGE=pf diff --git a/sbin/pflowctl/Makefile b/sbin/pflowctl/Makefile index 35cf8cc020f4..dd20f7b7a37a 100644 --- a/sbin/pflowctl/Makefile +++ b/sbin/pflowctl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=pf diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index a710629cb242..b4e3f115b245 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/ping/tests/Makefile b/sbin/ping/tests/Makefile index 3bdf53c15a7c..0520b1d634cf 100644 --- a/sbin/ping/tests/Makefile +++ b/sbin/ping/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_C+= in_cksum_test SRCS.in_cksum_test= in_cksum_test.c ../utils.c diff --git a/sbin/quotacheck/Makefile b/sbin/quotacheck/Makefile index d737e4f04723..edaac8679459 100644 --- a/sbin/quotacheck/Makefile +++ b/sbin/quotacheck/Makefile @@ -1,4 +1,3 @@ - PACKAGE=quotacheck PROG= quotacheck SRCS= quotacheck.c preen.c fsutil.c utilities.c diff --git a/sbin/reboot/Makefile b/sbin/reboot/Makefile index 5e7a2fea15bf..27805d307794 100644 --- a/sbin/reboot/Makefile +++ b/sbin/reboot/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= reboot MAN= reboot.8 nextboot.8 diff --git a/sbin/recoverdisk/Makefile b/sbin/recoverdisk/Makefile index e0a8d118656f..41bc736ecc6e 100644 --- a/sbin/recoverdisk/Makefile +++ b/sbin/recoverdisk/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= recoverdisk diff --git a/sbin/resolvconf/Makefile b/sbin/resolvconf/Makefile index e381ee4118a8..328153a2b0ba 100644 --- a/sbin/resolvconf/Makefile +++ b/sbin/resolvconf/Makefile @@ -1,4 +1,3 @@ - PACKAGE=resolvconf DIST= ${SRCTOP}/contrib/openresolv .PATH: ${DIST} diff --git a/sbin/restore/Makefile b/sbin/restore/Makefile index 915ad0d1ad63..99fc7e190bfd 100644 --- a/sbin/restore/Makefile +++ b/sbin/restore/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/dump PACKAGE=ufs diff --git a/sbin/route/Makefile b/sbin/route/Makefile index b0a0670e4629..43b9c0d8d821 100644 --- a/sbin/route/Makefile +++ b/sbin/route/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/route/tests/Makefile b/sbin/route/tests/Makefile index 23e5ecb79143..9d634d7c48b8 100644 --- a/sbin/route/tests/Makefile +++ b/sbin/route/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= basic diff --git a/sbin/routed/Makefile.inc b/sbin/routed/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sbin/routed/Makefile.inc +++ b/sbin/routed/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sbin/savecore/Makefile b/sbin/savecore/Makefile index fe10df459309..8d22ab21b6da 100644 --- a/sbin/savecore/Makefile +++ b/sbin/savecore/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime CONFS= minfree VAR_CRASH= /var/crash diff --git a/sbin/shutdown/Makefile b/sbin/shutdown/Makefile index 3271570b3521..6c5d6e4487e2 100644 --- a/sbin/shutdown/Makefile +++ b/sbin/shutdown/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= shutdown MAN= shutdown.8 diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile index 27808aed5857..ef87c9668dd7 100644 --- a/sbin/swapon/Makefile +++ b/sbin/swapon/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= swapon MAN= swapon.8 diff --git a/sbin/sysctl/Makefile b/sbin/sysctl/Makefile index e1e590307c6d..cd47d8b28295 100644 --- a/sbin/sysctl/Makefile +++ b/sbin/sysctl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=runtime diff --git a/sbin/sysctl/tests/Makefile b/sbin/sysctl/tests/Makefile index c3f117dcff1f..b209b2448241 100644 --- a/sbin/sysctl/tests/Makefile +++ b/sbin/sysctl/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= sysctl_test .include diff --git a/sbin/tests/Makefile b/sbin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/sbin/tests/Makefile +++ b/sbin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/sbin/tunefs/Makefile b/sbin/tunefs/Makefile index 2a1f78885311..e236525557e1 100644 --- a/sbin/tunefs/Makefile +++ b/sbin/tunefs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ufs PROG= tunefs SRCS= tunefs.c getmntopts.c diff --git a/sbin/umount/Makefile b/sbin/umount/Makefile index 7b440db82af1..d97283d70c21 100644 --- a/sbin/umount/Makefile +++ b/sbin/umount/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= umount SRCS= umount.c vfslist.c mounttab.c diff --git a/sbin/veriexec/Makefile b/sbin/veriexec/Makefile index 78f7059109fb..6b6007c4bb3d 100644 --- a/sbin/veriexec/Makefile +++ b/sbin/veriexec/Makefile @@ -1,4 +1,3 @@ - PROG= veriexec MAN= veriexec.8 SRCS= \ diff --git a/secure/Makefile b/secure/Makefile index f23953bb71ad..268ece6847f4 100644 --- a/secure/Makefile +++ b/secure/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= lib .WAIT \ diff --git a/secure/Makefile.inc b/secure/Makefile.inc index c951f3d3524f..a0f42faa062b 100644 --- a/secure/Makefile.inc +++ b/secure/Makefile.inc @@ -1,4 +1,3 @@ - .if exists(${.CURDIR:H:H}/lib/libcrypt/obj) CRYPTOBJDIR= ${.CURDIR:H:H}/lib/libcrypt/obj .else diff --git a/secure/caroot/Makefile b/secure/caroot/Makefile index 4390d4890b92..cd337a74a75a 100644 --- a/secure/caroot/Makefile +++ b/secure/caroot/Makefile @@ -1,4 +1,3 @@ - CLEANFILES+= certdata.txt SUBDIR+= trusted diff --git a/secure/caroot/Makefile.inc b/secure/caroot/Makefile.inc index 700e6ff3048c..88e287789688 100644 --- a/secure/caroot/Makefile.inc +++ b/secure/caroot/Makefile.inc @@ -1,2 +1 @@ - PACKAGE= caroot diff --git a/secure/caroot/trusted/Makefile b/secure/caroot/trusted/Makefile index 20d0ccfcbe23..b2fe43fcb802 100644 --- a/secure/caroot/trusted/Makefile +++ b/secure/caroot/trusted/Makefile @@ -1,4 +1,3 @@ - BINDIR= /usr/share/certs/trusted TRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true diff --git a/secure/caroot/untrusted/Makefile b/secure/caroot/untrusted/Makefile index e5341c978008..19d7359ddcb9 100644 --- a/secure/caroot/untrusted/Makefile +++ b/secure/caroot/untrusted/Makefile @@ -1,4 +1,3 @@ - BINDIR= /usr/share/certs/untrusted UNTRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true diff --git a/secure/lib/Makefile b/secure/lib/Makefile index b4b586fa6585..195fef28501c 100644 --- a/secure/lib/Makefile +++ b/secure/lib/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= diff --git a/secure/lib/Makefile.inc b/secure/lib/Makefile.inc index 9f5c8f243963..ac01b9fd6829 100644 --- a/secure/lib/Makefile.inc +++ b/secure/lib/Makefile.inc @@ -1,4 +1,3 @@ - .include "../Makefile.inc" .if exists(${.CURDIR:H:H:H}/lib/Makefile.inc) .include "${.CURDIR:H:H:H}/lib/Makefile.inc" diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index dc701d90451e..a6ca46ecd372 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -1,4 +1,3 @@ - SHLIBDIR?= /lib .if !defined(LIBCRYPTO_WITHOUT_SUBDIRS) SUBDIR= engines modules diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common index b109fd7f7f4f..afcc2a48660c 100644 --- a/secure/lib/libcrypto/Makefile.common +++ b/secure/lib/libcrypto/Makefile.common @@ -1,4 +1,3 @@ - .include .if ${TARGET_ENDIANNESS} == 1234 diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index d95f08e27256..16a2c15bc962 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -1,4 +1,3 @@ - .include # OpenSSL version used for manual page generation diff --git a/secure/lib/libcrypto/engines/Makefile b/secure/lib/libcrypto/engines/Makefile index 80587f47c48f..945d93599f06 100644 --- a/secure/lib/libcrypto/engines/Makefile +++ b/secure/lib/libcrypto/engines/Makefile @@ -1,4 +1,3 @@ - SUBDIR= capi devcrypto loader_attic .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SUBDIR+= padlock diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 13d5f4849cbc..3da129023c7f 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -1,4 +1,3 @@ - SHLIBDIR= ${LIBDIR}/engines-3 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl diff --git a/secure/lib/libcrypto/engines/capi/Makefile b/secure/lib/libcrypto/engines/capi/Makefile index 184b6aaef2f2..2162dbf94b68 100644 --- a/secure/lib/libcrypto/engines/capi/Makefile +++ b/secure/lib/libcrypto/engines/capi/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= capi.so SRCS= e_capi.c diff --git a/secure/lib/libcrypto/engines/devcrypto/Makefile b/secure/lib/libcrypto/engines/devcrypto/Makefile index a8b6f84a70ba..a69e6074cc2e 100644 --- a/secure/lib/libcrypto/engines/devcrypto/Makefile +++ b/secure/lib/libcrypto/engines/devcrypto/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= devcrypto.so SRCS= e_devcrypto.c diff --git a/secure/lib/libcrypto/engines/loader_attic/Makefile b/secure/lib/libcrypto/engines/loader_attic/Makefile index bd837dbb5596..cee699eaccf6 100644 --- a/secure/lib/libcrypto/engines/loader_attic/Makefile +++ b/secure/lib/libcrypto/engines/loader_attic/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= loader_attic.so SRCS= e_loader_attic.c pvkfmt.c diff --git a/secure/lib/libcrypto/engines/padlock/Makefile b/secure/lib/libcrypto/engines/padlock/Makefile index 9dc8cd4eafec..60dfa9c77c20 100644 --- a/secure/lib/libcrypto/engines/padlock/Makefile +++ b/secure/lib/libcrypto/engines/padlock/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= padlock.so SRCS= e_padlock.c diff --git a/secure/lib/libcrypto/modules/Makefile b/secure/lib/libcrypto/modules/Makefile index 2f9e5b40fe3e..0e01eb3b8ef2 100644 --- a/secure/lib/libcrypto/modules/Makefile +++ b/secure/lib/libcrypto/modules/Makefile @@ -1,4 +1,3 @@ - SUBDIR= fips legacy SUBDIR_PARALLEL= diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 0c7027bff89b..92bc102c06e9 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -1,4 +1,3 @@ - SHLIBDIR= ${LIBDIR}/ossl-modules LCRYPTO_SRC= ${SRCTOP}/crypto/openssl diff --git a/secure/lib/libcrypto/modules/fips/Makefile b/secure/lib/libcrypto/modules/fips/Makefile index 8843cb9717c9..0f4889f3ff81 100644 --- a/secure/lib/libcrypto/modules/fips/Makefile +++ b/secure/lib/libcrypto/modules/fips/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= fips.so CFLAGS+= -DFIPS_MODULE diff --git a/secure/lib/libcrypto/modules/legacy/Makefile b/secure/lib/libcrypto/modules/legacy/Makefile index a285d0b1148b..f90c873072ea 100644 --- a/secure/lib/libcrypto/modules/legacy/Makefile +++ b/secure/lib/libcrypto/modules/legacy/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME?= legacy.so LIBADD= crypto diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index e6738be94f65..aca21d318812 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile index 21a57f6b368f..9d8a64ee0ab4 100644 --- a/secure/lib/libssl/Makefile +++ b/secure/lib/libssl/Makefile @@ -1,4 +1,3 @@ - .include LIB= ssl diff --git a/secure/lib/tests/Makefile b/secure/lib/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/secure/lib/tests/Makefile +++ b/secure/lib/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/secure/libexec/Makefile b/secure/libexec/Makefile index 6d0be7b50dfd..cf265c72bddd 100644 --- a/secure/libexec/Makefile +++ b/secure/libexec/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= diff --git a/secure/libexec/Makefile.inc b/secure/libexec/Makefile.inc index e5beeed87cac..8998b613dda3 100644 --- a/secure/libexec/Makefile.inc +++ b/secure/libexec/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/libexec PACKAGE= ssh diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile index 852055bfe625..40d86926d1bb 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/libexec/ssh-keysign/Makefile b/secure/libexec/ssh-keysign/Makefile index e5aa05f40f1d..6027b164a35f 100644 --- a/secure/libexec/ssh-keysign/Makefile +++ b/secure/libexec/ssh-keysign/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/libexec/ssh-pkcs11-helper/Makefile b/secure/libexec/ssh-pkcs11-helper/Makefile index 2e04a0ed1fc2..4bc3a814ab8e 100644 --- a/secure/libexec/ssh-pkcs11-helper/Makefile +++ b/secure/libexec/ssh-pkcs11-helper/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/libexec/tests/Makefile b/secure/libexec/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/secure/libexec/tests/Makefile +++ b/secure/libexec/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/secure/tests/Makefile b/secure/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/secure/tests/Makefile +++ b/secure/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile index 55abbdb5c3e8..30f8767aa4e9 100644 --- a/secure/usr.bin/Makefile +++ b/secure/usr.bin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= diff --git a/secure/usr.bin/Makefile.inc b/secure/usr.bin/Makefile.inc index 78a3af23f3cc..b87015c546ca 100644 --- a/secure/usr.bin/Makefile.inc +++ b/secure/usr.bin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/bin .include "../Makefile.inc" diff --git a/secure/usr.bin/openssl/Makefile b/secure/usr.bin/openssl/Makefile index 464189e79821..0653e6875188 100644 --- a/secure/usr.bin/openssl/Makefile +++ b/secure/usr.bin/openssl/Makefile @@ -1,4 +1,3 @@ - CONFS= openssl.cnf CONFSDIR= /etc/ssl PROG= openssl diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index bb2623062333..dbc896286dd3 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index 72229d100c45..841c89b71c67 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile index 43ee63c567e7..ec709c721089 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index 83813452e69a..bc5985a7325e 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile index 6595ad3db132..149dc6936659 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile index b71c07a91b90..b842841f765f 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index 1d1f5e5e8723..7c3eb68ea083 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.bin/tests/Makefile b/secure/usr.bin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/secure/usr.bin/tests/Makefile +++ b/secure/usr.bin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/secure/usr.sbin/Makefile b/secure/usr.sbin/Makefile index c0521b95cdb4..50b863096138 100644 --- a/secure/usr.sbin/Makefile +++ b/secure/usr.sbin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= diff --git a/secure/usr.sbin/Makefile.inc b/secure/usr.sbin/Makefile.inc index 5c01baa093b7..b660f1cc6638 100644 --- a/secure/usr.sbin/Makefile.inc +++ b/secure/usr.sbin/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/sbin .include "../Makefile.inc" diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index c15bd773c77a..323fe4b8c99f 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -1,4 +1,3 @@ - .include .include "${SRCTOP}/secure/ssh.mk" diff --git a/secure/usr.sbin/tests/Makefile b/secure/usr.sbin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/secure/usr.sbin/tests/Makefile +++ b/secure/usr.sbin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/share/Makefile b/share/Makefile index 5546f3e90c1b..a94fe6334709 100644 --- a/share/Makefile +++ b/share/Makefile @@ -1,4 +1,3 @@ - .include # Do not include `info' in the SUBDIR list, it is handled separately. diff --git a/share/Makefile.inc b/share/Makefile.inc index 121787f4b10b..31d47bde05d9 100644 --- a/share/Makefile.inc +++ b/share/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= ${SHAREDIR} BINOWN= ${SHAREOWN} BINGRP= ${SHAREGRP} diff --git a/share/colldef/Makefile b/share/colldef/Makefile index dd310b699dd5..5d608056f733 100644 --- a/share/colldef/Makefile +++ b/share/colldef/Makefile @@ -1,4 +1,3 @@ - PACKAGE= locales LOCALEDIR= ${SHAREDIR}/locale FILESNAME= LC_COLLATE diff --git a/share/ctypedef/Makefile b/share/ctypedef/Makefile index 62b3a719fe57..cf3335267446 100644 --- a/share/ctypedef/Makefile +++ b/share/ctypedef/Makefile @@ -1,4 +1,3 @@ - PACKAGE= locales FILESGROUPS= FILES ALWAYS ALWAYSPACKAGE= runtime diff --git a/share/dict/Makefile b/share/dict/Makefile index 7e8c830d1944..3fb23e269ae2 100644 --- a/share/dict/Makefile +++ b/share/dict/Makefile @@ -1,4 +1,3 @@ - # XXX MISSING: connectives words FILES= README propernames web2 web2a freebsd FILESDIR= ${BINDIR}/dict diff --git a/share/doc/IPv6/Makefile b/share/doc/IPv6/Makefile index 29a321f55c30..c2b04c972bf1 100644 --- a/share/doc/IPv6/Makefile +++ b/share/doc/IPv6/Makefile @@ -1,4 +1,3 @@ - FILES= IMPLEMENTATION FILESDIR= ${SHAREDIR}/doc/IPv6 diff --git a/share/doc/Makefile b/share/doc/Makefile index 75c12e2ba0e7..6324dd59ef75 100644 --- a/share/doc/Makefile +++ b/share/doc/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= ${_IPv6} \ diff --git a/share/doc/legal/Makefile b/share/doc/legal/Makefile index 8e674019e9a2..9467a4ece9a7 100644 --- a/share/doc/legal/Makefile +++ b/share/doc/legal/Makefile @@ -1,4 +1,3 @@ - SUBDIR= intel_ipw \ intel_iwi \ intel_iwlwififw \ diff --git a/share/doc/legal/Makefile.armv7 b/share/doc/legal/Makefile.armv7 index 245d40118ac0..3064611d04b2 100644 --- a/share/doc/legal/Makefile.armv7 +++ b/share/doc/legal/Makefile.armv7 @@ -1,2 +1 @@ - SUBDIR += imx diff --git a/share/doc/legal/imx/Makefile b/share/doc/legal/imx/Makefile index bd0e97a04a8e..866af4017e4f 100644 --- a/share/doc/legal/imx/Makefile +++ b/share/doc/legal/imx/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/imx/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= sdma-imx6q.LICENSE diff --git a/share/doc/legal/intel_ipw/Makefile b/share/doc/legal/intel_ipw/Makefile index fccf2bda0c0c..9f842cb8b247 100644 --- a/share/doc/legal/intel_ipw/Makefile +++ b/share/doc/legal/intel_ipw/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/ipw/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_ipw.LICENSE diff --git a/share/doc/legal/intel_iwi/Makefile b/share/doc/legal/intel_iwi/Makefile index 93c0ddf05561..8c3a73fd88c1 100644 --- a/share/doc/legal/intel_iwi/Makefile +++ b/share/doc/legal/intel_iwi/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/iwi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_iwi.LICENSE diff --git a/share/doc/legal/intel_iwlwififw/Makefile b/share/doc/legal/intel_iwlwififw/Makefile index 631d34654341..87956f8e7a30 100644 --- a/share/doc/legal/intel_iwlwififw/Makefile +++ b/share/doc/legal/intel_iwlwififw/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_iwlwifi_firmware.LICENCE diff --git a/share/doc/legal/intel_iwn/Makefile b/share/doc/legal/intel_iwn/Makefile index d706f3a3b880..7542e0d6356d 100644 --- a/share/doc/legal/intel_iwn/Makefile +++ b/share/doc/legal/intel_iwn/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/iwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_iwn.LICENSE diff --git a/share/doc/legal/intel_wpi/Makefile b/share/doc/legal/intel_wpi/Makefile index 29baf84d1d48..b23d3ab9260c 100644 --- a/share/doc/legal/intel_wpi/Makefile +++ b/share/doc/legal/intel_wpi/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/wpi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= intel_wpi.LICENSE diff --git a/share/doc/legal/realtek/Makefile b/share/doc/legal/realtek/Makefile index 2a6fd6ae6192..14aa123011c3 100644 --- a/share/doc/legal/realtek/Makefile +++ b/share/doc/legal/realtek/Makefile @@ -1,4 +1,3 @@ - FILES= ${SRCTOP}/sys/contrib/dev/rtwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal FILESNAME= realtek.LICENSE diff --git a/share/doc/llvm/Makefile b/share/doc/llvm/Makefile index 829b77a117ab..8fde27acf117 100644 --- a/share/doc/llvm/Makefile +++ b/share/doc/llvm/Makefile @@ -1,4 +1,3 @@ - SUBDIR= clang SRCDIR= ${SRCTOP}/contrib/llvm-project/llvm diff --git a/share/doc/llvm/clang/Makefile b/share/doc/llvm/clang/Makefile index 9cd2f210cd95..ba789f4afd98 100644 --- a/share/doc/llvm/clang/Makefile +++ b/share/doc/llvm/clang/Makefile @@ -1,4 +1,3 @@ - SRCDIR= ${SRCTOP}/contrib/llvm-project/clang .PATH: ${SRCDIR} diff --git a/share/doc/papers/Makefile b/share/doc/papers/Makefile index 271180abb827..3c702b2aeaaa 100644 --- a/share/doc/papers/Makefile +++ b/share/doc/papers/Makefile @@ -1,4 +1,3 @@ - SUBDIR= beyond4.3 \ bufbio \ contents \ diff --git a/share/doc/papers/beyond4.3/Makefile b/share/doc/papers/beyond4.3/Makefile index 9f25cb6db894..acc2048503f8 100644 --- a/share/doc/papers/beyond4.3/Makefile +++ b/share/doc/papers/beyond4.3/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= beyond43 SRCS= beyond43.ms diff --git a/share/doc/papers/bufbio/Makefile b/share/doc/papers/bufbio/Makefile index 8cffb984f880..a486124fac51 100644 --- a/share/doc/papers/bufbio/Makefile +++ b/share/doc/papers/bufbio/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= bio SRCS= bio.ms-patched diff --git a/share/doc/papers/contents/Makefile b/share/doc/papers/contents/Makefile index c4075606b261..454fff5ee5a9 100644 --- a/share/doc/papers/contents/Makefile +++ b/share/doc/papers/contents/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= contents SRCS= contents.ms diff --git a/share/doc/papers/devfs/Makefile b/share/doc/papers/devfs/Makefile index 114134a59589..656e3cd89c2c 100644 --- a/share/doc/papers/devfs/Makefile +++ b/share/doc/papers/devfs/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= devfs SRCS= paper.me diff --git a/share/doc/papers/diskperf/Makefile b/share/doc/papers/diskperf/Makefile index dd6c009d47ea..0c909ea95845 100644 --- a/share/doc/papers/diskperf/Makefile +++ b/share/doc/papers/diskperf/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= diskperf SRCS= abs.ms motivation.ms equip.ms methodology.ms tests.ms \ diff --git a/share/doc/papers/fsinterface/Makefile b/share/doc/papers/fsinterface/Makefile index 4226f134917a..3c45b04b08d6 100644 --- a/share/doc/papers/fsinterface/Makefile +++ b/share/doc/papers/fsinterface/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= fsinterface SRCS= fsinterface.ms diff --git a/share/doc/papers/jail/Makefile b/share/doc/papers/jail/Makefile index 3476ab194d5c..d25059929908 100644 --- a/share/doc/papers/jail/Makefile +++ b/share/doc/papers/jail/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= jail SRCS= paper.ms-patched diff --git a/share/doc/papers/kernmalloc/Makefile b/share/doc/papers/kernmalloc/Makefile index d91fd40baaa5..f353016251b5 100644 --- a/share/doc/papers/kernmalloc/Makefile +++ b/share/doc/papers/kernmalloc/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= kernmalloc SRCS= kernmalloc.t appendix.ms diff --git a/share/doc/papers/kerntune/Makefile b/share/doc/papers/kerntune/Makefile index a4f9954d6aba..6dbc8c67ab2b 100644 --- a/share/doc/papers/kerntune/Makefile +++ b/share/doc/papers/kerntune/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= kerntune SRCS= 0.t 1.t 2.t 3.t 4.t diff --git a/share/doc/papers/malloc/Makefile b/share/doc/papers/malloc/Makefile index 8925f01cb450..755264466aa3 100644 --- a/share/doc/papers/malloc/Makefile +++ b/share/doc/papers/malloc/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= malloc SRCS= abs.ms intro.ms kernel.ms malloc.ms problems.ms alternatives.ms \ diff --git a/share/doc/papers/newvm/Makefile b/share/doc/papers/newvm/Makefile index 531de11faf3d..6a4d1342162d 100644 --- a/share/doc/papers/newvm/Makefile +++ b/share/doc/papers/newvm/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= newvm SRCS= 0.t 1.t a.t diff --git a/share/doc/papers/relengr/Makefile b/share/doc/papers/relengr/Makefile index 902c3d1855e4..a2a2b355ef6e 100644 --- a/share/doc/papers/relengr/Makefile +++ b/share/doc/papers/relengr/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= releng SRCS= stubs 0.t 1.t 2.t 3.t diff --git a/share/doc/papers/sysperf/Makefile b/share/doc/papers/sysperf/Makefile index 8eaf0ec10083..d38189a350dc 100644 --- a/share/doc/papers/sysperf/Makefile +++ b/share/doc/papers/sysperf/Makefile @@ -1,4 +1,3 @@ - VOLUME= papers DOC= sysperf SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t appendix.ms diff --git a/share/doc/papers/timecounter/Makefile b/share/doc/papers/timecounter/Makefile index 02833db4692e..a2e7479bbd2a 100644 --- a/share/doc/papers/timecounter/Makefile +++ b/share/doc/papers/timecounter/Makefile @@ -1,4 +1,3 @@ - # You really want: # PRINTERDEVICE=ps # or you will not get the illustration. diff --git a/share/doc/pjdfstest/Makefile b/share/doc/pjdfstest/Makefile index a4463fa65676..d7bfd45ae36e 100644 --- a/share/doc/pjdfstest/Makefile +++ b/share/doc/pjdfstest/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/doc/pjdfstest FILES= README diff --git a/share/doc/psd/01.cacm/Makefile b/share/doc/psd/01.cacm/Makefile index b7770a4c1fb2..1e5d3c677dbf 100644 --- a/share/doc/psd/01.cacm/Makefile +++ b/share/doc/psd/01.cacm/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/01.cacm SRCS= stubs p.mac p1 p2 p3 p4 p5 p6 EXTRA= ref.bib diff --git a/share/doc/psd/02.implement/Makefile b/share/doc/psd/02.implement/Makefile index c6c881ab8f66..4aa334a84a9f 100644 --- a/share/doc/psd/02.implement/Makefile +++ b/share/doc/psd/02.implement/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/02.implement SRCS= stubs implement EXTRA= ref.bib diff --git a/share/doc/psd/03.iosys/Makefile b/share/doc/psd/03.iosys/Makefile index 69b12e8d31ff..297c2e63a5e2 100644 --- a/share/doc/psd/03.iosys/Makefile +++ b/share/doc/psd/03.iosys/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/03.iosys SRCS= iosys MACROS= -ms diff --git a/share/doc/psd/04.uprog/Makefile b/share/doc/psd/04.uprog/Makefile index 9039377ea8f2..aeb736aedb04 100644 --- a/share/doc/psd/04.uprog/Makefile +++ b/share/doc/psd/04.uprog/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/04.uprog SRCS= p.mac p0 p1 p2 p3 p4 p5 p6 p8 p9 MACROS= -ms diff --git a/share/doc/psd/05.sysman/Makefile b/share/doc/psd/05.sysman/Makefile index a9115a090289..eea45d304977 100644 --- a/share/doc/psd/05.sysman/Makefile +++ b/share/doc/psd/05.sysman/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/05.sysman SRCS= 0.t 1.0.t 1.1.t 1.2.t 1.3.t 1.4.t 1.5.t 1.6.t 1.7.t \ 2.0.t 2.1.t 2.2.t 2.3.t 2.4.t 2.5.t a.t diff --git a/share/doc/psd/06.Clang/Makefile b/share/doc/psd/06.Clang/Makefile index 4a1f10394d7e..966bed693ba1 100644 --- a/share/doc/psd/06.Clang/Makefile +++ b/share/doc/psd/06.Clang/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/06.Clang SRCS= Clang.ms MACROS= -ms diff --git a/share/doc/psd/12.make/Makefile b/share/doc/psd/12.make/Makefile index d72bde8b35f4..ea4ba64282fe 100644 --- a/share/doc/psd/12.make/Makefile +++ b/share/doc/psd/12.make/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/12.make SRCS= stubs tutorial.ms MACROS= -ms diff --git a/share/doc/psd/15.yacc/Makefile b/share/doc/psd/15.yacc/Makefile index 462b31785878..781cbb0c6ced 100644 --- a/share/doc/psd/15.yacc/Makefile +++ b/share/doc/psd/15.yacc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/15.yacc SRCS= stubs ss_ ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 \ ss10 ss11 ssa ssb ssc ssd diff --git a/share/doc/psd/16.lex/Makefile b/share/doc/psd/16.lex/Makefile index 23698f35b656..ff7f26e13747 100644 --- a/share/doc/psd/16.lex/Makefile +++ b/share/doc/psd/16.lex/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/16.lex SRCS= lex.ms MACROS= -ms diff --git a/share/doc/psd/17.m4/Makefile b/share/doc/psd/17.m4/Makefile index 1f248858c057..d47473ba0a3d 100644 --- a/share/doc/psd/17.m4/Makefile +++ b/share/doc/psd/17.m4/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/17.m4 SRCS= m4.ms MACROS= -ms diff --git a/share/doc/psd/18.gprof/Makefile b/share/doc/psd/18.gprof/Makefile index 05d283217bdc..066a930a2ea3 100644 --- a/share/doc/psd/18.gprof/Makefile +++ b/share/doc/psd/18.gprof/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/18.gprof SRCS= header.me abstract.me intro.me profiling.me gathering.me \ postp.me present.me refs.me diff --git a/share/doc/psd/20.ipctut/Makefile b/share/doc/psd/20.ipctut/Makefile index f26c47c6d6df..c752d8279c98 100644 --- a/share/doc/psd/20.ipctut/Makefile +++ b/share/doc/psd/20.ipctut/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/20.ipctut SRCS= tutor.me MACROS= -me diff --git a/share/doc/psd/21.ipc/Makefile b/share/doc/psd/21.ipc/Makefile index 4ba3bf5d44b7..baf34752ea10 100644 --- a/share/doc/psd/21.ipc/Makefile +++ b/share/doc/psd/21.ipc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/21.ipc SRCS= 0.t 1.t 2.t 3.t 4.t 5.t MACROS= -ms diff --git a/share/doc/psd/22.rpcgen/Makefile b/share/doc/psd/22.rpcgen/Makefile index 653a382ebbab..067b258a1a9f 100644 --- a/share/doc/psd/22.rpcgen/Makefile +++ b/share/doc/psd/22.rpcgen/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/22.rpcgen SRCS= stubs rpcgen.ms MACROS= -ms diff --git a/share/doc/psd/23.rpc/Makefile b/share/doc/psd/23.rpc/Makefile index f1a004c4a574..5a893108c02d 100644 --- a/share/doc/psd/23.rpc/Makefile +++ b/share/doc/psd/23.rpc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/23.rpc SRCS= stubs rpc.prog.ms MACROS= -ms diff --git a/share/doc/psd/24.xdr/Makefile b/share/doc/psd/24.xdr/Makefile index 49a9239dbef6..b4525b58c7b4 100644 --- a/share/doc/psd/24.xdr/Makefile +++ b/share/doc/psd/24.xdr/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/24.xdr SRCS= stubs xdr.nts.ms MACROS= -ms diff --git a/share/doc/psd/25.xdrrfc/Makefile b/share/doc/psd/25.xdrrfc/Makefile index e2deaa0edd49..5edb44e847c9 100644 --- a/share/doc/psd/25.xdrrfc/Makefile +++ b/share/doc/psd/25.xdrrfc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/25.xdrrfc SRCS= stubs xdr.rfc.ms MACROS= -ms diff --git a/share/doc/psd/26.rpcrfc/Makefile b/share/doc/psd/26.rpcrfc/Makefile index 6334e077f2f0..cdfbe9d4a4d5 100644 --- a/share/doc/psd/26.rpcrfc/Makefile +++ b/share/doc/psd/26.rpcrfc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/26.rpcrfc SRCS= stubs rpc.rfc.ms MACROS= -ms diff --git a/share/doc/psd/27.nfsrpc/Makefile b/share/doc/psd/27.nfsrpc/Makefile index aa06a588d2cb..c1c1720b74e5 100644 --- a/share/doc/psd/27.nfsrpc/Makefile +++ b/share/doc/psd/27.nfsrpc/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd/27.nfsrfc SRCS= stubs nfs.rfc.ms MACROS= -ms diff --git a/share/doc/psd/Makefile b/share/doc/psd/Makefile index 93fa759ed346..15ff1bb02221 100644 --- a/share/doc/psd/Makefile +++ b/share/doc/psd/Makefile @@ -1,4 +1,3 @@ - # The following modules do not build/install: # 10.gdb diff --git a/share/doc/psd/contents/Makefile b/share/doc/psd/contents/Makefile index 778650d1f4c2..b1ca61764f90 100644 --- a/share/doc/psd/contents/Makefile +++ b/share/doc/psd/contents/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd DOC= contents SRCS= contents.ms diff --git a/share/doc/psd/title/Makefile b/share/doc/psd/title/Makefile index 06f1a0607137..c13d72618522 100644 --- a/share/doc/psd/title/Makefile +++ b/share/doc/psd/title/Makefile @@ -1,4 +1,3 @@ - VOLUME= psd DOC= Title SRCS= Title diff --git a/share/doc/smm/01.setup/Makefile b/share/doc/smm/01.setup/Makefile index be4ea12d9431..60351b562bb3 100644 --- a/share/doc/smm/01.setup/Makefile +++ b/share/doc/smm/01.setup/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/01.setup SRCS= stubs 0.t 1.t 2.t 3.t 4.t 5.t 6.t MACROS= -ms diff --git a/share/doc/smm/02.config/Makefile b/share/doc/smm/02.config/Makefile index da2ec7424c86..7c8eb7f50779 100644 --- a/share/doc/smm/02.config/Makefile +++ b/share/doc/smm/02.config/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/02.config SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t a.t b.t c.t d.t e.t MACROS= -ms diff --git a/share/doc/smm/03.fsck/Makefile b/share/doc/smm/03.fsck/Makefile index a946ad81be7d..59cf82cd2cf4 100644 --- a/share/doc/smm/03.fsck/Makefile +++ b/share/doc/smm/03.fsck/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/03.fsck SRCS= 0.t 1.t 2.t 3.t 4.t MACROS= -ms diff --git a/share/doc/smm/04.quotas/Makefile b/share/doc/smm/04.quotas/Makefile index ade471b8d654..e9f7ac58710b 100644 --- a/share/doc/smm/04.quotas/Makefile +++ b/share/doc/smm/04.quotas/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/04.quotas SRCS= quotas.ms MACROS= -ms diff --git a/share/doc/smm/05.fastfs/Makefile b/share/doc/smm/05.fastfs/Makefile index 18b13a175c94..fa7cf0f830df 100644 --- a/share/doc/smm/05.fastfs/Makefile +++ b/share/doc/smm/05.fastfs/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/05.fastfs SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t MACROS= -ms diff --git a/share/doc/smm/06.nfs/Makefile b/share/doc/smm/06.nfs/Makefile index d5375598b989..a15d81d5b868 100644 --- a/share/doc/smm/06.nfs/Makefile +++ b/share/doc/smm/06.nfs/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/06.nfs SRCS= 0.t 1.t 2.t ref.t MACROS= -me diff --git a/share/doc/smm/07.lpd/Makefile b/share/doc/smm/07.lpd/Makefile index 1d2ffa321343..a92ce0bd3bbb 100644 --- a/share/doc/smm/07.lpd/Makefile +++ b/share/doc/smm/07.lpd/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/07.lpd SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t MACROS= -ms diff --git a/share/doc/smm/08.sendmailop/Makefile b/share/doc/smm/08.sendmailop/Makefile index 53eedc4058c7..ba0eb96de955 100644 --- a/share/doc/smm/08.sendmailop/Makefile +++ b/share/doc/smm/08.sendmailop/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/08.sendmailop SRCS= op.me MACROS= -me diff --git a/share/doc/smm/11.timedop/Makefile b/share/doc/smm/11.timedop/Makefile index 1f7ff654b501..a78b1204ca47 100644 --- a/share/doc/smm/11.timedop/Makefile +++ b/share/doc/smm/11.timedop/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/11.timedop SRCS= timed.ms MACROS= -ms diff --git a/share/doc/smm/12.timed/Makefile b/share/doc/smm/12.timed/Makefile index eee720bac9a2..e8498e8ccc90 100644 --- a/share/doc/smm/12.timed/Makefile +++ b/share/doc/smm/12.timed/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/12.timed SRCS= timed.ms EXTRA= date loop time unused diff --git a/share/doc/smm/18.net/Makefile b/share/doc/smm/18.net/Makefile index 05972254c5d9..beb0b147771a 100644 --- a/share/doc/smm/18.net/Makefile +++ b/share/doc/smm/18.net/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm/18.net SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t 8.t 9.t a.t b.t c.t d.t e.t f.t MACROS= -ms diff --git a/share/doc/smm/Makefile b/share/doc/smm/Makefile index 60c4f72ee923..14a57395090e 100644 --- a/share/doc/smm/Makefile +++ b/share/doc/smm/Makefile @@ -1,4 +1,3 @@ - .include # The following modules do not describe FreeBSD: diff --git a/share/doc/smm/contents/Makefile b/share/doc/smm/contents/Makefile index 800331f7eb13..c529682d6f33 100644 --- a/share/doc/smm/contents/Makefile +++ b/share/doc/smm/contents/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm DOC= contents SRCS= contents.ms diff --git a/share/doc/smm/title/Makefile b/share/doc/smm/title/Makefile index bd8c1e1e3431..294e37666112 100644 --- a/share/doc/smm/title/Makefile +++ b/share/doc/smm/title/Makefile @@ -1,4 +1,3 @@ - VOLUME= smm DOC= Title SRCS= Title diff --git a/share/doc/usd/04.csh/Makefile b/share/doc/usd/04.csh/Makefile index f9845389a6c4..95aafe8851fa 100644 --- a/share/doc/usd/04.csh/Makefile +++ b/share/doc/usd/04.csh/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/04.csh SRCS= tabs csh.1 csh.2 csh.3 csh.4 csh.a csh.g MACROS= -ms diff --git a/share/doc/usd/05.dc/Makefile b/share/doc/usd/05.dc/Makefile index 73ac03c794ec..4a850d9f21aa 100644 --- a/share/doc/usd/05.dc/Makefile +++ b/share/doc/usd/05.dc/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/05.dc SRCS= dc MACROS= -ms diff --git a/share/doc/usd/06.bc/Makefile b/share/doc/usd/06.bc/Makefile index ddb52f6f701d..15e6aaca9539 100644 --- a/share/doc/usd/06.bc/Makefile +++ b/share/doc/usd/06.bc/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/06.bc SRCS= bc MACROS= -ms diff --git a/share/doc/usd/07.mail/Makefile b/share/doc/usd/07.mail/Makefile index 5009150bc849..a8592b1e77e6 100644 --- a/share/doc/usd/07.mail/Makefile +++ b/share/doc/usd/07.mail/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/07.mail SRCS= mail0.nr mail1.nr mail2.nr mail3.nr mail4.nr mail5.nr mail6.nr \ mail7.nr mail8.nr mail9.nr maila.nr diff --git a/share/doc/usd/10.exref/Makefile b/share/doc/usd/10.exref/Makefile index f41e46a8b60a..b5732c655131 100644 --- a/share/doc/usd/10.exref/Makefile +++ b/share/doc/usd/10.exref/Makefile @@ -1,4 +1,3 @@ - SUBDIR= exref summary .include diff --git a/share/doc/usd/10.exref/Makefile.inc b/share/doc/usd/10.exref/Makefile.inc index 5a64f267bb45..c5dd0a9aac67 100644 --- a/share/doc/usd/10.exref/Makefile.inc +++ b/share/doc/usd/10.exref/Makefile.inc @@ -1,3 +1,2 @@ - VOLUME= usd/10.exref MACROS= -ms diff --git a/share/doc/usd/10.exref/exref/Makefile b/share/doc/usd/10.exref/exref/Makefile index 8e5d815dbe3e..23d10e553164 100644 --- a/share/doc/usd/10.exref/exref/Makefile +++ b/share/doc/usd/10.exref/exref/Makefile @@ -1,4 +1,3 @@ - SRCS= ex.rm .include diff --git a/share/doc/usd/10.exref/summary/Makefile b/share/doc/usd/10.exref/summary/Makefile index 1d05d7c0f8c8..fe2d338a961e 100644 --- a/share/doc/usd/10.exref/summary/Makefile +++ b/share/doc/usd/10.exref/summary/Makefile @@ -1,4 +1,3 @@ - DOC= summary SRCS= ex.summary USE_TBL= diff --git a/share/doc/usd/11.vitut/Makefile b/share/doc/usd/11.vitut/Makefile index 9a18829d24c2..e6aa1e72e546 100644 --- a/share/doc/usd/11.vitut/Makefile +++ b/share/doc/usd/11.vitut/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/11.edit SRCS= edittut.ms MACROS= -ms diff --git a/share/doc/usd/12.vi/Makefile b/share/doc/usd/12.vi/Makefile index ba422c8442e9..9896d75fb419 100644 --- a/share/doc/usd/12.vi/Makefile +++ b/share/doc/usd/12.vi/Makefile @@ -1,4 +1,3 @@ - SUBDIR= vi viapwh summary .include diff --git a/share/doc/usd/12.vi/Makefile.inc b/share/doc/usd/12.vi/Makefile.inc index 1c1b09d2add7..0fa6960311d4 100644 --- a/share/doc/usd/12.vi/Makefile.inc +++ b/share/doc/usd/12.vi/Makefile.inc @@ -1,3 +1,2 @@ - VOLUME= usd/12.vi MACROS= -ms diff --git a/share/doc/usd/12.vi/summary/Makefile b/share/doc/usd/12.vi/summary/Makefile index e2a12e50fed6..16482e203b72 100644 --- a/share/doc/usd/12.vi/summary/Makefile +++ b/share/doc/usd/12.vi/summary/Makefile @@ -1,4 +1,3 @@ - DOC= summary SRCS= vi.summary USE_TBL= diff --git a/share/doc/usd/12.vi/vi/Makefile b/share/doc/usd/12.vi/vi/Makefile index 72be559f2100..b7281ebcdc86 100644 --- a/share/doc/usd/12.vi/vi/Makefile +++ b/share/doc/usd/12.vi/vi/Makefile @@ -1,4 +1,3 @@ - SRCS= vi.in vi.chars USE_TBL= diff --git a/share/doc/usd/12.vi/viapwh/Makefile b/share/doc/usd/12.vi/viapwh/Makefile index 3746784bbdb5..a8de9a151e0a 100644 --- a/share/doc/usd/12.vi/viapwh/Makefile +++ b/share/doc/usd/12.vi/viapwh/Makefile @@ -1,4 +1,3 @@ - DOC= viapwh SRCS= vi.apwh.ms diff --git a/share/doc/usd/13.viref/Makefile b/share/doc/usd/13.viref/Makefile index 5bea230c3ce0..c7a03af2c7aa 100644 --- a/share/doc/usd/13.viref/Makefile +++ b/share/doc/usd/13.viref/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/13.viref EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff MACROS= -me diff --git a/share/doc/usd/18.msdiffs/Makefile b/share/doc/usd/18.msdiffs/Makefile index a50b225f66b7..1945542dc282 100644 --- a/share/doc/usd/18.msdiffs/Makefile +++ b/share/doc/usd/18.msdiffs/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/18.msdiffs SRCS= ms.diffs MACROS= -ms diff --git a/share/doc/usd/19.memacros/Makefile b/share/doc/usd/19.memacros/Makefile index e3a00289cd6c..547eb25bd817 100644 --- a/share/doc/usd/19.memacros/Makefile +++ b/share/doc/usd/19.memacros/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/19.memacros SRCS= meintro.me-sed MACROS= -me diff --git a/share/doc/usd/20.meref/Makefile b/share/doc/usd/20.meref/Makefile index 0481c80e38f7..a0d7fe6cb2e4 100644 --- a/share/doc/usd/20.meref/Makefile +++ b/share/doc/usd/20.meref/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/20.meref SRCS= meref.me-sed MACROS= -me diff --git a/share/doc/usd/21.troff/Makefile b/share/doc/usd/21.troff/Makefile index 5360967a7004..d2b140dc44bc 100644 --- a/share/doc/usd/21.troff/Makefile +++ b/share/doc/usd/21.troff/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd/21.troff SRCS= m.mac m0 m0a m1 m2 m3 m4 m5 table1 table2 USE_TBL= diff --git a/share/doc/usd/Makefile b/share/doc/usd/Makefile index 7f298c60a655..16d98b85506f 100644 --- a/share/doc/usd/Makefile +++ b/share/doc/usd/Makefile @@ -1,4 +1,3 @@ - # The following modules are not provided: # 14.jove diff --git a/share/doc/usd/contents/Makefile b/share/doc/usd/contents/Makefile index d2052ccce944..860f1199707d 100644 --- a/share/doc/usd/contents/Makefile +++ b/share/doc/usd/contents/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd DOC= contents SRCS= contents.ms diff --git a/share/doc/usd/title/Makefile b/share/doc/usd/title/Makefile index 8d1adca5b9f3..3a0b41aee339 100644 --- a/share/doc/usd/title/Makefile +++ b/share/doc/usd/title/Makefile @@ -1,4 +1,3 @@ - VOLUME= usd DOC= Title SRCS= Title diff --git a/share/examples/FreeBSD_version/Makefile b/share/examples/FreeBSD_version/Makefile index 13d60978e868..9c74916dd6b4 100644 --- a/share/examples/FreeBSD_version/Makefile +++ b/share/examples/FreeBSD_version/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/${PROG} PROG= FreeBSD_version diff --git a/share/examples/find_interface/Makefile b/share/examples/find_interface/Makefile index 91ce0eb88072..23d02a2002de 100644 --- a/share/examples/find_interface/Makefile +++ b/share/examples/find_interface/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/${PROG} PROG= find_interface diff --git a/share/examples/hwpmc/Makefile b/share/examples/hwpmc/Makefile index fcbb6160bb00..c7d1c54b1d19 100644 --- a/share/examples/hwpmc/Makefile +++ b/share/examples/hwpmc/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/hwpmc PROG= overhead diff --git a/share/examples/ipfilter/Makefile b/share/examples/ipfilter/Makefile index b1b8b57449f1..ec4d4be3dd2f 100644 --- a/share/examples/ipfilter/Makefile +++ b/share/examples/ipfilter/Makefile @@ -1,4 +1,3 @@ - PACKAGE=ipf FILES= README diff --git a/share/examples/kld/cdev/Makefile b/share/examples/kld/cdev/Makefile index 706cb2dcbae9..8c7662243b3c 100644 --- a/share/examples/kld/cdev/Makefile +++ b/share/examples/kld/cdev/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/cdev SUBDIR= module test diff --git a/share/examples/kld/dyn_sysctl/Makefile b/share/examples/kld/dyn_sysctl/Makefile index 0dffd9c8e7b0..e47eb3f339b3 100644 --- a/share/examples/kld/dyn_sysctl/Makefile +++ b/share/examples/kld/dyn_sysctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/${KMOD} SRCS = dyn_sysctl.c diff --git a/share/examples/kld/firmware/Makefile b/share/examples/kld/firmware/Makefile index b4b144a7669d..5e31deaa17eb 100644 --- a/share/examples/kld/firmware/Makefile +++ b/share/examples/kld/firmware/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/firmware SUBDIR= fwimage fwconsumer diff --git a/share/examples/kld/firmware/fwconsumer/Makefile b/share/examples/kld/firmware/fwconsumer/Makefile index b29684999124..ce4f77d41d89 100644 --- a/share/examples/kld/firmware/fwconsumer/Makefile +++ b/share/examples/kld/firmware/fwconsumer/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/fwconsumer KMOD= fw_consumer diff --git a/share/examples/kld/firmware/fwimage/Makefile b/share/examples/kld/firmware/fwimage/Makefile index 1e0e3ff3ca93..b57d2bf326b4 100644 --- a/share/examples/kld/firmware/fwimage/Makefile +++ b/share/examples/kld/firmware/fwimage/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/fwimage KMOD= beastie diff --git a/share/examples/kld/khelp/Makefile b/share/examples/kld/khelp/Makefile index 7cbaa79ceda6..dfdf602a4689 100644 --- a/share/examples/kld/khelp/Makefile +++ b/share/examples/kld/khelp/Makefile @@ -1,4 +1,3 @@ - .include # Change if the src tree you are compiling for is not in /usr/src diff --git a/share/examples/kld/random_adaptor/Makefile b/share/examples/kld/random_adaptor/Makefile index c391da795e89..c9011bb2dba3 100644 --- a/share/examples/kld/random_adaptor/Makefile +++ b/share/examples/kld/random_adaptor/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/${KMOD} KMOD= random_adaptor_example diff --git a/share/examples/kld/syscall/Makefile b/share/examples/kld/syscall/Makefile index efae887771e2..4270f388bd1b 100644 --- a/share/examples/kld/syscall/Makefile +++ b/share/examples/kld/syscall/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/kld/syscall SUBDIR= module test diff --git a/share/examples/libusb20/Makefile b/share/examples/libusb20/Makefile index 262f1ac3825a..9c0524c00b2c 100644 --- a/share/examples/libusb20/Makefile +++ b/share/examples/libusb20/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/libusb20 TARGETS= bulk control diff --git a/share/examples/libvgl/Makefile b/share/examples/libvgl/Makefile index ebfa7eaa47ea..8bb99eb795b9 100644 --- a/share/examples/libvgl/Makefile +++ b/share/examples/libvgl/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/libvgl PROG= demo diff --git a/share/examples/perfmon/Makefile b/share/examples/perfmon/Makefile index a687980e7808..96712dee88e3 100644 --- a/share/examples/perfmon/Makefile +++ b/share/examples/perfmon/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/${PROG} PROG= perfmon diff --git a/share/examples/pf/Makefile b/share/examples/pf/Makefile index 4ea4f9c79bb8..3107fa346c65 100644 --- a/share/examples/pf/Makefile +++ b/share/examples/pf/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILES= faq-example1 faq-example2 faq-example3 \ ackpri queue1 queue2 queue3 queue4 \ diff --git a/share/examples/scsi_target/Makefile b/share/examples/scsi_target/Makefile index 1e2c076591bf..42dd2ca58513 100644 --- a/share/examples/scsi_target/Makefile +++ b/share/examples/scsi_target/Makefile @@ -1,4 +1,3 @@ - PACKAGE=examples FILESDIR=${SHAREDIR}/examples/${PROG} PROG= scsi_target diff --git a/share/examples/smbfs/Makefile b/share/examples/smbfs/Makefile index e38305148005..cd235434db79 100644 --- a/share/examples/smbfs/Makefile +++ b/share/examples/smbfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=utilities FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc diff --git a/share/examples/smbfs/print/Makefile b/share/examples/smbfs/print/Makefile index 0a0fd500724f..a8a6e12e7013 100644 --- a/share/examples/smbfs/print/Makefile +++ b/share/examples/smbfs/print/Makefile @@ -1,4 +1,3 @@ - PACKAGE=utilities FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj diff --git a/share/examples/tests/Makefile b/share/examples/tests/Makefile index 8f257929d60f..6aea074e2544 100644 --- a/share/examples/tests/Makefile +++ b/share/examples/tests/Makefile @@ -1,4 +1,3 @@ - SUBDIR= tests .PATH: ${SRCTOP}/tests diff --git a/share/examples/tests/tests/Makefile b/share/examples/tests/tests/Makefile index ecaa1b5b9037..4530e341aa37 100644 --- a/share/examples/tests/tests/Makefile +++ b/share/examples/tests/tests/Makefile @@ -1,4 +1,3 @@ - .include # Directory into which the Kyuafile provided by this directory will be diff --git a/share/examples/tests/tests/atf/Makefile b/share/examples/tests/tests/atf/Makefile index 7614767b6e0a..72c2e546d3f9 100644 --- a/share/examples/tests/tests/atf/Makefile +++ b/share/examples/tests/tests/atf/Makefile @@ -1,4 +1,3 @@ - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support diff --git a/share/examples/tests/tests/plain/Makefile b/share/examples/tests/tests/plain/Makefile index 462324309f6a..40f4e7041b1a 100644 --- a/share/examples/tests/tests/plain/Makefile +++ b/share/examples/tests/tests/plain/Makefile @@ -1,4 +1,3 @@ - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support diff --git a/share/examples/tests/tests/tap/Makefile b/share/examples/tests/tests/tap/Makefile index 86d3f6805045..af906b309358 100644 --- a/share/examples/tests/tests/tap/Makefile +++ b/share/examples/tests/tests/tap/Makefile @@ -1,4 +1,3 @@ - # The release package to use for the tests contained within the directory # # This applies to components which rely on ^/projects/release-pkg support diff --git a/share/i18n/csmapper/Makefile.inc b/share/i18n/csmapper/Makefile.inc index 798a0ab4f505..9bbbbed5020b 100644 --- a/share/i18n/csmapper/Makefile.inc +++ b/share/i18n/csmapper/Makefile.inc @@ -1,4 +1,3 @@ - .include CSMAPPERDIR?= /usr/share/i18n/csmapper diff --git a/share/i18n/esdb/Makefile.inc b/share/i18n/esdb/Makefile.inc index 8db77ae0711b..e072ef592aa0 100644 --- a/share/i18n/esdb/Makefile.inc +++ b/share/i18n/esdb/Makefile.inc @@ -1,4 +1,3 @@ - .include .PATH: ${.CURDIR} diff --git a/share/keys/Makefile b/share/keys/Makefile index b51ccc176268..f4bab152d8cb 100644 --- a/share/keys/Makefile +++ b/share/keys/Makefile @@ -1,4 +1,3 @@ - SUBDIR= pkg .include diff --git a/share/keys/pkg/Makefile b/share/keys/pkg/Makefile index 2fd000191078..665bcf389da1 100644 --- a/share/keys/pkg/Makefile +++ b/share/keys/pkg/Makefile @@ -1,4 +1,3 @@ - SUBDIR= trusted .include diff --git a/share/keys/pkg/trusted/Makefile b/share/keys/pkg/trusted/Makefile index 15044f1c9a4d..cb550d1d71ff 100644 --- a/share/keys/pkg/trusted/Makefile +++ b/share/keys/pkg/trusted/Makefile @@ -1,4 +1,3 @@ - PACKAGE= pkg-bootstrap FILES= pkg.freebsd.org.2013102301 diff --git a/share/man/Makefile b/share/man/Makefile index cf91101a27f0..51e560e199a5 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -1,4 +1,3 @@ - .include # XXX MISSING: man3f diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile index 04f05920c9a4..e5ab6597ead2 100644 --- a/share/man/man1/Makefile +++ b/share/man/man1/Makefile @@ -1,4 +1,3 @@ - .include MAN= builtin.1 intro.1 diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 5c8dced71743..1d8586e48f9f 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -1,4 +1,3 @@ - .include MAN= arb.3 \ diff --git a/share/man/man3lua/Makefile b/share/man/man3lua/Makefile index 35555988b6a2..6f95a27ac303 100644 --- a/share/man/man3lua/Makefile +++ b/share/man/man3lua/Makefile @@ -1,4 +1,3 @@ - .include MAN= intro.3lua diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 69424a4be271..36d945d64a60 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,3 @@ - .include MAN= aac.4 \ diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index a0161f8f4900..aca11eeb583f 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../man4.arm # Some manpages are common to arm and aarch64 MAN= \ diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index e2a41559410b..b5d49d0dffb9 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -1,4 +1,3 @@ - MAN= \ aw_gpio.4 \ aw_mmc.4 \ diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index f84f0797a62c..ad9b3a01828c 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -1,4 +1,3 @@ - MAN= apm.4 \ CPU_ELAN.4 \ glxiic.4 \ diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index dbc133cc985b..1762bf17b50d 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -1,4 +1,3 @@ - MAN= adb.4 \ akbd.4 \ abtn.4 \ diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 465cc85a3feb..553bedddeea1 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -1,4 +1,3 @@ - .include #MISSING: dump.5 plot.5 diff --git a/share/man/man6/Makefile b/share/man/man6/Makefile index b97fae54a03d..9c94781169f8 100644 --- a/share/man/man6/Makefile +++ b/share/man/man6/Makefile @@ -1,4 +1,3 @@ - MAN= intro.6 .include diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index b83399b2917d..67cca438a46d 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -1,4 +1,3 @@ - .include #MISSING: eqnchar.7 ms.7 term.7 diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index 1e2c22e97d8e..bd6bdfe4ba05 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -1,4 +1,3 @@ - .include MAN= \ diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 35eec7b2c6ce..9880b7b2f5e4 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,3 @@ - .include MAN= accept_filter.9 \ diff --git a/share/misc/Makefile b/share/misc/Makefile index bd560db25c7d..d92a359ec367 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${.CURDIR}/../../sys/dev/usb diff --git a/share/mk/Makefile b/share/mk/Makefile index 096dc2ede002..85b39a9c72ea 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,4 +1,3 @@ - # Only parse this if executing make in this directory, not in other places # in src that lack a Makefile, such as sys/dev/*. Otherwise the MAKESYSPATH # will read this Makefile since it auto includes it into -I. diff --git a/share/numericdef/Makefile b/share/numericdef/Makefile index 4835486036ab..95469fd68ddf 100644 --- a/share/numericdef/Makefile +++ b/share/numericdef/Makefile @@ -1,4 +1,3 @@ - PACKAGE= locales LOCALEDIR= ${SHAREDIR}/locale FILESNAME= LC_NUMERIC diff --git a/share/security/Makefile b/share/security/Makefile index 31de6284f913..44d116aa4724 100644 --- a/share/security/Makefile +++ b/share/security/Makefile @@ -1,4 +1,3 @@ - FILES= lomac-policy.contexts FILESDIR= ${BINDIR}/security diff --git a/share/skel/Makefile b/share/skel/Makefile index fa0c97066dda..0cd718b6ad2e 100644 --- a/share/skel/Makefile +++ b/share/skel/Makefile @@ -1,4 +1,3 @@ - FILES= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \ dot.shrc dot.mail_aliases FILESDIR= ${SHAREDIR}/skel diff --git a/share/snmp/Makefile b/share/snmp/Makefile index 6e1e93019cad..95efeec23a76 100644 --- a/share/snmp/Makefile +++ b/share/snmp/Makefile @@ -1,4 +1,3 @@ - SUBDIR= mibs .include diff --git a/share/snmp/mibs/Makefile b/share/snmp/mibs/Makefile index 023cbf26e01c..29be45a8dafd 100644 --- a/share/snmp/mibs/Makefile +++ b/share/snmp/mibs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= bsnmp FILES= FREEBSD-MIB.txt diff --git a/share/syscons/Makefile b/share/syscons/Makefile index 2bff5fcb6398..aa1920937826 100644 --- a/share/syscons/Makefile +++ b/share/syscons/Makefile @@ -1,4 +1,3 @@ - SUBDIR= fonts keymaps scrnmaps SUBDIR_PARALLEL= diff --git a/share/syscons/Makefile.inc b/share/syscons/Makefile.inc index 0b22547cec2f..07cde30e3d52 100644 --- a/share/syscons/Makefile.inc +++ b/share/syscons/Makefile.inc @@ -1,2 +1 @@ - FILESPACKAGE= syscons diff --git a/share/syscons/fonts/Makefile b/share/syscons/fonts/Makefile index 8dfd012c9103..e1b6614b5684 100644 --- a/share/syscons/fonts/Makefile +++ b/share/syscons/fonts/Makefile @@ -1,4 +1,3 @@ - PACKAGE= syscons-data FILES= armscii8-8x8.fnt armscii8-8x14.fnt armscii8-8x16.fnt \ diff --git a/share/syscons/keymaps/Makefile b/share/syscons/keymaps/Makefile index a8aaa08c47d3..139834abcd2b 100644 --- a/share/syscons/keymaps/Makefile +++ b/share/syscons/keymaps/Makefile @@ -1,4 +1,3 @@ - PACKAGE= syscons-data FILES= INDEX.keymaps \ diff --git a/share/syscons/scrnmaps/Makefile b/share/syscons/scrnmaps/Makefile index b7e94fd16293..8da31ed32be4 100644 --- a/share/syscons/scrnmaps/Makefile +++ b/share/syscons/scrnmaps/Makefile @@ -1,4 +1,3 @@ - PACKAGE= syscons-data SCRMAPS = armscii8-2haik8.scm \ diff --git a/share/tabset/Makefile b/share/tabset/Makefile index a23390052126..fe7519084716 100644 --- a/share/tabset/Makefile +++ b/share/tabset/Makefile @@ -1,4 +1,3 @@ - FILES= 3101 9837 aa aed512 beehive diablo dtc382 hp700-wy ibm3101 std \ stdcrt tandem653 teleray vt100 vt100-w wyse-adds xerox1720 xerox1730 \ xerox1730-lm zenith29 diff --git a/share/termcap/Makefile b/share/termcap/Makefile index 3bddf790b801..34ad41fd520a 100644 --- a/share/termcap/Makefile +++ b/share/termcap/Makefile @@ -1,4 +1,3 @@ - # reorder gives an editor command for most common terminals # (in reverse order from n'th to 1'st most commonly used) # to move them to the front of termcap diff --git a/share/tests/Makefile b/share/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/share/tests/Makefile +++ b/share/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/share/timedef/Makefile b/share/timedef/Makefile index f8cb183c0323..d09a7d33db34 100644 --- a/share/timedef/Makefile +++ b/share/timedef/Makefile @@ -1,4 +1,3 @@ - PACKAGE= locales LOCALEDIR= ${SHAREDIR}/locale FILESNAME= LC_TIME diff --git a/share/vt/Makefile b/share/vt/Makefile index 91465c657766..51c237e7ac8f 100644 --- a/share/vt/Makefile +++ b/share/vt/Makefile @@ -1,4 +1,3 @@ - SUBDIR= fonts keymaps .include diff --git a/share/vt/fonts/Makefile b/share/vt/fonts/Makefile index a5a1ef981a97..01f56a235e5e 100644 --- a/share/vt/fonts/Makefile +++ b/share/vt/fonts/Makefile @@ -1,4 +1,3 @@ - PACKAGE= vt-data .PATH: ${SRCTOP}/contrib/spleen diff --git a/share/vt/keymaps/Makefile b/share/vt/keymaps/Makefile index bcfd6abaa4e1..52b7c616c8b7 100644 --- a/share/vt/keymaps/Makefile +++ b/share/vt/keymaps/Makefile @@ -1,4 +1,3 @@ - PACKAGE= vt-data FILES= INDEX.keymaps \ diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index d4b37ce991aa..824dda827e44 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -1,4 +1,3 @@ - # # HOW TO UPDATE THE ZONEINFO DATA # diff --git a/share/zoneinfo/tests/Makefile b/share/zoneinfo/tests/Makefile index 97d47d3a150f..7e8c05a3bc76 100644 --- a/share/zoneinfo/tests/Makefile +++ b/share/zoneinfo/tests/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/tzdata diff --git a/stand/Makefile b/stand/Makefile index 6d0d7a09672a..225113384b13 100644 --- a/stand/Makefile +++ b/stand/Makefile @@ -1,4 +1,3 @@ - .include # For amd64 we have to build 32 and 64 bit versions of things. For diff --git a/stand/Makefile.amd64 b/stand/Makefile.amd64 index 82b3f0def223..48e5136ec33f 100644 --- a/stand/Makefile.amd64 +++ b/stand/Makefile.amd64 @@ -1,4 +1,3 @@ - S.yes+= userboot S.yes+= i386 diff --git a/stand/Makefile.inc b/stand/Makefile.inc index 391de6abc6d4..5d55c4e4a16f 100644 --- a/stand/Makefile.inc +++ b/stand/Makefile.inc @@ -1,4 +1,3 @@ - SUBDIR_PARALLEL= yes # Firmware may not be able to handle branch protection failures diff --git a/stand/arm64/Makefile b/stand/arm64/Makefile index c378e5b10dfe..eb7a92885d77 100644 --- a/stand/arm64/Makefile +++ b/stand/arm64/Makefile @@ -1,4 +1,3 @@ - NO_OBJ=t .include diff --git a/stand/defaults/Makefile b/stand/defaults/Makefile index ae382b9af694..f3ee630a9c13 100644 --- a/stand/defaults/Makefile +++ b/stand/defaults/Makefile @@ -1,4 +1,3 @@ - .include FILES+= loader.conf diff --git a/stand/efi/Makefile b/stand/efi/Makefile index 5177ea688ed1..c6ef92b26838 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -1,4 +1,3 @@ - NO_OBJ=t .include diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc index a27eb5d97484..3a13ca24f369 100644 --- a/stand/efi/Makefile.inc +++ b/stand/efi/Makefile.inc @@ -1,4 +1,3 @@ - # Options used when building app-specific efi components # See conf/kern.mk for the correct set of these CFLAGS+= -Wformat diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 607c30f10cf7..8641ecf457ab 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -1,4 +1,3 @@ - .include BOOT1?= boot1 diff --git a/stand/efi/fdt/Makefile b/stand/efi/fdt/Makefile index 518d7a75dc68..bbb380f52184 100644 --- a/stand/efi/fdt/Makefile +++ b/stand/efi/fdt/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${LDRSRC} diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile index 7bc0184e2062..8ce57280d615 100644 --- a/stand/efi/libefi/Makefile +++ b/stand/efi/libefi/Makefile @@ -1,4 +1,3 @@ - .include LIB= efi diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 946ea0937de0..057cb15fb7ff 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -1,4 +1,3 @@ - LOADER_NET_SUPPORT?= yes LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes diff --git a/stand/efi/loader/arch/amd64/Makefile.inc b/stand/efi/loader/arch/amd64/Makefile.inc index 00658b3b8636..25ff8fa9ce59 100644 --- a/stand/efi/loader/arch/amd64/Makefile.inc +++ b/stand/efi/loader/arch/amd64/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= amd64_tramp.S \ start.S \ elf64_freebsd.c \ diff --git a/stand/efi/loader/arch/arm/Makefile.inc b/stand/efi/loader/arch/arm/Makefile.inc index 5761c8062117..3d07122530e7 100644 --- a/stand/efi/loader/arch/arm/Makefile.inc +++ b/stand/efi/loader/arch/arm/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= exec.c \ start.S diff --git a/stand/efi/loader/arch/arm64/Makefile.inc b/stand/efi/loader/arch/arm64/Makefile.inc index d19a23af0e9e..9474767cf2f2 100644 --- a/stand/efi/loader/arch/arm64/Makefile.inc +++ b/stand/efi/loader/arch/arm64/Makefile.inc @@ -1,4 +1,3 @@ - HAVE_FDT=yes SRCS+= exec.c \ diff --git a/stand/efi/loader/arch/riscv/Makefile.inc b/stand/efi/loader/arch/riscv/Makefile.inc index c25f63c0b3b7..e7f7fd8b7f4f 100644 --- a/stand/efi/loader/arch/riscv/Makefile.inc +++ b/stand/efi/loader/arch/riscv/Makefile.inc @@ -1,4 +1,3 @@ - HAVE_FDT=yes SRCS+= exec.c \ diff --git a/stand/efi/loader_4th/Makefile b/stand/efi/loader_4th/Makefile index 3ca078668437..2361952ccc5d 100644 --- a/stand/efi/loader_4th/Makefile +++ b/stand/efi/loader_4th/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=4th INSTALL_LOADER_HELP_FILE=no diff --git a/stand/efi/loader_lua/Makefile b/stand/efi/loader_lua/Makefile index 6866e742290a..628aab34c0b8 100644 --- a/stand/efi/loader_lua/Makefile +++ b/stand/efi/loader_lua/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=lua INSTALL_LOADER_HELP_FILE=no diff --git a/stand/efi/loader_simp/Makefile b/stand/efi/loader_simp/Makefile index ac873c1a3033..2e10a6595ed2 100644 --- a/stand/efi/loader_simp/Makefile +++ b/stand/efi/loader_simp/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=simp .include "../loader/Makefile" diff --git a/stand/fdt/Makefile b/stand/fdt/Makefile index b0090be108aa..f585d8a2098a 100644 --- a/stand/fdt/Makefile +++ b/stand/fdt/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SYSDIR}/contrib/libfdt/ diff --git a/stand/ficl32/Makefile b/stand/ficl32/Makefile index c231b51cac8a..4851e0b8f97f 100644 --- a/stand/ficl32/Makefile +++ b/stand/ficl32/Makefile @@ -1,4 +1,3 @@ - DO32=1 .include "${.CURDIR}/../ficl/Makefile" diff --git a/stand/fonts/Makefile b/stand/fonts/Makefile index 88e7d0f91046..3ac1b0bac951 100644 --- a/stand/fonts/Makefile +++ b/stand/fonts/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/terminus diff --git a/stand/forth/Makefile b/stand/forth/Makefile index 0fcee14fcdf5..d362863a0970 100644 --- a/stand/forth/Makefile +++ b/stand/forth/Makefile @@ -1,4 +1,3 @@ - .include MAN+= beastie.4th.8 \ diff --git a/stand/i386/Makefile b/stand/i386/Makefile index e323a2cef9cd..a08e956ef4f9 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -1,4 +1,3 @@ - NO_OBJ=t .include diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index bfd566dfa45c..e9c6b2281e37 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -1,4 +1,3 @@ - PROG?= boot0 STRIP= BINMODE=${NOBINMODE} diff --git a/stand/i386/boot0sio/Makefile b/stand/i386/boot0sio/Makefile index 1725a11ec328..3c883a7d93d1 100644 --- a/stand/i386/boot0sio/Makefile +++ b/stand/i386/boot0sio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../boot0 PROGNAME= boot0sio diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 6d6a05cf228f..313bb8030f3e 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -1,4 +1,3 @@ - .include FILES= boot boot1 boot2 diff --git a/stand/i386/btx/Makefile b/stand/i386/btx/Makefile index 8ab9e72c5488..c055927ae59f 100644 --- a/stand/i386/btx/Makefile +++ b/stand/i386/btx/Makefile @@ -1,4 +1,3 @@ - SUBDIR= btx btxldr lib .include diff --git a/stand/i386/btx/Makefile.inc b/stand/i386/btx/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/stand/i386/btx/Makefile.inc +++ b/stand/i386/btx/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/stand/i386/btx/btx/Makefile b/stand/i386/btx/btx/Makefile index bfb9edcd1d31..6812115213d9 100644 --- a/stand/i386/btx/btx/Makefile +++ b/stand/i386/btx/btx/Makefile @@ -1,4 +1,3 @@ - .include PROG= btx diff --git a/stand/i386/btx/btxldr/Makefile b/stand/i386/btx/btxldr/Makefile index 83eaf7d2beb7..ef3a04bf12f1 100644 --- a/stand/i386/btx/btxldr/Makefile +++ b/stand/i386/btx/btxldr/Makefile @@ -1,4 +1,3 @@ - .include PROG= btxldr diff --git a/stand/i386/btx/lib/Makefile b/stand/i386/btx/lib/Makefile index 11d8e05b7f66..ae7ebc331189 100644 --- a/stand/i386/btx/lib/Makefile +++ b/stand/i386/btx/lib/Makefile @@ -1,4 +1,3 @@ - .include PROG= crt0.o diff --git a/stand/i386/cdboot/Makefile b/stand/i386/cdboot/Makefile index 7923e258fb66..c66ff68105c1 100644 --- a/stand/i386/cdboot/Makefile +++ b/stand/i386/cdboot/Makefile @@ -1,4 +1,3 @@ - .include PROG= cdboot diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile index cce5e2e88d5d..b91875d242f5 100644 --- a/stand/i386/gptboot/Makefile +++ b/stand/i386/gptboot/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/common ${SASRC} diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index 03f891912886..0d9fa8b043df 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \ diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 12be31b52bc4..7973f8029aa0 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \ diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index 8608c369a118..038557c6a826 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -1,4 +1,3 @@ - .include LIB= i386 diff --git a/stand/i386/loader_4th/Makefile b/stand/i386/loader_4th/Makefile index 3ca078668437..2361952ccc5d 100644 --- a/stand/i386/loader_4th/Makefile +++ b/stand/i386/loader_4th/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=4th INSTALL_LOADER_HELP_FILE=no diff --git a/stand/i386/loader_lua/Makefile b/stand/i386/loader_lua/Makefile index 6866e742290a..628aab34c0b8 100644 --- a/stand/i386/loader_lua/Makefile +++ b/stand/i386/loader_lua/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=lua INSTALL_LOADER_HELP_FILE=no diff --git a/stand/i386/loader_simp/Makefile b/stand/i386/loader_simp/Makefile index ac873c1a3033..2e10a6595ed2 100644 --- a/stand/i386/loader_simp/Makefile +++ b/stand/i386/loader_simp/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=simp .include "../loader/Makefile" diff --git a/stand/i386/mbr/Makefile b/stand/i386/mbr/Makefile index ce38590bf859..f9dd023ea9b9 100644 --- a/stand/i386/mbr/Makefile +++ b/stand/i386/mbr/Makefile @@ -1,4 +1,3 @@ - PROG= mbr STRIP= BINMODE=${NOBINMODE} diff --git a/stand/i386/pmbr/Makefile b/stand/i386/pmbr/Makefile index 30a5e37b0e44..80b79f7b8c88 100644 --- a/stand/i386/pmbr/Makefile +++ b/stand/i386/pmbr/Makefile @@ -1,4 +1,3 @@ - PROG= pmbr STRIP= BINMODE=${NOBINMODE} diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile index b2ecedd45940..a303aff413a8 100644 --- a/stand/i386/pxeldr/Makefile +++ b/stand/i386/pxeldr/Makefile @@ -1,4 +1,3 @@ - .include PROG= ${LDR} diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index dcfac140231a..b619b84c368e 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/common ${BOOTSRC}/common diff --git a/stand/images/Makefile b/stand/images/Makefile index 44d2faf36e5f..d1e7d124dfa6 100644 --- a/stand/images/Makefile +++ b/stand/images/Makefile @@ -1,4 +1,3 @@ - .include FILES+= freebsd-brand-rev.png freebsd-brand.png freebsd-logo-rev.png diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index c6cb47fbbba2..d354e1bc7e60 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -1,4 +1,3 @@ - LOADER_DISK_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_MSDOS_SUPPORT?= no diff --git a/stand/liblua/Makefile b/stand/liblua/Makefile index b0d89bec4f02..ce7eb89fe494 100644 --- a/stand/liblua/Makefile +++ b/stand/liblua/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${LUASRC} diff --git a/stand/liblua32/Makefile b/stand/liblua32/Makefile index 1093e454385b..292fff71a956 100644 --- a/stand/liblua32/Makefile +++ b/stand/liblua32/Makefile @@ -1,4 +1,3 @@ - DO32=1 .include "${.CURDIR}/../liblua/Makefile" diff --git a/stand/libofw/Makefile b/stand/libofw/Makefile index 79d52023d633..3d4c70dcfc10 100644 --- a/stand/libofw/Makefile +++ b/stand/libofw/Makefile @@ -1,4 +1,3 @@ - .include LIB= ofw diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 15ec82626b8d..7c94c2184eb2 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -1,4 +1,3 @@ - .PATH: ${ZFSSRC} .PATH: ${SYSDIR}/crypto/skein .PATH: ${ZFSOSSRC}/spl diff --git a/stand/libsa32/Makefile b/stand/libsa32/Makefile index 4c62c79e01f6..7dea1efd0051 100644 --- a/stand/libsa32/Makefile +++ b/stand/libsa32/Makefile @@ -1,4 +1,3 @@ - DO32=1 .include diff --git a/stand/lua/Makefile b/stand/lua/Makefile index 4462a803beef..3cec7ae3b050 100644 --- a/stand/lua/Makefile +++ b/stand/lua/Makefile @@ -1,4 +1,3 @@ - .include MAN= loader.conf.lua.5 \ diff --git a/stand/man/Makefile b/stand/man/Makefile index 2f58c1ee617c..1075c2e831c7 100644 --- a/stand/man/Makefile +++ b/stand/man/Makefile @@ -1,4 +1,3 @@ - .include M.${MK_EFI}+= boot1.efi.8 diff --git a/stand/powerpc/Makefile b/stand/powerpc/Makefile index 4ac319c6f9eb..c6403f324ba7 100644 --- a/stand/powerpc/Makefile +++ b/stand/powerpc/Makefile @@ -1,4 +1,3 @@ - NO_OBJ=t .include diff --git a/stand/powerpc/Makefile.inc b/stand/powerpc/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/stand/powerpc/Makefile.inc +++ b/stand/powerpc/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index 11b9e356219b..e67414584bc8 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -1,4 +1,3 @@ - .include PROG= boot1.elf diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index 80ebaf486296..552e828b7614 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -1,4 +1,3 @@ - LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= no LOADER_MSDOS_SUPPORT?= no diff --git a/stand/uboot/Makefile b/stand/uboot/Makefile index 791cfcb47bfe..becca47944da 100644 --- a/stand/uboot/Makefile +++ b/stand/uboot/Makefile @@ -1,4 +1,3 @@ - LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_MSDOS_SUPPORT?= no diff --git a/stand/uboot/arch/powerpc/Makefile.inc b/stand/uboot/arch/powerpc/Makefile.inc index 226cfc2f7369..555eef94f1cc 100644 --- a/stand/uboot/arch/powerpc/Makefile.inc +++ b/stand/uboot/arch/powerpc/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= start.S conf.c ppc64_elf_freebsd.c .PATH: ${SYSDIR}/libkern SRCS+= ucmpdi2.c diff --git a/stand/usb/tools/Makefile b/stand/usb/tools/Makefile index 8b851e5788bc..30144ea5fc22 100644 --- a/stand/usb/tools/Makefile +++ b/stand/usb/tools/Makefile @@ -1,4 +1,3 @@ - PROG= sysinit MAN= diff --git a/stand/userboot/Makefile b/stand/userboot/Makefile index dd71908f8572..f783c93eedea 100644 --- a/stand/userboot/Makefile +++ b/stand/userboot/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR.yes= test diff --git a/stand/userboot/Makefile.inc b/stand/userboot/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/stand/userboot/Makefile.inc +++ b/stand/userboot/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/stand/userboot/test/Makefile b/stand/userboot/test/Makefile index 0ccec7e8f932..9e097ac64261 100644 --- a/stand/userboot/test/Makefile +++ b/stand/userboot/test/Makefile @@ -1,4 +1,3 @@ - .include PROG= test diff --git a/stand/userboot/userboot/Makefile b/stand/userboot/userboot/Makefile index 4674672bbec5..a1ba1b4d700e 100644 --- a/stand/userboot/userboot/Makefile +++ b/stand/userboot/userboot/Makefile @@ -1,4 +1,3 @@ - LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no diff --git a/stand/userboot/userboot_4th/Makefile b/stand/userboot/userboot_4th/Makefile index a1b91b4d075d..1f8b1df64cbd 100644 --- a/stand/userboot/userboot_4th/Makefile +++ b/stand/userboot/userboot_4th/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=4th INSTALL_LOADER_HELP_FILE=no diff --git a/stand/userboot/userboot_lua/Makefile b/stand/userboot/userboot_lua/Makefile index 4027a9a15395..ae8fc762c869 100644 --- a/stand/userboot/userboot_lua/Makefile +++ b/stand/userboot/userboot_lua/Makefile @@ -1,4 +1,3 @@ - LOADER_INTERP=lua .include "../userboot/Makefile" diff --git a/sys/Makefile b/sys/Makefile index f3702606fc6a..e62c085b4a5c 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -1,4 +1,3 @@ - # Directories to include in cscope name file and TAGS. CSCOPEDIRS= bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 \ diff --git a/sys/amd64/Makefile b/sys/amd64/Makefile index 759b12977d1a..98d95eaf9b75 100644 --- a/sys/amd64/Makefile +++ b/sys/amd64/Makefile @@ -1,4 +1,3 @@ - # Makefile for amd64 links, tags file # SYS is normally set in Make.tags.inc diff --git a/sys/contrib/device-tree/Makefile b/sys/contrib/device-tree/Makefile index fb51acef7c67..af6871622caf 100644 --- a/sys/contrib/device-tree/Makefile +++ b/sys/contrib/device-tree/Makefile @@ -1,4 +1,3 @@ - DTC ?= dtc CPP ?= cpp diff --git a/sys/contrib/libsodium/contrib/Makefile.am b/sys/contrib/libsodium/contrib/Makefile.am index 2cfe52248849..79228b435ca3 100644 --- a/sys/contrib/libsodium/contrib/Makefile.am +++ b/sys/contrib/libsodium/contrib/Makefile.am @@ -1,3 +1,2 @@ - EXTRA_DIST = \ Findsodium.cmake diff --git a/sys/contrib/libsodium/dist-build/Makefile.am b/sys/contrib/libsodium/dist-build/Makefile.am index 3d0a0e637f21..c4c1421b0e5b 100644 --- a/sys/contrib/libsodium/dist-build/Makefile.am +++ b/sys/contrib/libsodium/dist-build/Makefile.am @@ -1,4 +1,3 @@ - EXTRA_DIST = \ android-build.sh \ android-arm.sh \ diff --git a/sys/contrib/libsodium/src/Makefile.am b/sys/contrib/libsodium/src/Makefile.am index 64445045e6aa..cd132cd3ebd9 100644 --- a/sys/contrib/libsodium/src/Makefile.am +++ b/sys/contrib/libsodium/src/Makefile.am @@ -1,3 +1,2 @@ - SUBDIRS = \ libsodium diff --git a/sys/contrib/libsodium/src/libsodium/include/Makefile.am b/sys/contrib/libsodium/src/libsodium/include/Makefile.am index b70c22b39b8e..126d346a0ba9 100644 --- a/sys/contrib/libsodium/src/libsodium/include/Makefile.am +++ b/sys/contrib/libsodium/src/libsodium/include/Makefile.am @@ -1,4 +1,3 @@ - SODIUM_EXPORT = \ sodium.h \ sodium/core.h \ diff --git a/sys/contrib/libsodium/test/default/Makefile.am b/sys/contrib/libsodium/test/default/Makefile.am index 88d6e2aa9211..324943623a23 100644 --- a/sys/contrib/libsodium/test/default/Makefile.am +++ b/sys/contrib/libsodium/test/default/Makefile.am @@ -1,4 +1,3 @@ - EXTRA_DIST = \ cmptest.h \ wintest.bat \ diff --git a/sys/crypto/rijndael/Makefile b/sys/crypto/rijndael/Makefile index 44d91532b47b..a2cd780f7500 100644 --- a/sys/crypto/rijndael/Makefile +++ b/sys/crypto/rijndael/Makefile @@ -1,4 +1,3 @@ - PROG=test00 MAN= SRCS= ${PROG}.c rijndael-alg-fst.c rijndael-api-fst.c diff --git a/sys/dts/Makefile b/sys/dts/Makefile index 6f771855ea54..99eb23c033cf 100644 --- a/sys/dts/Makefile +++ b/sys/dts/Makefile @@ -1,4 +1,3 @@ - SUBDIR=arm powerpc .include diff --git a/sys/dts/Makefile.inc b/sys/dts/Makefile.inc index 9aa907fd12d5..7f51725400c6 100644 --- a/sys/dts/Makefile.inc +++ b/sys/dts/Makefile.inc @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys test-dts: diff --git a/sys/dts/arm/Makefile b/sys/dts/arm/Makefile index fd0468739432..a0cb93ec26d8 100644 --- a/sys/dts/arm/Makefile +++ b/sys/dts/arm/Makefile @@ -1,4 +1,3 @@ - DTS!=ls ${.CURDIR}/*.dts all: test-dts diff --git a/sys/dts/arm/Makefile.inc b/sys/dts/arm/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/dts/arm/Makefile.inc +++ b/sys/dts/arm/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/dts/arm/overlays/Makefile b/sys/dts/arm/overlays/Makefile index f3d08520a271..c234bead7d1b 100644 --- a/sys/dts/arm/overlays/Makefile +++ b/sys/dts/arm/overlays/Makefile @@ -1,4 +1,3 @@ - DTSO!=ls ${.CURDIR}/*.dtso all: test-dtso diff --git a/sys/dts/arm64/Makefile b/sys/dts/arm64/Makefile index fd0468739432..a0cb93ec26d8 100644 --- a/sys/dts/arm64/Makefile +++ b/sys/dts/arm64/Makefile @@ -1,4 +1,3 @@ - DTS!=ls ${.CURDIR}/*.dts all: test-dts diff --git a/sys/dts/arm64/Makefile.inc b/sys/dts/arm64/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/dts/arm64/Makefile.inc +++ b/sys/dts/arm64/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/dts/arm64/overlays/Makefile b/sys/dts/arm64/overlays/Makefile index f3d08520a271..c234bead7d1b 100644 --- a/sys/dts/arm64/overlays/Makefile +++ b/sys/dts/arm64/overlays/Makefile @@ -1,4 +1,3 @@ - DTSO!=ls ${.CURDIR}/*.dtso all: test-dtso diff --git a/sys/dts/powerpc/Makefile b/sys/dts/powerpc/Makefile index fd0468739432..a0cb93ec26d8 100644 --- a/sys/dts/powerpc/Makefile +++ b/sys/dts/powerpc/Makefile @@ -1,4 +1,3 @@ - DTS!=ls ${.CURDIR}/*.dts all: test-dts diff --git a/sys/i386/Makefile b/sys/i386/Makefile index 8a1744220474..9b9a00046664 100644 --- a/sys/i386/Makefile +++ b/sys/i386/Makefile @@ -1,4 +1,3 @@ - # Makefile for i386 links, tags file # SYS is normally set in Make.tags.inc diff --git a/sys/modules/3dfx/Makefile b/sys/modules/3dfx/Makefile index 8d553b25c656..f5ff7c61e0eb 100644 --- a/sys/modules/3dfx/Makefile +++ b/sys/modules/3dfx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/tdfx KMOD= 3dfx diff --git a/sys/modules/3dfx_linux/Makefile b/sys/modules/3dfx_linux/Makefile index b6da59fd35c2..841faf19f9e2 100644 --- a/sys/modules/3dfx_linux/Makefile +++ b/sys/modules/3dfx_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/tdfx KMOD= 3dfx_linux diff --git a/sys/modules/Makefile b/sys/modules/Makefile index be7539e9eae1..19c34f81851e 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/Makefile.inc b/sys/modules/Makefile.inc index d6f8b49f655c..9491a25bfa1b 100644 --- a/sys/modules/Makefile.inc +++ b/sys/modules/Makefile.inc @@ -1,2 +1 @@ - SUBDIR_PARALLEL= yes diff --git a/sys/modules/aac/Makefile b/sys/modules/aac/Makefile index 549619098e78..5d5f00ae0298 100644 --- a/sys/modules/aac/Makefile +++ b/sys/modules/aac/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aac .if ${MACHINE_CPUARCH} == "i386" diff --git a/sys/modules/aac/Makefile.inc b/sys/modules/aac/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/aac/Makefile.inc +++ b/sys/modules/aac/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/aac/aac_linux/Makefile b/sys/modules/aac/aac_linux/Makefile index b6ff82211308..96cc7cb0ec79 100644 --- a/sys/modules/aac/aac_linux/Makefile +++ b/sys/modules/aac/aac_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aac KMOD= aac_linux diff --git a/sys/modules/aacraid/Makefile b/sys/modules/aacraid/Makefile index 22815f9b4e56..1d174573e7b0 100644 --- a/sys/modules/aacraid/Makefile +++ b/sys/modules/aacraid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aacraid .if ${MACHINE_CPUARCH} == "i386" diff --git a/sys/modules/aacraid/Makefile.inc b/sys/modules/aacraid/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/aacraid/Makefile.inc +++ b/sys/modules/aacraid/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/aacraid/aacraid_linux/Makefile b/sys/modules/aacraid/aacraid_linux/Makefile index cf661c61d5a4..c0046292cace 100644 --- a/sys/modules/aacraid/aacraid_linux/Makefile +++ b/sys/modules/aacraid/aacraid_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aacraid KMOD= aacraid_linux diff --git a/sys/modules/accf_data/Makefile b/sys/modules/accf_data/Makefile index 10e7e6fa850d..6c0d216c1367 100644 --- a/sys/modules/accf_data/Makefile +++ b/sys/modules/accf_data/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= accf_data diff --git a/sys/modules/accf_dns/Makefile b/sys/modules/accf_dns/Makefile index c7c780843fe7..7fcefcc69565 100644 --- a/sys/modules/accf_dns/Makefile +++ b/sys/modules/accf_dns/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= accf_dns diff --git a/sys/modules/accf_http/Makefile b/sys/modules/accf_http/Makefile index dc491a819747..2c5988b585aa 100644 --- a/sys/modules/accf_http/Makefile +++ b/sys/modules/accf_http/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= accf_http diff --git a/sys/modules/accf_tls/Makefile b/sys/modules/accf_tls/Makefile index f45b2f057f0a..07fa15319b67 100644 --- a/sys/modules/accf_tls/Makefile +++ b/sys/modules/accf_tls/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= accf_tls diff --git a/sys/modules/acl_nfs4/Makefile b/sys/modules/acl_nfs4/Makefile index ae12090d11a9..1ddb8c1558fb 100644 --- a/sys/modules/acl_nfs4/Makefile +++ b/sys/modules/acl_nfs4/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= acl_nfs4 SRCS= vnode_if.h subr_acl_nfs4.c diff --git a/sys/modules/acl_posix1e/Makefile b/sys/modules/acl_posix1e/Makefile index f9333de37375..397832f9b89b 100644 --- a/sys/modules/acl_posix1e/Makefile +++ b/sys/modules/acl_posix1e/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= acl_posix1e SRCS= vnode_if.h subr_acl_posix1e.c diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile index ee921a23aeb7..918f5128e5c4 100644 --- a/sys/modules/acpi/Makefile +++ b/sys/modules/acpi/Makefile @@ -1,4 +1,3 @@ - SUBDIR= acpi_asus acpi_asus_wmi acpi_dock acpi_fujitsu acpi_hp \ acpi_ged acpi_ibm acpi_panasonic acpi_sony acpi_toshiba \ acpi_video acpi_wmi aibs diff --git a/sys/modules/acpi/Makefile.inc b/sys/modules/acpi/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/acpi/Makefile.inc +++ b/sys/modules/acpi/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/acpi/acpi_asus/Makefile b/sys/modules/acpi/acpi_asus/Makefile index 234fc11c3355..15a560c36d15 100644 --- a/sys/modules/acpi/acpi_asus/Makefile +++ b/sys/modules/acpi/acpi_asus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_asus diff --git a/sys/modules/acpi/acpi_asus_wmi/Makefile b/sys/modules/acpi/acpi_asus_wmi/Makefile index 0e831bf05e47..c202ef8f0707 100644 --- a/sys/modules/acpi/acpi_asus_wmi/Makefile +++ b/sys/modules/acpi/acpi_asus_wmi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_asus_wmi diff --git a/sys/modules/acpi/acpi_dock/Makefile b/sys/modules/acpi/acpi_dock/Makefile index f9856e1295d2..81ab3b98bd00 100644 --- a/sys/modules/acpi/acpi_dock/Makefile +++ b/sys/modules/acpi/acpi_dock/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpica KMOD= acpi_dock SRCS= acpi_dock.c opt_acpi.h device_if.h bus_if.h acpi_if.h diff --git a/sys/modules/acpi/acpi_fujitsu/Makefile b/sys/modules/acpi/acpi_fujitsu/Makefile index 8053f9891e65..e154efb69d13 100644 --- a/sys/modules/acpi/acpi_fujitsu/Makefile +++ b/sys/modules/acpi/acpi_fujitsu/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_fujitsu diff --git a/sys/modules/acpi/acpi_ged/Makefile b/sys/modules/acpi/acpi_ged/Makefile index 3cfc3b51a21e..c435fab4a173 100644 --- a/sys/modules/acpi/acpi_ged/Makefile +++ b/sys/modules/acpi/acpi_ged/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpica KMOD= acpi_ged SRCS= acpi_ged.c diff --git a/sys/modules/acpi/acpi_hp/Makefile b/sys/modules/acpi/acpi_hp/Makefile index 0d1a03c30b6b..9ab3dadf24a1 100644 --- a/sys/modules/acpi/acpi_hp/Makefile +++ b/sys/modules/acpi/acpi_hp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_hp diff --git a/sys/modules/acpi/acpi_ibm/Makefile b/sys/modules/acpi/acpi_ibm/Makefile index 9e815ccc9e80..ac7428ac4524 100644 --- a/sys/modules/acpi/acpi_ibm/Makefile +++ b/sys/modules/acpi/acpi_ibm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_ibm SRCS= acpi_ibm.c opt_acpi.h device_if.h bus_if.h acpi_if.h diff --git a/sys/modules/acpi/acpi_panasonic/Makefile b/sys/modules/acpi/acpi_panasonic/Makefile index 60a04cecb57f..9062374b25f4 100644 --- a/sys/modules/acpi/acpi_panasonic/Makefile +++ b/sys/modules/acpi/acpi_panasonic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_panasonic diff --git a/sys/modules/acpi/acpi_rapidstart/Makefile b/sys/modules/acpi/acpi_rapidstart/Makefile index 109fc30ba1d5..088b265d7842 100644 --- a/sys/modules/acpi/acpi_rapidstart/Makefile +++ b/sys/modules/acpi/acpi_rapidstart/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_rapidstart diff --git a/sys/modules/acpi/acpi_sony/Makefile b/sys/modules/acpi/acpi_sony/Makefile index b1c93c3d4be1..b30738cb0ca7 100644 --- a/sys/modules/acpi/acpi_sony/Makefile +++ b/sys/modules/acpi/acpi_sony/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_sony diff --git a/sys/modules/acpi/acpi_toshiba/Makefile b/sys/modules/acpi/acpi_toshiba/Makefile index 2f6190e1524f..f60ff2e55d6c 100644 --- a/sys/modules/acpi/acpi_toshiba/Makefile +++ b/sys/modules/acpi/acpi_toshiba/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_toshiba diff --git a/sys/modules/acpi/acpi_video/Makefile b/sys/modules/acpi/acpi_video/Makefile index 78c20b705cb9..a553612c245a 100644 --- a/sys/modules/acpi/acpi_video/Makefile +++ b/sys/modules/acpi/acpi_video/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpica KMOD= acpi_video diff --git a/sys/modules/acpi/acpi_wmi/Makefile b/sys/modules/acpi/acpi_wmi/Makefile index 850be463e076..55ba2f844b4f 100644 --- a/sys/modules/acpi/acpi_wmi/Makefile +++ b/sys/modules/acpi/acpi_wmi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= acpi_wmi diff --git a/sys/modules/acpi/aibs/Makefile b/sys/modules/acpi/aibs/Makefile index b3af05552f8f..346fb491adc7 100644 --- a/sys/modules/acpi/aibs/Makefile +++ b/sys/modules/acpi/aibs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/acpi_support KMOD= aibs diff --git a/sys/modules/adlink/Makefile b/sys/modules/adlink/Makefile index 1d5931cfcc9b..94e9393279ee 100644 --- a/sys/modules/adlink/Makefile +++ b/sys/modules/adlink/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/adlink KMOD= adlink diff --git a/sys/modules/ae/Makefile b/sys/modules/ae/Makefile index b9e1e6bf16b6..49024ff58e65 100644 --- a/sys/modules/ae/Makefile +++ b/sys/modules/ae/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ae KMOD= if_ae diff --git a/sys/modules/aesni/Makefile b/sys/modules/aesni/Makefile index 2ae256e40e89..4219182f03fe 100644 --- a/sys/modules/aesni/Makefile +++ b/sys/modules/aesni/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/aesni .PATH: ${SRCTOP}/contrib/llvm-project/clang/lib/Headers diff --git a/sys/modules/age/Makefile b/sys/modules/age/Makefile index e1e895222b2c..7a78e5de92f0 100644 --- a/sys/modules/age/Makefile +++ b/sys/modules/age/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/age KMOD= if_age diff --git a/sys/modules/agp/Makefile b/sys/modules/agp/Makefile index c5ce53d2ef13..d27a78b7e437 100644 --- a/sys/modules/agp/Makefile +++ b/sys/modules/agp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/agp KMOD= agp diff --git a/sys/modules/ahci/Makefile b/sys/modules/ahci/Makefile index b7d8aadc4fc0..d79c18397dc8 100644 --- a/sys/modules/ahci/Makefile +++ b/sys/modules/ahci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ahci KMOD= ahci diff --git a/sys/modules/aic7xxx/Makefile b/sys/modules/aic7xxx/Makefile index 720a7709a31d..6e69a6db2238 100644 --- a/sys/modules/aic7xxx/Makefile +++ b/sys/modules/aic7xxx/Makefile @@ -1,4 +1,3 @@ - SUBDIR= ahc ahd firmware: aicasm/aicasm ahdfirmware ahcfirmware diff --git a/sys/modules/aic7xxx/Makefile.inc b/sys/modules/aic7xxx/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/aic7xxx/Makefile.inc +++ b/sys/modules/aic7xxx/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile index 1ced6c050397..3741d4fb666f 100644 --- a/sys/modules/aic7xxx/ahc/Makefile +++ b/sys/modules/aic7xxx/ahc/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/aic7xxx/ahc/Makefile.inc b/sys/modules/aic7xxx/ahc/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/aic7xxx/ahc/Makefile.inc +++ b/sys/modules/aic7xxx/ahc/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/aic7xxx/ahc/ahc_isa/Makefile b/sys/modules/aic7xxx/ahc/ahc_isa/Makefile index 0d33d08e6e1e..875d26878512 100644 --- a/sys/modules/aic7xxx/ahc/ahc_isa/Makefile +++ b/sys/modules/aic7xxx/ahc/ahc_isa/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahc_isa diff --git a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile index 5b4059f2ceff..dd5da761dd66 100644 --- a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile +++ b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahc_pci diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile index cf68651e792c..c62b69eff9c9 100644 --- a/sys/modules/aic7xxx/ahd/Makefile +++ b/sys/modules/aic7xxx/ahd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/aic7xxx KMOD= ahd diff --git a/sys/modules/aic7xxx/aicasm/Makefile b/sys/modules/aic7xxx/aicasm/Makefile index d1e744e3583e..77b815421e1d 100644 --- a/sys/modules/aic7xxx/aicasm/Makefile +++ b/sys/modules/aic7xxx/aicasm/Makefile @@ -1,4 +1,3 @@ - MAKESRCPATH= ${SRCTOP}/sys/dev/aic7xxx/aicasm install: diff --git a/sys/modules/alc/Makefile b/sys/modules/alc/Makefile index 49aa0247cd43..d89d3ea4d30f 100644 --- a/sys/modules/alc/Makefile +++ b/sys/modules/alc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/alc KMOD= if_alc diff --git a/sys/modules/ale/Makefile b/sys/modules/ale/Makefile index beed313e4953..0a9853ec7048 100644 --- a/sys/modules/ale/Makefile +++ b/sys/modules/ale/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ale KMOD= if_ale diff --git a/sys/modules/allwinner/aw_mmc/Makefile b/sys/modules/allwinner/aw_mmc/Makefile index 450ba717829b..25a2a69cfac1 100644 --- a/sys/modules/allwinner/aw_mmc/Makefile +++ b/sys/modules/allwinner/aw_mmc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= aw_mmc diff --git a/sys/modules/allwinner/aw_pwm/Makefile b/sys/modules/allwinner/aw_pwm/Makefile index 8aac8f5ebe8a..dca08d5d7c63 100644 --- a/sys/modules/allwinner/aw_pwm/Makefile +++ b/sys/modules/allwinner/aw_pwm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pwm/controller/allwinner KMOD= aw_pwm diff --git a/sys/modules/allwinner/aw_rsb/Makefile b/sys/modules/allwinner/aw_rsb/Makefile index 89f5ec687170..325dc839dce3 100644 --- a/sys/modules/allwinner/aw_rsb/Makefile +++ b/sys/modules/allwinner/aw_rsb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= aw_rsb diff --git a/sys/modules/allwinner/aw_rtc/Makefile b/sys/modules/allwinner/aw_rtc/Makefile index 0eaa9befd88e..ea41747339e0 100644 --- a/sys/modules/allwinner/aw_rtc/Makefile +++ b/sys/modules/allwinner/aw_rtc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= aw_rtc diff --git a/sys/modules/allwinner/aw_sid/Makefile b/sys/modules/allwinner/aw_sid/Makefile index edbaf33f1a0a..7d3dad68acb9 100644 --- a/sys/modules/allwinner/aw_sid/Makefile +++ b/sys/modules/allwinner/aw_sid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= aw_sid diff --git a/sys/modules/allwinner/aw_spi/Makefile b/sys/modules/allwinner/aw_spi/Makefile index 3bab8c70e417..412880ce4b63 100644 --- a/sys/modules/allwinner/aw_spi/Makefile +++ b/sys/modules/allwinner/aw_spi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/spibus/controller/allwinner/ KMOD= aw_spi diff --git a/sys/modules/allwinner/aw_thermal/Makefile b/sys/modules/allwinner/aw_thermal/Makefile index 1552d420af87..911e6406d947 100644 --- a/sys/modules/allwinner/aw_thermal/Makefile +++ b/sys/modules/allwinner/aw_thermal/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= aw_thermal diff --git a/sys/modules/allwinner/axp81x/Makefile b/sys/modules/allwinner/axp81x/Makefile index 589303de4caa..7a07d48cc20a 100644 --- a/sys/modules/allwinner/axp81x/Makefile +++ b/sys/modules/allwinner/axp81x/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= axp81x diff --git a/sys/modules/allwinner/if_awg/Makefile b/sys/modules/allwinner/if_awg/Makefile index 41d98909583e..b0b0abbd8e44 100644 --- a/sys/modules/allwinner/if_awg/Makefile +++ b/sys/modules/allwinner/if_awg/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/allwinner KMOD= if_awg diff --git a/sys/modules/alq/Makefile b/sys/modules/alq/Makefile index 4eee884b3b07..28b7b71ac1f6 100644 --- a/sys/modules/alq/Makefile +++ b/sys/modules/alq/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= alq SRCS= opt_mac.h vnode_if.h kern_alq.c diff --git a/sys/modules/am335x_dmtpps/Makefile b/sys/modules/am335x_dmtpps/Makefile index 9fabb2aeaf40..35cffe0934f7 100644 --- a/sys/modules/am335x_dmtpps/Makefile +++ b/sys/modules/am335x_dmtpps/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/ti/am335x KMOD= am335x_dmtpps diff --git a/sys/modules/amd_ecc_inject/Makefile b/sys/modules/amd_ecc_inject/Makefile index 93d26d73beef..89b528f1cac0 100644 --- a/sys/modules/amd_ecc_inject/Makefile +++ b/sys/modules/amd_ecc_inject/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amd_ecc_inject KMOD= amd_ecc_inject diff --git a/sys/modules/amdgpio/Makefile b/sys/modules/amdgpio/Makefile index f825cd059bd4..1ac18e65c513 100644 --- a/sys/modules/amdgpio/Makefile +++ b/sys/modules/amdgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdgpio KMOD= amdgpio SRCS= amdgpio.c diff --git a/sys/modules/amdsbwd/Makefile b/sys/modules/amdsbwd/Makefile index 78166c67c775..29857e6a6a9c 100644 --- a/sys/modules/amdsbwd/Makefile +++ b/sys/modules/amdsbwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdsbwd KMOD = amdsbwd SRCS = amdsbwd.c diff --git a/sys/modules/amdsmb/Makefile b/sys/modules/amdsmb/Makefile index 91762bf883da..54bc51fe7fd7 100644 --- a/sys/modules/amdsmb/Makefile +++ b/sys/modules/amdsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdsmb KMOD= amdsmb diff --git a/sys/modules/amdsmn/Makefile b/sys/modules/amdsmn/Makefile index f41b8ac5c2b5..869474580106 100644 --- a/sys/modules/amdsmn/Makefile +++ b/sys/modules/amdsmn/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdsmn KMOD= amdsmn diff --git a/sys/modules/amdtemp/Makefile b/sys/modules/amdtemp/Makefile index 04b2b7b1135d..726e758f5d19 100644 --- a/sys/modules/amdtemp/Makefile +++ b/sys/modules/amdtemp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdtemp KMOD= amdtemp diff --git a/sys/modules/aout/Makefile b/sys/modules/aout/Makefile index cd5f6b99dcb4..e88d47bad683 100644 --- a/sys/modules/aout/Makefile +++ b/sys/modules/aout/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= aout diff --git a/sys/modules/arcmsr/Makefile b/sys/modules/arcmsr/Makefile index ec5e69f73eb6..0231cda28977 100644 --- a/sys/modules/arcmsr/Makefile +++ b/sys/modules/arcmsr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/arcmsr KMOD= arcmsr diff --git a/sys/modules/arm_ti/am335x_ehrpwm/Makefile b/sys/modules/arm_ti/am335x_ehrpwm/Makefile index 75139fff2bb0..af66edc69658 100644 --- a/sys/modules/arm_ti/am335x_ehrpwm/Makefile +++ b/sys/modules/arm_ti/am335x_ehrpwm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/ti/am335x KMOD= am335x_ehrpwm diff --git a/sys/modules/arm_ti/ti_i2c/Makefile b/sys/modules/arm_ti/ti_i2c/Makefile index 3a5e1a35b2a4..dc6dfb133de5 100644 --- a/sys/modules/arm_ti/ti_i2c/Makefile +++ b/sys/modules/arm_ti/ti_i2c/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/ti KMOD= ti_i2c diff --git a/sys/modules/asmc/Makefile b/sys/modules/asmc/Makefile index 70d8ed845900..f1b4a981ad24 100644 --- a/sys/modules/asmc/Makefile +++ b/sys/modules/asmc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/asmc KMOD= asmc diff --git a/sys/modules/ata/Makefile b/sys/modules/ata/Makefile index 3a9ad0dd123f..70a4f8e29b74 100644 --- a/sys/modules/ata/Makefile +++ b/sys/modules/ata/Makefile @@ -1,4 +1,3 @@ - SUBDIR = atacore SUBDIR += ataisa SUBDIR += atapci diff --git a/sys/modules/ata/Makefile.inc b/sys/modules/ata/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/ata/Makefile.inc +++ b/sys/modules/ata/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/ata/atacore/Makefile b/sys/modules/ata/atacore/Makefile index f4eff60f7b86..85964afa1f58 100644 --- a/sys/modules/ata/atacore/Makefile +++ b/sys/modules/ata/atacore/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata KMOD= ata diff --git a/sys/modules/ata/ataisa/Makefile b/sys/modules/ata/ataisa/Makefile index 7aab7b999be6..b15dad0a6498 100644 --- a/sys/modules/ata/ataisa/Makefile +++ b/sys/modules/ata/ataisa/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata KMOD= ataisa diff --git a/sys/modules/ata/atapci/Makefile b/sys/modules/ata/atapci/Makefile index dfabcf765a16..c9d8920023f4 100644 --- a/sys/modules/ata/atapci/Makefile +++ b/sys/modules/ata/atapci/Makefile @@ -1,4 +1,3 @@ - SUBDIR += chipsets .PATH: ${SRCTOP}/sys/dev/ata diff --git a/sys/modules/ata/atapci/Makefile.inc b/sys/modules/ata/atapci/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/ata/atapci/Makefile.inc +++ b/sys/modules/ata/atapci/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/ata/atapci/chipsets/Makefile b/sys/modules/ata/atapci/chipsets/Makefile index c17c84e6496c..e34f1163bb2d 100644 --- a/sys/modules/ata/atapci/chipsets/Makefile +++ b/sys/modules/ata/atapci/chipsets/Makefile @@ -1,4 +1,3 @@ - SUBDIR += ataacard ataacerlabs ataamd ataati atacenatek atacypress atacyrix atahighpoint ataintel ataite atajmicron atamarvell atamicron atanational atanetcell atanvidia atapromise ataserverworks atasiliconimage atasis atavia .include diff --git a/sys/modules/ata/atapci/chipsets/Makefile.inc b/sys/modules/ata/atapci/chipsets/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/ata/atapci/chipsets/Makefile.inc +++ b/sys/modules/ata/atapci/chipsets/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/ata/atapci/chipsets/ataacard/Makefile b/sys/modules/ata/atapci/chipsets/ataacard/Makefile index 23ced8d7473b..0ad0650d0ae8 100644 --- a/sys/modules/ata/atapci/chipsets/ataacard/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataacard/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataacard diff --git a/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile b/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile index 971d626dc12c..eeb2e1f7eb82 100644 --- a/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataacerlabs diff --git a/sys/modules/ata/atapci/chipsets/ataamd/Makefile b/sys/modules/ata/atapci/chipsets/ataamd/Makefile index eff9a378b130..58b4e6ee7975 100644 --- a/sys/modules/ata/atapci/chipsets/ataamd/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataamd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataamd diff --git a/sys/modules/ata/atapci/chipsets/ataati/Makefile b/sys/modules/ata/atapci/chipsets/ataati/Makefile index 6bd4a306f6dd..ffc779cf3fa3 100644 --- a/sys/modules/ata/atapci/chipsets/ataati/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataati/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataati diff --git a/sys/modules/ata/atapci/chipsets/atacenatek/Makefile b/sys/modules/ata/atapci/chipsets/atacenatek/Makefile index 7c9cec4c3ee8..1c8753479fab 100644 --- a/sys/modules/ata/atapci/chipsets/atacenatek/Makefile +++ b/sys/modules/ata/atapci/chipsets/atacenatek/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacenatek diff --git a/sys/modules/ata/atapci/chipsets/atacypress/Makefile b/sys/modules/ata/atapci/chipsets/atacypress/Makefile index c0dae4ce6143..edb5c20f5856 100644 --- a/sys/modules/ata/atapci/chipsets/atacypress/Makefile +++ b/sys/modules/ata/atapci/chipsets/atacypress/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacypress diff --git a/sys/modules/ata/atapci/chipsets/atacyrix/Makefile b/sys/modules/ata/atapci/chipsets/atacyrix/Makefile index 7a39455ba1d1..225318e3b466 100644 --- a/sys/modules/ata/atapci/chipsets/atacyrix/Makefile +++ b/sys/modules/ata/atapci/chipsets/atacyrix/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atacyrix diff --git a/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile b/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile index a889fc8ea47f..e889527bd877 100644 --- a/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile +++ b/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atahighpoint diff --git a/sys/modules/ata/atapci/chipsets/ataintel/Makefile b/sys/modules/ata/atapci/chipsets/ataintel/Makefile index 4734ccff6d7e..12a86fc1d9af 100644 --- a/sys/modules/ata/atapci/chipsets/ataintel/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataintel/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataintel diff --git a/sys/modules/ata/atapci/chipsets/ataite/Makefile b/sys/modules/ata/atapci/chipsets/ataite/Makefile index e1a17c373b64..2f434ddb80ba 100644 --- a/sys/modules/ata/atapci/chipsets/ataite/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataite/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataite diff --git a/sys/modules/ata/atapci/chipsets/atajmicron/Makefile b/sys/modules/ata/atapci/chipsets/atajmicron/Makefile index 71ee58d6e89e..6b9f4c0a5435 100644 --- a/sys/modules/ata/atapci/chipsets/atajmicron/Makefile +++ b/sys/modules/ata/atapci/chipsets/atajmicron/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atajmicron diff --git a/sys/modules/ata/atapci/chipsets/atamarvell/Makefile b/sys/modules/ata/atapci/chipsets/atamarvell/Makefile index 9fccff592287..df98955ff4b6 100644 --- a/sys/modules/ata/atapci/chipsets/atamarvell/Makefile +++ b/sys/modules/ata/atapci/chipsets/atamarvell/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atamarvell diff --git a/sys/modules/ata/atapci/chipsets/atamicron/Makefile b/sys/modules/ata/atapci/chipsets/atamicron/Makefile index 54934f6d11c3..56c339e2607f 100644 --- a/sys/modules/ata/atapci/chipsets/atamicron/Makefile +++ b/sys/modules/ata/atapci/chipsets/atamicron/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atamicron diff --git a/sys/modules/ata/atapci/chipsets/atanational/Makefile b/sys/modules/ata/atapci/chipsets/atanational/Makefile index 3e486b1637e3..ed599f1afbd9 100644 --- a/sys/modules/ata/atapci/chipsets/atanational/Makefile +++ b/sys/modules/ata/atapci/chipsets/atanational/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanational diff --git a/sys/modules/ata/atapci/chipsets/atanetcell/Makefile b/sys/modules/ata/atapci/chipsets/atanetcell/Makefile index b317e950a22b..7d6e1cb5d681 100644 --- a/sys/modules/ata/atapci/chipsets/atanetcell/Makefile +++ b/sys/modules/ata/atapci/chipsets/atanetcell/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanetcell diff --git a/sys/modules/ata/atapci/chipsets/atanvidia/Makefile b/sys/modules/ata/atapci/chipsets/atanvidia/Makefile index b4b720cfea13..1ee823eb6958 100644 --- a/sys/modules/ata/atapci/chipsets/atanvidia/Makefile +++ b/sys/modules/ata/atapci/chipsets/atanvidia/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atanvidia diff --git a/sys/modules/ata/atapci/chipsets/atapromise/Makefile b/sys/modules/ata/atapci/chipsets/atapromise/Makefile index d6296769f63f..b96d0e3e80f3 100644 --- a/sys/modules/ata/atapci/chipsets/atapromise/Makefile +++ b/sys/modules/ata/atapci/chipsets/atapromise/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atapromise diff --git a/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile b/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile index 76662f0a81c9..1da7e531583c 100644 --- a/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile +++ b/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= ataserverworks diff --git a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile index 3bb7248468f3..858d8afb54d8 100644 --- a/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile +++ b/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atasiliconimage diff --git a/sys/modules/ata/atapci/chipsets/atasis/Makefile b/sys/modules/ata/atapci/chipsets/atasis/Makefile index 16252fff2861..ba9efca9b32c 100644 --- a/sys/modules/ata/atapci/chipsets/atasis/Makefile +++ b/sys/modules/ata/atapci/chipsets/atasis/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atasis diff --git a/sys/modules/ata/atapci/chipsets/atavia/Makefile b/sys/modules/ata/atapci/chipsets/atavia/Makefile index 04a76295277f..1827dca23d76 100644 --- a/sys/modules/ata/atapci/chipsets/atavia/Makefile +++ b/sys/modules/ata/atapci/chipsets/atavia/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ata/chipsets KMOD= atavia diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index 318b49fe43a1..eb02bda1699f 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -1,4 +1,3 @@ - DEVATH10KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath10k .PATH: ${DEVATH10KDIR} diff --git a/sys/modules/ath11k/Makefile b/sys/modules/ath11k/Makefile index 162b22d33074..fb610117dfa5 100644 --- a/sys/modules/ath11k/Makefile +++ b/sys/modules/ath11k/Makefile @@ -1,4 +1,3 @@ - DEVATH11KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath11k .PATH: ${DEVATH11KDIR} diff --git a/sys/modules/athk_common/Makefile b/sys/modules/athk_common/Makefile index 284e1b187405..5400cfa7723d 100644 --- a/sys/modules/athk_common/Makefile +++ b/sys/modules/athk_common/Makefile @@ -1,4 +1,3 @@ - DEVDIR= ${SRCTOP}/sys/contrib/dev/athk .PATH: ${DEVDIR} diff --git a/sys/modules/autofs/Makefile b/sys/modules/autofs/Makefile index 3fbd3a7db707..92ab40a92595 100644 --- a/sys/modules/autofs/Makefile +++ b/sys/modules/autofs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/autofs KMOD= autofs diff --git a/sys/modules/axgbe/Makefile b/sys/modules/axgbe/Makefile index bc5c5b1299f3..f28e50572a2d 100644 --- a/sys/modules/axgbe/Makefile +++ b/sys/modules/axgbe/Makefile @@ -1,4 +1,3 @@ - .if ${MACHINE_CPUARCH} == "aarch64" SUBDIR= if_axa .elif ${MACHINE_CPUARCH} == "amd64" diff --git a/sys/modules/axgbe/if_axa/Makefile b/sys/modules/axgbe/if_axa/Makefile index 088e4383b9e0..2a096ccb0b03 100644 --- a/sys/modules/axgbe/if_axa/Makefile +++ b/sys/modules/axgbe/if_axa/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/axgbe KMOD = if_axa diff --git a/sys/modules/axgbe/if_axp/Makefile b/sys/modules/axgbe/if_axp/Makefile index 6cab3317c1e2..c042fe026b98 100644 --- a/sys/modules/axgbe/if_axp/Makefile +++ b/sys/modules/axgbe/if_axp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/axgbe KMOD = if_axp diff --git a/sys/modules/backlight/Makefile b/sys/modules/backlight/Makefile index 48c45d785ada..905203f1aa91 100644 --- a/sys/modules/backlight/Makefile +++ b/sys/modules/backlight/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/backlight KMOD= backlight SRCS= backlight.c diff --git a/sys/modules/bcm283x_clkman/Makefile b/sys/modules/bcm283x_clkman/Makefile index 06ae3cfc5668..6c245a2b7dc8 100644 --- a/sys/modules/bcm283x_clkman/Makefile +++ b/sys/modules/bcm283x_clkman/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/broadcom/bcm2835/ KMOD= bcm283x_clkman diff --git a/sys/modules/bcm283x_pwm/Makefile b/sys/modules/bcm283x_pwm/Makefile index 16f3364ef8e4..4aa615d81454 100644 --- a/sys/modules/bcm283x_pwm/Makefile +++ b/sys/modules/bcm283x_pwm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/broadcom/bcm2835/ KMOD= bcm283x_pwm diff --git a/sys/modules/bfe/Makefile b/sys/modules/bfe/Makefile index 99458b2bec7b..2f3b820de23a 100644 --- a/sys/modules/bfe/Makefile +++ b/sys/modules/bfe/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bfe KMOD= if_bfe diff --git a/sys/modules/bge/Makefile b/sys/modules/bge/Makefile index 4ded89da977b..49e6c455c381 100644 --- a/sys/modules/bge/Makefile +++ b/sys/modules/bge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bge KMOD= if_bge diff --git a/sys/modules/bhnd/Makefile b/sys/modules/bhnd/Makefile index 032d33210079..f07379a2a047 100644 --- a/sys/modules/bhnd/Makefile +++ b/sys/modules/bhnd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd .PATH: ${SRCTOP}/sys/dev/bhnd/cores/chipc .PATH: ${SRCTOP}/sys/dev/bhnd/cores/chipc/pwrctl diff --git a/sys/modules/bhnd/bcma/Makefile b/sys/modules/bhnd/bcma/Makefile index c329aa3c6e98..351424441e55 100644 --- a/sys/modules/bhnd/bcma/Makefile +++ b/sys/modules/bhnd/bcma/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/bcma KMOD= bcma diff --git a/sys/modules/bhnd/bcma_bhndb/Makefile b/sys/modules/bhnd/bcma_bhndb/Makefile index c771985ecde4..19fd6a89a16b 100644 --- a/sys/modules/bhnd/bcma_bhndb/Makefile +++ b/sys/modules/bhnd/bcma_bhndb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/bcma KMOD= bcma_bhndb diff --git a/sys/modules/bhnd/bhndb/Makefile b/sys/modules/bhnd/bhndb/Makefile index c4745f17b74e..9a0d68519a98 100644 --- a/sys/modules/bhnd/bhndb/Makefile +++ b/sys/modules/bhnd/bhndb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/bhndb KMOD= bhndb diff --git a/sys/modules/bhnd/bhndb_pci/Makefile b/sys/modules/bhnd/bhndb_pci/Makefile index 958502b29c0e..29fa7cd61cd7 100644 --- a/sys/modules/bhnd/bhndb_pci/Makefile +++ b/sys/modules/bhnd/bhndb_pci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/bhndb KMOD= bhndb_pci diff --git a/sys/modules/bhnd/cores/Makefile b/sys/modules/bhnd/cores/Makefile index 610d735f723d..ba7b711b3bc0 100644 --- a/sys/modules/bhnd/cores/Makefile +++ b/sys/modules/bhnd/cores/Makefile @@ -1,4 +1,3 @@ - SUBDIR= bhnd_pci \ bhnd_pci_hostb \ bhnd_pcib diff --git a/sys/modules/bhnd/cores/bhnd_pci/Makefile b/sys/modules/bhnd/cores/bhnd_pci/Makefile index 96275c7d5ee8..962743c07671 100644 --- a/sys/modules/bhnd/cores/bhnd_pci/Makefile +++ b/sys/modules/bhnd/cores/bhnd_pci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pci .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pcie2 diff --git a/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile b/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile index a27d30f50677..350ac6721c9b 100644 --- a/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile +++ b/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pci .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pcie2 diff --git a/sys/modules/bhnd/cores/bhnd_pcib/Makefile b/sys/modules/bhnd/cores/bhnd_pcib/Makefile index 93e53415df0d..9c7f86eca22c 100644 --- a/sys/modules/bhnd/cores/bhnd_pcib/Makefile +++ b/sys/modules/bhnd/cores/bhnd_pcib/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pci .PATH: ${SRCTOP}/sys/dev/bhnd/cores/pcie2 diff --git a/sys/modules/bhnd/siba/Makefile b/sys/modules/bhnd/siba/Makefile index 572fab726664..aa933129a9f6 100644 --- a/sys/modules/bhnd/siba/Makefile +++ b/sys/modules/bhnd/siba/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/siba KMOD= siba diff --git a/sys/modules/bhnd/siba_bhndb/Makefile b/sys/modules/bhnd/siba_bhndb/Makefile index ccf978edf515..eaaa62e49e42 100644 --- a/sys/modules/bhnd/siba_bhndb/Makefile +++ b/sys/modules/bhnd/siba_bhndb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bhnd/siba KMOD= siba_bhndb diff --git a/sys/modules/blake2/Makefile b/sys/modules/blake2/Makefile index a8863c2e67e7..85d4bff8dede 100644 --- a/sys/modules/blake2/Makefile +++ b/sys/modules/blake2/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/libb2 .PATH: ${SRCTOP}/sys/crypto/blake2 .PATH: ${SRCTOP}/sys/opencrypto diff --git a/sys/modules/bnxt/bnxt_en/Makefile b/sys/modules/bnxt/bnxt_en/Makefile index de08d7c500c4..d90f3b91d860 100644 --- a/sys/modules/bnxt/bnxt_en/Makefile +++ b/sys/modules/bnxt/bnxt_en/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bnxt/bnxt_en KMOD = if_bnxt diff --git a/sys/modules/bridgestp/Makefile b/sys/modules/bridgestp/Makefile index 79b339bb3d44..71e383510189 100644 --- a/sys/modules/bridgestp/Makefile +++ b/sys/modules/bridgestp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= bridgestp diff --git a/sys/modules/bwi/Makefile b/sys/modules/bwi/Makefile index 6fbf77bc903f..425009276488 100644 --- a/sys/modules/bwi/Makefile +++ b/sys/modules/bwi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bwi KMOD = if_bwi diff --git a/sys/modules/bwn/Makefile b/sys/modules/bwn/Makefile index 4385b5498ad8..37c7b35db7e9 100644 --- a/sys/modules/bwn/Makefile +++ b/sys/modules/bwn/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/bwn KMOD= if_bwn diff --git a/sys/modules/bxe/Makefile b/sys/modules/bxe/Makefile index 70b2965ece51..7e6d73a63fa9 100644 --- a/sys/modules/bxe/Makefile +++ b/sys/modules/bxe/Makefile @@ -1,4 +1,3 @@ - SYSDIR ?= ${SRCTOP}/sys BXE = ${SYSDIR}/dev/bxe diff --git a/sys/modules/bytgpio/Makefile b/sys/modules/bytgpio/Makefile index a25a76141031..6b5c3fa79d87 100644 --- a/sys/modules/bytgpio/Makefile +++ b/sys/modules/bytgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/gpio KMOD= bytgpio SRCS= bytgpio.c diff --git a/sys/modules/cam/Makefile b/sys/modules/cam/Makefile index 566b245dca2c..41783c54e8a9 100644 --- a/sys/modules/cam/Makefile +++ b/sys/modules/cam/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/cam $S/cam/scsi $S/cam/ata $S/cam/nvme $S/dev/nvme diff --git a/sys/modules/cardbus/Makefile b/sys/modules/cardbus/Makefile index a87a0de5185a..d7111b2451a1 100644 --- a/sys/modules/cardbus/Makefile +++ b/sys/modules/cardbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cardbus KMOD= cardbus diff --git a/sys/modules/carp/Makefile b/sys/modules/carp/Makefile index d7a85043539f..385c42f12bd6 100644 --- a/sys/modules/carp/Makefile +++ b/sys/modules/carp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet .PATH: ${SRCTOP}/sys/crypto diff --git a/sys/modules/cas/Makefile b/sys/modules/cas/Makefile index 45d475734562..6e0098414ef4 100644 --- a/sys/modules/cas/Makefile +++ b/sys/modules/cas/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cas KMOD= if_cas diff --git a/sys/modules/cbb/Makefile b/sys/modules/cbb/Makefile index 156a273e01b2..a715d428cbde 100644 --- a/sys/modules/cbb/Makefile +++ b/sys/modules/cbb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pccbb KMOD= cbb diff --git a/sys/modules/cc/Makefile b/sys/modules/cc/Makefile index c3e59aef331e..2ec1c49621c1 100644 --- a/sys/modules/cc/Makefile +++ b/sys/modules/cc/Makefile @@ -1,4 +1,3 @@ - SUBDIR= cc_newreno \ cc_cubic \ cc_dctcp \ diff --git a/sys/modules/cc/cc_cdg/Makefile b/sys/modules/cc/cc_cdg/Makefile index 8da536709e7d..828f309dcc00 100644 --- a/sys/modules/cc/cc_cdg/Makefile +++ b/sys/modules/cc/cc_cdg/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_cdg SRCS= cc_cdg.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_chd/Makefile b/sys/modules/cc/cc_chd/Makefile index 0f682432d26d..b8e6304da9c1 100644 --- a/sys/modules/cc/cc_chd/Makefile +++ b/sys/modules/cc/cc_chd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_chd SRCS= cc_chd.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_cubic/Makefile b/sys/modules/cc/cc_cubic/Makefile index 6599126e0b8d..28d662c6d1f8 100644 --- a/sys/modules/cc/cc_cubic/Makefile +++ b/sys/modules/cc/cc_cubic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_cubic SRCS= cc_cubic.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_dctcp/Makefile b/sys/modules/cc/cc_dctcp/Makefile index a084ae4f6e0e..7ef327b50293 100644 --- a/sys/modules/cc/cc_dctcp/Makefile +++ b/sys/modules/cc/cc_dctcp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_dctcp SRCS= cc_dctcp.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_hd/Makefile b/sys/modules/cc/cc_hd/Makefile index ae3fe500a278..d1df7f60761f 100644 --- a/sys/modules/cc/cc_hd/Makefile +++ b/sys/modules/cc/cc_hd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_hd SRCS= cc_hd.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_htcp/Makefile b/sys/modules/cc/cc_htcp/Makefile index 0475f768a545..12506b20a719 100644 --- a/sys/modules/cc/cc_htcp/Makefile +++ b/sys/modules/cc/cc_htcp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_htcp SRCS= cc_htcp.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_newreno/Makefile b/sys/modules/cc/cc_newreno/Makefile index d6ec03807b6f..7b1ee5a1a8ce 100644 --- a/sys/modules/cc/cc_newreno/Makefile +++ b/sys/modules/cc/cc_newreno/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_newreno SRCS= cc_newreno.c opt_kern_tls.h diff --git a/sys/modules/cc/cc_vegas/Makefile b/sys/modules/cc/cc_vegas/Makefile index 87f36414a2e2..6929ea55bc8b 100644 --- a/sys/modules/cc/cc_vegas/Makefile +++ b/sys/modules/cc/cc_vegas/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/cc KMOD= cc_vegas SRCS= cc_vegas.c opt_kern_tls.h diff --git a/sys/modules/ccp/Makefile b/sys/modules/ccp/Makefile index c31c2a3bfe99..d268f0b58a91 100644 --- a/sys/modules/ccp/Makefile +++ b/sys/modules/ccp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/ccp KMOD= ccp diff --git a/sys/modules/cd9660/Makefile b/sys/modules/cd9660/Makefile index d1563bcafd34..e39e859b933f 100644 --- a/sys/modules/cd9660/Makefile +++ b/sys/modules/cd9660/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/cd9660 KMOD= cd9660 diff --git a/sys/modules/cd9660_iconv/Makefile b/sys/modules/cd9660_iconv/Makefile index 9a4f27e829a2..1e6f97cf8ce2 100644 --- a/sys/modules/cd9660_iconv/Makefile +++ b/sys/modules/cd9660_iconv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/cd9660 KMOD= cd9660_iconv SRCS= cd9660_iconv.c diff --git a/sys/modules/cfi/Makefile b/sys/modules/cfi/Makefile index c795803a08f3..d71d2ba0cc84 100644 --- a/sys/modules/cfi/Makefile +++ b/sys/modules/cfi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cfi KMOD= cfi diff --git a/sys/modules/cfiscsi/Makefile b/sys/modules/cfiscsi/Makefile index 4d6538684038..f896e27c09f2 100644 --- a/sys/modules/cfiscsi/Makefile +++ b/sys/modules/cfiscsi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/cam/ctl KMOD= cfiscsi diff --git a/sys/modules/chromebook_platform/Makefile b/sys/modules/chromebook_platform/Makefile index 2f8ff9167b75..287db3565c0d 100644 --- a/sys/modules/chromebook_platform/Makefile +++ b/sys/modules/chromebook_platform/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/chromebook_platform KMOD= chromebook_platform SRCS= chromebook_platform.c bus_if.h device_if.h pci_if.h diff --git a/sys/modules/chvgpio/Makefile b/sys/modules/chvgpio/Makefile index 8c4dbcdb2830..6983da86bd9e 100644 --- a/sys/modules/chvgpio/Makefile +++ b/sys/modules/chvgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/gpio KMOD= chvgpio SRCS= chvgpio.c diff --git a/sys/modules/ciss/Makefile b/sys/modules/ciss/Makefile index b2025106248e..81b50a7111d1 100644 --- a/sys/modules/ciss/Makefile +++ b/sys/modules/ciss/Makefile @@ -1,4 +1,3 @@ - KMOD = ciss .PATH: ${SRCTOP}/sys/dev/${KMOD} SRCS = ciss.c diff --git a/sys/modules/coretemp/Makefile b/sys/modules/coretemp/Makefile index a77c8c956956..3873009ada49 100644 --- a/sys/modules/coretemp/Makefile +++ b/sys/modules/coretemp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/coretemp KMOD= coretemp diff --git a/sys/modules/cpsw/Makefile b/sys/modules/cpsw/Makefile index 05dc943bace9..3b083a326150 100644 --- a/sys/modules/cpsw/Makefile +++ b/sys/modules/cpsw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/ti/cpsw KMOD= if_cpsw diff --git a/sys/modules/cpuctl/Makefile b/sys/modules/cpuctl/Makefile index 4a6e302b60c7..35823e959159 100644 --- a/sys/modules/cpuctl/Makefile +++ b/sys/modules/cpuctl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cpuctl KMOD= cpuctl diff --git a/sys/modules/cpufreq/Makefile b/sys/modules/cpufreq/Makefile index 6b88f1a6c02a..9a417f72fc27 100644 --- a/sys/modules/cpufreq/Makefile +++ b/sys/modules/cpufreq/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cpufreq \ ${SRCTOP}/sys/${MACHINE_CPUARCH}/cpufreq diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index 59f66aeff3cc..95700b23c72f 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -1,4 +1,3 @@ - LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodium .PATH: ${SRCTOP}/sys/opencrypto diff --git a/sys/modules/cryptodev/Makefile b/sys/modules/cryptodev/Makefile index a6e9ef9ae822..9a2f30d094a4 100644 --- a/sys/modules/cryptodev/Makefile +++ b/sys/modules/cryptodev/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/opencrypto KMOD = cryptodev SRCS = cryptodev.c diff --git a/sys/modules/ctl/Makefile b/sys/modules/ctl/Makefile index 9fb94ddc9bca..86fd89feb4b2 100644 --- a/sys/modules/ctl/Makefile +++ b/sys/modules/ctl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/cam/ctl KMOD= ctl diff --git a/sys/modules/cxgb/Makefile b/sys/modules/cxgb/Makefile index 144d8f8531db..2989ad580b97 100644 --- a/sys/modules/cxgb/Makefile +++ b/sys/modules/cxgb/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/cxgb/cxgb/Makefile b/sys/modules/cxgb/cxgb/Makefile index 08644a5d8058..736bd75e3f2d 100644 --- a/sys/modules/cxgb/cxgb/Makefile +++ b/sys/modules/cxgb/cxgb/Makefile @@ -1,4 +1,3 @@ - CXGB = ${SRCTOP}/sys/dev/cxgb .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys diff --git a/sys/modules/cxgb/cxgb_t3fw/Makefile b/sys/modules/cxgb/cxgb_t3fw/Makefile index 602fae4ff2a9..b97e3179c6c4 100644 --- a/sys/modules/cxgb/cxgb_t3fw/Makefile +++ b/sys/modules/cxgb/cxgb_t3fw/Makefile @@ -1,4 +1,3 @@ - CXGB = ${SRCTOP}/sys/dev/cxgb .PATH: ${CXGB} diff --git a/sys/modules/cxgbe/ccr/Makefile b/sys/modules/cxgbe/ccr/Makefile index eb2171f6ea80..dade268baea2 100644 --- a/sys/modules/cxgbe/ccr/Makefile +++ b/sys/modules/cxgbe/ccr/Makefile @@ -1,4 +1,3 @@ - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/crypto diff --git a/sys/modules/cxgbe/cxgbei/Makefile b/sys/modules/cxgbe/cxgbei/Makefile index 6e87566b07e8..7238ec6b423a 100644 --- a/sys/modules/cxgbe/cxgbei/Makefile +++ b/sys/modules/cxgbe/cxgbei/Makefile @@ -1,4 +1,3 @@ - CXGBE = ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/cxgbei diff --git a/sys/modules/cxgbe/iw_cxgbe/Makefile b/sys/modules/cxgbe/iw_cxgbe/Makefile index 9416cdec5ce3..83a861bf9d45 100644 --- a/sys/modules/cxgbe/iw_cxgbe/Makefile +++ b/sys/modules/cxgbe/iw_cxgbe/Makefile @@ -1,4 +1,3 @@ - CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/iw_cxgbe diff --git a/sys/modules/dc/Makefile b/sys/modules/dc/Makefile index e45f76fdf917..3ca6edff82a2 100644 --- a/sys/modules/dc/Makefile +++ b/sys/modules/dc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/dc KMOD= if_dc diff --git a/sys/modules/dpdk_lpm4/Makefile b/sys/modules/dpdk_lpm4/Makefile index cd9f0f415ce7..ff68fac78915 100644 --- a/sys/modules/dpdk_lpm4/Makefile +++ b/sys/modules/dpdk_lpm4/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/dpdk_lpm6/Makefile b/sys/modules/dpdk_lpm6/Makefile index 3145c0646a90..f2248e5d1c1c 100644 --- a/sys/modules/dpdk_lpm6/Makefile +++ b/sys/modules/dpdk_lpm6/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/dpms/Makefile b/sys/modules/dpms/Makefile index 55b0a1ef1c3f..de15963f1084 100644 --- a/sys/modules/dpms/Makefile +++ b/sys/modules/dpms/Makefile @@ -1,4 +1,3 @@ - KMOD= dpms SRCS= bus_if.h device_if.h pci_if.h diff --git a/sys/modules/dtb/sifive/Makefile b/sys/modules/dtb/sifive/Makefile index 818ffa472ec0..a0566e5fc9bd 100644 --- a/sys/modules/dtb/sifive/Makefile +++ b/sys/modules/dtb/sifive/Makefile @@ -1,4 +1,3 @@ - DTS= \ sifive/hifive-unleashed-a00.dts diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile index 3cc672b62c3b..9a67f517fc5c 100644 --- a/sys/modules/dtrace/Makefile +++ b/sys/modules/dtrace/Makefile @@ -1,4 +1,3 @@ - .include "Makefile.inc" SUBDIR= dtaudit \ diff --git a/sys/modules/dtrace/Makefile.inc b/sys/modules/dtrace/Makefile.inc index fd3c99a9407a..c23cf4c476ce 100644 --- a/sys/modules/dtrace/Makefile.inc +++ b/sys/modules/dtrace/Makefile.inc @@ -1,4 +1,3 @@ - IGNORE_PRAGMA= 1 load : diff --git a/sys/modules/dtrace/dtaudit/Makefile b/sys/modules/dtrace/dtaudit/Makefile index 22e85a70afac..205c4ef08795 100644 --- a/sys/modules/dtrace/dtaudit/Makefile +++ b/sys/modules/dtrace/dtaudit/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/security/audit diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile index 5c1570b69e86..6b58ac097378 100644 --- a/sys/modules/dtrace/dtmalloc/Makefile +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/dtmalloc diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile index 24e58828a8b7..11b254c3d7bd 100644 --- a/sys/modules/dtrace/dtnfscl/Makefile +++ b/sys/modules/dtrace/dtnfscl/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/fs/nfsclient diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 53e5f1792ad5..765a8477f3f2 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys ARCHDIR= ${MACHINE_CPUARCH} diff --git a/sys/modules/dtrace/dtrace_test/Makefile b/sys/modules/dtrace/dtrace_test/Makefile index 70f12982162c..dacb44710fb4 100644 --- a/sys/modules/dtrace/dtrace_test/Makefile +++ b/sys/modules/dtrace/dtrace_test/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/dtrace diff --git a/sys/modules/dtrace/dtraceall/Makefile b/sys/modules/dtrace/dtraceall/Makefile index ecbb0f4a21bb..8228a0f0c98f 100644 --- a/sys/modules/dtrace/dtraceall/Makefile +++ b/sys/modules/dtrace/dtraceall/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys KMOD= dtraceall diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile index 271ac07cfbbb..af0cace6c5a9 100644 --- a/sys/modules/dtrace/fasttrap/Makefile +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile index 370ee316098d..97898091fcec 100644 --- a/sys/modules/dtrace/fbt/Makefile +++ b/sys/modules/dtrace/fbt/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/fbt diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile index b193ee0e3e43..7cb53c4c788e 100644 --- a/sys/modules/dtrace/profile/Makefile +++ b/sys/modules/dtrace/profile/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/profile diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile index b622d628eacd..d4e8b57aac67 100644 --- a/sys/modules/dtrace/prototype/Makefile +++ b/sys/modules/dtrace/prototype/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile index ee6627c5e72e..e8db8a77f353 100644 --- a/sys/modules/dtrace/sdt/Makefile +++ b/sys/modules/dtrace/sdt/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/sdt diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile index ab16dd031244..dff3ca03db8a 100644 --- a/sys/modules/dtrace/systrace/Makefile +++ b/sys/modules/dtrace/systrace/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/systrace diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile index c9376a4b206d..06023e79dea2 100644 --- a/sys/modules/dtrace/systrace_freebsd32/Makefile +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/systrace diff --git a/sys/modules/dtrace/systrace_linux/Makefile b/sys/modules/dtrace/systrace_linux/Makefile index acdc7c0c967b..204b40ab674c 100644 --- a/sys/modules/dtrace/systrace_linux/Makefile +++ b/sys/modules/dtrace/systrace_linux/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/systrace diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile index 2970e42a58f5..82b6482a7ad2 100644 --- a/sys/modules/dtrace/systrace_linux32/Makefile +++ b/sys/modules/dtrace/systrace_linux32/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/dev/systrace diff --git a/sys/modules/dummynet/Makefile b/sys/modules/dummynet/Makefile index 6c7599eae45f..4ff023e6bca5 100644 --- a/sys/modules/dummynet/Makefile +++ b/sys/modules/dummynet/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw KMOD= dummynet SRCS= ip_dummynet.c diff --git a/sys/modules/e6000sw/Makefile b/sys/modules/e6000sw/Makefile index a4315ca16ddc..da08f80b0a29 100644 --- a/sys/modules/e6000sw/Makefile +++ b/sys/modules/e6000sw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/etherswitch/e6000sw KMOD= e6000sw diff --git a/sys/modules/efirt/Makefile b/sys/modules/efirt/Makefile index 2993f5de0ef6..2befdcb7dd8d 100644 --- a/sys/modules/efirt/Makefile +++ b/sys/modules/efirt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/${MACHINE}/${MACHINE} .PATH: ${SRCTOP}/sys/dev/efidev diff --git a/sys/modules/em/Makefile b/sys/modules/em/Makefile index bcf8d262dc45..aad7cb07a31f 100644 --- a/sys/modules/em/Makefile +++ b/sys/modules/em/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/e1000 KMOD = if_em SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h \ diff --git a/sys/modules/enetc/Makefile b/sys/modules/enetc/Makefile index b54c5171616b..e4259b692925 100644 --- a/sys/modules/enetc/Makefile +++ b/sys/modules/enetc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/enetc KMOD = if_enetc diff --git a/sys/modules/epoch_test/Makefile b/sys/modules/epoch_test/Makefile index 64d16faf7893..c0d16756e86d 100644 --- a/sys/modules/epoch_test/Makefile +++ b/sys/modules/epoch_test/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/tests/epoch KMOD= epoch_test SRCS= epoch_test.c \ diff --git a/sys/modules/evdev/Makefile b/sys/modules/evdev/Makefile index 49183bd3a8de..bd66013885db 100644 --- a/sys/modules/evdev/Makefile +++ b/sys/modules/evdev/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/evdev KMOD= evdev diff --git a/sys/modules/exca/Makefile b/sys/modules/exca/Makefile index 210a6eed5454..b8c67212d744 100644 --- a/sys/modules/exca/Makefile +++ b/sys/modules/exca/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/exca KMOD= exca diff --git a/sys/modules/ext2fs/Makefile b/sys/modules/ext2fs/Makefile index 0b0b20e29b1f..1e831c898443 100644 --- a/sys/modules/ext2fs/Makefile +++ b/sys/modules/ext2fs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ diff --git a/sys/modules/fdc/Makefile b/sys/modules/fdc/Makefile index 1b131cc4d162..716e935cdc46 100644 --- a/sys/modules/fdc/Makefile +++ b/sys/modules/fdc/Makefile @@ -1,4 +1,3 @@ - KMOD= fdc .PATH: ${SRCTOP}/sys/dev/fdc diff --git a/sys/modules/fdescfs/Makefile b/sys/modules/fdescfs/Makefile index 6745cffcfb24..29536b25c195 100644 --- a/sys/modules/fdescfs/Makefile +++ b/sys/modules/fdescfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/fdescfs KMOD= fdescfs diff --git a/sys/modules/fdt/fdt_slicer/Makefile b/sys/modules/fdt/fdt_slicer/Makefile index 75de4cc58172..7dbbef513db0 100644 --- a/sys/modules/fdt/fdt_slicer/Makefile +++ b/sys/modules/fdt/fdt_slicer/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/fdt KMOD= fdt_slicer diff --git a/sys/modules/ffec/Makefile b/sys/modules/ffec/Makefile index 72bf600ac444..6cea0ced85a4 100644 --- a/sys/modules/ffec/Makefile +++ b/sys/modules/ffec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ffec KMOD= if_ffec diff --git a/sys/modules/fib_dxr/Makefile b/sys/modules/fib_dxr/Makefile index e620fdeb7fa8..7d1996ba510f 100644 --- a/sys/modules/fib_dxr/Makefile +++ b/sys/modules/fib_dxr/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/filemon/Makefile b/sys/modules/filemon/Makefile index 26c23854b984..97d24e044de1 100644 --- a/sys/modules/filemon/Makefile +++ b/sys/modules/filemon/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/filemon KMOD= filemon diff --git a/sys/modules/firewire/Makefile b/sys/modules/firewire/Makefile index d5254f528eea..492a59a71e33 100644 --- a/sys/modules/firewire/Makefile +++ b/sys/modules/firewire/Makefile @@ -1,4 +1,3 @@ - SUBDIR= firewire \ fwe \ fwip \ diff --git a/sys/modules/firewire/Makefile.inc b/sys/modules/firewire/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/firewire/Makefile.inc +++ b/sys/modules/firewire/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/firewire/firewire/Makefile b/sys/modules/firewire/firewire/Makefile index 7eb04113b8a5..153e6f05c334 100644 --- a/sys/modules/firewire/firewire/Makefile +++ b/sys/modules/firewire/firewire/Makefile @@ -1,4 +1,3 @@ - # Makefile for the IEEE1394 OHCI chipset .PATH: ${SRCTOP}/sys/dev/firewire diff --git a/sys/modules/firewire/fwe/Makefile b/sys/modules/firewire/fwe/Makefile index 0e05a7d35489..1b911050d293 100644 --- a/sys/modules/firewire/fwe/Makefile +++ b/sys/modules/firewire/fwe/Makefile @@ -1,4 +1,3 @@ - # Makefile for the fwe(4) module (Ethernet over IEEE1394) .PATH: ${SRCTOP}/sys/dev/firewire diff --git a/sys/modules/firewire/fwip/Makefile b/sys/modules/firewire/fwip/Makefile index 063dc2f0d502..b56bdb8d1c70 100644 --- a/sys/modules/firewire/fwip/Makefile +++ b/sys/modules/firewire/fwip/Makefile @@ -1,4 +1,3 @@ - # Makefile for the fwip(4) module (IP over IEEE1394) .PATH: ${SRCTOP}/sys/dev/firewire ${SRCTOP}/sys/net diff --git a/sys/modules/firewire/sbp/Makefile b/sys/modules/firewire/sbp/Makefile index c4fb487c3093..f27d37d9f68a 100644 --- a/sys/modules/firewire/sbp/Makefile +++ b/sys/modules/firewire/sbp/Makefile @@ -1,4 +1,3 @@ - # Makefile for the SBP-II (Serial Bus Protocol 2/SCSI over IEEE1394) .PATH: ${SRCTOP}/sys/dev/firewire diff --git a/sys/modules/firewire/sbp_targ/Makefile b/sys/modules/firewire/sbp_targ/Makefile index ff14615bd541..ab85d97f025f 100644 --- a/sys/modules/firewire/sbp_targ/Makefile +++ b/sys/modules/firewire/sbp_targ/Makefile @@ -1,4 +1,3 @@ - # Makefile for the SBP-II Target mode .PATH: ${SRCTOP}/sys/dev/firewire diff --git a/sys/modules/firmware/Makefile b/sys/modules/firmware/Makefile index 949bc3e6cf24..71fe5064c8f4 100644 --- a/sys/modules/firmware/Makefile +++ b/sys/modules/firmware/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= firmware diff --git a/sys/modules/flash/flexspi/Makefile b/sys/modules/flash/flexspi/Makefile index 25d937df9316..94e365844844 100644 --- a/sys/modules/flash/flexspi/Makefile +++ b/sys/modules/flash/flexspi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/flash/flexspi KMOD= flexspi diff --git a/sys/modules/ftgpio/Makefile b/sys/modules/ftgpio/Makefile index eb8e22b48870..33f329dee9f8 100644 --- a/sys/modules/ftgpio/Makefile +++ b/sys/modules/ftgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ftgpio KMOD= ftgpio SRCS= ftgpio.c diff --git a/sys/modules/ftwd/Makefile b/sys/modules/ftwd/Makefile index 56dd7c8a04f9..f4220616baf5 100644 --- a/sys/modules/ftwd/Makefile +++ b/sys/modules/ftwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ftwd KMOD= ftwd diff --git a/sys/modules/fusefs/Makefile b/sys/modules/fusefs/Makefile index 682505c401ba..3c852cf7a3f0 100644 --- a/sys/modules/fusefs/Makefile +++ b/sys/modules/fusefs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/fuse KMOD= fusefs diff --git a/sys/modules/fxp/Makefile b/sys/modules/fxp/Makefile index 3f8963b3f38a..43dd4be031c7 100644 --- a/sys/modules/fxp/Makefile +++ b/sys/modules/fxp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/fxp KMOD= if_fxp diff --git a/sys/modules/gem/Makefile b/sys/modules/gem/Makefile index 820ff4f7bd53..00bae15d6f60 100644 --- a/sys/modules/gem/Makefile +++ b/sys/modules/gem/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/gem KMOD= if_gem diff --git a/sys/modules/genet/Makefile b/sys/modules/genet/Makefile index fac165c688ba..fa7e8f94425a 100644 --- a/sys/modules/genet/Makefile +++ b/sys/modules/genet/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm64/broadcom/genet KMOD= if_genet diff --git a/sys/modules/geom/Makefile b/sys/modules/geom/Makefile index 24be5b1b82d7..f696a190fdeb 100644 --- a/sys/modules/geom/Makefile +++ b/sys/modules/geom/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/geom/Makefile.inc b/sys/modules/geom/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/geom/Makefile.inc +++ b/sys/modules/geom/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/geom/geom_cache/Makefile b/sys/modules/geom/geom_cache/Makefile index 73bb7665d745..a8b20fdb2102 100644 --- a/sys/modules/geom/geom_cache/Makefile +++ b/sys/modules/geom/geom_cache/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/cache KMOD= geom_cache diff --git a/sys/modules/geom/geom_ccd/Makefile b/sys/modules/geom/geom_ccd/Makefile index ada4b9259c0d..4e8af6f58571 100644 --- a/sys/modules/geom/geom_ccd/Makefile +++ b/sys/modules/geom/geom_ccd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom KMOD= geom_ccd diff --git a/sys/modules/geom/geom_concat/Makefile b/sys/modules/geom/geom_concat/Makefile index 603f7d81cb19..e322da86f67f 100644 --- a/sys/modules/geom/geom_concat/Makefile +++ b/sys/modules/geom/geom_concat/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/concat KMOD= geom_concat diff --git a/sys/modules/geom/geom_eli/Makefile b/sys/modules/geom/geom_eli/Makefile index 68907218fdae..88f13bbde33d 100644 --- a/sys/modules/geom/geom_eli/Makefile +++ b/sys/modules/geom/geom_eli/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/eli KMOD= geom_eli diff --git a/sys/modules/geom/geom_flashmap/Makefile b/sys/modules/geom/geom_flashmap/Makefile index 520d0ad783c6..189102a547d0 100644 --- a/sys/modules/geom/geom_flashmap/Makefile +++ b/sys/modules/geom/geom_flashmap/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom KMOD= geom_flashmap diff --git a/sys/modules/geom/geom_gate/Makefile b/sys/modules/geom/geom_gate/Makefile index 3d084790eb7c..3946e8554879 100644 --- a/sys/modules/geom/geom_gate/Makefile +++ b/sys/modules/geom/geom_gate/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/gate KMOD= geom_gate diff --git a/sys/modules/geom/geom_journal/Makefile b/sys/modules/geom/geom_journal/Makefile index b8bd96d3b242..69c76dbf9115 100644 --- a/sys/modules/geom/geom_journal/Makefile +++ b/sys/modules/geom/geom_journal/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/journal KMOD= geom_journal diff --git a/sys/modules/geom/geom_label/Makefile b/sys/modules/geom/geom_label/Makefile index 37ee312f849e..e867d6ae0b93 100644 --- a/sys/modules/geom/geom_label/Makefile +++ b/sys/modules/geom/geom_label/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/label KMOD= geom_label diff --git a/sys/modules/geom/geom_linux_lvm/Makefile b/sys/modules/geom/geom_linux_lvm/Makefile index 0d0ee72e8d87..66661692a901 100644 --- a/sys/modules/geom/geom_linux_lvm/Makefile +++ b/sys/modules/geom/geom_linux_lvm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/linux_lvm KMOD= geom_linux_lvm diff --git a/sys/modules/geom/geom_mirror/Makefile b/sys/modules/geom/geom_mirror/Makefile index a46e0ceebf38..fcf8dc7d697d 100644 --- a/sys/modules/geom/geom_mirror/Makefile +++ b/sys/modules/geom/geom_mirror/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/mirror KMOD= geom_mirror diff --git a/sys/modules/geom/geom_mountver/Makefile b/sys/modules/geom/geom_mountver/Makefile index f5df29d8f29a..c1fb3fcfb3b4 100644 --- a/sys/modules/geom/geom_mountver/Makefile +++ b/sys/modules/geom/geom_mountver/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/mountver KMOD= geom_mountver diff --git a/sys/modules/geom/geom_multipath/Makefile b/sys/modules/geom/geom_multipath/Makefile index a45f5d330631..a6dd25191d45 100644 --- a/sys/modules/geom/geom_multipath/Makefile +++ b/sys/modules/geom/geom_multipath/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/multipath KMOD= geom_multipath diff --git a/sys/modules/geom/geom_nop/Makefile b/sys/modules/geom/geom_nop/Makefile index 2436fc81e268..ebc2f9e8b7eb 100644 --- a/sys/modules/geom/geom_nop/Makefile +++ b/sys/modules/geom/geom_nop/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/nop KMOD= geom_nop diff --git a/sys/modules/geom/geom_part/Makefile b/sys/modules/geom/geom_part/Makefile index f9a6076f184b..80802c500c10 100644 --- a/sys/modules/geom/geom_part/Makefile +++ b/sys/modules/geom/geom_part/Makefile @@ -1,4 +1,3 @@ - SUBDIR= geom_part_apm \ geom_part_bsd \ geom_part_bsd64 \ diff --git a/sys/modules/geom/geom_part/geom_part_apm/Makefile b/sys/modules/geom/geom_part/geom_part_apm/Makefile index 2922e575ac0e..1df21acd5f75 100644 --- a/sys/modules/geom/geom_part/geom_part_apm/Makefile +++ b/sys/modules/geom/geom_part/geom_part_apm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_apm diff --git a/sys/modules/geom/geom_part/geom_part_bsd/Makefile b/sys/modules/geom/geom_part/geom_part_bsd/Makefile index 63c8a4813bd9..558056d2a994 100644 --- a/sys/modules/geom/geom_part/geom_part_bsd/Makefile +++ b/sys/modules/geom/geom_part/geom_part_bsd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part ${SRCTOP}/sys/geom KMOD= geom_part_bsd diff --git a/sys/modules/geom/geom_part/geom_part_bsd64/Makefile b/sys/modules/geom/geom_part/geom_part_bsd64/Makefile index c4848ffd3c00..f316c3eec031 100644 --- a/sys/modules/geom/geom_part/geom_part_bsd64/Makefile +++ b/sys/modules/geom/geom_part/geom_part_bsd64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_bsd64 diff --git a/sys/modules/geom/geom_part/geom_part_ebr/Makefile b/sys/modules/geom/geom_part/geom_part_ebr/Makefile index cbc970754444..947eca3b2036 100644 --- a/sys/modules/geom/geom_part/geom_part_ebr/Makefile +++ b/sys/modules/geom/geom_part/geom_part_ebr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_ebr diff --git a/sys/modules/geom/geom_part/geom_part_gpt/Makefile b/sys/modules/geom/geom_part/geom_part_gpt/Makefile index 0183caa98e59..bdc4a9ab18c2 100644 --- a/sys/modules/geom/geom_part/geom_part_gpt/Makefile +++ b/sys/modules/geom/geom_part/geom_part_gpt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_gpt diff --git a/sys/modules/geom/geom_part/geom_part_ldm/Makefile b/sys/modules/geom/geom_part/geom_part_ldm/Makefile index dcf3a83f4039..a9bab9fd5fd5 100644 --- a/sys/modules/geom/geom_part/geom_part_ldm/Makefile +++ b/sys/modules/geom/geom_part/geom_part_ldm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_ldm diff --git a/sys/modules/geom/geom_part/geom_part_mbr/Makefile b/sys/modules/geom/geom_part/geom_part_mbr/Makefile index b0c6664a33c6..1c71b0b6a224 100644 --- a/sys/modules/geom/geom_part/geom_part_mbr/Makefile +++ b/sys/modules/geom/geom_part/geom_part_mbr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/part KMOD= geom_part_mbr diff --git a/sys/modules/geom/geom_raid/Makefile b/sys/modules/geom/geom_raid/Makefile index 65bd41b92698..9ef0fbce93fe 100644 --- a/sys/modules/geom/geom_raid/Makefile +++ b/sys/modules/geom/geom_raid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/raid KMOD= geom_raid diff --git a/sys/modules/geom/geom_raid3/Makefile b/sys/modules/geom/geom_raid3/Makefile index 8581b689aacf..11f1e3ac9727 100644 --- a/sys/modules/geom/geom_raid3/Makefile +++ b/sys/modules/geom/geom_raid3/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/raid3 KMOD= geom_raid3 diff --git a/sys/modules/geom/geom_shsec/Makefile b/sys/modules/geom/geom_shsec/Makefile index 618dfba4387a..bb22968aae0d 100644 --- a/sys/modules/geom/geom_shsec/Makefile +++ b/sys/modules/geom/geom_shsec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/shsec KMOD= geom_shsec diff --git a/sys/modules/geom/geom_stripe/Makefile b/sys/modules/geom/geom_stripe/Makefile index 4ae94ca09bd5..d7be4d8a6452 100644 --- a/sys/modules/geom/geom_stripe/Makefile +++ b/sys/modules/geom/geom_stripe/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/stripe KMOD= geom_stripe diff --git a/sys/modules/geom/geom_union/Makefile b/sys/modules/geom/geom_union/Makefile index 3ca2f4ce151e..3dfde4a9fc8d 100644 --- a/sys/modules/geom/geom_union/Makefile +++ b/sys/modules/geom/geom_union/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/union KMOD= geom_union diff --git a/sys/modules/geom/geom_uzip/Makefile b/sys/modules/geom/geom_uzip/Makefile index 958da0c9d214..953436484d32 100644 --- a/sys/modules/geom/geom_uzip/Makefile +++ b/sys/modules/geom/geom_uzip/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/sys/geom/uzip ${SRCTOP}/sys/net diff --git a/sys/modules/geom/geom_vinum/Makefile b/sys/modules/geom/geom_vinum/Makefile index d66ac02a13d4..ba40c497736d 100644 --- a/sys/modules/geom/geom_vinum/Makefile +++ b/sys/modules/geom/geom_vinum/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/vinum KMOD= geom_vinum diff --git a/sys/modules/geom/geom_virstor/Makefile b/sys/modules/geom/geom_virstor/Makefile index 2e19affd247a..8ffcf4493cc1 100644 --- a/sys/modules/geom/geom_virstor/Makefile +++ b/sys/modules/geom/geom_virstor/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/virstor KMOD= geom_virstor diff --git a/sys/modules/geom/geom_zero/Makefile b/sys/modules/geom/geom_zero/Makefile index c43d896d5399..06c23835f72c 100644 --- a/sys/modules/geom/geom_zero/Makefile +++ b/sys/modules/geom/geom_zero/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/zero KMOD= geom_zero diff --git a/sys/modules/glxiic/Makefile b/sys/modules/glxiic/Makefile index 09853747adb0..c2a21e6d9aea 100644 --- a/sys/modules/glxiic/Makefile +++ b/sys/modules/glxiic/Makefile @@ -1,4 +1,3 @@ - #CFLAGS+= -DGLXIIC_DEBUG .PATH: ${SRCTOP}/sys/dev/glxiic diff --git a/sys/modules/glxsb/Makefile b/sys/modules/glxsb/Makefile index 8a138e0fea71..395916b2c645 100644 --- a/sys/modules/glxsb/Makefile +++ b/sys/modules/glxsb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/glxsb KMOD = glxsb SRCS = glxsb.c glxsb_hash.c glxsb.h diff --git a/sys/modules/hid/Makefile b/sys/modules/hid/Makefile index f2331d7db728..56c3267d8684 100644 --- a/sys/modules/hid/Makefile +++ b/sys/modules/hid/Makefile @@ -1,4 +1,3 @@ - SUBDIR = \ hid \ hidbus \ diff --git a/sys/modules/hid/bcm5974/Makefile b/sys/modules/hid/bcm5974/Makefile index 50b51f497d85..803a43c96107 100644 --- a/sys/modules/hid/bcm5974/Makefile +++ b/sys/modules/hid/bcm5974/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= bcm5974 diff --git a/sys/modules/hid/hconf/Makefile b/sys/modules/hid/hconf/Makefile index 32ab19a954f6..86475e06ad25 100644 --- a/sys/modules/hid/hconf/Makefile +++ b/sys/modules/hid/hconf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hconf diff --git a/sys/modules/hid/hcons/Makefile b/sys/modules/hid/hcons/Makefile index d012a3f49569..d020ba08a22b 100644 --- a/sys/modules/hid/hcons/Makefile +++ b/sys/modules/hid/hcons/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hcons diff --git a/sys/modules/hid/hgame/Makefile b/sys/modules/hid/hgame/Makefile index 3af829d1e971..a9d6dadbdbc6 100644 --- a/sys/modules/hid/hgame/Makefile +++ b/sys/modules/hid/hgame/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hgame diff --git a/sys/modules/hid/hid/Makefile b/sys/modules/hid/hid/Makefile index e9104b27e377..26f98d7eb575 100644 --- a/sys/modules/hid/hid/Makefile +++ b/sys/modules/hid/hid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hid diff --git a/sys/modules/hid/hidbus/Makefile b/sys/modules/hid/hidbus/Makefile index c3aa91acff4d..f92f17deb5c3 100644 --- a/sys/modules/hid/hidbus/Makefile +++ b/sys/modules/hid/hidbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hidbus diff --git a/sys/modules/hid/hidmap/Makefile b/sys/modules/hid/hidmap/Makefile index f682a39925eb..9be54e725d45 100644 --- a/sys/modules/hid/hidmap/Makefile +++ b/sys/modules/hid/hidmap/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hidmap diff --git a/sys/modules/hid/hidraw/Makefile b/sys/modules/hid/hidraw/Makefile index 6148cf9e193e..996b8770e53f 100644 --- a/sys/modules/hid/hidraw/Makefile +++ b/sys/modules/hid/hidraw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hidraw diff --git a/sys/modules/hid/hkbd/Makefile b/sys/modules/hid/hkbd/Makefile index 5dc4040783ef..42b5d69dda9e 100644 --- a/sys/modules/hid/hkbd/Makefile +++ b/sys/modules/hid/hkbd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hkbd diff --git a/sys/modules/hid/hms/Makefile b/sys/modules/hid/hms/Makefile index 573757cad525..0c6e9c1b1ec2 100644 --- a/sys/modules/hid/hms/Makefile +++ b/sys/modules/hid/hms/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hms diff --git a/sys/modules/hid/hmt/Makefile b/sys/modules/hid/hmt/Makefile index a96fdd44b311..0f46acba198c 100644 --- a/sys/modules/hid/hmt/Makefile +++ b/sys/modules/hid/hmt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hmt diff --git a/sys/modules/hid/hpen/Makefile b/sys/modules/hid/hpen/Makefile index ed008b43565e..e1db07a9c3f8 100644 --- a/sys/modules/hid/hpen/Makefile +++ b/sys/modules/hid/hpen/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hpen diff --git a/sys/modules/hid/hsctrl/Makefile b/sys/modules/hid/hsctrl/Makefile index 4e0dd5d0c4cc..68984958895e 100644 --- a/sys/modules/hid/hsctrl/Makefile +++ b/sys/modules/hid/hsctrl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= hsctrl diff --git a/sys/modules/hid/ietp/Makefile b/sys/modules/hid/ietp/Makefile index c3b39e7b7a58..1b8baf36ec80 100644 --- a/sys/modules/hid/ietp/Makefile +++ b/sys/modules/hid/ietp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= ietp diff --git a/sys/modules/hid/ps4dshock/Makefile b/sys/modules/hid/ps4dshock/Makefile index bb12c8a16971..0b00f16ca98c 100644 --- a/sys/modules/hid/ps4dshock/Makefile +++ b/sys/modules/hid/ps4dshock/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= ps4dshock diff --git a/sys/modules/hid/xb360gp/Makefile b/sys/modules/hid/xb360gp/Makefile index 1570a6cfadc9..3cc846292e67 100644 --- a/sys/modules/hid/xb360gp/Makefile +++ b/sys/modules/hid/xb360gp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hid KMOD= xb360gp diff --git a/sys/modules/hifn/Makefile b/sys/modules/hifn/Makefile index 8c36def0c97d..a425cc39768a 100644 --- a/sys/modules/hifn/Makefile +++ b/sys/modules/hifn/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hifn KMOD = hifn SRCS = hifn7751.c opt_hifn.h diff --git a/sys/modules/hptiop/Makefile b/sys/modules/hptiop/Makefile index ca28125f3c1a..09249b24a2b6 100644 --- a/sys/modules/hptiop/Makefile +++ b/sys/modules/hptiop/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hptiop KMOD= hptiop diff --git a/sys/modules/hyperv/Makefile b/sys/modules/hyperv/Makefile index 4b9c179641de..170564a730ac 100644 --- a/sys/modules/hyperv/Makefile +++ b/sys/modules/hyperv/Makefile @@ -1,4 +1,3 @@ - SUBDIR = vmbus netvsc storvsc utilities hvsock hid .include diff --git a/sys/modules/hyperv/hid/Makefile b/sys/modules/hyperv/hid/Makefile index 22c8c46490c7..f714ec3756af 100644 --- a/sys/modules/hyperv/hid/Makefile +++ b/sys/modules/hyperv/hid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/input KMOD= hv_hid diff --git a/sys/modules/hyperv/hvsock/Makefile b/sys/modules/hyperv/hvsock/Makefile index d00b8dd35dcb..b168a044775e 100644 --- a/sys/modules/hyperv/hvsock/Makefile +++ b/sys/modules/hyperv/hvsock/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/hvsock KMOD= hv_sock diff --git a/sys/modules/hyperv/netvsc/Makefile b/sys/modules/hyperv/netvsc/Makefile index 1dad0d7b6b6c..37b398de1f4f 100644 --- a/sys/modules/hyperv/netvsc/Makefile +++ b/sys/modules/hyperv/netvsc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/netvsc \ ${SRCTOP}/sys/dev/hyperv/vmbus diff --git a/sys/modules/hyperv/pcib/Makefile b/sys/modules/hyperv/pcib/Makefile index ae785de5e093..be0a905aab80 100644 --- a/sys/modules/hyperv/pcib/Makefile +++ b/sys/modules/hyperv/pcib/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/pcib \ ${SRCTOP}/sys/dev/hyperv/vmbus diff --git a/sys/modules/hyperv/storvsc/Makefile b/sys/modules/hyperv/storvsc/Makefile index 9802a8af02c9..3c96db8e3d62 100644 --- a/sys/modules/hyperv/storvsc/Makefile +++ b/sys/modules/hyperv/storvsc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/storvsc \ ${SRCTOP}/sys/dev/hyperv/vmbus \ diff --git a/sys/modules/hyperv/utilities/Makefile b/sys/modules/hyperv/utilities/Makefile index 353b59af9e5e..42b314e1f156 100644 --- a/sys/modules/hyperv/utilities/Makefile +++ b/sys/modules/hyperv/utilities/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/utilities KMOD= hv_utils diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 9863f4db46ca..5cd9535585d3 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/hyperv/vmbus \ ${SRCTOP}/sys/dev/hyperv/vmbus/${MACHINE_CPUARCH} \ ${SRCTOP}/sys/dev/hyperv/vmbus/x86 diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index 6c976e9303f1..6561327abfca 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -1,4 +1,3 @@ - SUBDIR = \ ads111x \ controllers \ diff --git a/sys/modules/i2c/Makefile.inc b/sys/modules/i2c/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/i2c/Makefile.inc +++ b/sys/modules/i2c/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/i2c/ads111x/Makefile b/sys/modules/i2c/ads111x/Makefile index d02cb704146c..bcc7c52ef087 100644 --- a/sys/modules/i2c/ads111x/Makefile +++ b/sys/modules/i2c/ads111x/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= ads111x diff --git a/sys/modules/i2c/controllers/Makefile b/sys/modules/i2c/controllers/Makefile index ce96c9d5ac8e..2faf6d51a2ba 100644 --- a/sys/modules/i2c/controllers/Makefile +++ b/sys/modules/i2c/controllers/Makefile @@ -1,4 +1,3 @@ - SUBDIR = alpm amdpm amdsmb ichiic ichsmb intpm ismt nfsmb viapm lpbb pcf .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" diff --git a/sys/modules/i2c/controllers/Makefile.inc b/sys/modules/i2c/controllers/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/i2c/controllers/Makefile.inc +++ b/sys/modules/i2c/controllers/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/i2c/controllers/alpm/Makefile b/sys/modules/i2c/controllers/alpm/Makefile index 5c09fbf1db51..6afa48d70a69 100644 --- a/sys/modules/i2c/controllers/alpm/Makefile +++ b/sys/modules/i2c/controllers/alpm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/alpm KMOD = alpm SRCS = device_if.h bus_if.h iicbus_if.h smbus_if.h pci_if.h \ diff --git a/sys/modules/i2c/controllers/amdpm/Makefile b/sys/modules/i2c/controllers/amdpm/Makefile index d04ea542cd37..ef1bccf91aea 100644 --- a/sys/modules/i2c/controllers/amdpm/Makefile +++ b/sys/modules/i2c/controllers/amdpm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdpm KMOD = amdpm SRCS = device_if.h bus_if.h pci_if.h smbus_if.h \ diff --git a/sys/modules/i2c/controllers/amdsmb/Makefile b/sys/modules/i2c/controllers/amdsmb/Makefile index 2c3dd2a2e6b6..db68b51286a9 100644 --- a/sys/modules/i2c/controllers/amdsmb/Makefile +++ b/sys/modules/i2c/controllers/amdsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/amdsmb KMOD= amdsmb diff --git a/sys/modules/i2c/controllers/ichiic/Makefile b/sys/modules/i2c/controllers/ichiic/Makefile index 02ea3694fc89..735a222bea8d 100644 --- a/sys/modules/i2c/controllers/ichiic/Makefile +++ b/sys/modules/i2c/controllers/ichiic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ichiic KMOD = ig4 SRCS = acpi_if.h device_if.h bus_if.h iicbus_if.h pci_if.h \ diff --git a/sys/modules/i2c/controllers/ichsmb/Makefile b/sys/modules/i2c/controllers/ichsmb/Makefile index 3601f737628c..7141216d5879 100644 --- a/sys/modules/i2c/controllers/ichsmb/Makefile +++ b/sys/modules/i2c/controllers/ichsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ichsmb KMOD = ichsmb SRCS = device_if.h bus_if.h iicbb_if.h pci_if.h smbus_if.h \ diff --git a/sys/modules/i2c/controllers/imcsmb/Makefile b/sys/modules/i2c/controllers/imcsmb/Makefile index 25fa1965f463..d51628546e9c 100644 --- a/sys/modules/i2c/controllers/imcsmb/Makefile +++ b/sys/modules/i2c/controllers/imcsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/imcsmb KMOD = imcsmb SRCS = device_if.h bus_if.h pci_if.h smbus_if.h \ diff --git a/sys/modules/i2c/controllers/intpm/Makefile b/sys/modules/i2c/controllers/intpm/Makefile index 294f7e05ecdd..f9f25569cc6a 100644 --- a/sys/modules/i2c/controllers/intpm/Makefile +++ b/sys/modules/i2c/controllers/intpm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/intpm KMOD = intpm SRCS = device_if.h bus_if.h iicbus_if.h smbus_if.h pci_if.h \ diff --git a/sys/modules/i2c/controllers/ismt/Makefile b/sys/modules/i2c/controllers/ismt/Makefile index ac00cfad17bc..6daeb9e0ef80 100644 --- a/sys/modules/i2c/controllers/ismt/Makefile +++ b/sys/modules/i2c/controllers/ismt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ismt KMOD = ismt SRCS = device_if.h bus_if.h iicbb_if.h pci_if.h smbus_if.h \ diff --git a/sys/modules/i2c/controllers/lpbb/Makefile b/sys/modules/i2c/controllers/lpbb/Makefile index 20f39f4b5ad2..b74bc2d55f38 100644 --- a/sys/modules/i2c/controllers/lpbb/Makefile +++ b/sys/modules/i2c/controllers/lpbb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD = lpbb SRCS = device_if.h bus_if.h iicbb_if.h ppbus_if.h \ diff --git a/sys/modules/i2c/controllers/nfsmb/Makefile b/sys/modules/i2c/controllers/nfsmb/Makefile index 5ad838650224..658c980faa1d 100644 --- a/sys/modules/i2c/controllers/nfsmb/Makefile +++ b/sys/modules/i2c/controllers/nfsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nfsmb KMOD= nfsmb diff --git a/sys/modules/i2c/controllers/pcf/Makefile b/sys/modules/i2c/controllers/pcf/Makefile index fc42100b8cfd..e4599dea9d54 100644 --- a/sys/modules/i2c/controllers/pcf/Makefile +++ b/sys/modules/i2c/controllers/pcf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pcf KMOD= pcf diff --git a/sys/modules/i2c/controllers/viapm/Makefile b/sys/modules/i2c/controllers/viapm/Makefile index 9a6c5bda1c16..910edf720d87 100644 --- a/sys/modules/i2c/controllers/viapm/Makefile +++ b/sys/modules/i2c/controllers/viapm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/viapm KMOD = viapm SRCS = device_if.h bus_if.h iicbb_if.h isa_if.h pci_if.h smbus_if.h \ diff --git a/sys/modules/i2c/cyapa/Makefile b/sys/modules/i2c/cyapa/Makefile index f69e270f855c..e14a9359b69e 100644 --- a/sys/modules/i2c/cyapa/Makefile +++ b/sys/modules/i2c/cyapa/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/cyapa KMOD = cyapa SRCS = cyapa.c device_if.h bus_if.h iicbus_if.h vnode_if.h \ diff --git a/sys/modules/i2c/ds1307/Makefile b/sys/modules/i2c/ds1307/Makefile index 363aa412cbdc..7ca283e72473 100644 --- a/sys/modules/i2c/ds1307/Makefile +++ b/sys/modules/i2c/ds1307/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1307 SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds13rtc/Makefile b/sys/modules/i2c/ds13rtc/Makefile index a9616765b7a5..daa19a0842aa 100644 --- a/sys/modules/i2c/ds13rtc/Makefile +++ b/sys/modules/i2c/ds13rtc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds13rtc SRCS = ds13rtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/ds1672/Makefile b/sys/modules/i2c/ds1672/Makefile index c160e317c36d..25ccce37a75f 100644 --- a/sys/modules/i2c/ds1672/Makefile +++ b/sys/modules/i2c/ds1672/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds1672 SRCS = ds1672.c diff --git a/sys/modules/i2c/ds3231/Makefile b/sys/modules/i2c/ds3231/Makefile index 4c6a7241bf76..7365ef4edf1a 100644 --- a/sys/modules/i2c/ds3231/Makefile +++ b/sys/modules/i2c/ds3231/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = ds3231 SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/htu21/Makefile b/sys/modules/i2c/htu21/Makefile index e049139c20cf..1c2ded0389ec 100644 --- a/sys/modules/i2c/htu21/Makefile +++ b/sys/modules/i2c/htu21/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= htu21 SRCS= htu21.c diff --git a/sys/modules/i2c/hym8563/Makefile b/sys/modules/i2c/hym8563/Makefile index e64190887610..e0377ccd6c7f 100644 --- a/sys/modules/i2c/hym8563/Makefile +++ b/sys/modules/i2c/hym8563/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD= hym8563 SRCS= hym8563.c diff --git a/sys/modules/i2c/icee/Makefile b/sys/modules/i2c/icee/Makefile index b66bb5a5f8c4..bf6c539abef1 100644 --- a/sys/modules/i2c/icee/Makefile +++ b/sys/modules/i2c/icee/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD= icee SRCS= icee.c diff --git a/sys/modules/i2c/if_ic/Makefile b/sys/modules/i2c/if_ic/Makefile index 4fac1ac0fef9..b96b631902f8 100644 --- a/sys/modules/i2c/if_ic/Makefile +++ b/sys/modules/i2c/if_ic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = if_ic SRCS = device_if.h bus_if.h iicbus_if.h \ diff --git a/sys/modules/i2c/iic/Makefile b/sys/modules/i2c/iic/Makefile index 34ca739a06a8..788d106064f1 100644 --- a/sys/modules/i2c/iic/Makefile +++ b/sys/modules/i2c/iic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = iic SRCS = device_if.h bus_if.h iicbus_if.h \ diff --git a/sys/modules/i2c/iicbb/Makefile b/sys/modules/i2c/iicbb/Makefile index e0b7e4049de0..71c120253cee 100644 --- a/sys/modules/i2c/iicbb/Makefile +++ b/sys/modules/i2c/iicbb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ diff --git a/sys/modules/i2c/iicbus/Makefile b/sys/modules/i2c/iicbus/Makefile index 11df1b902e7e..13a637642716 100644 --- a/sys/modules/i2c/iicbus/Makefile +++ b/sys/modules/i2c/iicbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD= iicbus diff --git a/sys/modules/i2c/iichid/Makefile b/sys/modules/i2c/iichid/Makefile index 96c0257ca89d..cf0d8006a79e 100644 --- a/sys/modules/i2c/iichid/Makefile +++ b/sys/modules/i2c/iichid/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = iichid SRCS = iichid.c diff --git a/sys/modules/i2c/iicsmb/Makefile b/sys/modules/i2c/iicsmb/Makefile index ca70677c453d..06a8a5664b90 100644 --- a/sys/modules/i2c/iicsmb/Makefile +++ b/sys/modules/i2c/iicsmb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = iicsmb SRCS = device_if.h bus_if.h iicbus_if.h \ diff --git a/sys/modules/i2c/isl/Makefile b/sys/modules/i2c/isl/Makefile index 320f6ed6704e..60a9c218cbeb 100644 --- a/sys/modules/i2c/isl/Makefile +++ b/sys/modules/i2c/isl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/isl KMOD = isl SRCS = isl.c device_if.h bus_if.h iicbus_if.h opt_platform.h diff --git a/sys/modules/i2c/isl12xx/Makefile b/sys/modules/i2c/isl12xx/Makefile index be0b409eeff2..8ce41388dc28 100644 --- a/sys/modules/i2c/isl12xx/Makefile +++ b/sys/modules/i2c/isl12xx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = isl12xx SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/jedec_dimm/Makefile b/sys/modules/i2c/jedec_dimm/Makefile index 15d4034aec91..6df941e4798c 100644 --- a/sys/modules/i2c/jedec_dimm/Makefile +++ b/sys/modules/i2c/jedec_dimm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../dev/jedec_dimm KMOD = jedec_dimm SRCS = jedec_dimm.c jedec_dimm.h bus_if.h device_if.h smbus_if.h diff --git a/sys/modules/i2c/max44009/Makefile b/sys/modules/i2c/max44009/Makefile index c4342b5819aa..adef7594eaa8 100644 --- a/sys/modules/i2c/max44009/Makefile +++ b/sys/modules/i2c/max44009/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD= max44009 SRCS= max44009.c diff --git a/sys/modules/i2c/mux/Makefile b/sys/modules/i2c/mux/Makefile index e197793e5d86..e06b96e43898 100644 --- a/sys/modules/i2c/mux/Makefile +++ b/sys/modules/i2c/mux/Makefile @@ -1,4 +1,3 @@ - SUBDIR = \ iicmux \ ltc430x \ diff --git a/sys/modules/i2c/mux/iic_gpiomux/Makefile b/sys/modules/i2c/mux/iic_gpiomux/Makefile index 7c26dd89e20e..be886cb3d38b 100644 --- a/sys/modules/i2c/mux/iic_gpiomux/Makefile +++ b/sys/modules/i2c/mux/iic_gpiomux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/mux KMOD= iic_gpiomux diff --git a/sys/modules/i2c/mux/iicmux/Makefile b/sys/modules/i2c/mux/iicmux/Makefile index b8bbad587bcd..7bd267797b52 100644 --- a/sys/modules/i2c/mux/iicmux/Makefile +++ b/sys/modules/i2c/mux/iicmux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/mux KMOD= iicmux diff --git a/sys/modules/i2c/mux/ltc430x/Makefile b/sys/modules/i2c/mux/ltc430x/Makefile index 3fd5838d5ad4..bcfbcd594981 100644 --- a/sys/modules/i2c/mux/ltc430x/Makefile +++ b/sys/modules/i2c/mux/ltc430x/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/mux KMOD= ltc430x diff --git a/sys/modules/i2c/mux/pca954x/Makefile b/sys/modules/i2c/mux/pca954x/Makefile index b70802b43bcc..58d620312b3e 100644 --- a/sys/modules/i2c/mux/pca954x/Makefile +++ b/sys/modules/i2c/mux/pca954x/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/mux KMOD= pca954x diff --git a/sys/modules/i2c/nxprtc/Makefile b/sys/modules/i2c/nxprtc/Makefile index 3501909f6ea4..d7f7dc04fdc4 100644 --- a/sys/modules/i2c/nxprtc/Makefile +++ b/sys/modules/i2c/nxprtc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = nxprtc SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/pcf8574/Makefile b/sys/modules/i2c/pcf8574/Makefile index 53290fb8cce3..b3b357d6b33c 100644 --- a/sys/modules/i2c/pcf8574/Makefile +++ b/sys/modules/i2c/pcf8574/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/gpio/ KMOD = pcf8574 SRCS = pcf8574.c diff --git a/sys/modules/i2c/pcf8591/Makefile b/sys/modules/i2c/pcf8591/Makefile index 8f17f3dc3ae1..ee2e788272c5 100644 --- a/sys/modules/i2c/pcf8591/Makefile +++ b/sys/modules/i2c/pcf8591/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/adc KMOD= pcf8591 SRCS= pcf8591.c diff --git a/sys/modules/i2c/rtc8583/Makefile b/sys/modules/i2c/rtc8583/Makefile index a474da20685e..035d6de652e0 100644 --- a/sys/modules/i2c/rtc8583/Makefile +++ b/sys/modules/i2c/rtc8583/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = rtc8583 SRCS = rtc8583.c diff --git a/sys/modules/i2c/rv3032/Makefile b/sys/modules/i2c/rv3032/Makefile index 7d3f8ac47aa6..32ff79c9e03e 100644 --- a/sys/modules/i2c/rv3032/Makefile +++ b/sys/modules/i2c/rv3032/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD= rv3032 SRCS= rv3032.c diff --git a/sys/modules/i2c/rx8803/Makefile b/sys/modules/i2c/rx8803/Makefile index a2b30582cabb..b630fd17c1f9 100644 --- a/sys/modules/i2c/rx8803/Makefile +++ b/sys/modules/i2c/rx8803/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc/ KMOD = rx8803 SRCS = rx8803.c diff --git a/sys/modules/i2c/s35390a/Makefile b/sys/modules/i2c/s35390a/Makefile index e12ddeece2ec..9fd63d731a35 100644 --- a/sys/modules/i2c/s35390a/Makefile +++ b/sys/modules/i2c/s35390a/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/rtc KMOD = s35390a SRCS = s35390a.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/i2c/smb/Makefile b/sys/modules/i2c/smb/Makefile index 99cf77514267..57b6a3ba55e1 100644 --- a/sys/modules/i2c/smb/Makefile +++ b/sys/modules/i2c/smb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/smbus KMOD = smb SRCS = device_if.h bus_if.h smbus_if.h \ diff --git a/sys/modules/i2c/smbus/Makefile b/sys/modules/i2c/smbus/Makefile index 530d576ba805..e22d607eaaad 100644 --- a/sys/modules/i2c/smbus/Makefile +++ b/sys/modules/i2c/smbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/smbus KMOD = smbus SRCS = device_if.h bus_if.h smbus_if.h smbus_if.c \ diff --git a/sys/modules/i2c/tmp461/Makefile b/sys/modules/i2c/tmp461/Makefile index 9c4d6518d596..381a68f0dd5a 100644 --- a/sys/modules/i2c/tmp461/Makefile +++ b/sys/modules/i2c/tmp461/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/sensor KMOD = tmp461 SRCS = tmp461.c bus_if.h device_if.h iicbus_if.h ofw_bus_if.h opt_platform.h diff --git a/sys/modules/iavf/Makefile b/sys/modules/iavf/Makefile index d572c79d544a..92e929b9048d 100644 --- a/sys/modules/iavf/Makefile +++ b/sys/modules/iavf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iavf KMOD = if_iavf diff --git a/sys/modules/ice/Makefile b/sys/modules/ice/Makefile index 54f824894164..91f20193d878 100644 --- a/sys/modules/ice/Makefile +++ b/sys/modules/ice/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ice KMOD = if_ice diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index e0ef344a8283..bacf95365c82 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/ice KMOD= ice_ddp diff --git a/sys/modules/ichwd/Makefile b/sys/modules/ichwd/Makefile index 5a136c180f2a..3c3bbc37eff5 100644 --- a/sys/modules/ichwd/Makefile +++ b/sys/modules/ichwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ichwd KMOD= ichwd diff --git a/sys/modules/ida/Makefile b/sys/modules/ida/Makefile index 4e67e16a10b8..fee7a2fbab7f 100644 --- a/sys/modules/ida/Makefile +++ b/sys/modules/ida/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ida KMOD= ida diff --git a/sys/modules/if_bridge/Makefile b/sys/modules/if_bridge/Makefile index 0835d1a383a8..6fb47110c33f 100644 --- a/sys/modules/if_bridge/Makefile +++ b/sys/modules/if_bridge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_bridge SRCS= if_bridge.c opt_inet.h opt_inet6.h opt_carp.h diff --git a/sys/modules/if_disc/Makefile b/sys/modules/if_disc/Makefile index 53b9ab146dad..8879be2e5912 100644 --- a/sys/modules/if_disc/Makefile +++ b/sys/modules/if_disc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_disc diff --git a/sys/modules/if_edsc/Makefile b/sys/modules/if_edsc/Makefile index 5a72f3951d86..32f1b6dedc05 100644 --- a/sys/modules/if_edsc/Makefile +++ b/sys/modules/if_edsc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_edsc diff --git a/sys/modules/if_enc/Makefile b/sys/modules/if_enc/Makefile index be57d3114d31..449d869d6a21 100644 --- a/sys/modules/if_enc/Makefile +++ b/sys/modules/if_enc/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/if_epair/Makefile b/sys/modules/if_epair/Makefile index bb4be21c7126..86b8c849a1e8 100644 --- a/sys/modules/if_epair/Makefile +++ b/sys/modules/if_epair/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_epair diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile index fb13f7af32f4..efcd6952a8ac 100644 --- a/sys/modules/if_gif/Makefile +++ b/sys/modules/if_gif/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/if_gre/Makefile b/sys/modules/if_gre/Makefile index 44643e5f0979..9f50708a14d7 100644 --- a/sys/modules/if_gre/Makefile +++ b/sys/modules/if_gre/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .PATH: ${SYSDIR}/net ${SYSDIR}/netinet ${SYSDIR}/netinet6 .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/if_infiniband/Makefile b/sys/modules/if_infiniband/Makefile index ac191c143292..01e3164b1271 100644 --- a/sys/modules/if_infiniband/Makefile +++ b/sys/modules/if_infiniband/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_infiniband diff --git a/sys/modules/if_lagg/Makefile b/sys/modules/if_lagg/Makefile index 7952fa836a8e..6a570f3b0c64 100644 --- a/sys/modules/if_lagg/Makefile +++ b/sys/modules/if_lagg/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_lagg SRCS= if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h opt_kern_tls.h diff --git a/sys/modules/if_me/Makefile b/sys/modules/if_me/Makefile index c9b045cf7341..21fdbd2b7664 100644 --- a/sys/modules/if_me/Makefile +++ b/sys/modules/if_me/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_me diff --git a/sys/modules/if_stf/Makefile b/sys/modules/if_stf/Makefile index 6cac98219a47..7545f8507fa6 100644 --- a/sys/modules/if_stf/Makefile +++ b/sys/modules/if_stf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_stf diff --git a/sys/modules/if_tuntap/Makefile b/sys/modules/if_tuntap/Makefile index 22ca9a144c1d..8a23a4bbed8f 100644 --- a/sys/modules/if_tuntap/Makefile +++ b/sys/modules/if_tuntap/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_tuntap diff --git a/sys/modules/if_vlan/Makefile b/sys/modules/if_vlan/Makefile index a9eb44e25278..3077f4289d5a 100644 --- a/sys/modules/if_vlan/Makefile +++ b/sys/modules/if_vlan/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_vlan diff --git a/sys/modules/if_vxlan/Makefile b/sys/modules/if_vxlan/Makefile index 60d38d4d1855..a9be25cf2db4 100644 --- a/sys/modules/if_vxlan/Makefile +++ b/sys/modules/if_vxlan/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= if_vxlan diff --git a/sys/modules/iflib/Makefile b/sys/modules/iflib/Makefile index 5d30b5fdad91..a4a5706cfd58 100644 --- a/sys/modules/iflib/Makefile +++ b/sys/modules/iflib/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net KMOD= iflib diff --git a/sys/modules/igc/Makefile b/sys/modules/igc/Makefile index 54cdbee3242e..229da5f6592d 100644 --- a/sys/modules/igc/Makefile +++ b/sys/modules/igc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/igc KMOD = if_igc diff --git a/sys/modules/imgact_binmisc/Makefile b/sys/modules/imgact_binmisc/Makefile index a77f79dfeaa9..fbe9d8d0f82e 100644 --- a/sys/modules/imgact_binmisc/Makefile +++ b/sys/modules/imgact_binmisc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= imgact_binmisc diff --git a/sys/modules/imx/imx6_ahci/Makefile b/sys/modules/imx/imx6_ahci/Makefile index 5d7ad5c6786e..0fd16a8614c0 100644 --- a/sys/modules/imx/imx6_ahci/Makefile +++ b/sys/modules/imx/imx6_ahci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/freescale/imx KMOD= imx6_ahci diff --git a/sys/modules/imx/imx6_snvs/Makefile b/sys/modules/imx/imx6_snvs/Makefile index 1c0d5c1accf0..3208ea2c0752 100644 --- a/sys/modules/imx/imx6_snvs/Makefile +++ b/sys/modules/imx/imx6_snvs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/freescale/imx KMOD= imx6_snvs diff --git a/sys/modules/imx/imx_i2c/Makefile b/sys/modules/imx/imx_i2c/Makefile index b089d587489f..82297b3d6e99 100644 --- a/sys/modules/imx/imx_i2c/Makefile +++ b/sys/modules/imx/imx_i2c/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/freescale/imx KMOD= imx_i2c diff --git a/sys/modules/imx/imx_spi/Makefile b/sys/modules/imx/imx_spi/Makefile index 5dc6cd65076e..e79814e78981 100644 --- a/sys/modules/imx/imx_spi/Makefile +++ b/sys/modules/imx/imx_spi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/freescale/imx KMOD= imx_spi diff --git a/sys/modules/imx/imx_wdog/Makefile b/sys/modules/imx/imx_wdog/Makefile index ef6ca0854764..7923798d66b7 100644 --- a/sys/modules/imx/imx_wdog/Makefile +++ b/sys/modules/imx/imx_wdog/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/freescale/imx KMOD= imx_wdog diff --git a/sys/modules/intelspi/Makefile b/sys/modules/intelspi/Makefile index ec97b0a6edec..8f2205b8b11c 100644 --- a/sys/modules/intelspi/Makefile +++ b/sys/modules/intelspi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/intel KMOD= intelspi SRCS= spi.c spi_acpi.c spi_pci.c diff --git a/sys/modules/io/Makefile b/sys/modules/io/Makefile index ed0f1f1643e7..d9102ee85575 100644 --- a/sys/modules/io/Makefile +++ b/sys/modules/io/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/io .PATH: ${SRCTOP}/sys/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} diff --git a/sys/modules/ip6_mroute_mod/Makefile b/sys/modules/ip6_mroute_mod/Makefile index 9772c1ed0ea5..3516893ea183 100644 --- a/sys/modules/ip6_mroute_mod/Makefile +++ b/sys/modules/ip6_mroute_mod/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet6 KMOD= ip6_mroute diff --git a/sys/modules/ip_mroute_mod/Makefile b/sys/modules/ip_mroute_mod/Makefile index 2c1364539d98..1da154894dd8 100644 --- a/sys/modules/ip_mroute_mod/Makefile +++ b/sys/modules/ip_mroute_mod/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet ${SRCTOP}/sys/netinet6 KMOD= ip_mroute diff --git a/sys/modules/ipdivert/Makefile b/sys/modules/ipdivert/Makefile index 981d1559fcee..c319ec81348e 100644 --- a/sys/modules/ipdivert/Makefile +++ b/sys/modules/ipdivert/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= ipdivert diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index d2f32538b68b..6c5fc140f36c 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet KMOD= ipl diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index 35723925d121..7d16c17f0b26 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw KMOD= ipfw diff --git a/sys/modules/ipfw_nat/Makefile b/sys/modules/ipfw_nat/Makefile index 0ebc25f95be0..bace25d53240 100644 --- a/sys/modules/ipfw_nat/Makefile +++ b/sys/modules/ipfw_nat/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw KMOD= ipfw_nat diff --git a/sys/modules/ipfw_nat64/Makefile b/sys/modules/ipfw_nat64/Makefile index 4beffc8426cc..bb67bf740857 100644 --- a/sys/modules/ipfw_nat64/Makefile +++ b/sys/modules/ipfw_nat64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw/nat64 KMOD= ipfw_nat64 diff --git a/sys/modules/ipfw_nptv6/Makefile b/sys/modules/ipfw_nptv6/Makefile index 7b49d72027e4..2d5dac192969 100644 --- a/sys/modules/ipfw_nptv6/Makefile +++ b/sys/modules/ipfw_nptv6/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw/nptv6 KMOD= ipfw_nptv6 diff --git a/sys/modules/ipfw_pmod/Makefile b/sys/modules/ipfw_pmod/Makefile index d2473573ee2b..ddf7bd56e20b 100644 --- a/sys/modules/ipfw_pmod/Makefile +++ b/sys/modules/ipfw_pmod/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/ipfw/pmod KMOD= ipfw_pmod diff --git a/sys/modules/ipmi/Makefile b/sys/modules/ipmi/Makefile index 41c4d5285314..9419100cc01c 100644 --- a/sys/modules/ipmi/Makefile +++ b/sys/modules/ipmi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ipmi # XXX - ipmi_smbus and ipmi_ssif depend on smbus diff --git a/sys/modules/ipmi/ipmi_linux/Makefile b/sys/modules/ipmi/ipmi_linux/Makefile index 50e918db8045..bab62d7fdc83 100644 --- a/sys/modules/ipmi/ipmi_linux/Makefile +++ b/sys/modules/ipmi/ipmi_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ipmi KMOD= ipmi_linux diff --git a/sys/modules/ips/Makefile b/sys/modules/ips/Makefile index b505e7d62b65..09d3cf9c1da9 100644 --- a/sys/modules/ips/Makefile +++ b/sys/modules/ips/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ips KMOD = ips SRCS = ips.c ips_pci.c ips.h ips_disk.c ips_disk.h ips_commands.c \ diff --git a/sys/modules/ipsec/Makefile b/sys/modules/ipsec/Makefile index 8979508375a4..1e2d73ca7a1c 100644 --- a/sys/modules/ipsec/Makefile +++ b/sys/modules/ipsec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net ${SRCTOP}/sys/netipsec KMOD= ipsec diff --git a/sys/modules/ipw/Makefile b/sys/modules/ipw/Makefile index b91464b894d0..076d5a19c1d6 100644 --- a/sys/modules/ipw/Makefile +++ b/sys/modules/ipw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ipw KMOD = if_ipw diff --git a/sys/modules/ipwfw/Makefile b/sys/modules/ipwfw/Makefile index 59ff2c4face3..47cbe06967b4 100644 --- a/sys/modules/ipwfw/Makefile +++ b/sys/modules/ipwfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= ipw_bss \ ipw_ibss \ ipw_monitor diff --git a/sys/modules/ipwfw/ipw_bss/Makefile b/sys/modules/ipwfw/ipw_bss/Makefile index 2e7fcd9e45ad..368d6575f8e4 100644 --- a/sys/modules/ipwfw/ipw_bss/Makefile +++ b/sys/modules/ipwfw/ipw_bss/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/ipw KMOD= ipw_bss diff --git a/sys/modules/ipwfw/ipw_ibss/Makefile b/sys/modules/ipwfw/ipw_ibss/Makefile index 75788b756ffa..77f06ff61ede 100644 --- a/sys/modules/ipwfw/ipw_ibss/Makefile +++ b/sys/modules/ipwfw/ipw_ibss/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/ipw KMOD= ipw_ibss diff --git a/sys/modules/ipwfw/ipw_monitor/Makefile b/sys/modules/ipwfw/ipw_monitor/Makefile index 39179ab231e3..29230eb22b66 100644 --- a/sys/modules/ipwfw/ipw_monitor/Makefile +++ b/sys/modules/ipwfw/ipw_monitor/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/ipw KMOD= ipw_monitor diff --git a/sys/modules/iscsi/Makefile b/sys/modules/iscsi/Makefile index c80f32d19da4..7ec5d455932c 100644 --- a/sys/modules/iscsi/Makefile +++ b/sys/modules/iscsi/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/iser/Makefile b/sys/modules/iser/Makefile index d0db499e6fde..615199ec97a3 100644 --- a/sys/modules/iser/Makefile +++ b/sys/modules/iser/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/isp/Makefile b/sys/modules/isp/Makefile index d203b8f464cb..05bc1c8e1f85 100644 --- a/sys/modules/isp/Makefile +++ b/sys/modules/isp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/isp KMOD= isp diff --git a/sys/modules/itwd/Makefile b/sys/modules/itwd/Makefile index 02a5959387d0..f6ee5495d8a8 100644 --- a/sys/modules/itwd/Makefile +++ b/sys/modules/itwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/itwd KMOD= itwd diff --git a/sys/modules/iwi/Makefile b/sys/modules/iwi/Makefile index 3994161da39c..54f49a08f7cc 100644 --- a/sys/modules/iwi/Makefile +++ b/sys/modules/iwi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iwi KMOD = if_iwi diff --git a/sys/modules/iwifw/Makefile b/sys/modules/iwifw/Makefile index 6d5ab036cd34..52343aa6fb4b 100644 --- a/sys/modules/iwifw/Makefile +++ b/sys/modules/iwifw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= iwi_bss \ iwi_ibss \ iwi_monitor diff --git a/sys/modules/iwifw/iwi_bss/Makefile b/sys/modules/iwifw/iwi_bss/Makefile index 6452289898fa..278929d5b933 100644 --- a/sys/modules/iwifw/iwi_bss/Makefile +++ b/sys/modules/iwifw/iwi_bss/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/iwi KMOD= iwi_bss diff --git a/sys/modules/iwifw/iwi_ibss/Makefile b/sys/modules/iwifw/iwi_ibss/Makefile index ad4e76706620..008439f94ab9 100644 --- a/sys/modules/iwifw/iwi_ibss/Makefile +++ b/sys/modules/iwifw/iwi_ibss/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/iwi KMOD= iwi_ibss diff --git a/sys/modules/iwifw/iwi_monitor/Makefile b/sys/modules/iwifw/iwi_monitor/Makefile index 91dc7f33b07f..9c8e8e23abce 100644 --- a/sys/modules/iwifw/iwi_monitor/Makefile +++ b/sys/modules/iwifw/iwi_monitor/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/iwi KMOD= iwi_monitor diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index 256e08282ad7..72864caedeae 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -1,4 +1,3 @@ - DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} diff --git a/sys/modules/iwlwififw/Makefile b/sys/modules/iwlwififw/Makefile index 756fb2f73af7..dcecb2072d0c 100644 --- a/sys/modules/iwlwififw/Makefile +++ b/sys/modules/iwlwififw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= \ iwlwifi-3160-fw \ iwlwifi-3168-fw \ diff --git a/sys/modules/iwlwififw/Makefile.inc b/sys/modules/iwlwififw/Makefile.inc index ea3e88783809..1fe51a087f58 100644 --- a/sys/modules/iwlwififw/Makefile.inc +++ b/sys/modules/iwlwififw/Makefile.inc @@ -1,4 +1,3 @@ - # Common rules for building iwlwifi firmware. EXT?= ucode diff --git a/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile index 69d537c89754..22817a070537 100644 --- a/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-3160-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 17 NAME= 3160 diff --git a/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile index 2e98c2148a79..8f5ab6a15110 100644 --- a/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-3168-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 29 NAME= 3168 diff --git a/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile index befd607a269e..d18dca802cba 100644 --- a/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-7260-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 17 NAME= 7260 diff --git a/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile index 42d7c508dd1b..3058f7e26d2e 100644 --- a/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-7265-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 17 NAME= 7265 diff --git a/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile index 37af2799e1eb..30d1788fa0bf 100644 --- a/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-7265D-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 29 NAME= 7265D diff --git a/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile index 0b3efe221d08..d0e9113028be 100644 --- a/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-8000C-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 36 NAME= 8000C diff --git a/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile index 5f238c8aa619..344c76d69db0 100644 --- a/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-8265-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 36 NAME= 8265 diff --git a/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile index 03b5d5d142d2..4475367933e5 100644 --- a/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-9000-pu-b0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 46 NAME= 9000-pu-b0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile index 37ae25a4a836..b33ac5a53f7b 100644 --- a/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-9260-th-b0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 46 NAME= 9260-th-b0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile index e781e790a048..d991ff20e099 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-hr-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= Qu-b0-hr-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile index ac8b13cd1777..2876476060bc 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-b0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= Qu-b0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile index 15389b3c3e2f..dc3f899e52ce 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-hr-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= Qu-c0-hr-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile index bd9cd5077021..3d8ab9d436ae 100644 --- a/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-Qu-c0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= Qu-c0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile index d15ee3643679..387813717cd5 100644 --- a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-hr-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= QuZ-a0-hr-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile index ac0f398a10d6..b4198a3068b9 100644 --- a/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-QuZ-a0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= QuZ-a0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile index 645e3c94684a..b6949c29c30d 100644 --- a/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-cc-a0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= cc-a0 diff --git a/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-fw/Makefile index 4a078a28c3b2..e44c7c406e82 100644 --- a/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= gl-c0-fm-c0 diff --git a/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile index 8b1f4692271b..4fc1b42284d1 100644 --- a/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-gl-c0-fm-c0-pnvm/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= gl-c0-fm-c0 EXT= pnvm diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile index 4106eedfa339..5c1d26d1e8c9 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= so-a0-gf-a0 diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile index 56b5cbde6c26..bf14a597c5b4 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf-a0-pnvm/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= so-a0-gf-a0 EXT= pnvm diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile index f89756193b89..c75525c620e9 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= so-a0-gf4-a0 diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile index a13ba593b628..49eae25d5e5d 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-gf4-a0-pnvm/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= so-a0-gf4-a0 EXT= pnvm diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile index ae908c41376a..4c056fcfd3c4 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-hr-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 81 NAME= so-a0-hr-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile index 372a04314cf7..1ffc42d0ea13 100644 --- a/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-so-a0-jf-b0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 77 NAME= so-a0-jf-b0 diff --git a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile index 3bb0931b5248..032c3a9d2171 100644 --- a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-fw/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= ty-a0-gf-a0 diff --git a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile index 1dcb41414755..83a7b625d64a 100644 --- a/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile +++ b/sys/modules/iwlwififw/iwlwifi-ty-a0-gf-a0-pnvm/Makefile @@ -1,4 +1,3 @@ - FWVERSION= 83 NAME= ty-a0-gf-a0 EXT= pnvm diff --git a/sys/modules/iwm/Makefile b/sys/modules/iwm/Makefile index a115c4a807bb..07b8334c5699 100644 --- a/sys/modules/iwm/Makefile +++ b/sys/modules/iwm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iwm KMOD= if_iwm diff --git a/sys/modules/iwmfw/Makefile b/sys/modules/iwmfw/Makefile index 1ff62d2ab3bf..9101f0f816ee 100644 --- a/sys/modules/iwmfw/Makefile +++ b/sys/modules/iwmfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= iwm3160fw \ iwm3168fw \ iwm7260fw \ diff --git a/sys/modules/iwmfw/iwm3160fw/Makefile b/sys/modules/iwmfw/iwm3160fw/Makefile index 42701d1d58d9..cc507306a32e 100644 --- a/sys/modules/iwmfw/iwm3160fw/Makefile +++ b/sys/modules/iwmfw/iwm3160fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm3160fw IMG= iwm-3160-17 diff --git a/sys/modules/iwmfw/iwm3168fw/Makefile b/sys/modules/iwmfw/iwm3168fw/Makefile index 2ee4ff4292bc..3b325c827295 100644 --- a/sys/modules/iwmfw/iwm3168fw/Makefile +++ b/sys/modules/iwmfw/iwm3168fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm3168fw IMG= iwm-3168-22 diff --git a/sys/modules/iwmfw/iwm7260fw/Makefile b/sys/modules/iwmfw/iwm7260fw/Makefile index 5d22c2343030..56b8b1d43e51 100644 --- a/sys/modules/iwmfw/iwm7260fw/Makefile +++ b/sys/modules/iwmfw/iwm7260fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm7260fw IMG= iwm-7260-17 diff --git a/sys/modules/iwmfw/iwm7265Dfw/Makefile b/sys/modules/iwmfw/iwm7265Dfw/Makefile index e3f8af5cbcf2..d2a5097a723f 100644 --- a/sys/modules/iwmfw/iwm7265Dfw/Makefile +++ b/sys/modules/iwmfw/iwm7265Dfw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm7265Dfw IMG= iwm-7265D-22 diff --git a/sys/modules/iwmfw/iwm7265fw/Makefile b/sys/modules/iwmfw/iwm7265fw/Makefile index 9be31560ccca..5ccdb7aacd66 100644 --- a/sys/modules/iwmfw/iwm7265fw/Makefile +++ b/sys/modules/iwmfw/iwm7265fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm7265fw IMG= iwm-7265-17 diff --git a/sys/modules/iwmfw/iwm8000Cfw/Makefile b/sys/modules/iwmfw/iwm8000Cfw/Makefile index 3ba360d4040d..d09a6243b534 100644 --- a/sys/modules/iwmfw/iwm8000Cfw/Makefile +++ b/sys/modules/iwmfw/iwm8000Cfw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm8000Cfw IMG= iwm-8000C-22 diff --git a/sys/modules/iwmfw/iwm8265fw/Makefile b/sys/modules/iwmfw/iwm8265fw/Makefile index 1a4930c5e774..1ad04a45556c 100644 --- a/sys/modules/iwmfw/iwm8265fw/Makefile +++ b/sys/modules/iwmfw/iwm8265fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm8265fw IMG= iwm-8265-22 diff --git a/sys/modules/iwmfw/iwm9000fw/Makefile b/sys/modules/iwmfw/iwm9000fw/Makefile index d78dce7be8a7..3c921ba9729d 100644 --- a/sys/modules/iwmfw/iwm9000fw/Makefile +++ b/sys/modules/iwmfw/iwm9000fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm9000fw IMG= iwm-9000-34 diff --git a/sys/modules/iwmfw/iwm9260fw/Makefile b/sys/modules/iwmfw/iwm9260fw/Makefile index a8693d2b6d61..639858725002 100644 --- a/sys/modules/iwmfw/iwm9260fw/Makefile +++ b/sys/modules/iwmfw/iwm9260fw/Makefile @@ -1,4 +1,3 @@ - KMOD= iwm9260fw IMG= iwm-9260-34 diff --git a/sys/modules/iwn/Makefile b/sys/modules/iwn/Makefile index 5a219ffa5c6d..4cd2f02f6b28 100644 --- a/sys/modules/iwn/Makefile +++ b/sys/modules/iwn/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iwn KMOD = if_iwn diff --git a/sys/modules/iwnfw/Makefile b/sys/modules/iwnfw/Makefile index 487009a027a8..bb2d6a11cec5 100644 --- a/sys/modules/iwnfw/Makefile +++ b/sys/modules/iwnfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= iwn100 \ iwn105 \ iwn135 \ diff --git a/sys/modules/iwnfw/iwn100/Makefile b/sys/modules/iwnfw/iwn100/Makefile index 24a3943934a6..883033887bf8 100644 --- a/sys/modules/iwnfw/iwn100/Makefile +++ b/sys/modules/iwnfw/iwn100/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn100fw IMG= iwlwifi-100-39.31.5.1 diff --git a/sys/modules/iwnfw/iwn1000/Makefile b/sys/modules/iwnfw/iwn1000/Makefile index 4107d5a69a28..af9231d91f39 100644 --- a/sys/modules/iwnfw/iwn1000/Makefile +++ b/sys/modules/iwnfw/iwn1000/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn1000fw IMG= iwlwifi-1000-39.31.5.1 diff --git a/sys/modules/iwnfw/iwn105/Makefile b/sys/modules/iwnfw/iwn105/Makefile index 71a93d240db4..0727fc8ca556 100644 --- a/sys/modules/iwnfw/iwn105/Makefile +++ b/sys/modules/iwnfw/iwn105/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn105fw IMG= iwlwifi-105-6-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn135/Makefile b/sys/modules/iwnfw/iwn135/Makefile index 24f6cf7cf9cf..05b3c8af0538 100644 --- a/sys/modules/iwnfw/iwn135/Makefile +++ b/sys/modules/iwnfw/iwn135/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn135fw IMG= iwlwifi-135-6-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn2000/Makefile b/sys/modules/iwnfw/iwn2000/Makefile index 72a676886b03..f761c8dc60f6 100644 --- a/sys/modules/iwnfw/iwn2000/Makefile +++ b/sys/modules/iwnfw/iwn2000/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn2000fw IMG= iwlwifi-2000-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn2030/Makefile b/sys/modules/iwnfw/iwn2030/Makefile index c11fa66fe9c2..d2faaee47bbf 100644 --- a/sys/modules/iwnfw/iwn2030/Makefile +++ b/sys/modules/iwnfw/iwn2030/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn2030fw IMG= iwnwifi-2030-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn4965/Makefile b/sys/modules/iwnfw/iwn4965/Makefile index f3bad9ecbf2f..0c430782c3c7 100644 --- a/sys/modules/iwnfw/iwn4965/Makefile +++ b/sys/modules/iwnfw/iwn4965/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn4965fw IMG= iwlwifi-4965-228.61.2.24 diff --git a/sys/modules/iwnfw/iwn5000/Makefile b/sys/modules/iwnfw/iwn5000/Makefile index 7c79e86c3f9d..821e096a00ae 100644 --- a/sys/modules/iwnfw/iwn5000/Makefile +++ b/sys/modules/iwnfw/iwn5000/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn5000fw IMG= iwlwifi-5000-8.83.5.1 diff --git a/sys/modules/iwnfw/iwn5150/Makefile b/sys/modules/iwnfw/iwn5150/Makefile index c4616797b018..ae220149f2d9 100644 --- a/sys/modules/iwnfw/iwn5150/Makefile +++ b/sys/modules/iwnfw/iwn5150/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn5150fw IMG= iwlwifi-5150-8.24.2.2 diff --git a/sys/modules/iwnfw/iwn6000/Makefile b/sys/modules/iwnfw/iwn6000/Makefile index 76164ed97f89..c38b6d88b681 100644 --- a/sys/modules/iwnfw/iwn6000/Makefile +++ b/sys/modules/iwnfw/iwn6000/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn6000fw IMG= iwlwifi-6000-9.221.4.1 diff --git a/sys/modules/iwnfw/iwn6000g2a/Makefile b/sys/modules/iwnfw/iwn6000g2a/Makefile index 61375d6708aa..5e7ceb639b90 100644 --- a/sys/modules/iwnfw/iwn6000g2a/Makefile +++ b/sys/modules/iwnfw/iwn6000g2a/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn6000g2afw IMG= iwlwifi-6000g2a-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn6000g2b/Makefile b/sys/modules/iwnfw/iwn6000g2b/Makefile index d9020b807d43..e7c0891d1d43 100644 --- a/sys/modules/iwnfw/iwn6000g2b/Makefile +++ b/sys/modules/iwnfw/iwn6000g2b/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn6000g2bfw IMG= iwlwifi-6000g2b-18.168.6.1 diff --git a/sys/modules/iwnfw/iwn6050/Makefile b/sys/modules/iwnfw/iwn6050/Makefile index 742a96ca65c9..5ccae842acb1 100644 --- a/sys/modules/iwnfw/iwn6050/Makefile +++ b/sys/modules/iwnfw/iwn6050/Makefile @@ -1,4 +1,3 @@ - KMOD= iwn6050fw IMG= iwlwifi-6050-41.28.5.1 diff --git a/sys/modules/ix/Makefile b/sys/modules/ix/Makefile index 2c71371b88f9..ad9f36e054e3 100644 --- a/sys/modules/ix/Makefile +++ b/sys/modules/ix/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ixgbe KMOD = if_ix diff --git a/sys/modules/ixl/Makefile b/sys/modules/ixl/Makefile index 32f000734c9a..cfb644402819 100644 --- a/sys/modules/ixl/Makefile +++ b/sys/modules/ixl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ixl KMOD = if_ixl diff --git a/sys/modules/ixv/Makefile b/sys/modules/ixv/Makefile index e2616e2cfd5a..1b4431ac11cd 100644 --- a/sys/modules/ixv/Makefile +++ b/sys/modules/ixv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ixgbe KMOD = if_ixv diff --git a/sys/modules/jme/Makefile b/sys/modules/jme/Makefile index 414b579e06d8..1390357137c5 100644 --- a/sys/modules/jme/Makefile +++ b/sys/modules/jme/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/jme KMOD= if_jme diff --git a/sys/modules/kgssapi/Makefile b/sys/modules/kgssapi/Makefile index a3eb812fd6e6..f060a3039b43 100644 --- a/sys/modules/kgssapi/Makefile +++ b/sys/modules/kgssapi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kgssapi ${SRCTOP}/sys/rpc/rpcsec_gss KMOD= kgssapi diff --git a/sys/modules/kgssapi_krb5/Makefile b/sys/modules/kgssapi_krb5/Makefile index a540e9a74015..60e94586c0ac 100644 --- a/sys/modules/kgssapi_krb5/Makefile +++ b/sys/modules/kgssapi_krb5/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kgssapi/krb5 KMOD= kgssapi_krb5 diff --git a/sys/modules/khelp/Makefile b/sys/modules/khelp/Makefile index 173ba679bfcf..fc8fc1ac8364 100644 --- a/sys/modules/khelp/Makefile +++ b/sys/modules/khelp/Makefile @@ -1,4 +1,3 @@ - SUBDIR= # Do we have the TCP_HHOOK symbol defined? If not, there is no point in diff --git a/sys/modules/khelp/h_ertt/Makefile b/sys/modules/khelp/h_ertt/Makefile index d149cf254b60..007e17c4a181 100644 --- a/sys/modules/khelp/h_ertt/Makefile +++ b/sys/modules/khelp/h_ertt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/khelp KMOD= h_ertt SRCS= h_ertt.c opt_kern_tls.h diff --git a/sys/modules/krpc/Makefile b/sys/modules/krpc/Makefile index 168d1a3fc623..a49207b78123 100644 --- a/sys/modules/krpc/Makefile +++ b/sys/modules/krpc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/rpc ${SRCTOP}/sys/rpc/rpcsec_tls KMOD= krpc SRCS= auth_none.c \ diff --git a/sys/modules/ksyms/Makefile b/sys/modules/ksyms/Makefile index bf5f5fec89d4..ccf9a092c49e 100644 --- a/sys/modules/ksyms/Makefile +++ b/sys/modules/ksyms/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ksyms KMOD= ksyms diff --git a/sys/modules/ktest/ktest/Makefile b/sys/modules/ktest/ktest/Makefile index 264eb7b9f443..3d4f1a8c2cc0 100644 --- a/sys/modules/ktest/ktest/Makefile +++ b/sys/modules/ktest/ktest/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/ktest/ktest_example/Makefile b/sys/modules/ktest/ktest_example/Makefile index a5fe6d6d7843..2b572d867aa5 100644 --- a/sys/modules/ktest/ktest_example/Makefile +++ b/sys/modules/ktest/ktest_example/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/ktest/ktest_netlink_message_writer/Makefile b/sys/modules/ktest/ktest_netlink_message_writer/Makefile index 2f84b2fecd72..a91c45755d0d 100644 --- a/sys/modules/ktest/ktest_netlink_message_writer/Makefile +++ b/sys/modules/ktest/ktest_netlink_message_writer/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/le/Makefile b/sys/modules/le/Makefile index 4364a4fc660e..908247b957dc 100644 --- a/sys/modules/le/Makefile +++ b/sys/modules/le/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/le KMOD= if_le diff --git a/sys/modules/lge/Makefile b/sys/modules/lge/Makefile index 45869c039454..d1ae05c2143d 100644 --- a/sys/modules/lge/Makefile +++ b/sys/modules/lge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/lge KMOD= if_lge diff --git a/sys/modules/libalias/Makefile b/sys/modules/libalias/Makefile index 02fd37c62a1c..c847f55e8e00 100644 --- a/sys/modules/libalias/Makefile +++ b/sys/modules/libalias/Makefile @@ -1,4 +1,3 @@ - SUBDIR= libalias modules .include diff --git a/sys/modules/libalias/libalias/Makefile b/sys/modules/libalias/libalias/Makefile index e72e8e0e1290..61ada50950d1 100644 --- a/sys/modules/libalias/libalias/Makefile +++ b/sys/modules/libalias/libalias/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet/libalias KMOD= libalias diff --git a/sys/modules/libalias/modules/Makefile b/sys/modules/libalias/modules/Makefile index a2c945965ca2..04b32bc8bb22 100644 --- a/sys/modules/libalias/modules/Makefile +++ b/sys/modules/libalias/modules/Makefile @@ -1,4 +1,3 @@ - .include "${.CURDIR}/modules.inc" SUBDIR= ${MODULES} diff --git a/sys/modules/libalias/modules/Makefile.inc b/sys/modules/libalias/modules/Makefile.inc index 86228d56da8f..241a3ecbdf2d 100644 --- a/sys/modules/libalias/modules/Makefile.inc +++ b/sys/modules/libalias/modules/Makefile.inc @@ -1,2 +1 @@ - .PATH: ${SRCTOP}/sys/netinet/libalias diff --git a/sys/modules/libalias/modules/dummy/Makefile b/sys/modules/libalias/modules/dummy/Makefile index 77f54c6e393d..8fa8571d4773 100644 --- a/sys/modules/libalias/modules/dummy/Makefile +++ b/sys/modules/libalias/modules/dummy/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_dummy SRCS= alias_dummy.c diff --git a/sys/modules/libalias/modules/ftp/Makefile b/sys/modules/libalias/modules/ftp/Makefile index b3297081b2d7..628104624954 100644 --- a/sys/modules/libalias/modules/ftp/Makefile +++ b/sys/modules/libalias/modules/ftp/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_ftp SRCS= alias_ftp.c diff --git a/sys/modules/libalias/modules/irc/Makefile b/sys/modules/libalias/modules/irc/Makefile index b2bd99ca88cc..002011076ed7 100644 --- a/sys/modules/libalias/modules/irc/Makefile +++ b/sys/modules/libalias/modules/irc/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_irc SRCS= alias_irc.c diff --git a/sys/modules/libalias/modules/nbt/Makefile b/sys/modules/libalias/modules/nbt/Makefile index 3de4a9a1e0af..abb12a65760f 100644 --- a/sys/modules/libalias/modules/nbt/Makefile +++ b/sys/modules/libalias/modules/nbt/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_nbt SRCS= alias_nbt.c diff --git a/sys/modules/libalias/modules/pptp/Makefile b/sys/modules/libalias/modules/pptp/Makefile index 379cc180d539..f0bc0299ed76 100644 --- a/sys/modules/libalias/modules/pptp/Makefile +++ b/sys/modules/libalias/modules/pptp/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_pptp SRCS= alias_pptp.c diff --git a/sys/modules/libalias/modules/skinny/Makefile b/sys/modules/libalias/modules/skinny/Makefile index d62ba63b2f04..8507770c4352 100644 --- a/sys/modules/libalias/modules/skinny/Makefile +++ b/sys/modules/libalias/modules/skinny/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_skinny SRCS= alias_skinny.c diff --git a/sys/modules/libalias/modules/smedia/Makefile b/sys/modules/libalias/modules/smedia/Makefile index e0a7e7747c5c..ebf88604716f 100644 --- a/sys/modules/libalias/modules/smedia/Makefile +++ b/sys/modules/libalias/modules/smedia/Makefile @@ -1,4 +1,3 @@ - KMOD= alias_smedia SRCS= alias_smedia.c diff --git a/sys/modules/libiconv/Makefile b/sys/modules/libiconv/Makefile index 0100bd707cfe..4958de835b9c 100644 --- a/sys/modules/libiconv/Makefile +++ b/sys/modules/libiconv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/libkern ${SRCTOP}/sys/sys KMOD= libiconv diff --git a/sys/modules/libmchain/Makefile b/sys/modules/libmchain/Makefile index aabaa311ac45..cef5d82de917 100644 --- a/sys/modules/libmchain/Makefile +++ b/sys/modules/libmchain/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= libmchain diff --git a/sys/modules/lindebugfs/Makefile b/sys/modules/lindebugfs/Makefile index 542a2fb7b6da..0933208d60fa 100644 --- a/sys/modules/lindebugfs/Makefile +++ b/sys/modules/lindebugfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/compat/lindebugfs KMOD= lindebugfs diff --git a/sys/modules/linprocfs/Makefile b/sys/modules/linprocfs/Makefile index df282d7eef31..ccb1818d85ce 100644 --- a/sys/modules/linprocfs/Makefile +++ b/sys/modules/linprocfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/compat/linprocfs KMOD= linprocfs diff --git a/sys/modules/linsysfs/Makefile b/sys/modules/linsysfs/Makefile index a9741d13cfee..4b354efa3beb 100644 --- a/sys/modules/linsysfs/Makefile +++ b/sys/modules/linsysfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/compat/linsysfs KMOD= linsysfs diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 37ba17e09e9d..eb4e17ec706b 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -1,4 +1,3 @@ - .if ${MACHINE_CPUARCH} == "amd64" SFX= 32 CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index beed5ec59c4b..d558319f3ba2 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/compat/linux ${SRCTOP}/sys/${MACHINE}/linux .if ${MACHINE_CPUARCH} == "amd64" .PATH: ${SRCTOP}/sys/x86/linux diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 374bc32215a2..f9f4c791e9d1 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/compat/linux .if ${MACHINE_CPUARCH} == "amd64" .PATH: ${SRCTOP}/sys/x86/linux diff --git a/sys/modules/lio/Makefile b/sys/modules/lio/Makefile index 3f8b5e04ec3e..f2819292bfa4 100644 --- a/sys/modules/lio/Makefile +++ b/sys/modules/lio/Makefile @@ -1,4 +1,3 @@ - #.PATH: ${.CURDIR} .PATH: ${.CURDIR}/../../dev/liquidio .PATH: ${.CURDIR}/../../dev/liquidio/base diff --git a/sys/modules/lpt/Makefile b/sys/modules/lpt/Makefile index 74b5a9c90faa..43a97ac3d499 100644 --- a/sys/modules/lpt/Makefile +++ b/sys/modules/lpt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= lpt SRCS= bus_if.h device_if.h ppbus_if.h \ diff --git a/sys/modules/mac_biba/Makefile b/sys/modules/mac_biba/Makefile index 21a85dc19601..a7982f8239d4 100644 --- a/sys/modules/mac_biba/Makefile +++ b/sys/modules/mac_biba/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_biba KMOD= mac_biba diff --git a/sys/modules/mac_bsdextended/Makefile b/sys/modules/mac_bsdextended/Makefile index 5921ac70dcbc..9dec5ab707bf 100644 --- a/sys/modules/mac_bsdextended/Makefile +++ b/sys/modules/mac_bsdextended/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_bsdextended KMOD= mac_bsdextended diff --git a/sys/modules/mac_ifoff/Makefile b/sys/modules/mac_ifoff/Makefile index b7f8806352b0..75759973b920 100644 --- a/sys/modules/mac_ifoff/Makefile +++ b/sys/modules/mac_ifoff/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_ifoff KMOD= mac_ifoff diff --git a/sys/modules/mac_ipacl/Makefile b/sys/modules/mac_ipacl/Makefile index 17059e145081..012741fe01a3 100644 --- a/sys/modules/mac_ipacl/Makefile +++ b/sys/modules/mac_ipacl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_ipacl KMOD= mac_ipacl diff --git a/sys/modules/mac_lomac/Makefile b/sys/modules/mac_lomac/Makefile index 9172d35ddf13..8f4be7a59559 100644 --- a/sys/modules/mac_lomac/Makefile +++ b/sys/modules/mac_lomac/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_lomac KMOD= mac_lomac diff --git a/sys/modules/mac_mls/Makefile b/sys/modules/mac_mls/Makefile index 7169ba304205..ca70a3ace5de 100644 --- a/sys/modules/mac_mls/Makefile +++ b/sys/modules/mac_mls/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_mls KMOD= mac_mls diff --git a/sys/modules/mac_none/Makefile b/sys/modules/mac_none/Makefile index 9a015aaff12c..6079b4d298c9 100644 --- a/sys/modules/mac_none/Makefile +++ b/sys/modules/mac_none/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_none KMOD= mac_none diff --git a/sys/modules/mac_ntpd/Makefile b/sys/modules/mac_ntpd/Makefile index edd4ff70717a..ffde3db439b3 100644 --- a/sys/modules/mac_ntpd/Makefile +++ b/sys/modules/mac_ntpd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_ntpd KMOD= mac_ntpd diff --git a/sys/modules/mac_partition/Makefile b/sys/modules/mac_partition/Makefile index 26fae45e6cdc..25bd4a710cab 100644 --- a/sys/modules/mac_partition/Makefile +++ b/sys/modules/mac_partition/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_partition KMOD= mac_partition diff --git a/sys/modules/mac_pimd/Makefile b/sys/modules/mac_pimd/Makefile index 5e2ba5188654..0d3c78d90cc6 100644 --- a/sys/modules/mac_pimd/Makefile +++ b/sys/modules/mac_pimd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_pimd KMOD= mac_pimd diff --git a/sys/modules/mac_portacl/Makefile b/sys/modules/mac_portacl/Makefile index e2ab1da0a2ef..c1b4eb8c3fc7 100644 --- a/sys/modules/mac_portacl/Makefile +++ b/sys/modules/mac_portacl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_portacl KMOD= mac_portacl diff --git a/sys/modules/mac_seeotheruids/Makefile b/sys/modules/mac_seeotheruids/Makefile index adf50d946c63..76d89005c6d0 100644 --- a/sys/modules/mac_seeotheruids/Makefile +++ b/sys/modules/mac_seeotheruids/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_seeotheruids KMOD= mac_seeotheruids diff --git a/sys/modules/mac_stub/Makefile b/sys/modules/mac_stub/Makefile index 19b9a2fbd842..3b0b2fdc6df2 100644 --- a/sys/modules/mac_stub/Makefile +++ b/sys/modules/mac_stub/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_stub KMOD= mac_stub diff --git a/sys/modules/mac_test/Makefile b/sys/modules/mac_test/Makefile index a96aa12c08bb..4a89b8fad0d1 100644 --- a/sys/modules/mac_test/Makefile +++ b/sys/modules/mac_test/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/security/mac_test KMOD= mac_test diff --git a/sys/modules/mac_veriexec/Makefile b/sys/modules/mac_veriexec/Makefile index 82cf468fec50..ec1d7816055e 100644 --- a/sys/modules/mac_veriexec/Makefile +++ b/sys/modules/mac_veriexec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.PARSEDIR:H:H}/security/mac_veriexec KMOD = mac_veriexec diff --git a/sys/modules/mac_veriexec_sha1/Makefile b/sys/modules/mac_veriexec_sha1/Makefile index a8c16f179b8f..768a0df3a04f 100644 --- a/sys/modules/mac_veriexec_sha1/Makefile +++ b/sys/modules/mac_veriexec_sha1/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.PARSEDIR:H:H}/security/mac_veriexec .PATH: ${.PARSEDIR:H:H}/crypto diff --git a/sys/modules/mac_veriexec_sha256/Makefile b/sys/modules/mac_veriexec_sha256/Makefile index c09b0ac29548..d745fa17dde2 100644 --- a/sys/modules/mac_veriexec_sha256/Makefile +++ b/sys/modules/mac_veriexec_sha256/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../security/mac_veriexec .PATH: ${.CURDIR}/../../crypto/sha2 diff --git a/sys/modules/mac_veriexec_sha384/Makefile b/sys/modules/mac_veriexec_sha384/Makefile index 55ecabbac735..a1c621baafe3 100644 --- a/sys/modules/mac_veriexec_sha384/Makefile +++ b/sys/modules/mac_veriexec_sha384/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../security/mac_veriexec .PATH: ${.CURDIR}/../../crypto/sha2 diff --git a/sys/modules/mac_veriexec_sha512/Makefile b/sys/modules/mac_veriexec_sha512/Makefile index f201ea696d37..d1c02401a629 100644 --- a/sys/modules/mac_veriexec_sha512/Makefile +++ b/sys/modules/mac_veriexec_sha512/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../security/mac_veriexec .PATH: ${.CURDIR}/../../crypto/sha2 diff --git a/sys/modules/malo/Makefile b/sys/modules/malo/Makefile index 628d30aa0642..95cd346eee13 100644 --- a/sys/modules/malo/Makefile +++ b/sys/modules/malo/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/malo KMOD = if_malo diff --git a/sys/modules/mana/Makefile b/sys/modules/mana/Makefile index 6b37c209e9c7..c603963ea8cb 100644 --- a/sys/modules/mana/Makefile +++ b/sys/modules/mana/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mana KMOD = if_mana diff --git a/sys/modules/md/Makefile b/sys/modules/md/Makefile index 2473e3715bd2..2b0586c44717 100644 --- a/sys/modules/md/Makefile +++ b/sys/modules/md/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/md KMOD= geom_md diff --git a/sys/modules/mdio/Makefile b/sys/modules/mdio/Makefile index 6decada89386..fee29b333a29 100644 --- a/sys/modules/mdio/Makefile +++ b/sys/modules/mdio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mdio KMOD= mdio diff --git a/sys/modules/mem/Makefile b/sys/modules/mem/Makefile index 6ba998923d0d..4e9be89e8573 100644 --- a/sys/modules/mem/Makefile +++ b/sys/modules/mem/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mem .PATH: ${SRCTOP}/sys/${MACHINE}/${MACHINE} .PATH: ${SRCTOP}/sys/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} diff --git a/sys/modules/mfi/Makefile b/sys/modules/mfi/Makefile index a7541ab85e2f..41626370f210 100644 --- a/sys/modules/mfi/Makefile +++ b/sys/modules/mfi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mfi SUBDIR= mfip diff --git a/sys/modules/mfi/mfi_linux/Makefile b/sys/modules/mfi/mfi_linux/Makefile index f685ea699a3b..026e69043c53 100644 --- a/sys/modules/mfi/mfi_linux/Makefile +++ b/sys/modules/mfi/mfi_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mfi KMOD= mfi_linux diff --git a/sys/modules/mfi/mfip/Makefile b/sys/modules/mfi/mfip/Makefile index c3f8111dd60f..e2b273b07f1d 100644 --- a/sys/modules/mfi/mfip/Makefile +++ b/sys/modules/mfi/mfip/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mfi KMOD= mfip diff --git a/sys/modules/mgb/Makefile b/sys/modules/mgb/Makefile index e45ac034a1ab..53197d42b06c 100644 --- a/sys/modules/mgb/Makefile +++ b/sys/modules/mgb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mgb KMOD = if_mgb diff --git a/sys/modules/mii/Makefile b/sys/modules/mii/Makefile index 2413959cc67f..353d92a51167 100644 --- a/sys/modules/mii/Makefile +++ b/sys/modules/mii/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mii KMOD= miibus diff --git a/sys/modules/mlx/Makefile b/sys/modules/mlx/Makefile index 0f19a48f7332..709feca90455 100644 --- a/sys/modules/mlx/Makefile +++ b/sys/modules/mlx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mlx KMOD= mlx diff --git a/sys/modules/mmc/Makefile b/sys/modules/mmc/Makefile index b626eba0a102..690b0bfb9564 100644 --- a/sys/modules/mmc/Makefile +++ b/sys/modules/mmc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mmc KMOD= mmc diff --git a/sys/modules/mmcnull/Makefile b/sys/modules/mmcnull/Makefile index 0aeea797444a..a5354808bc46 100644 --- a/sys/modules/mmcnull/Makefile +++ b/sys/modules/mmcnull/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../dev/mmcnull KMOD= mmcnull diff --git a/sys/modules/mmcsd/Makefile b/sys/modules/mmcsd/Makefile index 4fdeaf88024e..32daec4b49f6 100644 --- a/sys/modules/mmcsd/Makefile +++ b/sys/modules/mmcsd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mmc KMOD= mmcsd diff --git a/sys/modules/mpi3mr/Makefile b/sys/modules/mpi3mr/Makefile index 1c44ed920d1b..81d2e86afc7f 100644 --- a/sys/modules/mpi3mr/Makefile +++ b/sys/modules/mpi3mr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mpi3mr KMOD= mpi3mr diff --git a/sys/modules/mpr/Makefile b/sys/modules/mpr/Makefile index f2ca7bb7e1b3..caf8000da6dc 100644 --- a/sys/modules/mpr/Makefile +++ b/sys/modules/mpr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mpr KMOD= mpr diff --git a/sys/modules/mps/Makefile b/sys/modules/mps/Makefile index af844fbe1a2b..d097b885ad45 100644 --- a/sys/modules/mps/Makefile +++ b/sys/modules/mps/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mps KMOD= mps diff --git a/sys/modules/mpt/Makefile b/sys/modules/mpt/Makefile index 9a6b5251ceed..a519039cf87c 100644 --- a/sys/modules/mpt/Makefile +++ b/sys/modules/mpt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mpt KMOD= mpt diff --git a/sys/modules/mqueue/Makefile b/sys/modules/mqueue/Makefile index b929c6b84ad1..dbc804ba30fb 100644 --- a/sys/modules/mqueue/Makefile +++ b/sys/modules/mqueue/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= mqueuefs diff --git a/sys/modules/msdosfs/Makefile b/sys/modules/msdosfs/Makefile index 794e7ba3d180..b520eb62643e 100644 --- a/sys/modules/msdosfs/Makefile +++ b/sys/modules/msdosfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/msdosfs KMOD= msdosfs diff --git a/sys/modules/msdosfs_iconv/Makefile b/sys/modules/msdosfs_iconv/Makefile index 7bf6442b3122..3064e4e2fccd 100644 --- a/sys/modules/msdosfs_iconv/Makefile +++ b/sys/modules/msdosfs_iconv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/msdosfs KMOD= msdosfs_iconv SRCS= msdosfs_iconv.c diff --git a/sys/modules/msk/Makefile b/sys/modules/msk/Makefile index 4e898a85b70a..6a49d142a5d7 100644 --- a/sys/modules/msk/Makefile +++ b/sys/modules/msk/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/msk KMOD= if_msk diff --git a/sys/modules/mt76/Makefile b/sys/modules/mt76/Makefile index 95d6e10a6991..fbc9265c9127 100644 --- a/sys/modules/mt76/Makefile +++ b/sys/modules/mt76/Makefile @@ -1,4 +1,3 @@ - SUBDIR= core SUBDIR+= mt7915 SUBDIR+= mt7921 diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index f1aa69f1bc8e..da5fe9133884 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -1,4 +1,3 @@ - # Common information shared by all submodule builds. COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76 diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile index 9e915fc5f965..88068b7bb188 100644 --- a/sys/modules/mt76/core/Makefile +++ b/sys/modules/mt76/core/Makefile @@ -1,4 +1,3 @@ - KMOD= mt76_core # Basic stuff. diff --git a/sys/modules/mt76/mt7915/Makefile b/sys/modules/mt76/mt7915/Makefile index 8d5b17dbac1a..049c919949f6 100644 --- a/sys/modules/mt76/mt7915/Makefile +++ b/sys/modules/mt76/mt7915/Makefile @@ -1,4 +1,3 @@ - DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7915 .PATH: ${DEVDIR} diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile index 0fb5f0c26fb1..d3f201997a2d 100644 --- a/sys/modules/mt76/mt7921/Makefile +++ b/sys/modules/mt76/mt7921/Makefile @@ -1,4 +1,3 @@ - DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921 .PATH: ${DEVDIR} diff --git a/sys/modules/mvs/Makefile b/sys/modules/mvs/Makefile index 512a885a55c0..b3d014f408b6 100644 --- a/sys/modules/mvs/Makefile +++ b/sys/modules/mvs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mvs KMOD= mvs diff --git a/sys/modules/mwlfw/Makefile b/sys/modules/mwlfw/Makefile index c4b9c046d098..913ccc0eb422 100644 --- a/sys/modules/mwlfw/Makefile +++ b/sys/modules/mwlfw/Makefile @@ -1,4 +1,3 @@ - KMOD= mw88W8363fw FIRMWS= mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot diff --git a/sys/modules/mxge/Makefile b/sys/modules/mxge/Makefile index 358adf109d18..b897429dee18 100644 --- a/sys/modules/mxge/Makefile +++ b/sys/modules/mxge/Makefile @@ -1,4 +1,3 @@ - SUBDIR= mxge SUBDIR+=mxge_eth_z8e SUBDIR+=mxge_ethp_z8e diff --git a/sys/modules/mxge/mxge/Makefile b/sys/modules/mxge/mxge/Makefile index b1b079b41adc..4b17d1bd5433 100644 --- a/sys/modules/mxge/mxge/Makefile +++ b/sys/modules/mxge/mxge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mxge KMOD= if_mxge diff --git a/sys/modules/mxge/mxge_eth_z8e/Makefile b/sys/modules/mxge/mxge_eth_z8e/Makefile index 9870ff5f4e60..d6ce84100025 100644 --- a/sys/modules/mxge/mxge_eth_z8e/Makefile +++ b/sys/modules/mxge/mxge_eth_z8e/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mxge KMOD= mxge_eth_z8e SRCS= mxge_eth_z8e.c diff --git a/sys/modules/mxge/mxge_ethp_z8e/Makefile b/sys/modules/mxge/mxge_ethp_z8e/Makefile index 28752de996f0..2aef89175d63 100644 --- a/sys/modules/mxge/mxge_ethp_z8e/Makefile +++ b/sys/modules/mxge/mxge_ethp_z8e/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mxge KMOD= mxge_ethp_z8e SRCS= mxge_ethp_z8e.c diff --git a/sys/modules/mxge/mxge_rss_eth_z8e/Makefile b/sys/modules/mxge/mxge_rss_eth_z8e/Makefile index 90b88931bf0d..08255305133d 100644 --- a/sys/modules/mxge/mxge_rss_eth_z8e/Makefile +++ b/sys/modules/mxge/mxge_rss_eth_z8e/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mxge KMOD= mxge_rss_eth_z8e SRCS= mxge_rss_eth_z8e.c diff --git a/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile b/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile index 668d37273749..998931256e28 100644 --- a/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile +++ b/sys/modules/mxge/mxge_rss_ethp_z8e/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mxge KMOD= mxge_rss_ethp_z8e SRCS= mxge_rss_ethp_z8e.c diff --git a/sys/modules/my/Makefile b/sys/modules/my/Makefile index f3d192fbcc25..c270c41f5da0 100644 --- a/sys/modules/my/Makefile +++ b/sys/modules/my/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/my KMOD= if_my diff --git a/sys/modules/nctgpio/Makefile b/sys/modules/nctgpio/Makefile index b48a11f1f899..aaaea9222d25 100644 --- a/sys/modules/nctgpio/Makefile +++ b/sys/modules/nctgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nctgpio KMOD= nctgpio SRCS= nctgpio.c diff --git a/sys/modules/ncthwm/Makefile b/sys/modules/ncthwm/Makefile index 266a476b6b73..8235c5e1a6d0 100644 --- a/sys/modules/ncthwm/Makefile +++ b/sys/modules/ncthwm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ncthwm KMOD= ncthwm SRCS= ncthwm.c diff --git a/sys/modules/neta/Makefile b/sys/modules/neta/Makefile index 635b15c2d61e..eb22487ecf3c 100644 --- a/sys/modules/neta/Makefile +++ b/sys/modules/neta/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/neta CFLAGS+= -DFDT diff --git a/sys/modules/netgraph/bluetooth/Makefile.inc b/sys/modules/netgraph/bluetooth/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/netgraph/bluetooth/Makefile.inc +++ b/sys/modules/netgraph/bluetooth/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/netgraph/bridge/Makefile b/sys/modules/netgraph/bridge/Makefile index 77ed20d85ce9..57a8afc76ff7 100644 --- a/sys/modules/netgraph/bridge/Makefile +++ b/sys/modules/netgraph/bridge/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_bridge SRCS= ng_bridge.c diff --git a/sys/modules/netgraph/car/Makefile b/sys/modules/netgraph/car/Makefile index b3ca9ab9d3b4..baf316e87c81 100644 --- a/sys/modules/netgraph/car/Makefile +++ b/sys/modules/netgraph/car/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_car SRCS= ng_car.c diff --git a/sys/modules/netgraph/checksum/Makefile b/sys/modules/netgraph/checksum/Makefile index 4b41bce3bc58..4e2b1f547a40 100644 --- a/sys/modules/netgraph/checksum/Makefile +++ b/sys/modules/netgraph/checksum/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/netgraph/deflate/Makefile b/sys/modules/netgraph/deflate/Makefile index b6f505fc8b8d..157df926d06b 100644 --- a/sys/modules/netgraph/deflate/Makefile +++ b/sys/modules/netgraph/deflate/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_deflate SRCS= ng_deflate.c diff --git a/sys/modules/netgraph/eiface/Makefile b/sys/modules/netgraph/eiface/Makefile index 5c7b4fe46b34..eac59c8fbbe3 100644 --- a/sys/modules/netgraph/eiface/Makefile +++ b/sys/modules/netgraph/eiface/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_eiface SRCS= ng_eiface.c diff --git a/sys/modules/netgraph/ether/Makefile b/sys/modules/netgraph/ether/Makefile index 7bfa7b1c0630..0fecfee3028e 100644 --- a/sys/modules/netgraph/ether/Makefile +++ b/sys/modules/netgraph/ether/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_ether SRCS= ng_ether.c diff --git a/sys/modules/netgraph/gif/Makefile b/sys/modules/netgraph/gif/Makefile index e7897492fa2c..4d0645faaa95 100644 --- a/sys/modules/netgraph/gif/Makefile +++ b/sys/modules/netgraph/gif/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_gif SRCS= ng_gif.c opt_inet.h opt_inet6.h diff --git a/sys/modules/netgraph/gif_demux/Makefile b/sys/modules/netgraph/gif_demux/Makefile index d95bf3d2d66e..ec35e2c8a63c 100644 --- a/sys/modules/netgraph/gif_demux/Makefile +++ b/sys/modules/netgraph/gif_demux/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_gif_demux SRCS= ng_gif_demux.c diff --git a/sys/modules/netgraph/hub/Makefile b/sys/modules/netgraph/hub/Makefile index 5829c1609b32..1d4af5d307b0 100644 --- a/sys/modules/netgraph/hub/Makefile +++ b/sys/modules/netgraph/hub/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_hub SRCS= ng_hub.c diff --git a/sys/modules/netgraph/ip_input/Makefile b/sys/modules/netgraph/ip_input/Makefile index 7aa3009ee8c7..55468f920d1a 100644 --- a/sys/modules/netgraph/ip_input/Makefile +++ b/sys/modules/netgraph/ip_input/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_ip_input SRCS= ng_ip_input.c diff --git a/sys/modules/netgraph/ipfw/Makefile b/sys/modules/netgraph/ipfw/Makefile index bdc23e7039ea..34163090ee22 100644 --- a/sys/modules/netgraph/ipfw/Makefile +++ b/sys/modules/netgraph/ipfw/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_ipfw SRCS= ng_ipfw.c opt_inet.h opt_inet6.h diff --git a/sys/modules/netgraph/ksocket/Makefile b/sys/modules/netgraph/ksocket/Makefile index 5e05eb1cc620..395fdbd7b3e3 100644 --- a/sys/modules/netgraph/ksocket/Makefile +++ b/sys/modules/netgraph/ksocket/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_ksocket SRCS= ng_ksocket.c diff --git a/sys/modules/netgraph/l2tp/Makefile b/sys/modules/netgraph/l2tp/Makefile index 7ff128ef6bc7..c2c78073c4bd 100644 --- a/sys/modules/netgraph/l2tp/Makefile +++ b/sys/modules/netgraph/l2tp/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_l2tp SRCS= ng_l2tp.c diff --git a/sys/modules/netgraph/macfilter/Makefile b/sys/modules/netgraph/macfilter/Makefile index c52a66dc0c2a..28830b7f0462 100644 --- a/sys/modules/netgraph/macfilter/Makefile +++ b/sys/modules/netgraph/macfilter/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_macfilter SRCS= ng_macfilter.c diff --git a/sys/modules/netgraph/nat/Makefile b/sys/modules/netgraph/nat/Makefile index 4569cfddfbe5..fd65b6224945 100644 --- a/sys/modules/netgraph/nat/Makefile +++ b/sys/modules/netgraph/nat/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_nat SRCS= ng_nat.c diff --git a/sys/modules/netgraph/one2many/Makefile b/sys/modules/netgraph/one2many/Makefile index 07596a73114c..2c61c6035f66 100644 --- a/sys/modules/netgraph/one2many/Makefile +++ b/sys/modules/netgraph/one2many/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_one2many SRCS= ng_one2many.c diff --git a/sys/modules/netgraph/patch/Makefile b/sys/modules/netgraph/patch/Makefile index ebbae47cf0ab..619b925b2f9b 100644 --- a/sys/modules/netgraph/patch/Makefile +++ b/sys/modules/netgraph/patch/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_patch SRCS= ng_patch.c diff --git a/sys/modules/netgraph/pipe/Makefile b/sys/modules/netgraph/pipe/Makefile index 68b5d1a7c1eb..04e644d7131b 100644 --- a/sys/modules/netgraph/pipe/Makefile +++ b/sys/modules/netgraph/pipe/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_pipe SRCS= ng_pipe.c diff --git a/sys/modules/netgraph/pred1/Makefile b/sys/modules/netgraph/pred1/Makefile index a4c95fdbb97e..1d51bf5ec3fc 100644 --- a/sys/modules/netgraph/pred1/Makefile +++ b/sys/modules/netgraph/pred1/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_pred1 SRCS= ng_pred1.c diff --git a/sys/modules/netgraph/sample/Makefile b/sys/modules/netgraph/sample/Makefile index d675a8b84441..e5cc44da6d3c 100644 --- a/sys/modules/netgraph/sample/Makefile +++ b/sys/modules/netgraph/sample/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_sample SRCS= ng_sample.c diff --git a/sys/modules/netgraph/source/Makefile b/sys/modules/netgraph/source/Makefile index 603a6b05bee1..d7d289e99f83 100644 --- a/sys/modules/netgraph/source/Makefile +++ b/sys/modules/netgraph/source/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_source SRCS= ng_source.c # 4.x only diff --git a/sys/modules/netgraph/tag/Makefile b/sys/modules/netgraph/tag/Makefile index cdc19325d096..84cf9b5cc1ec 100644 --- a/sys/modules/netgraph/tag/Makefile +++ b/sys/modules/netgraph/tag/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_tag SRCS= ng_tag.c diff --git a/sys/modules/netgraph/tcpmss/Makefile b/sys/modules/netgraph/tcpmss/Makefile index 3ed465b2dd2f..443e5b2d3a9b 100644 --- a/sys/modules/netgraph/tcpmss/Makefile +++ b/sys/modules/netgraph/tcpmss/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_tcpmss SRCS= ng_tcpmss.c diff --git a/sys/modules/netgraph/vlan/Makefile b/sys/modules/netgraph/vlan/Makefile index 2f6708de3747..135ac8eca7f3 100644 --- a/sys/modules/netgraph/vlan/Makefile +++ b/sys/modules/netgraph/vlan/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_vlan SRCS= ng_vlan.c diff --git a/sys/modules/netgraph/vlan_rotate/Makefile b/sys/modules/netgraph/vlan_rotate/Makefile index 619b5b432ad7..26e2e5d14e24 100644 --- a/sys/modules/netgraph/vlan_rotate/Makefile +++ b/sys/modules/netgraph/vlan_rotate/Makefile @@ -1,4 +1,3 @@ - KMOD= ng_vlan_rotate SRCS= ng_vlan_rotate.c diff --git a/sys/modules/nfe/Makefile b/sys/modules/nfe/Makefile index c7361ac97aeb..2450875e9230 100644 --- a/sys/modules/nfe/Makefile +++ b/sys/modules/nfe/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nfe KMOD= if_nfe diff --git a/sys/modules/nfscl/Makefile b/sys/modules/nfscl/Makefile index 6394d0fba753..82cf5def65b7 100644 --- a/sys/modules/nfscl/Makefile +++ b/sys/modules/nfscl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/nfsclient ${SRCTOP}/sys/nfs KMOD= nfscl SRCS= vnode_if.h \ diff --git a/sys/modules/nfscommon/Makefile b/sys/modules/nfscommon/Makefile index 7f03ba5a2b4f..317b14d3fbd4 100644 --- a/sys/modules/nfscommon/Makefile +++ b/sys/modules/nfscommon/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/nfs KMOD= nfscommon SRCS= vnode_if.h \ diff --git a/sys/modules/nfsd/Makefile b/sys/modules/nfsd/Makefile index 5ec7717e3f12..6861ace28685 100644 --- a/sys/modules/nfsd/Makefile +++ b/sys/modules/nfsd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/nfsserver KMOD= nfsd SRCS= vnode_if.h \ diff --git a/sys/modules/nfslockd/Makefile b/sys/modules/nfslockd/Makefile index 310b9e3611bd..20cbe1d02c6a 100644 --- a/sys/modules/nfslockd/Makefile +++ b/sys/modules/nfslockd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/nlm ${SRCTOP}/sys/rpc KMOD= nfslockd SRCS= vnode_if.h \ diff --git a/sys/modules/nfssvc/Makefile b/sys/modules/nfssvc/Makefile index 04bbf910eea0..02c0acb808de 100644 --- a/sys/modules/nfssvc/Makefile +++ b/sys/modules/nfssvc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/nfs KMOD= nfssvc SRCS= nfs_nfssvc.c \ diff --git a/sys/modules/nge/Makefile b/sys/modules/nge/Makefile index ea8d1ed2b355..ac746a87fcef 100644 --- a/sys/modules/nge/Makefile +++ b/sys/modules/nge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nge KMOD= if_nge diff --git a/sys/modules/nlsysevent/Makefile b/sys/modules/nlsysevent/Makefile index be9b985409b6..cffedc9539cf 100644 --- a/sys/modules/nlsysevent/Makefile +++ b/sys/modules/nlsysevent/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netlink/ KMOD= nlsysevent diff --git a/sys/modules/nmdm/Makefile b/sys/modules/nmdm/Makefile index d9d2fc8523ef..81e5e4b37c64 100644 --- a/sys/modules/nmdm/Makefile +++ b/sys/modules/nmdm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nmdm KMOD= nmdm diff --git a/sys/modules/ntb/Makefile b/sys/modules/ntb/Makefile index a1374f3d0f7c..421a98b5fadd 100644 --- a/sys/modules/ntb/Makefile +++ b/sys/modules/ntb/Makefile @@ -1,4 +1,3 @@ - SUBDIR= ntb ntb_hw_amd ntb_hw_intel ntb_hw_plx ntb_transport ntb_tool if_ntb .include diff --git a/sys/modules/ntb/if_ntb/Makefile b/sys/modules/ntb/if_ntb/Makefile index fb99668e2d12..3657bf64bb71 100644 --- a/sys/modules/ntb/if_ntb/Makefile +++ b/sys/modules/ntb/if_ntb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb/if_ntb KMOD = if_ntb diff --git a/sys/modules/ntb/ntb/Makefile b/sys/modules/ntb/ntb/Makefile index 97f54fff3688..45bc0678cc92 100644 --- a/sys/modules/ntb/ntb/Makefile +++ b/sys/modules/ntb/ntb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb KMOD = ntb diff --git a/sys/modules/ntb/ntb_hw_amd/Makefile b/sys/modules/ntb/ntb_hw_amd/Makefile index 59693dbec299..d69f1f5daedd 100644 --- a/sys/modules/ntb/ntb_hw_amd/Makefile +++ b/sys/modules/ntb/ntb_hw_amd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb/ntb_hw KMOD = ntb_hw_amd diff --git a/sys/modules/ntb/ntb_hw_intel/Makefile b/sys/modules/ntb/ntb_hw_intel/Makefile index 688eeeb17e7a..f28b02d7a0ec 100644 --- a/sys/modules/ntb/ntb_hw_intel/Makefile +++ b/sys/modules/ntb/ntb_hw_intel/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb/ntb_hw KMOD = ntb_hw_intel diff --git a/sys/modules/ntb/ntb_hw_plx/Makefile b/sys/modules/ntb/ntb_hw_plx/Makefile index 08075af35fc7..2785da7ea0ce 100644 --- a/sys/modules/ntb/ntb_hw_plx/Makefile +++ b/sys/modules/ntb/ntb_hw_plx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb/ntb_hw KMOD = ntb_hw_plx diff --git a/sys/modules/ntb/ntb_tool/Makefile b/sys/modules/ntb/ntb_tool/Makefile index 5fa4b1cfc7c8..a4c554f46709 100644 --- a/sys/modules/ntb/ntb_tool/Makefile +++ b/sys/modules/ntb/ntb_tool/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb/test KMOD = ntb_tool diff --git a/sys/modules/ntb/ntb_transport/Makefile b/sys/modules/ntb/ntb_transport/Makefile index 47af0b4ff21e..5692bb4361bf 100644 --- a/sys/modules/ntb/ntb_transport/Makefile +++ b/sys/modules/ntb/ntb_transport/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ntb KMOD = ntb_transport diff --git a/sys/modules/nullfs/Makefile b/sys/modules/nullfs/Makefile index 3f5d1aef3f87..e9644106773e 100644 --- a/sys/modules/nullfs/Makefile +++ b/sys/modules/nullfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/nullfs KMOD= nullfs diff --git a/sys/modules/nvd/Makefile b/sys/modules/nvd/Makefile index 2a1c49024fb0..08b2d61859e9 100644 --- a/sys/modules/nvd/Makefile +++ b/sys/modules/nvd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nvd KMOD= nvd diff --git a/sys/modules/nvdimm/Makefile b/sys/modules/nvdimm/Makefile index 043c1d287a75..81beca9adf16 100644 --- a/sys/modules/nvdimm/Makefile +++ b/sys/modules/nvdimm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nvdimm KMOD= nvdimm diff --git a/sys/modules/nvme/Makefile b/sys/modules/nvme/Makefile index 9b7003bdea69..9d7cf19b925e 100644 --- a/sys/modules/nvme/Makefile +++ b/sys/modules/nvme/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nvme KMOD = nvme diff --git a/sys/modules/nvram/Makefile b/sys/modules/nvram/Makefile index 5f6ab7b244b0..1cba445eb978 100644 --- a/sys/modules/nvram/Makefile +++ b/sys/modules/nvram/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/nvram KMOD= nvram diff --git a/sys/modules/ocs_fc/Makefile b/sys/modules/ocs_fc/Makefile index 24abff9eccc7..a855f71ec19e 100644 --- a/sys/modules/ocs_fc/Makefile +++ b/sys/modules/ocs_fc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ocs_fc KMOD = ocs_fc diff --git a/sys/modules/opal_nvram/Makefile b/sys/modules/opal_nvram/Makefile index 8898dbb4629c..c607684258ba 100644 --- a/sys/modules/opal_nvram/Makefile +++ b/sys/modules/opal_nvram/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/powerpc/powernv KMOD= opal_nvram diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 42702d0c685d..98f52057e45e 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -1,4 +1,3 @@ - SYSDIR?= ${SRCTOP}/sys .PATH: ${SYSDIR}/cddl/compat/opensolaris/kern diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index edaebe26ff9a..7a92742d6b36 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/openssl .PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} diff --git a/sys/modules/otus/Makefile b/sys/modules/otus/Makefile index 8c0c322429b8..5e5d9c16dc8d 100644 --- a/sys/modules/otus/Makefile +++ b/sys/modules/otus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/otus KMOD = if_otus diff --git a/sys/modules/otusfw/Makefile b/sys/modules/otusfw/Makefile index f55b73d06f5a..4535be9f596d 100644 --- a/sys/modules/otusfw/Makefile +++ b/sys/modules/otusfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR=otusfw_init otusfw_main .include diff --git a/sys/modules/otusfw/otusfw_init/Makefile b/sys/modules/otusfw/otusfw_init/Makefile index d3acbc16beea..0b06fddcfeeb 100644 --- a/sys/modules/otusfw/otusfw_init/Makefile +++ b/sys/modules/otusfw/otusfw_init/Makefile @@ -1,4 +1,3 @@ - KMOD= otusfw_init FIRMWS= otusfw_init:otusfw_init:1 diff --git a/sys/modules/otusfw/otusfw_main/Makefile b/sys/modules/otusfw/otusfw_main/Makefile index cd563b3ed1dd..d83863486cbc 100644 --- a/sys/modules/otusfw/otusfw_main/Makefile +++ b/sys/modules/otusfw/otusfw_main/Makefile @@ -1,4 +1,3 @@ - KMOD= otusfw_main FIRMWS= otusfw_main:otusfw_main:1 diff --git a/sys/modules/ow/Makefile b/sys/modules/ow/Makefile index 498dd15a0328..76fefe3e63be 100644 --- a/sys/modules/ow/Makefile +++ b/sys/modules/ow/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/ow/ow/Makefile b/sys/modules/ow/ow/Makefile index fbfbd1b5d58e..d1b4896dfbfc 100644 --- a/sys/modules/ow/ow/Makefile +++ b/sys/modules/ow/ow/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ow KMOD= ow diff --git a/sys/modules/ow/ow_temp/Makefile b/sys/modules/ow/ow_temp/Makefile index 6c6d2df47808..918bb19fbe13 100644 --- a/sys/modules/ow/ow_temp/Makefile +++ b/sys/modules/ow/ow_temp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ow KMOD= ow_temp diff --git a/sys/modules/ow/owc/Makefile b/sys/modules/ow/owc/Makefile index 5c98574c0711..ba8f672d4abb 100644 --- a/sys/modules/ow/owc/Makefile +++ b/sys/modules/ow/owc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ow KMOD= owc diff --git a/sys/modules/padlock/Makefile b/sys/modules/padlock/Makefile index 167282c99ff7..2515ddb1d5fe 100644 --- a/sys/modules/padlock/Makefile +++ b/sys/modules/padlock/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/via KMOD= padlock diff --git a/sys/modules/padlock_rng/Makefile b/sys/modules/padlock_rng/Makefile index fe224a7c8124..f9c137ed69c9 100644 --- a/sys/modules/padlock_rng/Makefile +++ b/sys/modules/padlock_rng/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/random KMOD= padlock_rng diff --git a/sys/modules/pcfclock/Makefile b/sys/modules/pcfclock/Makefile index 60f71e7b217c..51a9e3a11ed6 100644 --- a/sys/modules/pcfclock/Makefile +++ b/sys/modules/pcfclock/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= pcfclock diff --git a/sys/modules/pchtherm/Makefile b/sys/modules/pchtherm/Makefile index eb69b508f86e..10cffb2fd0a3 100644 --- a/sys/modules/pchtherm/Makefile +++ b/sys/modules/pchtherm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/intel KMOD= pchtherm SRCS= pchtherm.c diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile index 6158943139cf..4a12730f3610 100644 --- a/sys/modules/pf/Makefile +++ b/sys/modules/pf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/pf KMOD= pf diff --git a/sys/modules/pflog/Makefile b/sys/modules/pflog/Makefile index 8352a6c16cef..f7da8c3cbcb3 100644 --- a/sys/modules/pflog/Makefile +++ b/sys/modules/pflog/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/pf KMOD= pflog diff --git a/sys/modules/pfsync/Makefile b/sys/modules/pfsync/Makefile index fc2cdbf4ba85..aecd3a9f0448 100644 --- a/sys/modules/pfsync/Makefile +++ b/sys/modules/pfsync/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netpfil/pf KMOD= pfsync diff --git a/sys/modules/plip/Makefile b/sys/modules/plip/Makefile index dab5d4c64d8d..e54f2beef56d 100644 --- a/sys/modules/plip/Makefile +++ b/sys/modules/plip/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= plip SRCS= bus_if.h device_if.h ppbus_if.h \ diff --git a/sys/modules/pms/Makefile.inc b/sys/modules/pms/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/pms/Makefile.inc +++ b/sys/modules/pms/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/powermac_nvram/Makefile b/sys/modules/powermac_nvram/Makefile index 06e3b66e3e10..c2f724a54d9f 100644 --- a/sys/modules/powermac_nvram/Makefile +++ b/sys/modules/powermac_nvram/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/powermac_nvram KMOD= powermac_nvram diff --git a/sys/modules/ppbus/Makefile b/sys/modules/ppbus/Makefile index 37ce59ea9c25..eef4d8c5683e 100644 --- a/sys/modules/ppbus/Makefile +++ b/sys/modules/ppbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= ppbus SRCS= bus_if.h device_if.h ppbus_if.h ppbus_if.c \ diff --git a/sys/modules/ppc/Makefile b/sys/modules/ppc/Makefile index 8537acae9b3f..3142dbdaebb9 100644 --- a/sys/modules/ppc/Makefile +++ b/sys/modules/ppc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppc KMOD= ppc SRCS= bus_if.h device_if.h ppbus_if.h isa_if.h pci_if.h serdev_if.h \ diff --git a/sys/modules/ppi/Makefile b/sys/modules/ppi/Makefile index 5875e6e57dd9..213d6f17580c 100644 --- a/sys/modules/ppi/Makefile +++ b/sys/modules/ppi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= ppi SRCS= bus_if.h device_if.h ppbus_if.h \ diff --git a/sys/modules/pps/Makefile b/sys/modules/pps/Makefile index 59979e4b11a3..11ad95e68e0d 100644 --- a/sys/modules/pps/Makefile +++ b/sys/modules/pps/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ppbus KMOD= pps SRCS= bus_if.h device_if.h ppbus_if.h \ diff --git a/sys/modules/procfs/Makefile b/sys/modules/procfs/Makefile index 65708288a523..0ee750b6d929 100644 --- a/sys/modules/procfs/Makefile +++ b/sys/modules/procfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/procfs KMOD= procfs diff --git a/sys/modules/proto/Makefile b/sys/modules/proto/Makefile index fd9ea1b51dd8..ab417090643b 100644 --- a/sys/modules/proto/Makefile +++ b/sys/modules/proto/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/proto KMOD= proto diff --git a/sys/modules/pseudofs/Makefile b/sys/modules/pseudofs/Makefile index 52c01d1859c9..cb92b8912c86 100644 --- a/sys/modules/pseudofs/Makefile +++ b/sys/modules/pseudofs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/pseudofs KMOD= pseudofs diff --git a/sys/modules/pst/Makefile b/sys/modules/pst/Makefile index 2fd5f4a356f6..77387e1a26ca 100644 --- a/sys/modules/pst/Makefile +++ b/sys/modules/pst/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pst KMOD= pst diff --git a/sys/modules/pty/Makefile b/sys/modules/pty/Makefile index 63f8c8f50ee3..fc708d42263b 100644 --- a/sys/modules/pty/Makefile +++ b/sys/modules/pty/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pty KMOD= pty diff --git a/sys/modules/puc/Makefile b/sys/modules/puc/Makefile index cfd48bee5ff9..afa4fe074700 100644 --- a/sys/modules/puc/Makefile +++ b/sys/modules/puc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/puc ${SRCTOP}/sys/dev/uart/ KMOD= puc diff --git a/sys/modules/pwm/Makefile b/sys/modules/pwm/Makefile index 9b18a0be3908..bee797145842 100644 --- a/sys/modules/pwm/Makefile +++ b/sys/modules/pwm/Makefile @@ -1,4 +1,3 @@ - # Modules for dev/pwm drivers. SUBDIR = \ diff --git a/sys/modules/pwm/pwm_backlight/Makefile b/sys/modules/pwm/pwm_backlight/Makefile index b15ba296a133..635ebe513f30 100644 --- a/sys/modules/pwm/pwm_backlight/Makefile +++ b/sys/modules/pwm/pwm_backlight/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pwm KMOD= pwm_backlight SRCS= pwm_backlight.c diff --git a/sys/modules/pwm/pwmbus/Makefile b/sys/modules/pwm/pwmbus/Makefile index 3c0acecdf327..5c5f0051ee02 100644 --- a/sys/modules/pwm/pwmbus/Makefile +++ b/sys/modules/pwm/pwmbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pwm KMOD= pwmbus diff --git a/sys/modules/pwm/pwmc/Makefile b/sys/modules/pwm/pwmc/Makefile index 3ba120f51502..a5c589cc7ae3 100644 --- a/sys/modules/pwm/pwmc/Makefile +++ b/sys/modules/pwm/pwmc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/pwm KMOD= pwmc SRCS= pwmc.c diff --git a/sys/modules/qat_c2xxx/Makefile b/sys/modules/qat_c2xxx/Makefile index 950566d8146b..a0509e84bc5e 100644 --- a/sys/modules/qat_c2xxx/Makefile +++ b/sys/modules/qat_c2xxx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/qat_c2xxx KMOD= qat_c2xxx diff --git a/sys/modules/qat_c2xxxfw/Makefile b/sys/modules/qat_c2xxxfw/Makefile index d8284907ce4f..04e162148860 100644 --- a/sys/modules/qat_c2xxxfw/Makefile +++ b/sys/modules/qat_c2xxxfw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/qat_c2xxx KMOD= qat_c2xxxfw diff --git a/sys/modules/ral/Makefile b/sys/modules/ral/Makefile index 4b26a3414c78..156b1ab36dd5 100644 --- a/sys/modules/ral/Makefile +++ b/sys/modules/ral/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ral KMOD= if_ral diff --git a/sys/modules/ralfw/Makefile b/sys/modules/ralfw/Makefile index e8c74240cb1b..b474ee6c3517 100644 --- a/sys/modules/ralfw/Makefile +++ b/sys/modules/ralfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= rt2561 rt2561s rt2661 rt2860 .include diff --git a/sys/modules/ralfw/Makefile.inc b/sys/modules/ralfw/Makefile.inc index 5cf040ba5450..f5b29d817300 100644 --- a/sys/modules/ralfw/Makefile.inc +++ b/sys/modules/ralfw/Makefile.inc @@ -1,4 +1,3 @@ - # # Common rules for building firmware. Note this gets auto-included # by the subdir Makefile's as a consequence of included bsd.kmod.mk. diff --git a/sys/modules/ralfw/rt2561/Makefile b/sys/modules/ralfw/rt2561/Makefile index 3f5ba22d61b4..906b41278662 100644 --- a/sys/modules/ralfw/rt2561/Makefile +++ b/sys/modules/ralfw/rt2561/Makefile @@ -1,4 +1,3 @@ - IMG= rt2561 .include diff --git a/sys/modules/ralfw/rt2561s/Makefile b/sys/modules/ralfw/rt2561s/Makefile index 660d98d26ae3..7890f8bc8b3c 100644 --- a/sys/modules/ralfw/rt2561s/Makefile +++ b/sys/modules/ralfw/rt2561s/Makefile @@ -1,4 +1,3 @@ - IMG= rt2561s .include diff --git a/sys/modules/ralfw/rt2661/Makefile b/sys/modules/ralfw/rt2661/Makefile index 576d3b6c41f6..e4b01e030133 100644 --- a/sys/modules/ralfw/rt2661/Makefile +++ b/sys/modules/ralfw/rt2661/Makefile @@ -1,4 +1,3 @@ - IMG= rt2661 .include diff --git a/sys/modules/ralfw/rt2860/Makefile b/sys/modules/ralfw/rt2860/Makefile index 9fee45718f8f..fadf41f44952 100644 --- a/sys/modules/ralfw/rt2860/Makefile +++ b/sys/modules/ralfw/rt2860/Makefile @@ -1,4 +1,3 @@ - IMG= rt2860 .include diff --git a/sys/modules/random_fortuna/Makefile b/sys/modules/random_fortuna/Makefile index 854085d6452e..0cddaa4ab30e 100644 --- a/sys/modules/random_fortuna/Makefile +++ b/sys/modules/random_fortuna/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/random KMOD = random_fortuna diff --git a/sys/modules/random_other/Makefile b/sys/modules/random_other/Makefile index 2add4bfe048c..a67c53b790e2 100644 --- a/sys/modules/random_other/Makefile +++ b/sys/modules/random_other/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/random KMOD = random_OTHER diff --git a/sys/modules/rc4/Makefile b/sys/modules/rc4/Makefile index 5643ed40cb92..845e7403e460 100644 --- a/sys/modules/rc4/Makefile +++ b/sys/modules/rc4/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/rc4 KMOD= rc4 diff --git a/sys/modules/rccgpio/Makefile b/sys/modules/rccgpio/Makefile index 47e8a7915eaf..ba132e671b63 100644 --- a/sys/modules/rccgpio/Makefile +++ b/sys/modules/rccgpio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rccgpio KMOD= rccgpio SRCS= rccgpio.c diff --git a/sys/modules/rdma/Makefile b/sys/modules/rdma/Makefile index 81ddf6e71bf5..0e9b3e6b3658 100644 --- a/sys/modules/rdma/Makefile +++ b/sys/modules/rdma/Makefile @@ -1,4 +1,3 @@ - SUBDIR+= krping .include diff --git a/sys/modules/rdrand_rng/Makefile b/sys/modules/rdrand_rng/Makefile index 601bfcab51eb..7fa7a8bb8fb9 100644 --- a/sys/modules/rdrand_rng/Makefile +++ b/sys/modules/rdrand_rng/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/random KMOD= rdrand_rng diff --git a/sys/modules/re/Makefile b/sys/modules/re/Makefile index 6923d8d631c6..7967efc20857 100644 --- a/sys/modules/re/Makefile +++ b/sys/modules/re/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/re KMOD= if_re diff --git a/sys/modules/rl/Makefile b/sys/modules/rl/Makefile index e615ec364829..f0f0d61539b6 100644 --- a/sys/modules/rl/Makefile +++ b/sys/modules/rl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rl KMOD= if_rl diff --git a/sys/modules/rndtest/Makefile b/sys/modules/rndtest/Makefile index cb0f13492644..5adb33f92507 100644 --- a/sys/modules/rndtest/Makefile +++ b/sys/modules/rndtest/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rndtest KMOD = rndtest SRCS = rndtest.c diff --git a/sys/modules/rockchip/rk805/Makefile b/sys/modules/rockchip/rk805/Makefile index a5529531d14a..5147f55080a0 100644 --- a/sys/modules/rockchip/rk805/Makefile +++ b/sys/modules/rockchip/rk805/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/pmic/rockchip KMOD= rk805 diff --git a/sys/modules/rockchip/rk808/Makefile b/sys/modules/rockchip/rk808/Makefile index 6cf48cb40546..fbbb4a027437 100644 --- a/sys/modules/rockchip/rk808/Makefile +++ b/sys/modules/rockchip/rk808/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/pmic/rockchip KMOD= rk808 diff --git a/sys/modules/rockchip/rk_dwmmc/Makefile b/sys/modules/rockchip/rk_dwmmc/Makefile index b5641675db38..d8f28683fa81 100644 --- a/sys/modules/rockchip/rk_dwmmc/Makefile +++ b/sys/modules/rockchip/rk_dwmmc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/mmc/host/ KMOD= rk_dwmmc diff --git a/sys/modules/rockchip/rk_i2c/Makefile b/sys/modules/rockchip/rk_i2c/Makefile index 3cf847e1d1cc..5c6e40ec15c8 100644 --- a/sys/modules/rockchip/rk_i2c/Makefile +++ b/sys/modules/rockchip/rk_i2c/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/iicbus/controller/rockchip KMOD= rk_i2c diff --git a/sys/modules/rockchip/rk_spi/Makefile b/sys/modules/rockchip/rk_spi/Makefile index 70526cdaf2c2..3c083bfdd374 100644 --- a/sys/modules/rockchip/rk_spi/Makefile +++ b/sys/modules/rockchip/rk_spi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/spibus/controller/rockchip KMOD= rk_spi diff --git a/sys/modules/rpi_ft5406/Makefile b/sys/modules/rpi_ft5406/Makefile index 052886cc3c2a..1c78bd4e412e 100644 --- a/sys/modules/rpi_ft5406/Makefile +++ b/sys/modules/rpi_ft5406/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/arm/broadcom/bcm2835/ KMOD= rpi_ft5406 diff --git a/sys/modules/rtsx/Makefile b/sys/modules/rtsx/Makefile index 5cf75b0c719e..95d0607e41f4 100644 --- a/sys/modules/rtsx/Makefile +++ b/sys/modules/rtsx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rtsx KMOD= rtsx diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index da4233b7c79e..b0e6b59b708e 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -1,4 +1,3 @@ - DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} diff --git a/sys/modules/rtw88fw/Makefile b/sys/modules/rtw88fw/Makefile index 1b92f28e024e..928c80fbff95 100644 --- a/sys/modules/rtw88fw/Makefile +++ b/sys/modules/rtw88fw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= \ rtw8723d \ rtw8821c \ diff --git a/sys/modules/rtw88fw/rtw8723d/Makefile b/sys/modules/rtw88fw/rtw8723d/Makefile index 50a14fce3d21..e60918ea8457 100644 --- a/sys/modules/rtw88fw/rtw8723d/Makefile +++ b/sys/modules/rtw88fw/rtw8723d/Makefile @@ -1,4 +1,3 @@ - VERSION= 48 NAME= 8723d diff --git a/sys/modules/rtw88fw/rtw8821c/Makefile b/sys/modules/rtw88fw/rtw8821c/Makefile index 875dbb2628d6..d71aaa7d8669 100644 --- a/sys/modules/rtw88fw/rtw8821c/Makefile +++ b/sys/modules/rtw88fw/rtw8821c/Makefile @@ -1,4 +1,3 @@ - VERSION= 2408 NAME= 8821c diff --git a/sys/modules/rtw88fw/rtw8822b/Makefile b/sys/modules/rtw88fw/rtw8822b/Makefile index 709ef82cd725..1b428c30a3fb 100644 --- a/sys/modules/rtw88fw/rtw8822b/Makefile +++ b/sys/modules/rtw88fw/rtw8822b/Makefile @@ -1,4 +1,3 @@ - VERSION= 0 NAME= 8822b diff --git a/sys/modules/rtw88fw/rtw8822c/Makefile b/sys/modules/rtw88fw/rtw8822c/Makefile index 5fad1210b57f..06676b5a0fa4 100644 --- a/sys/modules/rtw88fw/rtw8822c/Makefile +++ b/sys/modules/rtw88fw/rtw8822c/Makefile @@ -1,4 +1,3 @@ - VERSION= 9910 NAME= 8822c diff --git a/sys/modules/rtw88fw/rtw8822c_wow/Makefile b/sys/modules/rtw88fw/rtw8822c_wow/Makefile index f1061a4aa151..d03b5c7d05a6 100644 --- a/sys/modules/rtw88fw/rtw8822c_wow/Makefile +++ b/sys/modules/rtw88fw/rtw8822c_wow/Makefile @@ -1,4 +1,3 @@ - VERSION= 994 NAME= 8822c_wow diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index 9f81912a762d..f13924e1aa5b 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -1,4 +1,3 @@ - DEVRTW89DIR= ${SRCTOP}/sys/contrib/dev/rtw89 .PATH: ${DEVRTW89DIR} diff --git a/sys/modules/rtw89fw/Makefile b/sys/modules/rtw89fw/Makefile index 7732d9d868ff..62340479737d 100644 --- a/sys/modules/rtw89fw/Makefile +++ b/sys/modules/rtw89fw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= \ rtw8852a \ rtw8852c diff --git a/sys/modules/rtw89fw/rtw8852a/Makefile b/sys/modules/rtw89fw/rtw8852a/Makefile index 910468870e78..876e8145759b 100644 --- a/sys/modules/rtw89fw/rtw8852a/Makefile +++ b/sys/modules/rtw89fw/rtw8852a/Makefile @@ -1,4 +1,3 @@ - VERSION= 013360 NAME= 8852a diff --git a/sys/modules/rtw89fw/rtw8852c/Makefile b/sys/modules/rtw89fw/rtw8852c/Makefile index b051945017e5..1479e43b7072 100644 --- a/sys/modules/rtw89fw/rtw8852c/Makefile +++ b/sys/modules/rtw89fw/rtw8852c/Makefile @@ -1,4 +1,3 @@ - VERSION= 027200 NAME= 8852c diff --git a/sys/modules/rtwn/Makefile b/sys/modules/rtwn/Makefile index 07a128a9968c..9afdd2084ecb 100644 --- a/sys/modules/rtwn/Makefile +++ b/sys/modules/rtwn/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rtwn SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/rtwn_pci/Makefile b/sys/modules/rtwn_pci/Makefile index 2d6650238c22..ce2144121e88 100644 --- a/sys/modules/rtwn_pci/Makefile +++ b/sys/modules/rtwn_pci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rtwn/pci SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/rtwn_usb/Makefile b/sys/modules/rtwn_usb/Makefile index a599f13095e5..16899b8a8c49 100644 --- a/sys/modules/rtwn_usb/Makefile +++ b/sys/modules/rtwn_usb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/rtwn/usb SYSDIR?=${SRCTOP}/sys diff --git a/sys/modules/rtwnfw/Makefile b/sys/modules/rtwnfw/Makefile index f747612c7526..a8eedea81d98 100644 --- a/sys/modules/rtwnfw/Makefile +++ b/sys/modules/rtwnfw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= rtwnrtl8188eu rtwnrtl8192cT rtwnrtl8192cU rtwnrtl8192eu rtwnrtl8812au \ rtwnrtl8821au rtwnrtl8192cE rtwnrtl8192cEB rtwnrtl8188ee diff --git a/sys/modules/rtwnfw/rtwnrtl8188ee/Makefile b/sys/modules/rtwnfw/rtwnrtl8188ee/Makefile index 4d3ed50d557d..6d030b069b2a 100644 --- a/sys/modules/rtwnfw/rtwnrtl8188ee/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8188ee/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8188eefw IMG= rtwn-rtl8188eefw diff --git a/sys/modules/rtwnfw/rtwnrtl8188eu/Makefile b/sys/modules/rtwnfw/rtwnrtl8188eu/Makefile index df896ca7dcc6..985f8439ddbb 100644 --- a/sys/modules/rtwnfw/rtwnrtl8188eu/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8188eu/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8188eufw IMG= rtwn-rtl8188eufw diff --git a/sys/modules/rtwnfw/rtwnrtl8192cE/Makefile b/sys/modules/rtwnfw/rtwnrtl8192cE/Makefile index 8b6ddb2a119d..6f253e757238 100644 --- a/sys/modules/rtwnfw/rtwnrtl8192cE/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8192cE/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8192cfwE IMG= rtwn-rtl8192cfwE diff --git a/sys/modules/rtwnfw/rtwnrtl8192cEB/Makefile b/sys/modules/rtwnfw/rtwnrtl8192cEB/Makefile index 15412322d527..bbe6013b3617 100644 --- a/sys/modules/rtwnfw/rtwnrtl8192cEB/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8192cEB/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8192cfwE_B IMG= rtwn-rtl8192cfwE_B diff --git a/sys/modules/rtwnfw/rtwnrtl8192cT/Makefile b/sys/modules/rtwnfw/rtwnrtl8192cT/Makefile index 98349e9b7ca6..799425ae3576 100644 --- a/sys/modules/rtwnfw/rtwnrtl8192cT/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8192cT/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8192cfwT IMG= rtwn-rtl8192cfwT diff --git a/sys/modules/rtwnfw/rtwnrtl8192cU/Makefile b/sys/modules/rtwnfw/rtwnrtl8192cU/Makefile index 84a2e1c69c68..6c62a3cac07b 100644 --- a/sys/modules/rtwnfw/rtwnrtl8192cU/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8192cU/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8192cfwU IMG= rtwn-rtl8192cfwU diff --git a/sys/modules/rtwnfw/rtwnrtl8192eu/Makefile b/sys/modules/rtwnfw/rtwnrtl8192eu/Makefile index 30cfd185c763..89676d44336f 100644 --- a/sys/modules/rtwnfw/rtwnrtl8192eu/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8192eu/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8192eufw IMG= rtwn-rtl8192eufw diff --git a/sys/modules/rtwnfw/rtwnrtl8812au/Makefile b/sys/modules/rtwnfw/rtwnrtl8812au/Makefile index cb69e8a17850..5d37b3b44654 100644 --- a/sys/modules/rtwnfw/rtwnrtl8812au/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8812au/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8812aufw IMG= rtwn-rtl8812aufw diff --git a/sys/modules/rtwnfw/rtwnrtl8821au/Makefile b/sys/modules/rtwnfw/rtwnrtl8821au/Makefile index c874a7b93568..b018cb3f16d5 100644 --- a/sys/modules/rtwnfw/rtwnrtl8821au/Makefile +++ b/sys/modules/rtwnfw/rtwnrtl8821au/Makefile @@ -1,4 +1,3 @@ - KMOD= rtwn-rtl8821aufw IMG= rtwn-rtl8821aufw diff --git a/sys/modules/s3/Makefile b/sys/modules/s3/Makefile index 153b41332aa3..2b2716e3e8f0 100644 --- a/sys/modules/s3/Makefile +++ b/sys/modules/s3/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/fb KMOD= s3 diff --git a/sys/modules/sbni/Makefile b/sys/modules/sbni/Makefile index 5f43f4ed289a..3d69f087ca12 100644 --- a/sys/modules/sbni/Makefile +++ b/sys/modules/sbni/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sbni KMOD= if_sbni diff --git a/sys/modules/scc/Makefile b/sys/modules/scc/Makefile index cd9e5b774224..c4bb5064e562 100644 --- a/sys/modules/scc/Makefile +++ b/sys/modules/scc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/scc .if ${MACHINE_CPUARCH} == "powerpc" diff --git a/sys/modules/sctp/Makefile b/sys/modules/sctp/Makefile index 4e91d7572ab0..626f195dbf1f 100644 --- a/sys/modules/sctp/Makefile +++ b/sys/modules/sctp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet .PATH: ${SRCTOP}/sys/netinet6 diff --git a/sys/modules/sdhci/Makefile b/sys/modules/sdhci/Makefile index cbd58d891a6e..2e3104573cd5 100644 --- a/sys/modules/sdhci/Makefile +++ b/sys/modules/sdhci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sdhci KMOD= sdhci diff --git a/sys/modules/sdhci_acpi/Makefile b/sys/modules/sdhci_acpi/Makefile index 597471eccefe..b6f6efeb5791 100644 --- a/sys/modules/sdhci_acpi/Makefile +++ b/sys/modules/sdhci_acpi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sdhci KMOD= sdhci_acpi diff --git a/sys/modules/sdhci_pci/Makefile b/sys/modules/sdhci_pci/Makefile index b06299193056..4a804941ac30 100644 --- a/sys/modules/sdhci_pci/Makefile +++ b/sys/modules/sdhci_pci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sdhci KMOD= sdhci_pci diff --git a/sys/modules/sdio/Makefile b/sys/modules/sdio/Makefile index 7f5bcb78a845..a6f1016404de 100644 --- a/sys/modules/sdio/Makefile +++ b/sys/modules/sdio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../dev/sdio KMOD= sdio diff --git a/sys/modules/sem/Makefile b/sys/modules/sem/Makefile index 1d3a88e09ebc..506d1c9be5c4 100644 --- a/sys/modules/sem/Makefile +++ b/sys/modules/sem/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= sem diff --git a/sys/modules/sfxge/Makefile b/sys/modules/sfxge/Makefile index e4d2a44d827e..78a51995493f 100644 --- a/sys/modules/sfxge/Makefile +++ b/sys/modules/sfxge/Makefile @@ -1,4 +1,3 @@ - KMOD= sfxge SFXGE= ${SRCTOP}/sys/dev/sfxge diff --git a/sys/modules/sge/Makefile b/sys/modules/sge/Makefile index d4032dfab29b..6d1a776da267 100644 --- a/sys/modules/sge/Makefile +++ b/sys/modules/sge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sge KMOD= if_sge diff --git a/sys/modules/sgx/Makefile b/sys/modules/sgx/Makefile index 504fa6d2e299..3c82e731856e 100644 --- a/sys/modules/sgx/Makefile +++ b/sys/modules/sgx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/amd64/sgx KMOD= sgx diff --git a/sys/modules/sgx_linux/Makefile b/sys/modules/sgx_linux/Makefile index 366918d3ab56..4f68431903c6 100644 --- a/sys/modules/sgx_linux/Makefile +++ b/sys/modules/sgx_linux/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/amd64/sgx KMOD= sgx_linux diff --git a/sys/modules/siftr/Makefile b/sys/modules/siftr/Makefile index 5bb038bf542f..e18c5db9ba06 100644 --- a/sys/modules/siftr/Makefile +++ b/sys/modules/siftr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= siftr SRCS= siftr.c opt_kern_tls.h diff --git a/sys/modules/siis/Makefile b/sys/modules/siis/Makefile index 0027fbaa3734..026fc174836f 100644 --- a/sys/modules/siis/Makefile +++ b/sys/modules/siis/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/siis KMOD= siis diff --git a/sys/modules/sis/Makefile b/sys/modules/sis/Makefile index 3ef619d9999d..c54acdab419a 100644 --- a/sys/modules/sis/Makefile +++ b/sys/modules/sis/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sis KMOD= if_sis diff --git a/sys/modules/sk/Makefile b/sys/modules/sk/Makefile index 1f7b477d9b68..370baf75007a 100644 --- a/sys/modules/sk/Makefile +++ b/sys/modules/sk/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sk KMOD= if_sk diff --git a/sys/modules/smbfs/Makefile b/sys/modules/smbfs/Makefile index 703343eb1b41..c796fb0701c5 100644 --- a/sys/modules/smbfs/Makefile +++ b/sys/modules/smbfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/crypto/des \ ${SRCTOP}/sys/crypto/des/arch/${MACHINE_CPUARCH} \ ${SRCTOP}/sys/kern \ diff --git a/sys/modules/snp/Makefile b/sys/modules/snp/Makefile index d963b8e10e6f..06a2160b31b8 100644 --- a/sys/modules/snp/Makefile +++ b/sys/modules/snp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/snp KMOD= snp diff --git a/sys/modules/sound/Makefile b/sys/modules/sound/Makefile index 41314d322c9d..57058d7bbb1b 100644 --- a/sys/modules/sound/Makefile +++ b/sys/modules/sound/Makefile @@ -1,4 +1,3 @@ - SUBDIR = SUBDIR += sound SUBDIR += driver diff --git a/sys/modules/sound/Makefile.inc b/sys/modules/sound/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/sound/Makefile.inc +++ b/sys/modules/sound/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/sound/driver/Makefile b/sys/modules/sound/driver/Makefile index 2391d1c5a8a4..9b157f0c76ab 100644 --- a/sys/modules/sound/driver/Makefile +++ b/sys/modules/sound/driver/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/sound/driver/Makefile.inc b/sys/modules/sound/driver/Makefile.inc index 980084ed099d..2dc6b1e6944d 100644 --- a/sys/modules/sound/driver/Makefile.inc +++ b/sys/modules/sound/driver/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= ac97_if.h channel_if.h feeder_if.h mixer_if.h .include "../Makefile.inc" diff --git a/sys/modules/sound/driver/ai2s/Makefile b/sys/modules/sound/driver/ai2s/Makefile index 76c00494bd80..459880df8c75 100644 --- a/sys/modules/sound/driver/ai2s/Makefile +++ b/sys/modules/sound/driver/ai2s/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/macio KMOD= snd_ai2s diff --git a/sys/modules/sound/driver/als4000/Makefile b/sys/modules/sound/driver/als4000/Makefile index a81692cb1838..f4b4d6f5d6a0 100644 --- a/sys/modules/sound/driver/als4000/Makefile +++ b/sys/modules/sound/driver/als4000/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_als4000 diff --git a/sys/modules/sound/driver/atiixp/Makefile b/sys/modules/sound/driver/atiixp/Makefile index 7a500dd7e05d..65380f7bdc5f 100644 --- a/sys/modules/sound/driver/atiixp/Makefile +++ b/sys/modules/sound/driver/atiixp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_atiixp diff --git a/sys/modules/sound/driver/cmi/Makefile b/sys/modules/sound/driver/cmi/Makefile index ece46bf80fe9..925700cded08 100644 --- a/sys/modules/sound/driver/cmi/Makefile +++ b/sys/modules/sound/driver/cmi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_cmi diff --git a/sys/modules/sound/driver/cs4281/Makefile b/sys/modules/sound/driver/cs4281/Makefile index d521d3240ff5..0a9f529eb762 100644 --- a/sys/modules/sound/driver/cs4281/Makefile +++ b/sys/modules/sound/driver/cs4281/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_cs4281 diff --git a/sys/modules/sound/driver/csa/Makefile b/sys/modules/sound/driver/csa/Makefile index 0cc2a3da16a6..52ca5b5fcaaa 100644 --- a/sys/modules/sound/driver/csa/Makefile +++ b/sys/modules/sound/driver/csa/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_csa diff --git a/sys/modules/sound/driver/davbus/Makefile b/sys/modules/sound/driver/davbus/Makefile index 12df61b69d0c..cbc2bf280115 100644 --- a/sys/modules/sound/driver/davbus/Makefile +++ b/sys/modules/sound/driver/davbus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/macio KMOD= snd_davbus diff --git a/sys/modules/sound/driver/driver/Makefile b/sys/modules/sound/driver/driver/Makefile index ce35900039c2..3ba4eb778034 100644 --- a/sys/modules/sound/driver/driver/Makefile +++ b/sys/modules/sound/driver/driver/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound KMOD= snd_driver diff --git a/sys/modules/sound/driver/emu10k1/Makefile b/sys/modules/sound/driver/emu10k1/Makefile index 4ab78cee3bb3..c0cdbadd4648 100644 --- a/sys/modules/sound/driver/emu10k1/Makefile +++ b/sys/modules/sound/driver/emu10k1/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_emu10k1 diff --git a/sys/modules/sound/driver/envy24/Makefile b/sys/modules/sound/driver/envy24/Makefile index c2c0e171a47d..5328f1fcd71a 100644 --- a/sys/modules/sound/driver/envy24/Makefile +++ b/sys/modules/sound/driver/envy24/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_envy24 diff --git a/sys/modules/sound/driver/envy24ht/Makefile b/sys/modules/sound/driver/envy24ht/Makefile index 179352c39ae2..262131c587dd 100644 --- a/sys/modules/sound/driver/envy24ht/Makefile +++ b/sys/modules/sound/driver/envy24ht/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_envy24ht diff --git a/sys/modules/sound/driver/es137x/Makefile b/sys/modules/sound/driver/es137x/Makefile index 5f08e6d3566b..2f7a47df5aaf 100644 --- a/sys/modules/sound/driver/es137x/Makefile +++ b/sys/modules/sound/driver/es137x/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_es137x diff --git a/sys/modules/sound/driver/fm801/Makefile b/sys/modules/sound/driver/fm801/Makefile index 826eaf9522b3..af706bcab024 100644 --- a/sys/modules/sound/driver/fm801/Makefile +++ b/sys/modules/sound/driver/fm801/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_fm801 diff --git a/sys/modules/sound/driver/hda/Makefile b/sys/modules/sound/driver/hda/Makefile index f1dbe405410a..0eec98fc53e1 100644 --- a/sys/modules/sound/driver/hda/Makefile +++ b/sys/modules/sound/driver/hda/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci/hda KMOD= snd_hda diff --git a/sys/modules/sound/driver/hdspe/Makefile b/sys/modules/sound/driver/hdspe/Makefile index c7be05fce737..f923634ea5c0 100644 --- a/sys/modules/sound/driver/hdspe/Makefile +++ b/sys/modules/sound/driver/hdspe/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_hdspe diff --git a/sys/modules/sound/driver/ich/Makefile b/sys/modules/sound/driver/ich/Makefile index b68e872cbf6e..927d9ad58ef0 100644 --- a/sys/modules/sound/driver/ich/Makefile +++ b/sys/modules/sound/driver/ich/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD = snd_ich SRCS = device_if.h bus_if.h pci_if.h diff --git a/sys/modules/sound/driver/maestro3/Makefile b/sys/modules/sound/driver/maestro3/Makefile index db6c21035ff0..efdc26ca2081 100644 --- a/sys/modules/sound/driver/maestro3/Makefile +++ b/sys/modules/sound/driver/maestro3/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_maestro3 diff --git a/sys/modules/sound/driver/neomagic/Makefile b/sys/modules/sound/driver/neomagic/Makefile index 7a8befaba6f1..4e64894daf6f 100644 --- a/sys/modules/sound/driver/neomagic/Makefile +++ b/sys/modules/sound/driver/neomagic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_neomagic diff --git a/sys/modules/sound/driver/solo/Makefile b/sys/modules/sound/driver/solo/Makefile index a429db8d29e2..f2824626e2a2 100644 --- a/sys/modules/sound/driver/solo/Makefile +++ b/sys/modules/sound/driver/solo/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_solo diff --git a/sys/modules/sound/driver/spicds/Makefile b/sys/modules/sound/driver/spicds/Makefile index bf9bc86dc106..c279a418cb4f 100644 --- a/sys/modules/sound/driver/spicds/Makefile +++ b/sys/modules/sound/driver/spicds/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_spicds diff --git a/sys/modules/sound/driver/t4dwave/Makefile b/sys/modules/sound/driver/t4dwave/Makefile index 4aaf1bd1d903..375373a15259 100644 --- a/sys/modules/sound/driver/t4dwave/Makefile +++ b/sys/modules/sound/driver/t4dwave/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_t4dwave diff --git a/sys/modules/sound/driver/uaudio/Makefile b/sys/modules/sound/driver/uaudio/Makefile index a246f23afffb..ed40adb3c67e 100644 --- a/sys/modules/sound/driver/uaudio/Makefile +++ b/sys/modules/sound/driver/uaudio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/usb KMOD= snd_uaudio diff --git a/sys/modules/sound/driver/via8233/Makefile b/sys/modules/sound/driver/via8233/Makefile index 07832592c83a..2af4e67ac334 100644 --- a/sys/modules/sound/driver/via8233/Makefile +++ b/sys/modules/sound/driver/via8233/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_via8233 diff --git a/sys/modules/sound/driver/via82c686/Makefile b/sys/modules/sound/driver/via82c686/Makefile index acf83ce7814c..a9629518354b 100644 --- a/sys/modules/sound/driver/via82c686/Makefile +++ b/sys/modules/sound/driver/via82c686/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_via82c686 diff --git a/sys/modules/sound/driver/vibes/Makefile b/sys/modules/sound/driver/vibes/Makefile index 53d1763d0cd5..88ab043c5c7b 100644 --- a/sys/modules/sound/driver/vibes/Makefile +++ b/sys/modules/sound/driver/vibes/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_vibes diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile index 1c3685715503..f31a751b3f29 100644 --- a/sys/modules/sound/sound/Makefile +++ b/sys/modules/sound/sound/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .PATH: ${SYSDIR}/dev/sound diff --git a/sys/modules/speaker/Makefile b/sys/modules/speaker/Makefile index 91b3312c2301..8a25744cafae 100644 --- a/sys/modules/speaker/Makefile +++ b/sys/modules/speaker/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/speaker KMOD= speaker diff --git a/sys/modules/spi/Makefile b/sys/modules/spi/Makefile index 494ff6dc2dcf..1c174b8dfbda 100644 --- a/sys/modules/spi/Makefile +++ b/sys/modules/spi/Makefile @@ -1,4 +1,3 @@ - SUBDIR = \ ../spigen \ at45d \ diff --git a/sys/modules/spi/at45d/Makefile b/sys/modules/spi/at45d/Makefile index a6e27b79a339..53ca181ebd1e 100644 --- a/sys/modules/spi/at45d/Makefile +++ b/sys/modules/spi/at45d/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/flash KMOD= at45d diff --git a/sys/modules/spi/mx25l/Makefile b/sys/modules/spi/mx25l/Makefile index 0c52f1f760c0..a7aabc7c2279 100644 --- a/sys/modules/spi/mx25l/Makefile +++ b/sys/modules/spi/mx25l/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/flash KMOD= mx25l diff --git a/sys/modules/spi/spibus/Makefile b/sys/modules/spi/spibus/Makefile index 834fbdb2717b..18ddb8be8728 100644 --- a/sys/modules/spi/spibus/Makefile +++ b/sys/modules/spi/spibus/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/spibus KMOD= spibus diff --git a/sys/modules/spigen/Makefile b/sys/modules/spigen/Makefile index e23d7dd214bf..c8aee6c2ef72 100644 --- a/sys/modules/spigen/Makefile +++ b/sys/modules/spigen/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/spibus KMOD= spigen SRCS= spigen.c diff --git a/sys/modules/splash/Makefile b/sys/modules/splash/Makefile index 8af6313e578f..050bd543eb0c 100644 --- a/sys/modules/splash/Makefile +++ b/sys/modules/splash/Makefile @@ -1,4 +1,3 @@ - SUBDIR= bmp pcx txt .include diff --git a/sys/modules/splash/Makefile.inc b/sys/modules/splash/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/splash/Makefile.inc +++ b/sys/modules/splash/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/splash/bmp/Makefile b/sys/modules/splash/bmp/Makefile index 8bb4e09590e5..f89523532a3f 100644 --- a/sys/modules/splash/bmp/Makefile +++ b/sys/modules/splash/bmp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/fb KMOD= splash_bmp diff --git a/sys/modules/splash/pcx/Makefile b/sys/modules/splash/pcx/Makefile index e29d24ab69a4..ff5e1af789e7 100644 --- a/sys/modules/splash/pcx/Makefile +++ b/sys/modules/splash/pcx/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/fb KMOD= splash_pcx diff --git a/sys/modules/ste/Makefile b/sys/modules/ste/Makefile index 552d84f2c91e..adab90f2f4f7 100644 --- a/sys/modules/ste/Makefile +++ b/sys/modules/ste/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/ste KMOD= if_ste diff --git a/sys/modules/stge/Makefile b/sys/modules/stge/Makefile index 31bdb03fde2e..329efbe27f95 100644 --- a/sys/modules/stge/Makefile +++ b/sys/modules/stge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/stge KMOD= if_stge diff --git a/sys/modules/sume/Makefile b/sys/modules/sume/Makefile index f10e26a71532..f463c51829cc 100644 --- a/sys/modules/sume/Makefile +++ b/sys/modules/sume/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sume KMOD= if_sume diff --git a/sys/modules/superio/Makefile b/sys/modules/superio/Makefile index 1936c86395ba..e9f6dbb2473a 100644 --- a/sys/modules/superio/Makefile +++ b/sys/modules/superio/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../dev/superio KMOD= superio diff --git a/sys/modules/sym/Makefile b/sys/modules/sym/Makefile index a3ca47eee715..822082082683 100644 --- a/sys/modules/sym/Makefile +++ b/sys/modules/sym/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/sym KMOD= sym diff --git a/sys/modules/syscons/Makefile b/sys/modules/syscons/Makefile index 83c2e34bfcb7..77466d84d6ef 100644 --- a/sys/modules/syscons/Makefile +++ b/sys/modules/syscons/Makefile @@ -1,4 +1,3 @@ - SUBDIR= beastie \ blank \ daemon \ diff --git a/sys/modules/syscons/Makefile.inc b/sys/modules/syscons/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/syscons/Makefile.inc +++ b/sys/modules/syscons/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/syscons/beastie/Makefile b/sys/modules/syscons/beastie/Makefile index 263f2940f69b..73ca08641cc5 100644 --- a/sys/modules/syscons/beastie/Makefile +++ b/sys/modules/syscons/beastie/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/logo KMOD= beastie_saver diff --git a/sys/modules/syscons/blank/Makefile b/sys/modules/syscons/blank/Makefile index 763d895cb32b..cb2286a5b3f7 100644 --- a/sys/modules/syscons/blank/Makefile +++ b/sys/modules/syscons/blank/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/blank KMOD= blank_saver diff --git a/sys/modules/syscons/daemon/Makefile b/sys/modules/syscons/daemon/Makefile index 296fc734513a..5f7fa4a3bf78 100644 --- a/sys/modules/syscons/daemon/Makefile +++ b/sys/modules/syscons/daemon/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/daemon KMOD= daemon_saver diff --git a/sys/modules/syscons/dragon/Makefile b/sys/modules/syscons/dragon/Makefile index 6f2b2fbac27f..23af4562921a 100644 --- a/sys/modules/syscons/dragon/Makefile +++ b/sys/modules/syscons/dragon/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/dragon KMOD= dragon_saver diff --git a/sys/modules/syscons/fade/Makefile b/sys/modules/syscons/fade/Makefile index e04df9da9fe7..1aafeecf6ae9 100644 --- a/sys/modules/syscons/fade/Makefile +++ b/sys/modules/syscons/fade/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/fade KMOD= fade_saver diff --git a/sys/modules/syscons/fire/Makefile b/sys/modules/syscons/fire/Makefile index 83c5cd60a04d..5003196ffd6a 100644 --- a/sys/modules/syscons/fire/Makefile +++ b/sys/modules/syscons/fire/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/fire KMOD= fire_saver diff --git a/sys/modules/syscons/green/Makefile b/sys/modules/syscons/green/Makefile index be5db35f864a..4b55b41d26d1 100644 --- a/sys/modules/syscons/green/Makefile +++ b/sys/modules/syscons/green/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/green KMOD= green_saver diff --git a/sys/modules/syscons/logo/Makefile b/sys/modules/syscons/logo/Makefile index 0a3e9c6c2af7..0dc144ec472b 100644 --- a/sys/modules/syscons/logo/Makefile +++ b/sys/modules/syscons/logo/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/logo KMOD= logo_saver diff --git a/sys/modules/syscons/plasma/Makefile b/sys/modules/syscons/plasma/Makefile index dd47c7e1e214..2de97f2ad4bb 100644 --- a/sys/modules/syscons/plasma/Makefile +++ b/sys/modules/syscons/plasma/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/plasma KMOD= plasma_saver diff --git a/sys/modules/syscons/rain/Makefile b/sys/modules/syscons/rain/Makefile index 8041246c1260..e68b44dbd9be 100644 --- a/sys/modules/syscons/rain/Makefile +++ b/sys/modules/syscons/rain/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/rain KMOD= rain_saver diff --git a/sys/modules/syscons/snake/Makefile b/sys/modules/syscons/snake/Makefile index 23bd60b6b626..b07c02123b03 100644 --- a/sys/modules/syscons/snake/Makefile +++ b/sys/modules/syscons/snake/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/snake KMOD= snake_saver diff --git a/sys/modules/syscons/star/Makefile b/sys/modules/syscons/star/Makefile index 25ece2cb02fe..9ad996afbc5a 100644 --- a/sys/modules/syscons/star/Makefile +++ b/sys/modules/syscons/star/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/star KMOD= star_saver diff --git a/sys/modules/syscons/warp/Makefile b/sys/modules/syscons/warp/Makefile index e3970032de25..b1237c2fdf77 100644 --- a/sys/modules/syscons/warp/Makefile +++ b/sys/modules/syscons/warp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/syscons/warp KMOD= warp_saver diff --git a/sys/modules/sysvipc/Makefile b/sys/modules/sysvipc/Makefile index fc9e27c81732..c9dd5ecac332 100644 --- a/sys/modules/sysvipc/Makefile +++ b/sys/modules/sysvipc/Makefile @@ -1,4 +1,3 @@ - SUBDIR= sysvmsg sysvsem sysvshm .include diff --git a/sys/modules/sysvipc/Makefile.inc b/sys/modules/sysvipc/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/sys/modules/sysvipc/Makefile.inc +++ b/sys/modules/sysvipc/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/sys/modules/sysvipc/sysvmsg/Makefile b/sys/modules/sysvipc/sysvmsg/Makefile index c31e69524722..3b2fdda1a294 100644 --- a/sys/modules/sysvipc/sysvmsg/Makefile +++ b/sys/modules/sysvipc/sysvmsg/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= sysvmsg diff --git a/sys/modules/sysvipc/sysvsem/Makefile b/sys/modules/sysvipc/sysvsem/Makefile index 516d275f41e5..f5a6e6aab54c 100644 --- a/sys/modules/sysvipc/sysvsem/Makefile +++ b/sys/modules/sysvipc/sysvsem/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= sysvsem diff --git a/sys/modules/sysvipc/sysvshm/Makefile b/sys/modules/sysvipc/sysvshm/Makefile index 6add9050736a..757c0c94dba4 100644 --- a/sys/modules/sysvipc/sysvshm/Makefile +++ b/sys/modules/sysvipc/sysvshm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/kern KMOD= sysvshm diff --git a/sys/modules/tarfs/Makefile b/sys/modules/tarfs/Makefile index 1510d2ea58b5..b882037afc90 100644 --- a/sys/modules/tarfs/Makefile +++ b/sys/modules/tarfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H:H}/fs/tarfs KMOD= tarfs diff --git a/sys/modules/tcp/tcpmd5/Makefile b/sys/modules/tcp/tcpmd5/Makefile index 15a71e9fe25c..560688cf66c8 100644 --- a/sys/modules/tcp/tcpmd5/Makefile +++ b/sys/modules/tcp/tcpmd5/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netipsec KMOD= tcpmd5 diff --git a/sys/modules/tests/Makefile b/sys/modules/tests/Makefile index 7481a0a3a4b4..ed06d0438222 100644 --- a/sys/modules/tests/Makefile +++ b/sys/modules/tests/Makefile @@ -1,4 +1,3 @@ - SUBDIR+= framework SUBDIR+= .WAIT diff --git a/sys/modules/tests/fib_lookup/Makefile b/sys/modules/tests/fib_lookup/Makefile index 8ad6340acdf3..7d6198396911 100644 --- a/sys/modules/tests/fib_lookup/Makefile +++ b/sys/modules/tests/fib_lookup/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/tmpfs/Makefile b/sys/modules/tmpfs/Makefile index 7a778c487cf5..984ccf940469 100644 --- a/sys/modules/tmpfs/Makefile +++ b/sys/modules/tmpfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/tmpfs KMOD= tmpfs diff --git a/sys/modules/toecore/Makefile b/sys/modules/toecore/Makefile index 90cb4103c759..00764c1f8e39 100644 --- a/sys/modules/toecore/Makefile +++ b/sys/modules/toecore/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/netinet KMOD= toecore diff --git a/sys/modules/tpm/Makefile b/sys/modules/tpm/Makefile index 372c2dcad86b..d929649d40fe 100644 --- a/sys/modules/tpm/Makefile +++ b/sys/modules/tpm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/tpm KMOD= tpm diff --git a/sys/modules/tsec/Makefile b/sys/modules/tsec/Makefile index 56cd28e1dbfb..ec79f2a9ffa1 100644 --- a/sys/modules/tsec/Makefile +++ b/sys/modules/tsec/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .PATH: ${SYSDIR}/dev/tsec diff --git a/sys/modules/uart/Makefile b/sys/modules/uart/Makefile index 38ffc2d49dd1..5d20a349e705 100644 --- a/sys/modules/uart/Makefile +++ b/sys/modules/uart/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/uart .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ diff --git a/sys/modules/ubser/Makefile b/sys/modules/ubser/Makefile index 2543659e4a05..d4e3fbead470 100644 --- a/sys/modules/ubser/Makefile +++ b/sys/modules/ubser/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/serial diff --git a/sys/modules/uchcom/Makefile b/sys/modules/uchcom/Makefile index d8d7e7b417c6..e8ea071965fd 100644 --- a/sys/modules/uchcom/Makefile +++ b/sys/modules/uchcom/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/serial diff --git a/sys/modules/ucycom/Makefile b/sys/modules/ucycom/Makefile index 490c84368c10..f3021f619845 100644 --- a/sys/modules/ucycom/Makefile +++ b/sys/modules/ucycom/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/serial diff --git a/sys/modules/udf/Makefile b/sys/modules/udf/Makefile index 45e7c6cca186..da8653d67de2 100644 --- a/sys/modules/udf/Makefile +++ b/sys/modules/udf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/udf KMOD= udf diff --git a/sys/modules/udf_iconv/Makefile b/sys/modules/udf_iconv/Makefile index 13dd047c0ba6..9d2af27dbfa8 100644 --- a/sys/modules/udf_iconv/Makefile +++ b/sys/modules/udf_iconv/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/udf KMOD= udf_iconv SRCS= udf_iconv.c diff --git a/sys/modules/ufs/Makefile b/sys/modules/ufs/Makefile index 225f6b09ac68..f8f360aee4df 100644 --- a/sys/modules/ufs/Makefile +++ b/sys/modules/ufs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/ufs/ufs ${SRCTOP}/sys/ufs/ffs KMOD= ufs diff --git a/sys/modules/uinput/Makefile b/sys/modules/uinput/Makefile index 623151c580a3..66ade2a5bb33 100644 --- a/sys/modules/uinput/Makefile +++ b/sys/modules/uinput/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/evdev KMOD= uinput diff --git a/sys/modules/unionfs/Makefile b/sys/modules/unionfs/Makefile index b3edfe7f5dd2..69299f0ee19a 100644 --- a/sys/modules/unionfs/Makefile +++ b/sys/modules/unionfs/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/fs/unionfs KMOD= unionfs diff --git a/sys/modules/usb/atp/Makefile b/sys/modules/usb/atp/Makefile index ae7bccda3ae2..968bc27f6c5d 100644 --- a/sys/modules/usb/atp/Makefile +++ b/sys/modules/usb/atp/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/input diff --git a/sys/modules/usb/axge/Makefile b/sys/modules/usb/axge/Makefile index cc1ad19068c7..5c38e2246e8e 100644 --- a/sys/modules/usb/axge/Makefile +++ b/sys/modules/usb/axge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/net KMOD= if_axge diff --git a/sys/modules/usb/cfumass/Makefile b/sys/modules/usb/cfumass/Makefile index 72b882efadbe..5ddefb712b9d 100644 --- a/sys/modules/usb/cfumass/Makefile +++ b/sys/modules/usb/cfumass/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/storage KMOD= cfumass diff --git a/sys/modules/usb/muge/Makefile b/sys/modules/usb/muge/Makefile index 7985ea81663d..5acc40d5b1cc 100644 --- a/sys/modules/usb/muge/Makefile +++ b/sys/modules/usb/muge/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/net diff --git a/sys/modules/usb/rsu/Makefile b/sys/modules/usb/rsu/Makefile index d9258591a2a7..8dc0fb84cbb4 100644 --- a/sys/modules/usb/rsu/Makefile +++ b/sys/modules/usb/rsu/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/wlan KMOD = if_rsu diff --git a/sys/modules/usb/rsufw/Makefile b/sys/modules/usb/rsufw/Makefile index ae154d51f979..3f69e6414d35 100644 --- a/sys/modules/usb/rsufw/Makefile +++ b/sys/modules/usb/rsufw/Makefile @@ -1,4 +1,3 @@ - SUBDIR= rsurtl8712fw .include diff --git a/sys/modules/usb/rsufw/rsurtl8712fw/Makefile b/sys/modules/usb/rsufw/rsurtl8712fw/Makefile index cdeeb8f73333..be9c4ce883a0 100644 --- a/sys/modules/usb/rsufw/rsurtl8712fw/Makefile +++ b/sys/modules/usb/rsufw/rsurtl8712fw/Makefile @@ -1,4 +1,3 @@ - KMOD= rsu-rtl8712fw IMG= rsu-rtl8712fw diff --git a/sys/modules/usb/runfw/Makefile b/sys/modules/usb/runfw/Makefile index 6369337268be..58d026b7129a 100644 --- a/sys/modules/usb/runfw/Makefile +++ b/sys/modules/usb/runfw/Makefile @@ -1,4 +1,3 @@ - KMOD= runfw FIRMWS= run.fw:runfw:1 diff --git a/sys/modules/usb/uath/Makefile b/sys/modules/usb/uath/Makefile index 04d167486fb2..e49167ddfda2 100644 --- a/sys/modules/usb/uath/Makefile +++ b/sys/modules/usb/uath/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/wlan KMOD = if_uath diff --git a/sys/modules/usb/udl/Makefile b/sys/modules/usb/udl/Makefile index 6bc0a99f2509..4440cbd90a51 100644 --- a/sys/modules/usb/udl/Makefile +++ b/sys/modules/usb/udl/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/video diff --git a/sys/modules/usb/uep/Makefile b/sys/modules/usb/uep/Makefile index e7fb87517b34..5425fd7489b1 100644 --- a/sys/modules/usb/uep/Makefile +++ b/sys/modules/usb/uep/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/input diff --git a/sys/modules/usb/upgt/Makefile b/sys/modules/usb/upgt/Makefile index 4db4b167915e..2d719135ffab 100644 --- a/sys/modules/usb/upgt/Makefile +++ b/sys/modules/usb/upgt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/wlan KMOD = if_upgt diff --git a/sys/modules/usb/ure/Makefile b/sys/modules/usb/ure/Makefile index 0ff0fce8a435..100fe5df67ee 100644 --- a/sys/modules/usb/ure/Makefile +++ b/sys/modules/usb/ure/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/net KMOD= if_ure diff --git a/sys/modules/usb/urtw/Makefile b/sys/modules/usb/urtw/Makefile index 89c1baf9cdea..13ea006e166c 100644 --- a/sys/modules/usb/urtw/Makefile +++ b/sys/modules/usb/urtw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/usb/wlan KMOD = if_urtw diff --git a/sys/modules/usb/usbhid/Makefile b/sys/modules/usb/usbhid/Makefile index 910385d1314b..f0994bb8416f 100644 --- a/sys/modules/usb/usbhid/Makefile +++ b/sys/modules/usb/usbhid/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/input diff --git a/sys/modules/usb/wmt/Makefile b/sys/modules/usb/wmt/Makefile index b20fa8f14297..72cf1d814908 100644 --- a/sys/modules/usb/wmt/Makefile +++ b/sys/modules/usb/wmt/Makefile @@ -1,4 +1,3 @@ - S= ${SRCTOP}/sys .PATH: $S/dev/usb/input diff --git a/sys/modules/veriexec/Makefile b/sys/modules/veriexec/Makefile index 453177fe199c..2916e0b5c987 100644 --- a/sys/modules/veriexec/Makefile +++ b/sys/modules/veriexec/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.PARSEDIR:H:H}/dev/veriexec .include diff --git a/sys/modules/vesa/Makefile b/sys/modules/vesa/Makefile index 9f539d20a138..83555cee68d3 100644 --- a/sys/modules/vesa/Makefile +++ b/sys/modules/vesa/Makefile @@ -1,4 +1,3 @@ - KMOD= vesa SRCS= opt_vga.h opt_vesa.h SRCS+= bus_if.h device_if.h pci_if.h diff --git a/sys/modules/vge/Makefile b/sys/modules/vge/Makefile index f6b3655366ee..fcc12fb07c27 100644 --- a/sys/modules/vge/Makefile +++ b/sys/modules/vge/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vge KMOD= if_vge diff --git a/sys/modules/viawd/Makefile b/sys/modules/viawd/Makefile index fb8efb69ca14..89996d6a5287 100644 --- a/sys/modules/viawd/Makefile +++ b/sys/modules/viawd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/viawd KMOD= viawd diff --git a/sys/modules/vmd/Makefile b/sys/modules/vmd/Makefile index c9f2f40730ec..906317f55e8e 100644 --- a/sys/modules/vmd/Makefile +++ b/sys/modules/vmd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vmd KMOD= vmd diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index 96155753f1de..fc9340e9cd86 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -1,4 +1,3 @@ - .include KMOD= vmm diff --git a/sys/modules/vmware/pvscsi/Makefile b/sys/modules/vmware/pvscsi/Makefile index 60951e886ce5..451a44a54816 100644 --- a/sys/modules/vmware/pvscsi/Makefile +++ b/sys/modules/vmware/pvscsi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vmware/pvscsi KMOD= pvscsi diff --git a/sys/modules/vmware/vmci/Makefile b/sys/modules/vmware/vmci/Makefile index 45accc068cc8..84b27417fbbd 100644 --- a/sys/modules/vmware/vmci/Makefile +++ b/sys/modules/vmware/vmci/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vmware/vmci KMOD= vmci diff --git a/sys/modules/vnic/Makefile b/sys/modules/vnic/Makefile index 79e206c8ef08..7b975bfebe81 100644 --- a/sys/modules/vnic/Makefile +++ b/sys/modules/vnic/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vnic/mrmlbus/Makefile b/sys/modules/vnic/mrmlbus/Makefile index e7397f8d8402..a3581b7a79a5 100644 --- a/sys/modules/vnic/mrmlbus/Makefile +++ b/sys/modules/vnic/mrmlbus/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vnic/thunder_bgx/Makefile b/sys/modules/vnic/thunder_bgx/Makefile index b51fe40a3b15..90df4b25df90 100644 --- a/sys/modules/vnic/thunder_bgx/Makefile +++ b/sys/modules/vnic/thunder_bgx/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vnic/thunder_mdio/Makefile b/sys/modules/vnic/thunder_mdio/Makefile index 899a9dfb5789..37032516f3ca 100644 --- a/sys/modules/vnic/thunder_mdio/Makefile +++ b/sys/modules/vnic/thunder_mdio/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vnic/vnicpf/Makefile b/sys/modules/vnic/vnicpf/Makefile index 8ba2cd029854..37cd29e6fdd8 100644 --- a/sys/modules/vnic/vnicpf/Makefile +++ b/sys/modules/vnic/vnicpf/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vnic/vnicvf/Makefile b/sys/modules/vnic/vnicvf/Makefile index 3f81ba16cff2..c6ffaaa2c302 100644 --- a/sys/modules/vnic/vnicvf/Makefile +++ b/sys/modules/vnic/vnicvf/Makefile @@ -1,4 +1,3 @@ - SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" diff --git a/sys/modules/vr/Makefile b/sys/modules/vr/Makefile index 980243faea4e..cd441957a357 100644 --- a/sys/modules/vr/Makefile +++ b/sys/modules/vr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vr KMOD= if_vr diff --git a/sys/modules/vte/Makefile b/sys/modules/vte/Makefile index 3dc09ebf829e..1b750d1bbb4f 100644 --- a/sys/modules/vte/Makefile +++ b/sys/modules/vte/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/vte KMOD= if_vte diff --git a/sys/modules/wbwd/Makefile b/sys/modules/wbwd/Makefile index 053d4a7aa9e6..c464a3f8fc0c 100644 --- a/sys/modules/wbwd/Makefile +++ b/sys/modules/wbwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/wbwd KMOD= wbwd diff --git a/sys/modules/wdatwd/Makefile b/sys/modules/wdatwd/Makefile index d9f578c8ad01..ecfbb7c046a1 100644 --- a/sys/modules/wdatwd/Makefile +++ b/sys/modules/wdatwd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/wdatwd KMOD= wdatwd diff --git a/sys/modules/wlan/Makefile b/sys/modules/wlan/Makefile index 1233e8216b4e..d0a761a8109f 100644 --- a/sys/modules/wlan/Makefile +++ b/sys/modules/wlan/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan diff --git a/sys/modules/wlan_acl/Makefile b/sys/modules/wlan_acl/Makefile index 168966aa0d81..bb8541e79bbb 100644 --- a/sys/modules/wlan_acl/Makefile +++ b/sys/modules/wlan_acl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_acl diff --git a/sys/modules/wlan_amrr/Makefile b/sys/modules/wlan_amrr/Makefile index 13503fff695d..4ad964d095fd 100644 --- a/sys/modules/wlan_amrr/Makefile +++ b/sys/modules/wlan_amrr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_amrr diff --git a/sys/modules/wlan_ccmp/Makefile b/sys/modules/wlan_ccmp/Makefile index a00d61b5f23d..5115ef73bc6e 100644 --- a/sys/modules/wlan_ccmp/Makefile +++ b/sys/modules/wlan_ccmp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 .PATH: ${SRCTOP}/sys/crypto/rijndael diff --git a/sys/modules/wlan_rssadapt/Makefile b/sys/modules/wlan_rssadapt/Makefile index df3f86611d94..88f3ec505ce7 100644 --- a/sys/modules/wlan_rssadapt/Makefile +++ b/sys/modules/wlan_rssadapt/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_rssadapt diff --git a/sys/modules/wlan_tkip/Makefile b/sys/modules/wlan_tkip/Makefile index 2888597dde8d..b173faa1b34e 100644 --- a/sys/modules/wlan_tkip/Makefile +++ b/sys/modules/wlan_tkip/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_tkip diff --git a/sys/modules/wlan_wep/Makefile b/sys/modules/wlan_wep/Makefile index 4d3e75803282..f995b9747b1d 100644 --- a/sys/modules/wlan_wep/Makefile +++ b/sys/modules/wlan_wep/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_wep diff --git a/sys/modules/wlan_xauth/Makefile b/sys/modules/wlan_xauth/Makefile index 6d5cb21147fc..cb1530d1036d 100644 --- a/sys/modules/wlan_xauth/Makefile +++ b/sys/modules/wlan_xauth/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/net80211 KMOD= wlan_xauth diff --git a/sys/modules/wpi/Makefile b/sys/modules/wpi/Makefile index d292618f5fcc..d827f451a67e 100644 --- a/sys/modules/wpi/Makefile +++ b/sys/modules/wpi/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/wpi KMOD = if_wpi diff --git a/sys/modules/wpifw/Makefile b/sys/modules/wpifw/Makefile index 60638d514db0..f13108abb5cc 100644 --- a/sys/modules/wpifw/Makefile +++ b/sys/modules/wpifw/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/contrib/dev/wpi KMOD= wpifw diff --git a/sys/modules/wtap/Makefile b/sys/modules/wtap/Makefile index 0ad01b627b15..a157695915a3 100644 --- a/sys/modules/wtap/Makefile +++ b/sys/modules/wtap/Makefile @@ -1,4 +1,3 @@ - KMOD= wtap .PATH: ${SRCTOP}/sys/dev/wtap diff --git a/sys/modules/x86bios/Makefile b/sys/modules/x86bios/Makefile index c3708b277504..225d8e0293b2 100644 --- a/sys/modules/x86bios/Makefile +++ b/sys/modules/x86bios/Makefile @@ -1,4 +1,3 @@ - KMOD= x86bios SRCS= opt_x86bios.h SRCS+= bus_if.h device_if.h pci_if.h diff --git a/sys/modules/xdr/Makefile b/sys/modules/xdr/Makefile index 44274237aac9..86212b5dcc4d 100644 --- a/sys/modules/xdr/Makefile +++ b/sys/modules/xdr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/xdr KMOD= xdr SRCS= xdr.c \ diff --git a/sys/modules/xl/Makefile b/sys/modules/xl/Makefile index 74f82c998d7d..dfe8ffc0ad9c 100644 --- a/sys/modules/xl/Makefile +++ b/sys/modules/xl/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/xl KMOD= if_xl diff --git a/sys/modules/xz/Makefile b/sys/modules/xz/Makefile index fae30d8ad885..8951123635c3 100644 --- a/sys/modules/xz/Makefile +++ b/sys/modules/xz/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/dev/xz .PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd .PATH: ${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 654f0044a8fc..d45488dcb346 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -1,4 +1,3 @@ - SRCDIR=${SRCTOP}/sys/contrib/openzfs/module INCDIR=${SRCTOP}/sys/contrib/openzfs/include diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile index 7f4f76fa2112..4790ad1fd70d 100644 --- a/sys/modules/zlib/Makefile +++ b/sys/modules/zlib/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/libkern .PATH: ${SRCTOP}/sys/dev/zlib .PATH: ${SRCTOP}/sys/contrib/zlib diff --git a/sys/teken/demo/Makefile b/sys/teken/demo/Makefile index b547e423e147..8b43e59b1eca 100644 --- a/sys/teken/demo/Makefile +++ b/sys/teken/demo/Makefile @@ -1,4 +1,3 @@ - PROG= teken_demo LDADD= -lncursesw -lteken -lutil MAN= diff --git a/sys/teken/libteken/Makefile b/sys/teken/libteken/Makefile index 55ffc7d92a63..11103550426d 100644 --- a/sys/teken/libteken/Makefile +++ b/sys/teken/libteken/Makefile @@ -1,4 +1,3 @@ - LIB= teken SHLIB_MAJOR= 0 diff --git a/sys/teken/stress/Makefile b/sys/teken/stress/Makefile index 6f4785d35856..4c776a658515 100644 --- a/sys/teken/stress/Makefile +++ b/sys/teken/stress/Makefile @@ -1,4 +1,3 @@ - PROG= teken_stress LDADD= -lteken MAN= diff --git a/targets/Makefile b/targets/Makefile index e6253c7f0316..a1fd2aabc6c6 100644 --- a/targets/Makefile +++ b/targets/Makefile @@ -1,4 +1,3 @@ - # This is the top-level makefile - derived from the Junos version # # If a subdir that matches the requested target exists, we assume diff --git a/targets/Makefile.inc b/targets/Makefile.inc index 22fc9698c4df..6a30d2e35e89 100644 --- a/targets/Makefile.inc +++ b/targets/Makefile.inc @@ -1,4 +1,3 @@ - .if !target(__${_this}__) __${_this}__: diff --git a/targets/pseudo/Makefile.inc b/targets/pseudo/Makefile.inc index 5173461eae71..dbe8b961ea8d 100644 --- a/targets/pseudo/Makefile.inc +++ b/targets/pseudo/Makefile.inc @@ -1,4 +1,3 @@ - # we don't do anything in these dirs # they are just for triggering building of other things diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 4c6bd8bc275f..f3ed985e14b9 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -1,4 +1,3 @@ - # building clang is particularly tedious - so avoid re-inventing wheels all: bootstrap-toolchain diff --git a/targets/pseudo/bootstrap-tools/Makefile.depend.host b/targets/pseudo/bootstrap-tools/Makefile.depend.host index d3ddeb5c1b80..d22118bdfad8 100644 --- a/targets/pseudo/bootstrap-tools/Makefile.depend.host +++ b/targets/pseudo/bootstrap-tools/Makefile.depend.host @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = diff --git a/targets/pseudo/clang/Makefile b/targets/pseudo/clang/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/clang/Makefile +++ b/targets/pseudo/clang/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/clang/Makefile.depend b/targets/pseudo/clang/Makefile.depend index 7b094a258fa0..98fd61e7b38e 100644 --- a/targets/pseudo/clang/Makefile.depend +++ b/targets/pseudo/clang/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .include diff --git a/targets/pseudo/gcc/Makefile b/targets/pseudo/gcc/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/gcc/Makefile +++ b/targets/pseudo/gcc/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/gcc/Makefile.depend b/targets/pseudo/gcc/Makefile.depend index 19e6d638291f..a381e9bd2ab8 100644 --- a/targets/pseudo/gcc/Makefile.depend +++ b/targets/pseudo/gcc/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/hosttools/Makefile b/targets/pseudo/hosttools/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/hosttools/Makefile +++ b/targets/pseudo/hosttools/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/hosttools/Makefile.depend.host b/targets/pseudo/hosttools/Makefile.depend.host index a54437970d59..899433463e73 100644 --- a/targets/pseudo/hosttools/Makefile.depend.host +++ b/targets/pseudo/hosttools/Makefile.depend.host @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .if !defined(MK_KERBEROS) diff --git a/targets/pseudo/kernel/Makefile b/targets/pseudo/kernel/Makefile index 052532a532f4..aa9c2f08980f 100644 --- a/targets/pseudo/kernel/Makefile +++ b/targets/pseudo/kernel/Makefile @@ -1,4 +1,3 @@ - # Build the kernel ${KERNCONF} KERNCONF?= ${KERNEL:UGENERIC} diff --git a/targets/pseudo/kernel/Makefile.depend b/targets/pseudo/kernel/Makefile.depend index 5a4e8b865e18..da8fc1d6435f 100644 --- a/targets/pseudo/kernel/Makefile.depend +++ b/targets/pseudo/kernel/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/stage/Makefile b/targets/pseudo/stage/Makefile index ac02e1c9099e..792c380c725e 100644 --- a/targets/pseudo/stage/Makefile +++ b/targets/pseudo/stage/Makefile @@ -1,4 +1,3 @@ - # this makefile gets hooked into everyone's dependencies so that # distrib-dirs can be done in STAGE_OBJTOP all: diff --git a/targets/pseudo/tests/Makefile b/targets/pseudo/tests/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/tests/Makefile +++ b/targets/pseudo/tests/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/tests/Makefile.depend b/targets/pseudo/tests/Makefile.depend index 54aa2f7ff52f..06771ad09707 100644 --- a/targets/pseudo/tests/Makefile.depend +++ b/targets/pseudo/tests/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .include diff --git a/targets/pseudo/the-lot/Makefile b/targets/pseudo/the-lot/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/the-lot/Makefile +++ b/targets/pseudo/the-lot/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/the-lot/Makefile.depend b/targets/pseudo/the-lot/Makefile.depend index 5ffafd8f7ecb..b98e8d3c269f 100644 --- a/targets/pseudo/the-lot/Makefile.depend +++ b/targets/pseudo/the-lot/Makefile.depend @@ -1,4 +1,3 @@ - .include # This file is not autogenerated - take care! diff --git a/targets/pseudo/toolchain/Makefile b/targets/pseudo/toolchain/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/toolchain/Makefile +++ b/targets/pseudo/toolchain/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/toolchain/Makefile.depend b/targets/pseudo/toolchain/Makefile.depend index 286b072dfcd9..e0c30675fc28 100644 --- a/targets/pseudo/toolchain/Makefile.depend +++ b/targets/pseudo/toolchain/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .if !defined(MK_CLANG) diff --git a/targets/pseudo/universe/Makefile b/targets/pseudo/universe/Makefile index 1a9e17ffa122..4f8e2cb94d46 100644 --- a/targets/pseudo/universe/Makefile +++ b/targets/pseudo/universe/Makefile @@ -1,4 +1,3 @@ - # This target is "special". # # The actual work is done via another target; diff --git a/targets/pseudo/universe/Makefile.depend b/targets/pseudo/universe/Makefile.depend index f2a6736ad994..70e52a1101f7 100644 --- a/targets/pseudo/universe/Makefile.depend +++ b/targets/pseudo/universe/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! # this is not normally needed, but we are not normal diff --git a/targets/pseudo/userland/Makefile b/targets/pseudo/userland/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/Makefile +++ b/targets/pseudo/userland/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index f6733e3228b4..378531b68cc1 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .include diff --git a/targets/pseudo/userland/Makefile.inc b/targets/pseudo/userland/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/Makefile.inc +++ b/targets/pseudo/userland/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/cddl/Makefile b/targets/pseudo/userland/cddl/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/cddl/Makefile +++ b/targets/pseudo/userland/cddl/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/cddl/Makefile.depend b/targets/pseudo/userland/cddl/Makefile.depend index 41042893cb79..85d8f2a3f462 100644 --- a/targets/pseudo/userland/cddl/Makefile.depend +++ b/targets/pseudo/userland/cddl/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .if !defined(MK_CTF) diff --git a/targets/pseudo/userland/games/Makefile b/targets/pseudo/userland/games/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/games/Makefile +++ b/targets/pseudo/userland/games/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/games/Makefile.depend b/targets/pseudo/userland/games/Makefile.depend index 13227c60e0ce..1aee166af71c 100644 --- a/targets/pseudo/userland/games/Makefile.depend +++ b/targets/pseudo/userland/games/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/userland/gnu/Makefile b/targets/pseudo/userland/gnu/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/gnu/Makefile +++ b/targets/pseudo/userland/gnu/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/gnu/Makefile.depend b/targets/pseudo/userland/gnu/Makefile.depend index 33ca85f86e69..188849601569 100644 --- a/targets/pseudo/userland/gnu/Makefile.depend +++ b/targets/pseudo/userland/gnu/Makefile.depend @@ -1,4 +1,3 @@ - .include "${SRCTOP}/share/mk/src.opts.mk" # This file is not autogenerated - take care! diff --git a/targets/pseudo/userland/include/Makefile b/targets/pseudo/userland/include/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/include/Makefile +++ b/targets/pseudo/userland/include/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/include/Makefile.depend b/targets/pseudo/userland/include/Makefile.depend index 6bbeb95c6474..0208e9f08bf3 100644 --- a/targets/pseudo/userland/include/Makefile.depend +++ b/targets/pseudo/userland/include/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/userland/kerberos5/Makefile b/targets/pseudo/userland/kerberos5/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/kerberos5/Makefile +++ b/targets/pseudo/userland/kerberos5/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/kerberos5/Makefile.depend b/targets/pseudo/userland/kerberos5/Makefile.depend index 09de4a621e5d..86ee91f874ec 100644 --- a/targets/pseudo/userland/kerberos5/Makefile.depend +++ b/targets/pseudo/userland/kerberos5/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/userland/lib/Makefile b/targets/pseudo/userland/lib/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/lib/Makefile +++ b/targets/pseudo/userland/lib/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/lib/Makefile.depend b/targets/pseudo/userland/lib/Makefile.depend index 5af2280ec053..8e1b0282be48 100644 --- a/targets/pseudo/userland/lib/Makefile.depend +++ b/targets/pseudo/userland/lib/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .include diff --git a/targets/pseudo/userland/libexec/Makefile b/targets/pseudo/userland/libexec/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/libexec/Makefile +++ b/targets/pseudo/userland/libexec/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/libexec/Makefile.depend b/targets/pseudo/userland/libexec/Makefile.depend index 034e2a2ea08f..4a6d72f914e3 100644 --- a/targets/pseudo/userland/libexec/Makefile.depend +++ b/targets/pseudo/userland/libexec/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .include diff --git a/targets/pseudo/userland/misc/Makefile b/targets/pseudo/userland/misc/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/misc/Makefile +++ b/targets/pseudo/userland/misc/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/misc/Makefile.depend b/targets/pseudo/userland/misc/Makefile.depend index 203e446dca50..d3c97fc56b40 100644 --- a/targets/pseudo/userland/misc/Makefile.depend +++ b/targets/pseudo/userland/misc/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! .if !defined(MK_FORTH) diff --git a/targets/pseudo/userland/secure/Makefile b/targets/pseudo/userland/secure/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/secure/Makefile +++ b/targets/pseudo/userland/secure/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/secure/Makefile.depend b/targets/pseudo/userland/secure/Makefile.depend index f6bfb82ddd9c..fd7ba71219bc 100644 --- a/targets/pseudo/userland/secure/Makefile.depend +++ b/targets/pseudo/userland/secure/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/targets/pseudo/userland/share/Makefile b/targets/pseudo/userland/share/Makefile index d3b5cbd3a79b..01b5f23410c8 100644 --- a/targets/pseudo/userland/share/Makefile +++ b/targets/pseudo/userland/share/Makefile @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/targets/pseudo/userland/share/Makefile.depend b/targets/pseudo/userland/share/Makefile.depend index a56f022ecdd7..dd56515a53ac 100644 --- a/targets/pseudo/userland/share/Makefile.depend +++ b/targets/pseudo/userland/share/Makefile.depend @@ -1,4 +1,3 @@ - # This file is not autogenerated - take care! DIRDEPS = \ diff --git a/tests/Makefile b/tests/Makefile index 09c0fbc62a2e..e8dd7793f169 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE} diff --git a/tests/Makefile.inc0 b/tests/Makefile.inc0 index c826809a3055..dc84ddc60992 100644 --- a/tests/Makefile.inc0 +++ b/tests/Makefile.inc0 @@ -1,4 +1,3 @@ - # tests/... doesn't conform to bsd.lib.mk and bsd.prog.mk, so specify a sane # default for MK_CHECK_USE_SANDBOX. src.opts.mk will override the value if the # user sets it to no. diff --git a/tests/etc/Makefile b/tests/etc/Makefile index b0c1fbcdc77f..d78ac932e0dd 100644 --- a/tests/etc/Makefile +++ b/tests/etc/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/etc diff --git a/tests/etc/Makefile.inc b/tests/etc/Makefile.inc index 03efce15f856..cec69b26e149 100644 --- a/tests/etc/Makefile.inc +++ b/tests/etc/Makefile.inc @@ -1,2 +1 @@ - .include "${SRCTOP}/tests/Makefile.inc0" diff --git a/tests/etc/rc.d/Makefile b/tests/etc/rc.d/Makefile index c8b1e7d81c1b..185bc9e7c112 100644 --- a/tests/etc/rc.d/Makefile +++ b/tests/etc/rc.d/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/etc/rc.d ATF_TESTS_SH+= routing_test diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 5a88e0f9ea1e..869fae2e963b 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/examples diff --git a/tests/sys/Makefile b/tests/sys/Makefile index 20ea4f181c7c..7167f77ff471 100644 --- a/tests/sys/Makefile +++ b/tests/sys/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys diff --git a/tests/sys/Makefile.inc b/tests/sys/Makefile.inc index 03efce15f856..cec69b26e149 100644 --- a/tests/sys/Makefile.inc +++ b/tests/sys/Makefile.inc @@ -1,2 +1 @@ - .include "${SRCTOP}/tests/Makefile.inc0" diff --git a/tests/sys/acl/Makefile b/tests/sys/acl/Makefile index e8db261edaec..0080e8dd5b5a 100644 --- a/tests/sys/acl/Makefile +++ b/tests/sys/acl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/acl diff --git a/tests/sys/aio/Makefile b/tests/sys/aio/Makefile index b0bddb044268..5cddb28c27a6 100644 --- a/tests/sys/aio/Makefile +++ b/tests/sys/aio/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/aio ATF_TESTS_C+= aio_test diff --git a/tests/sys/audit/Makefile b/tests/sys/audit/Makefile index c9068d0a8044..d6d9c2874d09 100644 --- a/tests/sys/audit/Makefile +++ b/tests/sys/audit/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/audit ATF_TESTS_C= file-attribute-access diff --git a/tests/sys/auditpipe/Makefile b/tests/sys/auditpipe/Makefile index 20832301f044..189535ee74ca 100644 --- a/tests/sys/auditpipe/Makefile +++ b/tests/sys/auditpipe/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/auditpipe ATF_TESTS_C= auditpipe_test diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 81cb4fa1ceee..6d37cfa08056 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys/capsicum diff --git a/tests/sys/cddl/Makefile b/tests/sys/cddl/Makefile index 80c72ea5ec42..6049a70fc613 100644 --- a/tests/sys/cddl/Makefile +++ b/tests/sys/cddl/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys/cddl diff --git a/tests/sys/cddl/zfs/Makefile b/tests/sys/cddl/zfs/Makefile index 18097f9b2617..f215f7438e78 100644 --- a/tests/sys/cddl/zfs/Makefile +++ b/tests/sys/cddl/zfs/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys/cddl/zfs diff --git a/tests/sys/cddl/zfs/bin/Makefile b/tests/sys/cddl/zfs/bin/Makefile index 3dfb86b1bd5b..98db25e396d3 100644 --- a/tests/sys/cddl/zfs/bin/Makefile +++ b/tests/sys/cddl/zfs/bin/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/include/Makefile b/tests/sys/cddl/zfs/include/Makefile index 81e81cb2e0c7..c7712a7d0a88 100644 --- a/tests/sys/cddl/zfs/include/Makefile +++ b/tests/sys/cddl/zfs/include/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/tests/Makefile b/tests/sys/cddl/zfs/tests/Makefile index efaae7bfc2c5..f007e78992fc 100644 --- a/tests/sys/cddl/zfs/tests/Makefile +++ b/tests/sys/cddl/zfs/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/tests/Makefile.inc b/tests/sys/cddl/zfs/tests/Makefile.inc index 069272ab8104..1b911c451c01 100644 --- a/tests/sys/cddl/zfs/tests/Makefile.inc +++ b/tests/sys/cddl/zfs/tests/Makefile.inc @@ -1,2 +1 @@ - WARNS?= 0 diff --git a/tests/sys/cddl/zfs/tests/acl/Makefile b/tests/sys/cddl/zfs/tests/acl/Makefile index 062a007a4096..95cbc40972e5 100644 --- a/tests/sys/cddl/zfs/tests/acl/Makefile +++ b/tests/sys/cddl/zfs/tests/acl/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/acl/cifs/Makefile b/tests/sys/cddl/zfs/tests/acl/cifs/Makefile index 30bfd2183a4d..bbb54429ec2c 100644 --- a/tests/sys/cddl/zfs/tests/acl/cifs/Makefile +++ b/tests/sys/cddl/zfs/tests/acl/cifs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/acl/nontrivial/Makefile b/tests/sys/cddl/zfs/tests/acl/nontrivial/Makefile index f942fa2ace46..1332371f7570 100644 --- a/tests/sys/cddl/zfs/tests/acl/nontrivial/Makefile +++ b/tests/sys/cddl/zfs/tests/acl/nontrivial/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/acl/trivial/Makefile b/tests/sys/cddl/zfs/tests/acl/trivial/Makefile index ca54995a53a0..5a00bc05746b 100644 --- a/tests/sys/cddl/zfs/tests/acl/trivial/Makefile +++ b/tests/sys/cddl/zfs/tests/acl/trivial/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/atime/Makefile b/tests/sys/cddl/zfs/tests/atime/Makefile index 315123c59bbd..f89f32c149f3 100644 --- a/tests/sys/cddl/zfs/tests/atime/Makefile +++ b/tests/sys/cddl/zfs/tests/atime/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/bootfs/Makefile b/tests/sys/cddl/zfs/tests/bootfs/Makefile index f59b08261989..53e2224e1d8c 100644 --- a/tests/sys/cddl/zfs/tests/bootfs/Makefile +++ b/tests/sys/cddl/zfs/tests/bootfs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cache/Makefile b/tests/sys/cddl/zfs/tests/cache/Makefile index 1955009834fe..df46dedcc8ec 100644 --- a/tests/sys/cddl/zfs/tests/cache/Makefile +++ b/tests/sys/cddl/zfs/tests/cache/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cachefile/Makefile b/tests/sys/cddl/zfs/tests/cachefile/Makefile index 60bfda066a15..09b55f1681aa 100644 --- a/tests/sys/cddl/zfs/tests/cachefile/Makefile +++ b/tests/sys/cddl/zfs/tests/cachefile/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/clean_mirror/Makefile b/tests/sys/cddl/zfs/tests/clean_mirror/Makefile index a95d1a286df5..881d6cdedb7a 100644 --- a/tests/sys/cddl/zfs/tests/clean_mirror/Makefile +++ b/tests/sys/cddl/zfs/tests/clean_mirror/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/Makefile b/tests/sys/cddl/zfs/tests/cli_root/Makefile index 33b97022fc4f..05b2f480e006 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zdb/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zdb/Makefile index 33ae1fcdbdc4..7bf850245a84 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zdb/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zdb/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs/Makefile index 814b790f1585..e123a67e482b 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/Makefile index ea8808442e1e..017e2c312ac6 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/Makefile index 6bb2031caf6b..f608eca9abf2 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_create/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_create/Makefile index 0a46a9e0b4c3..6f048fd37e7a 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_create/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_create/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/Makefile index 0aff64173c45..8e8777ff42af 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile index d2e61fdc8aae..2b6288c76ba8 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_diff/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_get/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_get/Makefile index 2763a53db4ee..140e5634d23f 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_get/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_get/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/Makefile index 0949c0408257..3b532596cee1 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/Makefile index 4d06e3e082a8..b5b68263d8a5 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/Makefile index 94929d25dcf4..53c59cf0bd99 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_property/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_property/Makefile index ae621146fef3..91b14e1aeadd 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_property/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_property/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/Makefile index b71daeb93518..066039a3fa04 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/Makefile index 6794da9b054f..431ab61354b4 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/Makefile index eb1b17251ae6..07f9e88fe963 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/Makefile index f8426d398d79..d288ea35914b 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_send/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_send/Makefile index 6b505a3bee2a..ff100e37f330 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_send/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_send/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_set/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_set/Makefile index 10e68def5db2..69300727fd9e 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_set/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_set/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_share/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_share/Makefile index 29b992e97c2c..1027523ddcd6 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_share/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_share/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/Makefile index f1a7f4a4e7fa..7cad43c9d796 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/Makefile index 930191f2b7bb..ba37c8fc0f62 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/Makefile index e5d0ac041940..eeaceb593ef7 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/Makefile index a26461b62104..0b01b8f05aba 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool/Makefile index fbbdb8c3dcf5..1d09a43ee977 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile index ed89d7ca995f..27986f8207fd 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_add/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/Makefile index 24ad0b17f737..d094cf65cbfd 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile index a40272300789..de2992fe86b3 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_create/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_create/Makefile index a331da6db05f..73026cf21ada 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_create/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_create/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/Makefile index a1be860244a7..90ceee214b00 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/Makefile index 7e4d63ea4c0c..353b8d22be79 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_expand/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_expand/Makefile index 0d1f98cab009..68265a18bbd0 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_expand/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_expand/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_export/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_export/Makefile index 5e87a94da1b7..fb15c0421a31 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_export/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_export/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_get/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_get/Makefile index b24ce38a3567..7066d97f02bc 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_get/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_get/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_history/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_history/Makefile index f2e930ad2fc1..c1341eaeec67 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_history/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_history/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile index a946dd6ceeba..508bfef28e4c 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_import/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_import/blockfiles/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_import/blockfiles/Makefile index 4f7e6e1a1054..13235edd1f47 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_import/blockfiles/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_import/blockfiles/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/Makefile index e1b55de436d8..22728ca40310 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_online/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_online/Makefile index 28ee77f2de35..73d3cb438b87 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_online/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_online/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/Makefile index 1de45591b801..39fdf272482f 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/Makefile index 00302f3833ef..dfe0a7c265d5 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/Makefile index fed1bd5a1094..5c855230c0d7 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_set/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_set/Makefile index 0477b0d99a64..4e8936cdb3b1 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_set/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_set/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_status/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_status/Makefile index 74b7a66e5e72..4340af728892 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_status/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_status/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/Makefile index 583d490387ab..f6365bbb46d5 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/blockfiles/Makefile b/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/blockfiles/Makefile index a31ad913b50c..2380e3be9e43 100644 --- a/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/blockfiles/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/blockfiles/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_user/Makefile b/tests/sys/cddl/zfs/tests/cli_user/Makefile index 667d4133ae77..947337d58367 100644 --- a/tests/sys/cddl/zfs/tests/cli_user/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_user/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_user/misc/Makefile b/tests/sys/cddl/zfs/tests/cli_user/misc/Makefile index 85ff511360a9..d22caa7382c5 100644 --- a/tests/sys/cddl/zfs/tests/cli_user/misc/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_user/misc/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_user/zfs_list/Makefile b/tests/sys/cddl/zfs/tests/cli_user/zfs_list/Makefile index 5443ff4dec0d..14185efb74da 100644 --- a/tests/sys/cddl/zfs/tests/cli_user/zfs_list/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_user/zfs_list/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/Makefile b/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/Makefile index 4de5d3857568..4c66f6d8343a 100644 --- a/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/cli_user/zpool_list/Makefile b/tests/sys/cddl/zfs/tests/cli_user/zpool_list/Makefile index d9f524c75d85..b50c82ccc1b4 100644 --- a/tests/sys/cddl/zfs/tests/cli_user/zpool_list/Makefile +++ b/tests/sys/cddl/zfs/tests/cli_user/zpool_list/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/compression/Makefile b/tests/sys/cddl/zfs/tests/compression/Makefile index 3ad018047e6e..3ed64fc3460e 100644 --- a/tests/sys/cddl/zfs/tests/compression/Makefile +++ b/tests/sys/cddl/zfs/tests/compression/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/ctime/Makefile b/tests/sys/cddl/zfs/tests/ctime/Makefile index 752ff9695a49..d7cf76d4517c 100644 --- a/tests/sys/cddl/zfs/tests/ctime/Makefile +++ b/tests/sys/cddl/zfs/tests/ctime/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/delegate/Makefile b/tests/sys/cddl/zfs/tests/delegate/Makefile index 5fb0be849309..c25841283c20 100644 --- a/tests/sys/cddl/zfs/tests/delegate/Makefile +++ b/tests/sys/cddl/zfs/tests/delegate/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/devices/Makefile b/tests/sys/cddl/zfs/tests/devices/Makefile index 4734f61096cf..6902f8c270be 100644 --- a/tests/sys/cddl/zfs/tests/devices/Makefile +++ b/tests/sys/cddl/zfs/tests/devices/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/exec/Makefile b/tests/sys/cddl/zfs/tests/exec/Makefile index 33dfcfad177b..2a8efb84b079 100644 --- a/tests/sys/cddl/zfs/tests/exec/Makefile +++ b/tests/sys/cddl/zfs/tests/exec/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/grow_pool/Makefile b/tests/sys/cddl/zfs/tests/grow_pool/Makefile index 9537fb62fde4..31fdf1fc9b39 100644 --- a/tests/sys/cddl/zfs/tests/grow_pool/Makefile +++ b/tests/sys/cddl/zfs/tests/grow_pool/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/grow_replicas/Makefile b/tests/sys/cddl/zfs/tests/grow_replicas/Makefile index 1eebf5ef0a31..06ee0c68c435 100644 --- a/tests/sys/cddl/zfs/tests/grow_replicas/Makefile +++ b/tests/sys/cddl/zfs/tests/grow_replicas/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/history/Makefile b/tests/sys/cddl/zfs/tests/history/Makefile index 8cd1babd3ecd..8a8175abbaea 100644 --- a/tests/sys/cddl/zfs/tests/history/Makefile +++ b/tests/sys/cddl/zfs/tests/history/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/hotplug/Makefile b/tests/sys/cddl/zfs/tests/hotplug/Makefile index 3da1b0f4174b..2264668f14bd 100644 --- a/tests/sys/cddl/zfs/tests/hotplug/Makefile +++ b/tests/sys/cddl/zfs/tests/hotplug/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/hotspare/Makefile b/tests/sys/cddl/zfs/tests/hotspare/Makefile index 9371186866b0..02a7aa3a1ac4 100644 --- a/tests/sys/cddl/zfs/tests/hotspare/Makefile +++ b/tests/sys/cddl/zfs/tests/hotspare/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/inheritance/Makefile b/tests/sys/cddl/zfs/tests/inheritance/Makefile index b337fd541ed2..8dc20cb7b3bd 100644 --- a/tests/sys/cddl/zfs/tests/inheritance/Makefile +++ b/tests/sys/cddl/zfs/tests/inheritance/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/interop/Makefile b/tests/sys/cddl/zfs/tests/interop/Makefile index e81bcb332628..cd26031d634d 100644 --- a/tests/sys/cddl/zfs/tests/interop/Makefile +++ b/tests/sys/cddl/zfs/tests/interop/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/inuse/Makefile b/tests/sys/cddl/zfs/tests/inuse/Makefile index eb26734de6a5..81405a420e98 100644 --- a/tests/sys/cddl/zfs/tests/inuse/Makefile +++ b/tests/sys/cddl/zfs/tests/inuse/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/iscsi/Makefile b/tests/sys/cddl/zfs/tests/iscsi/Makefile index 523e83904d37..c531c390e4fe 100644 --- a/tests/sys/cddl/zfs/tests/iscsi/Makefile +++ b/tests/sys/cddl/zfs/tests/iscsi/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/large_files/Makefile b/tests/sys/cddl/zfs/tests/large_files/Makefile index b169b19e6e13..e18bf056e290 100644 --- a/tests/sys/cddl/zfs/tests/large_files/Makefile +++ b/tests/sys/cddl/zfs/tests/large_files/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/largest_pool/Makefile b/tests/sys/cddl/zfs/tests/largest_pool/Makefile index 4a5fdcbaae54..12cb14f3a264 100644 --- a/tests/sys/cddl/zfs/tests/largest_pool/Makefile +++ b/tests/sys/cddl/zfs/tests/largest_pool/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/link_count/Makefile b/tests/sys/cddl/zfs/tests/link_count/Makefile index 8bbdc98f20a6..fd9aab99f355 100644 --- a/tests/sys/cddl/zfs/tests/link_count/Makefile +++ b/tests/sys/cddl/zfs/tests/link_count/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/migration/Makefile b/tests/sys/cddl/zfs/tests/migration/Makefile index dae2827fe2f2..68c9977d34b7 100644 --- a/tests/sys/cddl/zfs/tests/migration/Makefile +++ b/tests/sys/cddl/zfs/tests/migration/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/mmap/Makefile b/tests/sys/cddl/zfs/tests/mmap/Makefile index aeeecf79170a..494b84b8e155 100644 --- a/tests/sys/cddl/zfs/tests/mmap/Makefile +++ b/tests/sys/cddl/zfs/tests/mmap/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/mount/Makefile b/tests/sys/cddl/zfs/tests/mount/Makefile index fbbdc22506a0..6b00ecf96c1a 100644 --- a/tests/sys/cddl/zfs/tests/mount/Makefile +++ b/tests/sys/cddl/zfs/tests/mount/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/mv_files/Makefile b/tests/sys/cddl/zfs/tests/mv_files/Makefile index 8409af69bf58..b81bf3fa49a9 100644 --- a/tests/sys/cddl/zfs/tests/mv_files/Makefile +++ b/tests/sys/cddl/zfs/tests/mv_files/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/nestedfs/Makefile b/tests/sys/cddl/zfs/tests/nestedfs/Makefile index c15cdb402e56..0ffdee46247a 100644 --- a/tests/sys/cddl/zfs/tests/nestedfs/Makefile +++ b/tests/sys/cddl/zfs/tests/nestedfs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/no_space/Makefile b/tests/sys/cddl/zfs/tests/no_space/Makefile index 69aac3b4adba..db55c2674165 100644 --- a/tests/sys/cddl/zfs/tests/no_space/Makefile +++ b/tests/sys/cddl/zfs/tests/no_space/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/online_offline/Makefile b/tests/sys/cddl/zfs/tests/online_offline/Makefile index a66642a57d85..5f0e68a5ccd5 100644 --- a/tests/sys/cddl/zfs/tests/online_offline/Makefile +++ b/tests/sys/cddl/zfs/tests/online_offline/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/pool_names/Makefile b/tests/sys/cddl/zfs/tests/pool_names/Makefile index 040f9ebd46e0..34350e28a800 100644 --- a/tests/sys/cddl/zfs/tests/pool_names/Makefile +++ b/tests/sys/cddl/zfs/tests/pool_names/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/poolversion/Makefile b/tests/sys/cddl/zfs/tests/poolversion/Makefile index 45ddce8deec3..6c04aac0f5fb 100644 --- a/tests/sys/cddl/zfs/tests/poolversion/Makefile +++ b/tests/sys/cddl/zfs/tests/poolversion/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/quota/Makefile b/tests/sys/cddl/zfs/tests/quota/Makefile index 36784d03ae82..beae44a4a503 100644 --- a/tests/sys/cddl/zfs/tests/quota/Makefile +++ b/tests/sys/cddl/zfs/tests/quota/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/redundancy/Makefile b/tests/sys/cddl/zfs/tests/redundancy/Makefile index cef8705f12e7..30345b04cc78 100644 --- a/tests/sys/cddl/zfs/tests/redundancy/Makefile +++ b/tests/sys/cddl/zfs/tests/redundancy/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/refquota/Makefile b/tests/sys/cddl/zfs/tests/refquota/Makefile index 3b9caf86c059..0b86cf46eaf5 100644 --- a/tests/sys/cddl/zfs/tests/refquota/Makefile +++ b/tests/sys/cddl/zfs/tests/refquota/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/refreserv/Makefile b/tests/sys/cddl/zfs/tests/refreserv/Makefile index 0c04cf3284b3..983cc768a338 100644 --- a/tests/sys/cddl/zfs/tests/refreserv/Makefile +++ b/tests/sys/cddl/zfs/tests/refreserv/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/rename_dirs/Makefile b/tests/sys/cddl/zfs/tests/rename_dirs/Makefile index ce111219676d..9aafbf759374 100644 --- a/tests/sys/cddl/zfs/tests/rename_dirs/Makefile +++ b/tests/sys/cddl/zfs/tests/rename_dirs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/replacement/Makefile b/tests/sys/cddl/zfs/tests/replacement/Makefile index e172a1f6ac60..f818166cdaa8 100644 --- a/tests/sys/cddl/zfs/tests/replacement/Makefile +++ b/tests/sys/cddl/zfs/tests/replacement/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/reservation/Makefile b/tests/sys/cddl/zfs/tests/reservation/Makefile index 781146bd2418..cda06d9c96c8 100644 --- a/tests/sys/cddl/zfs/tests/reservation/Makefile +++ b/tests/sys/cddl/zfs/tests/reservation/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/tests/rootpool/Makefile b/tests/sys/cddl/zfs/tests/rootpool/Makefile index c82ea9ab2927..b4ddcc9b3256 100644 --- a/tests/sys/cddl/zfs/tests/rootpool/Makefile +++ b/tests/sys/cddl/zfs/tests/rootpool/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/cddl/zfs/tests/rsend/Makefile b/tests/sys/cddl/zfs/tests/rsend/Makefile index 2d459ea74c9e..708b53ed90e7 100644 --- a/tests/sys/cddl/zfs/tests/rsend/Makefile +++ b/tests/sys/cddl/zfs/tests/rsend/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/scrub_mirror/Makefile b/tests/sys/cddl/zfs/tests/scrub_mirror/Makefile index ae8f222f16a5..504f6210f6a8 100644 --- a/tests/sys/cddl/zfs/tests/scrub_mirror/Makefile +++ b/tests/sys/cddl/zfs/tests/scrub_mirror/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/slog/Makefile b/tests/sys/cddl/zfs/tests/slog/Makefile index 69167acfc30c..0cdbca1395f3 100644 --- a/tests/sys/cddl/zfs/tests/slog/Makefile +++ b/tests/sys/cddl/zfs/tests/slog/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/snapshot/Makefile b/tests/sys/cddl/zfs/tests/snapshot/Makefile index 04275f3b2355..369dde3ba7ad 100644 --- a/tests/sys/cddl/zfs/tests/snapshot/Makefile +++ b/tests/sys/cddl/zfs/tests/snapshot/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/snapused/Makefile b/tests/sys/cddl/zfs/tests/snapused/Makefile index f65ecc1251a6..f831ac5dc699 100644 --- a/tests/sys/cddl/zfs/tests/snapused/Makefile +++ b/tests/sys/cddl/zfs/tests/snapused/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/sparse/Makefile b/tests/sys/cddl/zfs/tests/sparse/Makefile index df147d108320..c606a58e3b40 100644 --- a/tests/sys/cddl/zfs/tests/sparse/Makefile +++ b/tests/sys/cddl/zfs/tests/sparse/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/threadsappend/Makefile b/tests/sys/cddl/zfs/tests/threadsappend/Makefile index f62ad46f3777..fd179e27e715 100644 --- a/tests/sys/cddl/zfs/tests/threadsappend/Makefile +++ b/tests/sys/cddl/zfs/tests/threadsappend/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/truncate/Makefile b/tests/sys/cddl/zfs/tests/truncate/Makefile index 783456d96634..98c8e085408d 100644 --- a/tests/sys/cddl/zfs/tests/truncate/Makefile +++ b/tests/sys/cddl/zfs/tests/truncate/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/txg_integrity/Makefile b/tests/sys/cddl/zfs/tests/txg_integrity/Makefile index 010021572358..6a200b0c12b0 100644 --- a/tests/sys/cddl/zfs/tests/txg_integrity/Makefile +++ b/tests/sys/cddl/zfs/tests/txg_integrity/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/userquota/Makefile b/tests/sys/cddl/zfs/tests/userquota/Makefile index 6ec2a4f0b15c..678678ced1dd 100644 --- a/tests/sys/cddl/zfs/tests/userquota/Makefile +++ b/tests/sys/cddl/zfs/tests/userquota/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/utils_test/Makefile b/tests/sys/cddl/zfs/tests/utils_test/Makefile index 2b550b166a1f..e14bf4586580 100644 --- a/tests/sys/cddl/zfs/tests/utils_test/Makefile +++ b/tests/sys/cddl/zfs/tests/utils_test/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/write_dirs/Makefile b/tests/sys/cddl/zfs/tests/write_dirs/Makefile index ae7858b9772d..69d11aa30034 100644 --- a/tests/sys/cddl/zfs/tests/write_dirs/Makefile +++ b/tests/sys/cddl/zfs/tests/write_dirs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/xattr/Makefile b/tests/sys/cddl/zfs/tests/xattr/Makefile index 7a88513edc1c..a1f76ef79d72 100644 --- a/tests/sys/cddl/zfs/tests/xattr/Makefile +++ b/tests/sys/cddl/zfs/tests/xattr/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zfsd/Makefile b/tests/sys/cddl/zfs/tests/zfsd/Makefile index 7d3f29a7359e..e34e24b40906 100644 --- a/tests/sys/cddl/zfs/tests/zfsd/Makefile +++ b/tests/sys/cddl/zfs/tests/zfsd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zil/Makefile b/tests/sys/cddl/zfs/tests/zil/Makefile index 387e799de35e..db30bfc9f6ec 100644 --- a/tests/sys/cddl/zfs/tests/zil/Makefile +++ b/tests/sys/cddl/zfs/tests/zil/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zinject/Makefile b/tests/sys/cddl/zfs/tests/zinject/Makefile index a317d61aa37a..6f37d7060abf 100644 --- a/tests/sys/cddl/zfs/tests/zinject/Makefile +++ b/tests/sys/cddl/zfs/tests/zinject/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zones/Makefile b/tests/sys/cddl/zfs/tests/zones/Makefile index d06e7a613aea..4b27462d1c0b 100644 --- a/tests/sys/cddl/zfs/tests/zones/Makefile +++ b/tests/sys/cddl/zfs/tests/zones/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol/Makefile b/tests/sys/cddl/zfs/tests/zvol/Makefile index deeb1b027b33..a0c4899ae106 100644 --- a/tests/sys/cddl/zfs/tests/zvol/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/Makefile b/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/Makefile index 3f35f6b3ee8d..ffcc0f79e88c 100644 --- a/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol/zvol_cli/Makefile b/tests/sys/cddl/zfs/tests/zvol/zvol_cli/Makefile index d6cb44734f17..4282538eecbc 100644 --- a/tests/sys/cddl/zfs/tests/zvol/zvol_cli/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol/zvol_cli/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol/zvol_misc/Makefile b/tests/sys/cddl/zfs/tests/zvol/zvol_misc/Makefile index 19d944278c66..5f29f33a9b35 100644 --- a/tests/sys/cddl/zfs/tests/zvol/zvol_misc/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol/zvol_misc/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol/zvol_swap/Makefile b/tests/sys/cddl/zfs/tests/zvol/zvol_swap/Makefile index 50d1f728638f..21acc05d8446 100644 --- a/tests/sys/cddl/zfs/tests/zvol/zvol_swap/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol/zvol_swap/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/cddl/zfs/tests/zvol_thrash/Makefile b/tests/sys/cddl/zfs/tests/zvol_thrash/Makefile index bd3847db678e..71c8f330b156 100644 --- a/tests/sys/cddl/zfs/tests/zvol_thrash/Makefile +++ b/tests/sys/cddl/zfs/tests/zvol_thrash/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=tests diff --git a/tests/sys/common/Makefile b/tests/sys/common/Makefile index 383fd17a5ba0..269aa9d52f9a 100644 --- a/tests/sys/common/Makefile +++ b/tests/sys/common/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/common ${PACKAGE}FILES+= vnet.subr diff --git a/tests/sys/compat32/Makefile b/tests/sys/compat32/Makefile index 31834de16246..e1a35422410e 100644 --- a/tests/sys/compat32/Makefile +++ b/tests/sys/compat32/Makefile @@ -1,4 +1,3 @@ - .if exists(${.CURDIR}/${MACHINE_ARCH}) SUBDIR+= ${MACHINE_ARCH} .endif diff --git a/tests/sys/compat32/Makefile.inc b/tests/sys/compat32/Makefile.inc index 0220ac0431e9..7f870e3701fb 100644 --- a/tests/sys/compat32/Makefile.inc +++ b/tests/sys/compat32/Makefile.inc @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/compat32 .include "../Makefile.inc" diff --git a/tests/sys/devrandom/Makefile b/tests/sys/devrandom/Makefile index e8a28789a7a3..342925246aee 100644 --- a/tests/sys/devrandom/Makefile +++ b/tests/sys/devrandom/Makefile @@ -1,4 +1,3 @@ - .include SDEVRANDOM= ${SRCTOP}/sys/dev/random diff --git a/tests/sys/fifo/Makefile b/tests/sys/fifo/Makefile index 766e9ee452a6..6d4c859288d9 100644 --- a/tests/sys/fifo/Makefile +++ b/tests/sys/fifo/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/fifo PLAIN_TESTS_C+= fifo_create diff --git a/tests/sys/file/Makefile b/tests/sys/file/Makefile index 010606bfeba0..f80d1b271b85 100644 --- a/tests/sys/file/Makefile +++ b/tests/sys/file/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/file BINDIR= ${TESTSDIR} diff --git a/tests/sys/fs/Makefile b/tests/sys/fs/Makefile index f0fd2cc5955f..e36a97d2335a 100644 --- a/tests/sys/fs/Makefile +++ b/tests/sys/fs/Makefile @@ -1,4 +1,3 @@ - .include .include diff --git a/tests/sys/fs/Makefile.inc b/tests/sys/fs/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/tests/sys/fs/Makefile.inc +++ b/tests/sys/fs/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index f45f2f93e1c0..86d942bea472 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/fs/tmpfs/Makefile b/tests/sys/fs/tmpfs/Makefile index 106b28c7c463..ce4ca959838c 100644 --- a/tests/sys/fs/tmpfs/Makefile +++ b/tests/sys/fs/tmpfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests FILESYSTEM?= ${.CURDIR:T} diff --git a/tests/sys/geom/Makefile b/tests/sys/geom/Makefile index 7e6e7cd2bb65..78257e180cf9 100644 --- a/tests/sys/geom/Makefile +++ b/tests/sys/geom/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/geom TESTS_SUBDIRS+= class diff --git a/tests/sys/geom/class/Makefile b/tests/sys/geom/class/Makefile index b640b0b46859..3cf3a15273ac 100644 --- a/tests/sys/geom/class/Makefile +++ b/tests/sys/geom/class/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/geom/class/Makefile.inc b/tests/sys/geom/class/Makefile.inc index 03efce15f856..cec69b26e149 100644 --- a/tests/sys/geom/class/Makefile.inc +++ b/tests/sys/geom/class/Makefile.inc @@ -1,2 +1 @@ - .include "${SRCTOP}/tests/Makefile.inc0" diff --git a/tests/sys/geom/class/concat/Makefile b/tests/sys/geom/class/concat/Makefile index 335c7632c6e5..d5457b64bd2a 100644 --- a/tests/sys/geom/class/concat/Makefile +++ b/tests/sys/geom/class/concat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/eli/Makefile b/tests/sys/geom/class/eli/Makefile index d8faff182ac4..e1a28f39d5d2 100644 --- a/tests/sys/geom/class/eli/Makefile +++ b/tests/sys/geom/class/eli/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/sys/geom/eli ${SRCTOP}/sys/crypto/sha2 PACKAGE= tests diff --git a/tests/sys/geom/class/gate/Makefile b/tests/sys/geom/class/gate/Makefile index a51c983f5cf6..5ebc1d9304e0 100644 --- a/tests/sys/geom/class/gate/Makefile +++ b/tests/sys/geom/class/gate/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/mirror/Makefile b/tests/sys/geom/class/mirror/Makefile index fdef410ab974..635288cc3d53 100644 --- a/tests/sys/geom/class/mirror/Makefile +++ b/tests/sys/geom/class/mirror/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/multipath/Makefile b/tests/sys/geom/class/multipath/Makefile index 9a2a9a29ec38..1246015e8fc4 100644 --- a/tests/sys/geom/class/multipath/Makefile +++ b/tests/sys/geom/class/multipath/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/nop/Makefile b/tests/sys/geom/class/nop/Makefile index a3347e0cdb65..e2cb249bcf56 100644 --- a/tests/sys/geom/class/nop/Makefile +++ b/tests/sys/geom/class/nop/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/part/Makefile b/tests/sys/geom/class/part/Makefile index 6ca33655c805..0d7d86224437 100644 --- a/tests/sys/geom/class/part/Makefile +++ b/tests/sys/geom/class/part/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/raid3/Makefile b/tests/sys/geom/class/raid3/Makefile index 97b9cd34b8f0..8f398a0f5fec 100644 --- a/tests/sys/geom/class/raid3/Makefile +++ b/tests/sys/geom/class/raid3/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/shsec/Makefile b/tests/sys/geom/class/shsec/Makefile index 7615142f605f..500c14cca51a 100644 --- a/tests/sys/geom/class/shsec/Makefile +++ b/tests/sys/geom/class/shsec/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/geom/class/stripe/Makefile b/tests/sys/geom/class/stripe/Makefile index 7615142f605f..500c14cca51a 100644 --- a/tests/sys/geom/class/stripe/Makefile +++ b/tests/sys/geom/class/stripe/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 0b9182b0808c..113e044b449b 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/tests/sys/kern/Makefile.inc b/tests/sys/kern/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/tests/sys/kern/Makefile.inc +++ b/tests/sys/kern/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/tests/sys/kern/acct/Makefile b/tests/sys/kern/acct/Makefile index 6f1181fe6d8a..779be0ae591d 100644 --- a/tests/sys/kern/acct/Makefile +++ b/tests/sys/kern/acct/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/kern/acct ATF_TESTS_C= acct_test diff --git a/tests/sys/kern/execve/Makefile b/tests/sys/kern/execve/Makefile index 77221b2d2dfa..afa537031c39 100644 --- a/tests/sys/kern/execve/Makefile +++ b/tests/sys/kern/execve/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/kern/execve BINDIR= ${TESTSDIR} diff --git a/tests/sys/kern/pipe/Makefile b/tests/sys/kern/pipe/Makefile index e9bc0b048c5b..e8fa05ee8e0e 100644 --- a/tests/sys/kern/pipe/Makefile +++ b/tests/sys/kern/pipe/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/kern/pipe PLAIN_TESTS_C+= big_pipe_test diff --git a/tests/sys/kqueue/Makefile.inc b/tests/sys/kqueue/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/tests/sys/kqueue/Makefile.inc +++ b/tests/sys/kqueue/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/tests/sys/kqueue/libkqueue/Makefile b/tests/sys/kqueue/libkqueue/Makefile index 797ff98f87a3..31eee2bd7c40 100644 --- a/tests/sys/kqueue/libkqueue/Makefile +++ b/tests/sys/kqueue/libkqueue/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/kqueue/libkqueue BINDIR= ${TESTSDIR} diff --git a/tests/sys/mac/Makefile b/tests/sys/mac/Makefile index 4c38ce1d6c7f..3447d00122f5 100644 --- a/tests/sys/mac/Makefile +++ b/tests/sys/mac/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/mac TESTS_SUBDIRS+= bsdextended diff --git a/tests/sys/mac/Makefile.inc b/tests/sys/mac/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/tests/sys/mac/Makefile.inc +++ b/tests/sys/mac/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/tests/sys/mac/bsdextended/Makefile b/tests/sys/mac/bsdextended/Makefile index f5b07db386c2..69cd27c0e321 100644 --- a/tests/sys/mac/bsdextended/Makefile +++ b/tests/sys/mac/bsdextended/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/mac/bsdextended ATF_TESTS_SH+= matches_test diff --git a/tests/sys/mac/ipacl/Makefile b/tests/sys/mac/ipacl/Makefile index 4a5dfaa015c3..e083f6c1a69c 100644 --- a/tests/sys/mac/ipacl/Makefile +++ b/tests/sys/mac/ipacl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/mac/ipacl diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile index 47993fe54c54..c9fb6bbaae3e 100644 --- a/tests/sys/mac/portacl/Makefile +++ b/tests/sys/mac/portacl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/mac/portacl diff --git a/tests/sys/mqueue/Makefile b/tests/sys/mqueue/Makefile index 05b5fc97c244..743c82ecc954 100644 --- a/tests/sys/mqueue/Makefile +++ b/tests/sys/mqueue/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/mqueue ATF_TESTS_SH= mqueue_test diff --git a/tests/sys/net/routing/Makefile b/tests/sys/net/routing/Makefile index c98e4e2a2eaf..c725d23f15d1 100644 --- a/tests/sys/net/routing/Makefile +++ b/tests/sys/net/routing/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests WARNS?= 1 diff --git a/tests/sys/netgraph/Makefile b/tests/sys/netgraph/Makefile index 2240570ff46a..f0eb4928ec7f 100644 --- a/tests/sys/netgraph/Makefile +++ b/tests/sys/netgraph/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netgraph diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index fb3281028aff..7e12dae6a4fa 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netinet diff --git a/tests/sys/netinet/libalias/Makefile b/tests/sys/netinet/libalias/Makefile index 20d904511538..43bef996fae7 100644 --- a/tests/sys/netinet/libalias/Makefile +++ b/tests/sys/netinet/libalias/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netinet/libalias diff --git a/tests/sys/netinet6/Makefile b/tests/sys/netinet6/Makefile index 82e84859ecbc..78df34af46dd 100644 --- a/tests/sys/netinet6/Makefile +++ b/tests/sys/netinet6/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netinet6 diff --git a/tests/sys/netinet6/frag6/Makefile b/tests/sys/netinet6/frag6/Makefile index d1661060368b..3fca0522e533 100644 --- a/tests/sys/netinet6/frag6/Makefile +++ b/tests/sys/netinet6/frag6/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netinet6/frag6 diff --git a/tests/sys/netipsec/Makefile b/tests/sys/netipsec/Makefile index af5c0f75e8ba..bb10297e0cc3 100644 --- a/tests/sys/netipsec/Makefile +++ b/tests/sys/netipsec/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/sys/netipsec TESTS_SUBDIRS+= tunnel diff --git a/tests/sys/netipsec/tunnel/Makefile b/tests/sys/netipsec/tunnel/Makefile index c28826711cb8..c6060a790cc3 100644 --- a/tests/sys/netipsec/tunnel/Makefile +++ b/tests/sys/netipsec/tunnel/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netipsec/tunnel diff --git a/tests/sys/netlink/Makefile b/tests/sys/netlink/Makefile index c52149674ceb..c07ef8663867 100644 --- a/tests/sys/netlink/Makefile +++ b/tests/sys/netlink/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests WARNS?= 1 diff --git a/tests/sys/netmap/Makefile b/tests/sys/netmap/Makefile index 8c3ae26284ec..ee00d0421620 100644 --- a/tests/sys/netmap/Makefile +++ b/tests/sys/netmap/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netmap diff --git a/tests/sys/netpfil/Makefile b/tests/sys/netpfil/Makefile index bdbb9078cfc2..b449902aabc2 100644 --- a/tests/sys/netpfil/Makefile +++ b/tests/sys/netpfil/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys/netpfil diff --git a/tests/sys/netpfil/common/Makefile b/tests/sys/netpfil/common/Makefile index 0003aac28779..320e61f3fb83 100644 --- a/tests/sys/netpfil/common/Makefile +++ b/tests/sys/netpfil/common/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/common diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 71f26979415a..c3e77415e995 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/pf diff --git a/tests/sys/netpfil/pf/ioctl/Makefile b/tests/sys/netpfil/pf/ioctl/Makefile index 5d4e9dbcff5f..6bcf48432d30 100644 --- a/tests/sys/netpfil/pf/ioctl/Makefile +++ b/tests/sys/netpfil/pf/ioctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netpfil/pf/ioctl diff --git a/tests/sys/opencrypto/Makefile b/tests/sys/opencrypto/Makefile index 8be069349aa2..a9c06ef2a93b 100644 --- a/tests/sys/opencrypto/Makefile +++ b/tests/sys/opencrypto/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/opencrypto diff --git a/tests/sys/pjdfstest/Makefile b/tests/sys/pjdfstest/Makefile index 9ad68c2ac6f3..f8a6f1cd6b8d 100644 --- a/tests/sys/pjdfstest/Makefile +++ b/tests/sys/pjdfstest/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests SUBDIR+= pjdfstest diff --git a/tests/sys/pjdfstest/Makefile.inc b/tests/sys/pjdfstest/Makefile.inc index 03efce15f856..cec69b26e149 100644 --- a/tests/sys/pjdfstest/Makefile.inc +++ b/tests/sys/pjdfstest/Makefile.inc @@ -1,2 +1 @@ - .include "${SRCTOP}/tests/Makefile.inc0" diff --git a/tests/sys/pjdfstest/pjdfstest/Makefile b/tests/sys/pjdfstest/pjdfstest/Makefile index 30c4713da177..95e6d953d146 100644 --- a/tests/sys/pjdfstest/pjdfstest/Makefile +++ b/tests/sys/pjdfstest/pjdfstest/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .PATH: ${SRCTOP}/contrib/pjdfstest diff --git a/tests/sys/pjdfstest/tests/Makefile b/tests/sys/pjdfstest/tests/Makefile index c2b5c3d166d5..abe854eb8c35 100644 --- a/tests/sys/pjdfstest/tests/Makefile +++ b/tests/sys/pjdfstest/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests PJDFSTEST_SRCDIR= ${SRCTOP}/contrib/pjdfstest diff --git a/tests/sys/pjdfstest/tests/Makefile.inc b/tests/sys/pjdfstest/tests/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/tests/sys/pjdfstest/tests/Makefile.inc +++ b/tests/sys/pjdfstest/tests/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/tests/sys/pjdfstest/tests/chflags/Makefile b/tests/sys/pjdfstest/tests/chflags/Makefile index 308e86e9f533..e0dd497b6807 100644 --- a/tests/sys/pjdfstest/tests/chflags/Makefile +++ b/tests/sys/pjdfstest/tests/chflags/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/chmod/Makefile b/tests/sys/pjdfstest/tests/chmod/Makefile index a3e600f4d232..441bec65a357 100644 --- a/tests/sys/pjdfstest/tests/chmod/Makefile +++ b/tests/sys/pjdfstest/tests/chmod/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/chown/Makefile b/tests/sys/pjdfstest/tests/chown/Makefile index 1012341c82a4..8138a674f052 100644 --- a/tests/sys/pjdfstest/tests/chown/Makefile +++ b/tests/sys/pjdfstest/tests/chown/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/ftruncate/Makefile b/tests/sys/pjdfstest/tests/ftruncate/Makefile index 2f3425423764..30aeb30cb525 100644 --- a/tests/sys/pjdfstest/tests/ftruncate/Makefile +++ b/tests/sys/pjdfstest/tests/ftruncate/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/granular/Makefile b/tests/sys/pjdfstest/tests/granular/Makefile index a67a50ede7b2..28ff001d6958 100644 --- a/tests/sys/pjdfstest/tests/granular/Makefile +++ b/tests/sys/pjdfstest/tests/granular/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/link/Makefile b/tests/sys/pjdfstest/tests/link/Makefile index 7a890e96aef4..a94c3281a01f 100644 --- a/tests/sys/pjdfstest/tests/link/Makefile +++ b/tests/sys/pjdfstest/tests/link/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/mkdir/Makefile b/tests/sys/pjdfstest/tests/mkdir/Makefile index a3e600f4d232..441bec65a357 100644 --- a/tests/sys/pjdfstest/tests/mkdir/Makefile +++ b/tests/sys/pjdfstest/tests/mkdir/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/mkfifo/Makefile b/tests/sys/pjdfstest/tests/mkfifo/Makefile index a3e600f4d232..441bec65a357 100644 --- a/tests/sys/pjdfstest/tests/mkfifo/Makefile +++ b/tests/sys/pjdfstest/tests/mkfifo/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/mknod/Makefile b/tests/sys/pjdfstest/tests/mknod/Makefile index edfa0847268a..03f178034e85 100644 --- a/tests/sys/pjdfstest/tests/mknod/Makefile +++ b/tests/sys/pjdfstest/tests/mknod/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/open/Makefile b/tests/sys/pjdfstest/tests/open/Makefile index e4c656242d0a..12f54ba412d9 100644 --- a/tests/sys/pjdfstest/tests/open/Makefile +++ b/tests/sys/pjdfstest/tests/open/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/rename/Makefile b/tests/sys/pjdfstest/tests/rename/Makefile index 913c0d5d2a49..b6a4c06c28a4 100644 --- a/tests/sys/pjdfstest/tests/rename/Makefile +++ b/tests/sys/pjdfstest/tests/rename/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/rmdir/Makefile b/tests/sys/pjdfstest/tests/rmdir/Makefile index 19ecd8b0743a..974f7f741825 100644 --- a/tests/sys/pjdfstest/tests/rmdir/Makefile +++ b/tests/sys/pjdfstest/tests/rmdir/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/symlink/Makefile b/tests/sys/pjdfstest/tests/symlink/Makefile index a3e600f4d232..441bec65a357 100644 --- a/tests/sys/pjdfstest/tests/symlink/Makefile +++ b/tests/sys/pjdfstest/tests/symlink/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/truncate/Makefile b/tests/sys/pjdfstest/tests/truncate/Makefile index 2f3425423764..30aeb30cb525 100644 --- a/tests/sys/pjdfstest/tests/truncate/Makefile +++ b/tests/sys/pjdfstest/tests/truncate/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/unlink/Makefile b/tests/sys/pjdfstest/tests/unlink/Makefile index 308e86e9f533..e0dd497b6807 100644 --- a/tests/sys/pjdfstest/tests/unlink/Makefile +++ b/tests/sys/pjdfstest/tests/unlink/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/pjdfstest/tests/utimensat/Makefile b/tests/sys/pjdfstest/tests/utimensat/Makefile index 7dd5b6a02b20..16b90be6d6d8 100644 --- a/tests/sys/pjdfstest/tests/utimensat/Makefile +++ b/tests/sys/pjdfstest/tests/utimensat/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= 00 TAP_TESTS_SH+= 01 TAP_TESTS_SH+= 02 diff --git a/tests/sys/posixshm/Makefile b/tests/sys/posixshm/Makefile index d7b46cd13867..9b87860fba58 100644 --- a/tests/sys/posixshm/Makefile +++ b/tests/sys/posixshm/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/posixshm diff --git a/tests/sys/sys/Makefile b/tests/sys/sys/Makefile index e9c9bfef7dbd..8d9cd552d9d2 100644 --- a/tests/sys/sys/Makefile +++ b/tests/sys/sys/Makefile @@ -1,4 +1,3 @@ - .include TESTSDIR= ${TESTSBASE}/sys/sys diff --git a/tests/sys/vfs/Makefile b/tests/sys/vfs/Makefile index 9670ec52674b..e25282b2c70a 100644 --- a/tests/sys/vfs/Makefile +++ b/tests/sys/vfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/vfs diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile index d63610ed272a..8be4b8666fdf 100644 --- a/tests/sys/vm/Makefile +++ b/tests/sys/vm/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/vm diff --git a/tests/sys/vm/soxstack/Makefile b/tests/sys/vm/soxstack/Makefile index c0b8ef095bce..bd159c2fde75 100644 --- a/tests/sys/vm/soxstack/Makefile +++ b/tests/sys/vm/soxstack/Makefile @@ -1,4 +1,3 @@ - SHLIB= soxstack SHLIB_NAME= libsoxstack.so SHLIB_MAJOR= 1 diff --git a/tests/sys/vm/stack/Makefile b/tests/sys/vm/stack/Makefile index 4279e4f48b8f..06ffcf4d4b4a 100644 --- a/tests/sys/vm/stack/Makefile +++ b/tests/sys/vm/stack/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/vm/stack diff --git a/tools/boot/smbios/Makefile b/tools/boot/smbios/Makefile index 042b3aaee274..42a17aa54b5a 100644 --- a/tools/boot/smbios/Makefile +++ b/tools/boot/smbios/Makefile @@ -1,4 +1,3 @@ - PROG= smbios MAN= .PATH: ${SRCTOP}/stand/libsa diff --git a/tools/bsdbox/Makefile b/tools/bsdbox/Makefile index 008b66647077..a164ddf54cbd 100644 --- a/tools/bsdbox/Makefile +++ b/tools/bsdbox/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/tools/build/Makefile b/tools/build/Makefile index e60c8694d56d..9e9d203f108b 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../include LIB= egacy diff --git a/tools/build/bootstrap-m4/Makefile b/tools/build/bootstrap-m4/Makefile index c0b82b307d5d..c12c82455958 100644 --- a/tools/build/bootstrap-m4/Makefile +++ b/tools/build/bootstrap-m4/Makefile @@ -1,4 +1,3 @@ - # Build a bootstrap version of m4 (needed in order to build libelf and lex) .PATH: ${SRCTOP}/usr.bin/m4 ${.CURDIR} diff --git a/tools/build/cross-build/Makefile b/tools/build/cross-build/Makefile index 72d78d7b6588..3c51dae472ef 100644 --- a/tools/build/cross-build/Makefile +++ b/tools/build/cross-build/Makefile @@ -1,4 +1,3 @@ - NO_OBJ= SCRIPTS= date.sh hostname.sh BINDIR= /usr/bin diff --git a/tools/build/cross-build/fake_chflags/Makefile b/tools/build/cross-build/fake_chflags/Makefile index 75c251a2b272..f5b867d50939 100644 --- a/tools/build/cross-build/fake_chflags/Makefile +++ b/tools/build/cross-build/fake_chflags/Makefile @@ -1,4 +1,3 @@ - NO_OBJ= SCRIPTS= chflags BINDIR= /usr/bin diff --git a/tools/build/cross-build/mkimg/Makefile b/tools/build/cross-build/mkimg/Makefile index 405d579fb633..cbef4a9f36ea 100644 --- a/tools/build/cross-build/mkimg/Makefile +++ b/tools/build/cross-build/mkimg/Makefile @@ -1,4 +1,3 @@ - # allow building mkimg as a host tool. MKIMG_SRC = ${SRCTOP}/usr.bin/mkimg diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile index d9efa7e4f8ab..74e28ad1c9f5 100644 --- a/tools/build/make_check/Makefile +++ b/tools/build/make_check/Makefile @@ -1,4 +1,3 @@ - .MAKE.MODE= normal # Failure is handled by the invoker, don't kill other legs of a parallel build. diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index b8a5c7780948..43246f3ceebf 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -1,4 +1,3 @@ - CFLAGS+= -I${WORLDTMP}/legacy/usr/include DPADD+= ${WORLDTMP}/legacy/usr/lib/libegacy.a LDADD+= -legacy diff --git a/tools/build/mk/Makefile.boot.pre b/tools/build/mk/Makefile.boot.pre index afad8d17b922..4bd8b964f90c 100644 --- a/tools/build/mk/Makefile.boot.pre +++ b/tools/build/mk/Makefile.boot.pre @@ -1,4 +1,3 @@ - # Various MK_* options need to be set before including bsd.prog.mk/bsd.lib.mk .if ${.MAKE.OS} != "FreeBSD" # Most Linux distributions don't ship the .a files for static linking. diff --git a/tools/bus_space/C/Makefile b/tools/bus_space/C/Makefile index 050fa3730fd4..914441227318 100644 --- a/tools/bus_space/C/Makefile +++ b/tools/bus_space/C/Makefile @@ -1,4 +1,3 @@ - LIB= bus SHLIB_MAJOR= 0 SRCS= lang.c diff --git a/tools/bus_space/Makefile b/tools/bus_space/Makefile index 95ea368ffd70..5f75db0103a5 100644 --- a/tools/bus_space/Makefile +++ b/tools/bus_space/Makefile @@ -1,4 +1,3 @@ - SUBDIR= \ C \ Python diff --git a/tools/bus_space/Makefile.inc b/tools/bus_space/Makefile.inc index af885574a3d3..06fc95199ab6 100644 --- a/tools/bus_space/Makefile.inc +++ b/tools/bus_space/Makefile.inc @@ -1,3 +1,2 @@ - .PATH: ${.CURDIR}/.. SRCS+= bus.c busdma.c diff --git a/tools/bus_space/Python/Makefile b/tools/bus_space/Python/Makefile index e56b9d2b1c15..23e5b00c152d 100644 --- a/tools/bus_space/Python/Makefile +++ b/tools/bus_space/Python/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME= bus.so SRCS= lang.c diff --git a/tools/diag/dumpvfscache/Makefile b/tools/diag/dumpvfscache/Makefile index 3b3959c318e7..4ab0e2b59061 100644 --- a/tools/diag/dumpvfscache/Makefile +++ b/tools/diag/dumpvfscache/Makefile @@ -1,4 +1,3 @@ - PROG= dumpvfscache LIBADD= kvm diff --git a/tools/diag/localeck/Makefile b/tools/diag/localeck/Makefile index 24ca74c8489c..b8642a70af4e 100644 --- a/tools/diag/localeck/Makefile +++ b/tools/diag/localeck/Makefile @@ -1,4 +1,3 @@ - PROG= localeck MAN= WARNS?= 4 diff --git a/tools/diag/prtblknos/Makefile b/tools/diag/prtblknos/Makefile index c337eec72a79..9e4f8b4a55bc 100644 --- a/tools/diag/prtblknos/Makefile +++ b/tools/diag/prtblknos/Makefile @@ -1,4 +1,3 @@ - BINDIR?= /usr/bin PROG= prtblknos diff --git a/tools/kerneldoc/Makefile b/tools/kerneldoc/Makefile index 6e9053aa22cf..36739c42ed15 100644 --- a/tools/kerneldoc/Makefile +++ b/tools/kerneldoc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../kern SRCS+= kern diff --git a/tools/regression/aio/aiop/Makefile b/tools/regression/aio/aiop/Makefile index 4c6d3ac16fef..e5d835cb2763 100644 --- a/tools/regression/aio/aiop/Makefile +++ b/tools/regression/aio/aiop/Makefile @@ -1,4 +1,3 @@ - PROG= aiop MAN= diff --git a/tools/regression/bpf/Makefile b/tools/regression/bpf/Makefile index 154b61fa280c..7bb25728d9ff 100644 --- a/tools/regression/bpf/Makefile +++ b/tools/regression/bpf/Makefile @@ -1,4 +1,3 @@ - SUBDIR= bpf_filter .include diff --git a/tools/regression/bpf/bpf_filter/Makefile b/tools/regression/bpf/bpf_filter/Makefile index 0f88a27c4e8a..a02f2cbd5710 100644 --- a/tools/regression/bpf/bpf_filter/Makefile +++ b/tools/regression/bpf/bpf_filter/Makefile @@ -1,4 +1,3 @@ - TEST_CASES?= test0001 test0002 test0003 test0004 \ test0005 test0006 test0007 test0008 \ test0009 test0010 test0011 test0012 \ diff --git a/tools/regression/capsicum/syscalls/Makefile b/tools/regression/capsicum/syscalls/Makefile index 86a3c48ba150..7f5a40752136 100644 --- a/tools/regression/capsicum/syscalls/Makefile +++ b/tools/regression/capsicum/syscalls/Makefile @@ -1,4 +1,3 @@ - SYSCALLS= cap_fcntls_limit cap_getmode cap_ioctls_limit CFLAGS= -O2 -pipe -std=gnu99 -fstack-protector diff --git a/tools/regression/doat/Makefile b/tools/regression/doat/Makefile index 96b1c6ebdff2..f102e7dd6437 100644 --- a/tools/regression/doat/Makefile +++ b/tools/regression/doat/Makefile @@ -1,4 +1,3 @@ - PROG= doat MAN= diff --git a/tools/regression/ethernet/ethermulti/Makefile b/tools/regression/ethernet/ethermulti/Makefile index ad0fa68320b8..a079cd6fcf4e 100644 --- a/tools/regression/ethernet/ethermulti/Makefile +++ b/tools/regression/ethernet/ethermulti/Makefile @@ -1,4 +1,3 @@ - PROG= ethermulti SRCS+= ethermulti.c MAN= diff --git a/tools/regression/fsx/Makefile b/tools/regression/fsx/Makefile index 0f5e8e81d32f..78f6dd970cf5 100644 --- a/tools/regression/fsx/Makefile +++ b/tools/regression/fsx/Makefile @@ -1,4 +1,3 @@ - PROG= fsx MAN= diff --git a/tools/regression/gaithrstress/Makefile b/tools/regression/gaithrstress/Makefile index a9d9687c8119..fd1a7e821019 100644 --- a/tools/regression/gaithrstress/Makefile +++ b/tools/regression/gaithrstress/Makefile @@ -1,4 +1,3 @@ - PROG= gaithrstress LIBADD= pthread diff --git a/tools/regression/geom/ConfCmp/Makefile b/tools/regression/geom/ConfCmp/Makefile index bbb6a14819c1..a03de0e9bcd4 100644 --- a/tools/regression/geom/ConfCmp/Makefile +++ b/tools/regression/geom/ConfCmp/Makefile @@ -1,4 +1,3 @@ - PROG= ConfCmp SRCS+= ConfCmp.c SRCS+= subr_sbuf.c diff --git a/tools/regression/geom/MdLoad/Makefile b/tools/regression/geom/MdLoad/Makefile index 4b998ee52580..0a5473ee9b91 100644 --- a/tools/regression/geom/MdLoad/Makefile +++ b/tools/regression/geom/MdLoad/Makefile @@ -1,4 +1,3 @@ - PROG= MdLoad LIBADD= sbuf bsdxml NO_OBJ= t diff --git a/tools/regression/geom_gpt/Makefile b/tools/regression/geom_gpt/Makefile index ef7f98e03c8b..603ceb0d61b7 100644 --- a/tools/regression/geom_gpt/Makefile +++ b/tools/regression/geom_gpt/Makefile @@ -1,4 +1,3 @@ - PROG= gctl_test_helper MAN= diff --git a/tools/regression/include/stdatomic/Makefile b/tools/regression/include/stdatomic/Makefile index ea6d0c7fb864..d0bbc93a2a26 100644 --- a/tools/regression/include/stdatomic/Makefile +++ b/tools/regression/include/stdatomic/Makefile @@ -1,4 +1,3 @@ - PROG= logic MAN= diff --git a/tools/regression/include/tgmath/Makefile b/tools/regression/include/tgmath/Makefile index 0e843bcf4b0c..aebd7e1b81e2 100644 --- a/tools/regression/include/tgmath/Makefile +++ b/tools/regression/include/tgmath/Makefile @@ -1,4 +1,3 @@ - PROG= tgmath CSTD= c99 CFLAGS+= -fno-builtin diff --git a/tools/regression/kgssapi/Makefile b/tools/regression/kgssapi/Makefile index 8b3998599be6..582658663d3f 100644 --- a/tools/regression/kgssapi/Makefile +++ b/tools/regression/kgssapi/Makefile @@ -1,4 +1,3 @@ - PROG= gsstest MAN= WARNS?= 2 diff --git a/tools/regression/kthread/kld/Makefile b/tools/regression/kthread/kld/Makefile index 125fdcf1767d..8ed2dabb4230 100644 --- a/tools/regression/kthread/kld/Makefile +++ b/tools/regression/kthread/kld/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR} KMOD= kthrdlk diff --git a/tools/regression/lib/libc/regex/Makefile b/tools/regression/lib/libc/regex/Makefile index 33f6d812d734..9b070b75cfb6 100644 --- a/tools/regression/lib/libc/regex/Makefile +++ b/tools/regression/lib/libc/regex/Makefile @@ -1,4 +1,3 @@ - GROT= ../../../../../lib/libc/regex/grot .PHONY: tests diff --git a/tools/regression/mlock/Makefile b/tools/regression/mlock/Makefile index ce523f2cdb73..77d295ceb7c7 100644 --- a/tools/regression/mlock/Makefile +++ b/tools/regression/mlock/Makefile @@ -1,4 +1,3 @@ - PROG= mlock MAN= diff --git a/tools/regression/net80211/ccmp/Makefile b/tools/regression/net80211/ccmp/Makefile index 3c309a81872a..298e41836f24 100644 --- a/tools/regression/net80211/ccmp/Makefile +++ b/tools/regression/net80211/ccmp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/net80211 KMOD= test_ccmp diff --git a/tools/regression/net80211/tkip/Makefile b/tools/regression/net80211/tkip/Makefile index 7873ffc17e7a..e6295bc1eea7 100644 --- a/tools/regression/net80211/tkip/Makefile +++ b/tools/regression/net80211/tkip/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/net80211 KMOD= test_tkip diff --git a/tools/regression/net80211/wep/Makefile b/tools/regression/net80211/wep/Makefile index e16ccb434e20..dd742a45401b 100644 --- a/tools/regression/net80211/wep/Makefile +++ b/tools/regression/net80211/wep/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/net80211 KMOD= test_wep diff --git a/tools/regression/netinet/arphold/Makefile b/tools/regression/netinet/arphold/Makefile index d8170303d42b..97cedfc3f9d1 100644 --- a/tools/regression/netinet/arphold/Makefile +++ b/tools/regression/netinet/arphold/Makefile @@ -1,4 +1,3 @@ - PROG= arphold MAN= CFLAGS+= -Wall diff --git a/tools/regression/netinet/msocket/Makefile b/tools/regression/netinet/msocket/Makefile index 64e10b153ec1..221b27d0dbf4 100644 --- a/tools/regression/netinet/msocket/Makefile +++ b/tools/regression/netinet/msocket/Makefile @@ -1,4 +1,3 @@ - PROG= msocket MAN= CFLAGS+= -Wall diff --git a/tools/regression/netinet/msocket_ifnet_remove/Makefile b/tools/regression/netinet/msocket_ifnet_remove/Makefile index 50f602f243a5..08640d862ce4 100644 --- a/tools/regression/netinet/msocket_ifnet_remove/Makefile +++ b/tools/regression/netinet/msocket_ifnet_remove/Makefile @@ -1,4 +1,3 @@ - PROG= msocket_ifnet_remove WARNS?= 3 MAN= diff --git a/tools/regression/netinet/tcpfullwindowrst/Makefile b/tools/regression/netinet/tcpfullwindowrst/Makefile index d86a3029bd8a..ad401e9df1cd 100644 --- a/tools/regression/netinet/tcpfullwindowrst/Makefile +++ b/tools/regression/netinet/tcpfullwindowrst/Makefile @@ -1,4 +1,3 @@ - PROG= tcpfullwindowrsttest MAN= diff --git a/tools/regression/netinet/udpconnectjail/Makefile b/tools/regression/netinet/udpconnectjail/Makefile index 23480a3a2ca2..88a14afb91d8 100644 --- a/tools/regression/netinet/udpconnectjail/Makefile +++ b/tools/regression/netinet/udpconnectjail/Makefile @@ -1,4 +1,3 @@ - PROG= udpconnectjail MAN= WARNS?= 2 diff --git a/tools/regression/netinet/udpzerobyte/Makefile b/tools/regression/netinet/udpzerobyte/Makefile index 7ac697d75d32..3cba327d2bd3 100644 --- a/tools/regression/netinet/udpzerobyte/Makefile +++ b/tools/regression/netinet/udpzerobyte/Makefile @@ -1,4 +1,3 @@ - PROG= udpzerobyte MAN= WARNS?= 2 diff --git a/tools/regression/nfsmmap/Makefile b/tools/regression/nfsmmap/Makefile index 4c3c96ebccfd..c731d428f7c1 100644 --- a/tools/regression/nfsmmap/Makefile +++ b/tools/regression/nfsmmap/Makefile @@ -1,4 +1,3 @@ - SUBDIR= test1 test2 .include diff --git a/tools/regression/nfsmmap/test1/Makefile b/tools/regression/nfsmmap/test1/Makefile index f42c89aa7653..97b2b6553211 100644 --- a/tools/regression/nfsmmap/test1/Makefile +++ b/tools/regression/nfsmmap/test1/Makefile @@ -1,4 +1,3 @@ - PROG= test1 MAN= NFSSERVER?= herring.nlsystems.com diff --git a/tools/regression/nfsmmap/test2/Makefile b/tools/regression/nfsmmap/test2/Makefile index c321daa3c8af..6d785a140dcb 100644 --- a/tools/regression/nfsmmap/test2/Makefile +++ b/tools/regression/nfsmmap/test2/Makefile @@ -1,4 +1,3 @@ - PROG= test2 MAN= NFSSERVER?= herring.nlsystems.com diff --git a/tools/regression/p1003_1b/Makefile b/tools/regression/p1003_1b/Makefile index 0c234ff29d6d..b5e7034792b4 100644 --- a/tools/regression/p1003_1b/Makefile +++ b/tools/regression/p1003_1b/Makefile @@ -1,4 +1,3 @@ - PROG=p1003_1b SRCS=\ diff --git a/tools/regression/posixsem/Makefile b/tools/regression/posixsem/Makefile index 1de91196d13b..2054d64afa45 100644 --- a/tools/regression/posixsem/Makefile +++ b/tools/regression/posixsem/Makefile @@ -1,4 +1,3 @@ - PROG= posixsem SRCS= posixsem.c test.c LIBADD= kvm diff --git a/tools/regression/posixsem2/Makefile b/tools/regression/posixsem2/Makefile index d5d87822a910..3e8227a1c952 100644 --- a/tools/regression/posixsem2/Makefile +++ b/tools/regression/posixsem2/Makefile @@ -1,4 +1,3 @@ - PROG= semtest SRCS= semtest.c MAN= diff --git a/tools/regression/pthread/cv_cancel1/Makefile b/tools/regression/pthread/cv_cancel1/Makefile index 04b151a138fe..1a27b8adfe78 100644 --- a/tools/regression/pthread/cv_cancel1/Makefile +++ b/tools/regression/pthread/cv_cancel1/Makefile @@ -1,4 +1,3 @@ - PROG= cv_cancel1 MAN= LIBADD= pthread diff --git a/tools/regression/pthread/mutex_isowned_np/Makefile b/tools/regression/pthread/mutex_isowned_np/Makefile index 650baa65563c..31dbd470d7d5 100644 --- a/tools/regression/pthread/mutex_isowned_np/Makefile +++ b/tools/regression/pthread/mutex_isowned_np/Makefile @@ -1,4 +1,3 @@ - PROG= mutex_isowned_np MAN= LIBADD= pthread diff --git a/tools/regression/redzone9/Makefile b/tools/regression/redzone9/Makefile index fe2d71ecd776..a7e56e1bd506 100644 --- a/tools/regression/redzone9/Makefile +++ b/tools/regression/redzone9/Makefile @@ -1,4 +1,3 @@ - KMOD= redzone SRCS= redzone.c diff --git a/tools/regression/rpcsec_gss/Makefile b/tools/regression/rpcsec_gss/Makefile index 60ece71252a4..6697fd9eaf99 100644 --- a/tools/regression/rpcsec_gss/Makefile +++ b/tools/regression/rpcsec_gss/Makefile @@ -1,4 +1,3 @@ - PROG= rpctest MAN= LIBADD= rpcsec_gss diff --git a/tools/regression/security/access/Makefile b/tools/regression/security/access/Makefile index 4f1b9a5fb2dd..59f52230e0e5 100644 --- a/tools/regression/security/access/Makefile +++ b/tools/regression/security/access/Makefile @@ -1,4 +1,3 @@ - PROG= testaccess MAN= diff --git a/tools/regression/security/cap_test/Makefile b/tools/regression/security/cap_test/Makefile index 05c7724af825..0fdc274edbed 100644 --- a/tools/regression/security/cap_test/Makefile +++ b/tools/regression/security/cap_test/Makefile @@ -1,4 +1,3 @@ - PROG= cap_test SRCS= cap_test.c \ cap_test_capmode.c \ diff --git a/tools/regression/security/open_to_operation/Makefile b/tools/regression/security/open_to_operation/Makefile index 87f46c1f3032..e319e4f78675 100644 --- a/tools/regression/security/open_to_operation/Makefile +++ b/tools/regression/security/open_to_operation/Makefile @@ -1,4 +1,3 @@ - PROG= open_to_operation MAN= WARNS?= 3 diff --git a/tools/regression/security/proc_to_proc/Makefile b/tools/regression/security/proc_to_proc/Makefile index 041aea2000e6..984791c299b6 100644 --- a/tools/regression/security/proc_to_proc/Makefile +++ b/tools/regression/security/proc_to_proc/Makefile @@ -1,4 +1,3 @@ - PROG= testuid MAN= diff --git a/tools/regression/sigqueue/Makefile b/tools/regression/sigqueue/Makefile index 2913e8870e8e..a35b2305815c 100644 --- a/tools/regression/sigqueue/Makefile +++ b/tools/regression/sigqueue/Makefile @@ -1,4 +1,3 @@ - SUBDIR=sigqtest1 sigqtest2 .include diff --git a/tools/regression/sigqueue/sigqtest1/Makefile b/tools/regression/sigqueue/sigqtest1/Makefile index 28e458537055..9efd0c2eec2a 100644 --- a/tools/regression/sigqueue/sigqtest1/Makefile +++ b/tools/regression/sigqueue/sigqtest1/Makefile @@ -1,4 +1,3 @@ - PROG=sigqtest1 MAN= DEBUG_FLAGS=-g diff --git a/tools/regression/sigqueue/sigqtest2/Makefile b/tools/regression/sigqueue/sigqtest2/Makefile index 6f278fab171e..9eea81bb59e8 100644 --- a/tools/regression/sigqueue/sigqtest2/Makefile +++ b/tools/regression/sigqueue/sigqtest2/Makefile @@ -1,4 +1,3 @@ - PROG=sigqtest2 MAN= DEBUG_FLAGS=-g diff --git a/tools/regression/sockets/listen_backlog/Makefile b/tools/regression/sockets/listen_backlog/Makefile index 24efd15aebd2..c7414442582e 100644 --- a/tools/regression/sockets/listen_backlog/Makefile +++ b/tools/regression/sockets/listen_backlog/Makefile @@ -1,4 +1,3 @@ - PROG= listen_backlog MAN= diff --git a/tools/regression/sockets/listen_kqueue/Makefile b/tools/regression/sockets/listen_kqueue/Makefile index 3ebdb1c4fac0..e67350d9ff14 100644 --- a/tools/regression/sockets/listen_kqueue/Makefile +++ b/tools/regression/sockets/listen_kqueue/Makefile @@ -1,4 +1,3 @@ - PROG= listen_kqueue MAN= diff --git a/tools/regression/sockets/pr_atomic/Makefile b/tools/regression/sockets/pr_atomic/Makefile index 3c13ea53d068..e9e5a2fa2e55 100644 --- a/tools/regression/sockets/pr_atomic/Makefile +++ b/tools/regression/sockets/pr_atomic/Makefile @@ -1,4 +1,3 @@ - PROG= pr_atomic MAN= diff --git a/tools/regression/sockets/rtsocket/Makefile b/tools/regression/sockets/rtsocket/Makefile index 666f6c1ab8d0..31120210ee2a 100644 --- a/tools/regression/sockets/rtsocket/Makefile +++ b/tools/regression/sockets/rtsocket/Makefile @@ -1,4 +1,3 @@ - PROG= rtsocket MAN= diff --git a/tools/regression/sockets/so_setfib/Makefile b/tools/regression/sockets/so_setfib/Makefile index c7c8e69fef6e..3670514e6c42 100644 --- a/tools/regression/sockets/so_setfib/Makefile +++ b/tools/regression/sockets/so_setfib/Makefile @@ -1,4 +1,3 @@ - .include PROG= so_setfib diff --git a/tools/regression/sockets/udp_pingpong/Makefile b/tools/regression/sockets/udp_pingpong/Makefile index 8ba9ee40826f..72090d725e75 100644 --- a/tools/regression/sockets/udp_pingpong/Makefile +++ b/tools/regression/sockets/udp_pingpong/Makefile @@ -1,4 +1,3 @@ - PROG= udp_pingpong MAN= diff --git a/tools/regression/sockets/unix_bindconnect/Makefile b/tools/regression/sockets/unix_bindconnect/Makefile index 776723eadada..0e5c32e67b92 100644 --- a/tools/regression/sockets/unix_bindconnect/Makefile +++ b/tools/regression/sockets/unix_bindconnect/Makefile @@ -1,4 +1,3 @@ - PROG= unix_bindconnect MAN= diff --git a/tools/regression/sockets/unix_close_race/Makefile b/tools/regression/sockets/unix_close_race/Makefile index b4fa340ed0df..ca151dc7af48 100644 --- a/tools/regression/sockets/unix_close_race/Makefile +++ b/tools/regression/sockets/unix_close_race/Makefile @@ -1,4 +1,3 @@ - PROG= unix_close_race MAN= diff --git a/tools/regression/sockets/unix_cmsg/Makefile b/tools/regression/sockets/unix_cmsg/Makefile index b3caf4996c46..24ca702e0a94 100644 --- a/tools/regression/sockets/unix_cmsg/Makefile +++ b/tools/regression/sockets/unix_cmsg/Makefile @@ -1,4 +1,3 @@ - PROG= unix_cmsg SRCS= ${AUTOSRCS} unix_cmsg.c uc_common.h uc_common.c \ t_generic.h t_generic.c t_peercred.h t_peercred.c \ diff --git a/tools/regression/sockets/unix_gc/Makefile b/tools/regression/sockets/unix_gc/Makefile index 81791f4b5212..c9f98fca8710 100644 --- a/tools/regression/sockets/unix_gc/Makefile +++ b/tools/regression/sockets/unix_gc/Makefile @@ -1,4 +1,3 @@ - PROG= unix_gc MAN= diff --git a/tools/regression/sockets/unix_sendtorace/Makefile b/tools/regression/sockets/unix_sendtorace/Makefile index fb1a25429f82..1e7b53d40379 100644 --- a/tools/regression/sockets/unix_sendtorace/Makefile +++ b/tools/regression/sockets/unix_sendtorace/Makefile @@ -1,4 +1,3 @@ - PROG= unix_sendtorace MAN= diff --git a/tools/regression/sockets/unix_socket/Makefile b/tools/regression/sockets/unix_socket/Makefile index 0a62bf25a0dc..61612323e98e 100644 --- a/tools/regression/sockets/unix_socket/Makefile +++ b/tools/regression/sockets/unix_socket/Makefile @@ -1,4 +1,3 @@ - PROG= unix_socket MAN= diff --git a/tools/regression/sockets/unix_sorflush/Makefile b/tools/regression/sockets/unix_sorflush/Makefile index a7f52e47d1fb..b41cb474f94a 100644 --- a/tools/regression/sockets/unix_sorflush/Makefile +++ b/tools/regression/sockets/unix_sorflush/Makefile @@ -1,4 +1,3 @@ - PROG= unix_sorflush MAN= diff --git a/tools/regression/sockets/zerosend/Makefile b/tools/regression/sockets/zerosend/Makefile index 4ceb95dd16b5..2f270d05cfa2 100644 --- a/tools/regression/sockets/zerosend/Makefile +++ b/tools/regression/sockets/zerosend/Makefile @@ -1,4 +1,3 @@ - PROG= zerosend MAN= diff --git a/tools/regression/tls/Makefile b/tools/regression/tls/Makefile index 96cd680987c2..063e3dec7d8d 100644 --- a/tools/regression/tls/Makefile +++ b/tools/regression/tls/Makefile @@ -1,4 +1,3 @@ - SUBDIR=libxx libyy ttls1 ttls2 ttls4 .if ${MACHINE_ARCH} == "i386" diff --git a/tools/regression/tls/libxx/Makefile b/tools/regression/tls/libxx/Makefile index adf4da1cb6b7..18195384ad9c 100644 --- a/tools/regression/tls/libxx/Makefile +++ b/tools/regression/tls/libxx/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME= libxx.so SRCS= xx.c diff --git a/tools/regression/tls/libyy/Makefile b/tools/regression/tls/libyy/Makefile index 634be2ad58ea..05ecfc735c62 100644 --- a/tools/regression/tls/libyy/Makefile +++ b/tools/regression/tls/libyy/Makefile @@ -1,4 +1,3 @@ - SHLIB_NAME= libyy.so SRCS= yy.c diff --git a/tools/regression/tls/ttls1/Makefile b/tools/regression/tls/ttls1/Makefile index fd0f5edfd0b8..8560de58cc9a 100644 --- a/tools/regression/tls/ttls1/Makefile +++ b/tools/regression/tls/ttls1/Makefile @@ -1,4 +1,3 @@ - PROG= ttls1 LDFLAGS+= -L../libxx -lxx -Wl,--rpath=${.OBJDIR}/../libxx LDFLAGS+= -L../libyy -lyy -Wl,--rpath=${.OBJDIR}/../libyy diff --git a/tools/regression/tls/ttls2/Makefile b/tools/regression/tls/ttls2/Makefile index 044520a6b73e..782808823efe 100644 --- a/tools/regression/tls/ttls2/Makefile +++ b/tools/regression/tls/ttls2/Makefile @@ -1,4 +1,3 @@ - PROG= ttls2 LIBADD= pthread MAN= diff --git a/tools/regression/tls/ttls3/Makefile b/tools/regression/tls/ttls3/Makefile index 4695889067eb..ef00223e4c25 100644 --- a/tools/regression/tls/ttls3/Makefile +++ b/tools/regression/tls/ttls3/Makefile @@ -1,4 +1,3 @@ - all: ttls3 LDFLAGS=-shared -Bsymbolic --allow-shlib-undefined diff --git a/tools/regression/tls/ttls4/Makefile b/tools/regression/tls/ttls4/Makefile index f6f54d48f1b1..b87343ecdd00 100644 --- a/tools/regression/tls/ttls4/Makefile +++ b/tools/regression/tls/ttls4/Makefile @@ -1,4 +1,3 @@ - PROG= ttls4 LIBADD= pthread MAN= diff --git a/tools/regression/ufs/uprintf/Makefile b/tools/regression/ufs/uprintf/Makefile index a1de5f3cb9c4..c1a7c4de03ae 100644 --- a/tools/regression/ufs/uprintf/Makefile +++ b/tools/regression/ufs/uprintf/Makefile @@ -1,4 +1,3 @@ - PROG= ufs_uprintf WARNS?= 3 MAN= diff --git a/tools/regression/usr.bin/cc/Makefile b/tools/regression/usr.bin/cc/Makefile index 890875b1abba..1f8b5d8f03fd 100644 --- a/tools/regression/usr.bin/cc/Makefile +++ b/tools/regression/usr.bin/cc/Makefile @@ -1,4 +1,3 @@ - TESTS= float CFLAGS+=-lm diff --git a/tools/regression/usr.bin/env/Makefile b/tools/regression/usr.bin/env/Makefile index 2a4e6bd61cea..06f1fbe82e23 100644 --- a/tools/regression/usr.bin/env/Makefile +++ b/tools/regression/usr.bin/env/Makefile @@ -1,4 +1,3 @@ - TESTPGM?=TestProgramNotSpecifed all: diff --git a/tools/test/auxinfo/Makefile b/tools/test/auxinfo/Makefile index f848a58f1446..e1edd843bd59 100644 --- a/tools/test/auxinfo/Makefile +++ b/tools/test/auxinfo/Makefile @@ -1,4 +1,3 @@ - PROG= auxinfo MAN= diff --git a/tools/test/bsnmp/Makefile b/tools/test/bsnmp/Makefile index 47f03ac48a1f..c3bcf832ff33 100644 --- a/tools/test/bsnmp/Makefile +++ b/tools/test/bsnmp/Makefile @@ -1,4 +1,3 @@ - CONTRIB=${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/tests diff --git a/tools/test/callout_free/Makefile b/tools/test/callout_free/Makefile index cc1583aa7a23..6421c072c5b9 100644 --- a/tools/test/callout_free/Makefile +++ b/tools/test/callout_free/Makefile @@ -1,4 +1,3 @@ - KMOD= callout_free SRCS= callout_free.c diff --git a/tools/test/gpioevents/Makefile b/tools/test/gpioevents/Makefile index 4bc4422ae333..8d256534447b 100644 --- a/tools/test/gpioevents/Makefile +++ b/tools/test/gpioevents/Makefile @@ -1,4 +1,3 @@ - PROG= gpioevents SRCS= gpioevents.c diff --git a/tools/test/iconv/Makefile b/tools/test/iconv/Makefile index 5452b20686f9..0d152df97c94 100644 --- a/tools/test/iconv/Makefile +++ b/tools/test/iconv/Makefile @@ -1,4 +1,3 @@ - SUBDIR= tablegen refgen posix gnu ENCODING= ASCII ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-6 \ diff --git a/tools/test/iconv/gnu/Makefile b/tools/test/iconv/gnu/Makefile index 3feb4845cee9..a90b2fea6918 100644 --- a/tools/test/iconv/gnu/Makefile +++ b/tools/test/iconv/gnu/Makefile @@ -1,4 +1,3 @@ - PROG= gnu MAN= diff --git a/tools/test/iconv/posix/Makefile b/tools/test/iconv/posix/Makefile index 55c939a32e84..6e15a6fa74e4 100644 --- a/tools/test/iconv/posix/Makefile +++ b/tools/test/iconv/posix/Makefile @@ -1,4 +1,3 @@ - PROG= posix MAN= diff --git a/tools/test/iconv/refgen/Makefile b/tools/test/iconv/refgen/Makefile index 5dc332c9d0e3..6052bd3604f8 100644 --- a/tools/test/iconv/refgen/Makefile +++ b/tools/test/iconv/refgen/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../tablegen PROG= refgen diff --git a/tools/test/iconv/tablegen/Makefile b/tools/test/iconv/tablegen/Makefile index ab79bacdb9c1..66362a70c12e 100644 --- a/tools/test/iconv/tablegen/Makefile +++ b/tools/test/iconv/tablegen/Makefile @@ -1,4 +1,3 @@ - PROG= tablegen MAN= diff --git a/tools/test/net/Makefile b/tools/test/net/Makefile index bdbc46c5ad57..b07506d9838b 100644 --- a/tools/test/net/Makefile +++ b/tools/test/net/Makefile @@ -1,4 +1,3 @@ - PROGS= listen connect MAN= diff --git a/tools/test/netfibs/Makefile b/tools/test/netfibs/Makefile index 02db4c8d82de..5e870a0d19d2 100644 --- a/tools/test/netfibs/Makefile +++ b/tools/test/netfibs/Makefile @@ -1,4 +1,3 @@ - PROG= reflect MAN= diff --git a/tools/test/ppsapi/Makefile b/tools/test/ppsapi/Makefile index 91a017f393ba..056a1fc31d6c 100644 --- a/tools/test/ppsapi/Makefile +++ b/tools/test/ppsapi/Makefile @@ -1,4 +1,3 @@ - PROG= ppsapitest MAN= diff --git a/tools/test/ptrace/Makefile b/tools/test/ptrace/Makefile index b2c9c7a91c37..ebc329a343bb 100644 --- a/tools/test/ptrace/Makefile +++ b/tools/test/ptrace/Makefile @@ -1,4 +1,3 @@ - PROG= scescx MAN= diff --git a/tools/test/sort/regression/Makefile b/tools/test/sort/regression/Makefile index e8f78e2e7f71..81dc44d8ef70 100644 --- a/tools/test/sort/regression/Makefile +++ b/tools/test/sort/regression/Makefile @@ -1,4 +1,3 @@ - TESTFILE= test01 test02 test03 test04 test05 test06 test07 test08 \ test09 test10 test11 test12 test13 test14 test15 test16 test17 \ test_nums diff --git a/tools/test/upsdl/Makefile b/tools/test/upsdl/Makefile index 2e58b42c0945..e134d92ea665 100644 --- a/tools/test/upsdl/Makefile +++ b/tools/test/upsdl/Makefile @@ -1,4 +1,3 @@ - PROG= upsdl MAN= diff --git a/tools/test/vm86/Makefile b/tools/test/vm86/Makefile index a275cc638b66..4fd25a7f4ad3 100644 --- a/tools/test/vm86/Makefile +++ b/tools/test/vm86/Makefile @@ -1,4 +1,3 @@ - all: vm86_test vm86_test: vm86_test_asm.s vm86_test.c diff --git a/tools/test/xregs_sig/Makefile b/tools/test/xregs_sig/Makefile index a8817c372840..fe0de78b40a0 100644 --- a/tools/test/xregs_sig/Makefile +++ b/tools/test/xregs_sig/Makefile @@ -1,4 +1,3 @@ - .include PROG= xregs_sig diff --git a/tools/tools/aac/Makefile b/tools/tools/aac/Makefile index b55c90e832ba..2967029e7925 100644 --- a/tools/tools/aac/Makefile +++ b/tools/tools/aac/Makefile @@ -1,4 +1,3 @@ - PROG= aac_checkq MAN= BINDIR?=/usr/local/bin diff --git a/tools/tools/ansify/Makefile b/tools/tools/ansify/Makefile index 9acbb961830f..b1dc9ec037d9 100644 --- a/tools/tools/ansify/Makefile +++ b/tools/tools/ansify/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= ansify.pl BINDIR?= /usr/local/bin diff --git a/tools/tools/ath/Makefile b/tools/tools/ath/Makefile index 33dd5b0fe3ba..dd4526d7ab46 100644 --- a/tools/tools/ath/Makefile +++ b/tools/tools/ath/Makefile @@ -1,4 +1,3 @@ - SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs athalq SUBDIR+= athstats ath_prom_read athradar athaggrstats SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print ath_ee_9300_print diff --git a/tools/tools/ath/Makefile.inc b/tools/tools/ath/Makefile.inc index 19fde77051c5..705d318948b0 100644 --- a/tools/tools/ath/Makefile.inc +++ b/tools/tools/ath/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/ath/arcode/Makefile b/tools/tools/ath/arcode/Makefile index 9073e1dc2c86..1c4aa6558f43 100644 --- a/tools/tools/ath/arcode/Makefile +++ b/tools/tools/ath/arcode/Makefile @@ -1,4 +1,3 @@ - PROG= arcode MAN= diff --git a/tools/tools/ath/ath_ee_9287_print/Makefile b/tools/tools/ath/ath_ee_9287_print/Makefile index 200dbba6052f..7948141c0e00 100644 --- a/tools/tools/ath/ath_ee_9287_print/Makefile +++ b/tools/tools/ath/ath_ee_9287_print/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= ath_ee_9287_print diff --git a/tools/tools/ath/ath_ee_9300_print/Makefile b/tools/tools/ath/ath_ee_9300_print/Makefile index 3df47a96efa8..c57f7e8c83bf 100644 --- a/tools/tools/ath/ath_ee_9300_print/Makefile +++ b/tools/tools/ath/ath_ee_9300_print/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= ath_ee_9300_print diff --git a/tools/tools/ath/ath_ee_v14_print/Makefile b/tools/tools/ath/ath_ee_v14_print/Makefile index ebb126388cfc..c85903d423bd 100644 --- a/tools/tools/ath/ath_ee_v14_print/Makefile +++ b/tools/tools/ath/ath_ee_v14_print/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= ath_ee_v14_print diff --git a/tools/tools/ath/ath_ee_v4k_print/Makefile b/tools/tools/ath/ath_ee_v4k_print/Makefile index 2bf0d969b1ca..a75e7fba8786 100644 --- a/tools/tools/ath/ath_ee_v4k_print/Makefile +++ b/tools/tools/ath/ath_ee_v4k_print/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= ath_ee_v4k_print diff --git a/tools/tools/ath/ath_prom_read/Makefile b/tools/tools/ath/ath_prom_read/Makefile index bc6fdd7dd246..7338a6b8a220 100644 --- a/tools/tools/ath/ath_prom_read/Makefile +++ b/tools/tools/ath/ath_prom_read/Makefile @@ -1,4 +1,3 @@ - PROG= ath_prom_read .include diff --git a/tools/tools/ath/athaggrstats/Makefile b/tools/tools/ath/athaggrstats/Makefile index a615a3c3f1ec..ea79e5734b29 100644 --- a/tools/tools/ath/athaggrstats/Makefile +++ b/tools/tools/ath/athaggrstats/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= athaggrstats diff --git a/tools/tools/ath/athalq/Makefile b/tools/tools/ath/athalq/Makefile index e8f27327e706..c8bb2f4446e7 100644 --- a/tools/tools/ath/athalq/Makefile +++ b/tools/tools/ath/athalq/Makefile @@ -1,4 +1,3 @@ - PROG= athalq MAN= diff --git a/tools/tools/ath/athani/Makefile b/tools/tools/ath/athani/Makefile index ba233de9aafa..af1325af55f9 100644 --- a/tools/tools/ath/athani/Makefile +++ b/tools/tools/ath/athani/Makefile @@ -1,4 +1,3 @@ - PROG= athani MAN= diff --git a/tools/tools/ath/athdebug/Makefile b/tools/tools/ath/athdebug/Makefile index b50c63891e20..f05e11fc5d0b 100644 --- a/tools/tools/ath/athdebug/Makefile +++ b/tools/tools/ath/athdebug/Makefile @@ -1,4 +1,3 @@ - PROG= athdebug .include <../Makefile.inc> diff --git a/tools/tools/ath/athkey/Makefile b/tools/tools/ath/athkey/Makefile index ef129fa5ecf8..f03223cfc437 100644 --- a/tools/tools/ath/athkey/Makefile +++ b/tools/tools/ath/athkey/Makefile @@ -1,4 +1,3 @@ - PROG= athkey SRCS= athkey.c diff --git a/tools/tools/ath/athpoke/Makefile b/tools/tools/ath/athpoke/Makefile index aede5d191135..e82c3f81fcc8 100644 --- a/tools/tools/ath/athpoke/Makefile +++ b/tools/tools/ath/athpoke/Makefile @@ -1,4 +1,3 @@ - PROG= athpoke LINKS= ${BINDIR}/${PROG} ${BINDIR}/athpeek diff --git a/tools/tools/ath/athpow/Makefile b/tools/tools/ath/athpow/Makefile index 6ed6f9d455f4..cfa6c8d5a3df 100644 --- a/tools/tools/ath/athpow/Makefile +++ b/tools/tools/ath/athpow/Makefile @@ -1,4 +1,3 @@ - PROG= athpow .include <../Makefile.inc> diff --git a/tools/tools/ath/athprom/Makefile b/tools/tools/ath/athprom/Makefile index 6af0225d5f3c..dc273a35a79a 100644 --- a/tools/tools/ath/athprom/Makefile +++ b/tools/tools/ath/athprom/Makefile @@ -1,4 +1,3 @@ - PROG= athprom .include <../Makefile.inc> diff --git a/tools/tools/ath/athradar/Makefile b/tools/tools/ath/athradar/Makefile index 0b1604a0239a..542a1401e13a 100644 --- a/tools/tools/ath/athradar/Makefile +++ b/tools/tools/ath/athradar/Makefile @@ -1,4 +1,3 @@ - PROG= athradar .include <../Makefile.inc> diff --git a/tools/tools/ath/athratestats/Makefile b/tools/tools/ath/athratestats/Makefile index 96a49433a698..cd2eb507326b 100644 --- a/tools/tools/ath/athratestats/Makefile +++ b/tools/tools/ath/athratestats/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal .PATH: ${.CURDIR}/../../../../sys/dev/ath/ diff --git a/tools/tools/ath/athrd/Makefile b/tools/tools/ath/athrd/Makefile index eb8d42c84028..07e48492dfc2 100644 --- a/tools/tools/ath/athrd/Makefile +++ b/tools/tools/ath/athrd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR}/../../../../sys/dev/ath/ath_hal PROG= athrd diff --git a/tools/tools/ath/athregs/Makefile b/tools/tools/ath/athregs/Makefile index 8248b193f36e..3bc6d38a5945 100644 --- a/tools/tools/ath/athregs/Makefile +++ b/tools/tools/ath/athregs/Makefile @@ -1,4 +1,3 @@ - PROG= athregs CFLAGS+= -I${.CURDIR}/../common/ diff --git a/tools/tools/ath/athspectral/Makefile b/tools/tools/ath/athspectral/Makefile index 0311d4a673f5..ef683994335b 100644 --- a/tools/tools/ath/athspectral/Makefile +++ b/tools/tools/ath/athspectral/Makefile @@ -1,4 +1,3 @@ - PROG= athspectral .include <../Makefile.inc> diff --git a/tools/tools/ath/athstats/Makefile b/tools/tools/ath/athstats/Makefile index 0c2b74967b9f..0c90fe355793 100644 --- a/tools/tools/ath/athstats/Makefile +++ b/tools/tools/ath/athstats/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/tools/tools/ath/athsurvey/Makefile b/tools/tools/ath/athsurvey/Makefile index 125fa6a839e2..68fd0881fd65 100644 --- a/tools/tools/ath/athsurvey/Makefile +++ b/tools/tools/ath/athsurvey/Makefile @@ -1,4 +1,3 @@ - PROG= athsurvey .include <../Makefile.inc> diff --git a/tools/tools/bootparttest/Makefile b/tools/tools/bootparttest/Makefile index dcf5cddfd84b..296a178bda3f 100644 --- a/tools/tools/bootparttest/Makefile +++ b/tools/tools/bootparttest/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/stand/common BINDIR?= /usr/bin diff --git a/tools/tools/cfi/Makefile b/tools/tools/cfi/Makefile index 967a5850ccfd..5c6f5eee36e3 100644 --- a/tools/tools/cfi/Makefile +++ b/tools/tools/cfi/Makefile @@ -1,4 +1,3 @@ - PROG= cfi BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/cxgbtool/Makefile b/tools/tools/cxgbtool/Makefile index ce21555fedcf..b8f8348cc708 100644 --- a/tools/tools/cxgbtool/Makefile +++ b/tools/tools/cxgbtool/Makefile @@ -1,4 +1,3 @@ - PROG= cxgbtool SRCS= cxgbtool.c MAN= diff --git a/tools/tools/decioctl/Makefile b/tools/tools/decioctl/Makefile index ffbc4b49f736..0b54c9c6d792 100644 --- a/tools/tools/decioctl/Makefile +++ b/tools/tools/decioctl/Makefile @@ -1,4 +1,3 @@ - PROG= decioctl SRCS= decioctl.c MAN= diff --git a/tools/tools/dmardump/Makefile b/tools/tools/dmardump/Makefile index 2181072927b7..9ef73583bcbe 100644 --- a/tools/tools/dmardump/Makefile +++ b/tools/tools/dmardump/Makefile @@ -1,4 +1,3 @@ - PROG= dmardump SRCS= dmardump.c MAN= diff --git a/tools/tools/drm/radeon/mkregtable/Makefile b/tools/tools/drm/radeon/mkregtable/Makefile index 0d346eb6eb2e..e6fadef710a9 100644 --- a/tools/tools/drm/radeon/mkregtable/Makefile +++ b/tools/tools/drm/radeon/mkregtable/Makefile @@ -1,4 +1,3 @@ - all: regtables PROG= mkregtable diff --git a/tools/tools/find-sb/Makefile b/tools/tools/find-sb/Makefile index 413ac2a3c1cb..0642ccf2d945 100644 --- a/tools/tools/find-sb/Makefile +++ b/tools/tools/find-sb/Makefile @@ -1,4 +1,3 @@ - PROG= find-sb MAN= diff --git a/tools/tools/fixwhite/Makefile b/tools/tools/fixwhite/Makefile index f8932cfb77de..299bf4704717 100644 --- a/tools/tools/fixwhite/Makefile +++ b/tools/tools/fixwhite/Makefile @@ -1,4 +1,3 @@ - PROG= fixwhite BINDIR= /usr/bin diff --git a/tools/tools/genericize/Makefile b/tools/tools/genericize/Makefile index 25fe89a51668..15374b3558a6 100644 --- a/tools/tools/genericize/Makefile +++ b/tools/tools/genericize/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= genericize.pl BINDIR?= /usr/local/bin diff --git a/tools/tools/hcomp/Makefile b/tools/tools/hcomp/Makefile index 6adaa3456bf9..d1d1f640553c 100644 --- a/tools/tools/hcomp/Makefile +++ b/tools/tools/hcomp/Makefile @@ -1,4 +1,3 @@ - BINDIR ?= ${HOME}/bin BINOWN ?= ${USER} BINGRP ?= ${USER} diff --git a/tools/tools/ifinfo/Makefile b/tools/tools/ifinfo/Makefile index 9b0c60733563..3e95a642ca5f 100644 --- a/tools/tools/ifinfo/Makefile +++ b/tools/tools/ifinfo/Makefile @@ -1,4 +1,3 @@ - PROG= ifinfo SRCS= ifinfo.c rfc1650.c MAN= diff --git a/tools/tools/ifpifa/Makefile b/tools/tools/ifpifa/Makefile index b822022defd2..b5aa64fe8b76 100644 --- a/tools/tools/ifpifa/Makefile +++ b/tools/tools/ifpifa/Makefile @@ -1,4 +1,3 @@ - PROG= ifpifa MAN= BINDIR?=/usr/local/bin diff --git a/tools/tools/intel-ucode-split/Makefile b/tools/tools/intel-ucode-split/Makefile index 61a61d79445e..52d355050955 100644 --- a/tools/tools/intel-ucode-split/Makefile +++ b/tools/tools/intel-ucode-split/Makefile @@ -1,4 +1,3 @@ - PROG= intel-ucode-split MAN= diff --git a/tools/tools/ioat/Makefile b/tools/tools/ioat/Makefile index 50601d250de5..7822cb5b0e93 100644 --- a/tools/tools/ioat/Makefile +++ b/tools/tools/ioat/Makefile @@ -1,4 +1,3 @@ - PROG= ioatcontrol MAN= ioatcontrol.8 BINDIR?= /usr/bin diff --git a/tools/tools/ipw/Makefile b/tools/tools/ipw/Makefile index f10ec3a03e35..cb8fcaf9fa81 100644 --- a/tools/tools/ipw/Makefile +++ b/tools/tools/ipw/Makefile @@ -1,4 +1,3 @@ - PROG= ipwstats MAN= diff --git a/tools/tools/iwi/Makefile b/tools/tools/iwi/Makefile index 42a72a901ada..0e3c3c78fe08 100644 --- a/tools/tools/iwi/Makefile +++ b/tools/tools/iwi/Makefile @@ -1,4 +1,3 @@ - PROG= iwistats MAN= diff --git a/tools/tools/iwn/Makefile b/tools/tools/iwn/Makefile index 948299d6c434..34ec4aa669ef 100644 --- a/tools/tools/iwn/Makefile +++ b/tools/tools/iwn/Makefile @@ -1,4 +1,3 @@ - SUBDIR= iwnstats .include diff --git a/tools/tools/iwn/iwnstats/Makefile b/tools/tools/iwn/iwnstats/Makefile index ccf1617c64b2..c5cf15a2bce4 100644 --- a/tools/tools/iwn/iwnstats/Makefile +++ b/tools/tools/iwn/iwnstats/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/tools/tools/kttcp/Makefile b/tools/tools/kttcp/Makefile index fe332e3c048f..cfa275f5d5ef 100644 --- a/tools/tools/kttcp/Makefile +++ b/tools/tools/kttcp/Makefile @@ -1,4 +1,3 @@ - SHELL= /bin/sh PROG= kttcp diff --git a/tools/tools/kttcp/sys/Makefile b/tools/tools/kttcp/sys/Makefile index 851921a54e93..c8f468418892 100644 --- a/tools/tools/kttcp/sys/Makefile +++ b/tools/tools/kttcp/sys/Makefile @@ -1,4 +1,3 @@ - KMOD = kttcp SRCS = kttcp.c SRCS += device_if.h diff --git a/tools/tools/makeroot/Makefile b/tools/tools/makeroot/Makefile index 218d77cf5211..fffe06d26f75 100644 --- a/tools/tools/makeroot/Makefile +++ b/tools/tools/makeroot/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= makeroot.sh MAN= makeroot.8 diff --git a/tools/tools/mcgrab/Makefile b/tools/tools/mcgrab/Makefile index 460c8beded1e..61eca34b4d56 100644 --- a/tools/tools/mcgrab/Makefile +++ b/tools/tools/mcgrab/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= mcgrab CFLAGS+= -I${.CURDIR}/../mctest diff --git a/tools/tools/mctest/Makefile b/tools/tools/mctest/Makefile index 6ffc0bedbfc9..0616e599ecfb 100644 --- a/tools/tools/mctest/Makefile +++ b/tools/tools/mctest/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= mctest LIBADD= pthread diff --git a/tools/tools/mfi/Makefile b/tools/tools/mfi/Makefile index 84e11395e766..bfae20586df5 100644 --- a/tools/tools/mfi/Makefile +++ b/tools/tools/mfi/Makefile @@ -1,4 +1,3 @@ - PROG= mfi_checkq MAN= BINDIR?=/usr/local/bin diff --git a/tools/tools/mwl/Makefile b/tools/tools/mwl/Makefile index f3a00af70d81..fc0f22878718 100644 --- a/tools/tools/mwl/Makefile +++ b/tools/tools/mwl/Makefile @@ -1,4 +1,3 @@ - SUBDIR= mwlstats mwldebug .include diff --git a/tools/tools/mwl/mwldebug/Makefile b/tools/tools/mwl/mwldebug/Makefile index cbbfdeb73617..8ec0d0cf5a69 100644 --- a/tools/tools/mwl/mwldebug/Makefile +++ b/tools/tools/mwl/mwldebug/Makefile @@ -1,4 +1,3 @@ - PROG= mwldebug BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/mwl/mwlstats/Makefile b/tools/tools/mwl/mwlstats/Makefile index af1833f9ea11..74d8c7df80be 100644 --- a/tools/tools/mwl/mwlstats/Makefile +++ b/tools/tools/mwl/mwlstats/Makefile @@ -1,4 +1,3 @@ - PROG= mwlstats BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/ncpus/Makefile b/tools/tools/ncpus/Makefile index 1b77b68b4eda..a6f740d8c611 100644 --- a/tools/tools/ncpus/Makefile +++ b/tools/tools/ncpus/Makefile @@ -1,4 +1,3 @@ - PROG= ncpus MAN= SRCS= ncpus.c acpi.c diff --git a/tools/tools/net80211/Makefile b/tools/tools/net80211/Makefile index 216d3bfa2d86..b4b32899cd26 100644 --- a/tools/tools/net80211/Makefile +++ b/tools/tools/net80211/Makefile @@ -1,4 +1,3 @@ - SUBDIR= stumbler w00t wesside wlaninject wlanstats wlantxtime wlanwatch wlanwds .include diff --git a/tools/tools/net80211/stumbler/Makefile b/tools/tools/net80211/stumbler/Makefile index ad553e006d2d..b8d5da3340b2 100644 --- a/tools/tools/net80211/stumbler/Makefile +++ b/tools/tools/net80211/stumbler/Makefile @@ -1,4 +1,3 @@ - PROG= stumbler BINDIR= /usr/local/bin LIBADD= pcap tinfow ncursesw diff --git a/tools/tools/net80211/w00t/Makefile b/tools/tools/net80211/w00t/Makefile index 04a165de9bc5..8cc9184a005a 100644 --- a/tools/tools/net80211/w00t/Makefile +++ b/tools/tools/net80211/w00t/Makefile @@ -1,4 +1,3 @@ - SUBDIR= libw00t ap assoc expand prga redir .include diff --git a/tools/tools/net80211/w00t/Makefile.inc b/tools/tools/net80211/w00t/Makefile.inc index d5596cc580bf..69c06542d367 100644 --- a/tools/tools/net80211/w00t/Makefile.inc +++ b/tools/tools/net80211/w00t/Makefile.inc @@ -1,4 +1,3 @@ - W00T= ../libw00t # NB: we get crc32 from -lz DPADD= ${W00T}/libw00t.a diff --git a/tools/tools/net80211/w00t/ap/Makefile b/tools/tools/net80211/w00t/ap/Makefile index 178470c5ca2f..f561227d5d19 100644 --- a/tools/tools/net80211/w00t/ap/Makefile +++ b/tools/tools/net80211/w00t/ap/Makefile @@ -1,4 +1,3 @@ - .include <../Makefile.inc> PROG= ap diff --git a/tools/tools/net80211/w00t/assoc/Makefile b/tools/tools/net80211/w00t/assoc/Makefile index d5ed3ebae4c9..623efd4a8565 100644 --- a/tools/tools/net80211/w00t/assoc/Makefile +++ b/tools/tools/net80211/w00t/assoc/Makefile @@ -1,4 +1,3 @@ - .include <../Makefile.inc> PROG= assoc diff --git a/tools/tools/net80211/w00t/expand/Makefile b/tools/tools/net80211/w00t/expand/Makefile index d413af5fdb2a..3dadccf97b8b 100644 --- a/tools/tools/net80211/w00t/expand/Makefile +++ b/tools/tools/net80211/w00t/expand/Makefile @@ -1,4 +1,3 @@ - .include <../Makefile.inc> PROG= expand diff --git a/tools/tools/net80211/w00t/libw00t/Makefile b/tools/tools/net80211/w00t/libw00t/Makefile index 2146da5a9e33..190cc4fd8741 100644 --- a/tools/tools/net80211/w00t/libw00t/Makefile +++ b/tools/tools/net80211/w00t/libw00t/Makefile @@ -1,4 +1,3 @@ - LIB= w00t SRCS= w00t.c INTERNALLIB= true diff --git a/tools/tools/net80211/w00t/prga/Makefile b/tools/tools/net80211/w00t/prga/Makefile index 9d4a2395c2dd..a95727443d2d 100644 --- a/tools/tools/net80211/w00t/prga/Makefile +++ b/tools/tools/net80211/w00t/prga/Makefile @@ -1,4 +1,3 @@ - .include <../Makefile.inc> PROG= prga diff --git a/tools/tools/net80211/w00t/redir/Makefile b/tools/tools/net80211/w00t/redir/Makefile index 0bc0729de5a4..d9a22f0110ed 100644 --- a/tools/tools/net80211/w00t/redir/Makefile +++ b/tools/tools/net80211/w00t/redir/Makefile @@ -1,4 +1,3 @@ - .include <../Makefile.inc> PROG= redir diff --git a/tools/tools/net80211/wesside/Makefile b/tools/tools/net80211/wesside/Makefile index 8badc634353a..563e8b0f1c59 100644 --- a/tools/tools/net80211/wesside/Makefile +++ b/tools/tools/net80211/wesside/Makefile @@ -1,4 +1,3 @@ - SUBDIR= dics udps wesside .include diff --git a/tools/tools/net80211/wesside/dics/Makefile b/tools/tools/net80211/wesside/dics/Makefile index ec94e0dc9889..f5411a28d9ef 100644 --- a/tools/tools/net80211/wesside/dics/Makefile +++ b/tools/tools/net80211/wesside/dics/Makefile @@ -1,4 +1,3 @@ - PROG= dics BINDIR= /usr/local/bin LIBADD= z diff --git a/tools/tools/net80211/wesside/udps/Makefile b/tools/tools/net80211/wesside/udps/Makefile index 40177a533c2e..34b045cb52c3 100644 --- a/tools/tools/net80211/wesside/udps/Makefile +++ b/tools/tools/net80211/wesside/udps/Makefile @@ -1,4 +1,3 @@ - PROG= udps BINDIR= /usr/local/bin LIBADD= z diff --git a/tools/tools/net80211/wesside/wesside/Makefile b/tools/tools/net80211/wesside/wesside/Makefile index 0c2bb0f42b23..50a599e848f6 100644 --- a/tools/tools/net80211/wesside/wesside/Makefile +++ b/tools/tools/net80211/wesside/wesside/Makefile @@ -1,4 +1,3 @@ - PROG= wesside BINDIR= /usr/local/bin LIBADD= z diff --git a/tools/tools/net80211/wlaninject/Makefile b/tools/tools/net80211/wlaninject/Makefile index c072ef10e3b8..5923248ad2eb 100644 --- a/tools/tools/net80211/wlaninject/Makefile +++ b/tools/tools/net80211/wlaninject/Makefile @@ -1,4 +1,3 @@ - PROG= wlaninject BINDIR= /usr/local/bin CFLAGS=-g diff --git a/tools/tools/net80211/wlanstats/Makefile b/tools/tools/net80211/wlanstats/Makefile index dec8e84e1255..f3b6f718d44e 100644 --- a/tools/tools/net80211/wlanstats/Makefile +++ b/tools/tools/net80211/wlanstats/Makefile @@ -1,4 +1,3 @@ - .include PROG= wlanstats diff --git a/tools/tools/net80211/wlantxtime/Makefile b/tools/tools/net80211/wlantxtime/Makefile index 4948d818f466..b133375f5a4d 100644 --- a/tools/tools/net80211/wlantxtime/Makefile +++ b/tools/tools/net80211/wlantxtime/Makefile @@ -1,4 +1,3 @@ - PROG= wlantxtime BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/net80211/wlanwatch/Makefile b/tools/tools/net80211/wlanwatch/Makefile index 28a13096f450..0cace0f00bc7 100644 --- a/tools/tools/net80211/wlanwatch/Makefile +++ b/tools/tools/net80211/wlanwatch/Makefile @@ -1,4 +1,3 @@ - PROG= wlanwatch BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/net80211/wlanwds/Makefile b/tools/tools/net80211/wlanwds/Makefile index 0a2ab16381c7..1e993cc07c21 100644 --- a/tools/tools/net80211/wlanwds/Makefile +++ b/tools/tools/net80211/wlanwds/Makefile @@ -1,4 +1,3 @@ - PROG= wlanwds BINDIR= /usr/local/bin MAN= diff --git a/tools/tools/netrate/Makefile.inc b/tools/tools/netrate/Makefile.inc index 59704fbd89de..cf63a151e331 100644 --- a/tools/tools/netrate/Makefile.inc +++ b/tools/tools/netrate/Makefile.inc @@ -1,3 +1,2 @@ - WARNS?= 5 WFORMAT?= 2 diff --git a/tools/tools/netrate/http/Makefile b/tools/tools/netrate/http/Makefile index cfdea3e09753..588199f2ae62 100644 --- a/tools/tools/netrate/http/Makefile +++ b/tools/tools/netrate/http/Makefile @@ -1,4 +1,3 @@ - PROG= http MAN= LIBADD= pthread diff --git a/tools/tools/netrate/httpd/Makefile b/tools/tools/netrate/httpd/Makefile index 5282df918de6..18bd38009e4c 100644 --- a/tools/tools/netrate/httpd/Makefile +++ b/tools/tools/netrate/httpd/Makefile @@ -1,4 +1,3 @@ - PROG= httpd MAN= WARNS?= 3 diff --git a/tools/tools/netrate/juggle/Makefile b/tools/tools/netrate/juggle/Makefile index 7b624d7e4e74..15665e63e2ef 100644 --- a/tools/tools/netrate/juggle/Makefile +++ b/tools/tools/netrate/juggle/Makefile @@ -1,4 +1,3 @@ - PROG= juggle MAN= WARNS?= 3 diff --git a/tools/tools/netrate/tcpconnect/Makefile b/tools/tools/netrate/tcpconnect/Makefile index 3686c823d89c..a038ba496b86 100644 --- a/tools/tools/netrate/tcpconnect/Makefile +++ b/tools/tools/netrate/tcpconnect/Makefile @@ -1,4 +1,3 @@ - PROG= tcpconnect MAN= WARNS?= 3 diff --git a/tools/tools/netrate/tcpp/Makefile b/tools/tools/netrate/tcpp/Makefile index 79ee56b8f7cf..a25d418f2649 100644 --- a/tools/tools/netrate/tcpp/Makefile +++ b/tools/tools/netrate/tcpp/Makefile @@ -1,4 +1,3 @@ - PROG= tcpp INCS= tcpp.h MAN= diff --git a/tools/tools/netrate/tcpreceive/Makefile b/tools/tools/netrate/tcpreceive/Makefile index 1564bd5a41ec..1d02a57656a0 100644 --- a/tools/tools/netrate/tcpreceive/Makefile +++ b/tools/tools/netrate/tcpreceive/Makefile @@ -1,4 +1,3 @@ - PROG= tcpreceive MAN= WARNS?= 3 diff --git a/tools/tools/notescheck/Makefile b/tools/tools/notescheck/Makefile index c86b2ee41bc1..493068e67eef 100644 --- a/tools/tools/notescheck/Makefile +++ b/tools/tools/notescheck/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= notescheck.py .include diff --git a/tools/tools/npe/Makefile b/tools/tools/npe/Makefile index 67634bf343f6..e89e95afe4ad 100644 --- a/tools/tools/npe/Makefile +++ b/tools/tools/npe/Makefile @@ -1,4 +1,3 @@ - SUBDIR= npestats .include diff --git a/tools/tools/npe/npestats/Makefile b/tools/tools/npe/npestats/Makefile index 3c1cca48f903..3fa9dd50c555 100644 --- a/tools/tools/npe/npestats/Makefile +++ b/tools/tools/npe/npestats/Makefile @@ -1,4 +1,3 @@ - PROG= npestats SRCS= main.c npestats.c BINDIR= /usr/local/bin diff --git a/tools/tools/pirtool/Makefile b/tools/tools/pirtool/Makefile index df60b2d9ce8c..e291511839c6 100644 --- a/tools/tools/pirtool/Makefile +++ b/tools/tools/pirtool/Makefile @@ -1,4 +1,3 @@ - PROG= pirtool SRCS= pirtool.c MAN= diff --git a/tools/tools/shlib-compat/Makefile.sysfake b/tools/tools/shlib-compat/Makefile.sysfake index 9ef5a3a752da..34a790be3f8c 100644 --- a/tools/tools/shlib-compat/Makefile.sysfake +++ b/tools/tools/shlib-compat/Makefile.sysfake @@ -1,4 +1,3 @@ - SRCS+= sysfake.c CLEANFILES+= sysfake.c diff --git a/tools/tools/shlib-compat/test/Makefile b/tools/tools/shlib-compat/test/Makefile index 6af16f2f9e61..e28b6ee2ad7e 100644 --- a/tools/tools/shlib-compat/test/Makefile +++ b/tools/tools/shlib-compat/test/Makefile @@ -1,4 +1,3 @@ - SUBDIR= libtest1 \ libtest2 \ libtest3 \ diff --git a/tools/tools/shlib-compat/test/Makefile.inc b/tools/tools/shlib-compat/test/Makefile.inc index 6417cdc826fb..dc0bf23f863f 100644 --- a/tools/tools/shlib-compat/test/Makefile.inc +++ b/tools/tools/shlib-compat/test/Makefile.inc @@ -1,4 +1,3 @@ - LIB= test${TESTNUM} SHLIB_MAJOR= 0 diff --git a/tools/tools/shlib-compat/test/libtest1/Makefile b/tools/tools/shlib-compat/test/libtest1/Makefile index 36b4e7024397..cbbb9d30d960 100644 --- a/tools/tools/shlib-compat/test/libtest1/Makefile +++ b/tools/tools/shlib-compat/test/libtest1/Makefile @@ -1,4 +1,3 @@ - TESTNUM= 1 .include <../Makefile.inc> diff --git a/tools/tools/shlib-compat/test/libtest2/Makefile b/tools/tools/shlib-compat/test/libtest2/Makefile index a205258710a0..fe2b7b22b111 100644 --- a/tools/tools/shlib-compat/test/libtest2/Makefile +++ b/tools/tools/shlib-compat/test/libtest2/Makefile @@ -1,4 +1,3 @@ - TESTNUM= 2 .include <../Makefile.inc> diff --git a/tools/tools/shlib-compat/test/libtest3/Makefile b/tools/tools/shlib-compat/test/libtest3/Makefile index 232da97d2555..d5942c588a15 100644 --- a/tools/tools/shlib-compat/test/libtest3/Makefile +++ b/tools/tools/shlib-compat/test/libtest3/Makefile @@ -1,4 +1,3 @@ - TESTNUM= 3 .include <../Makefile.inc> diff --git a/tools/tools/shlib-compat/test/libtestsys/Makefile b/tools/tools/shlib-compat/test/libtestsys/Makefile index 8bf88e27430d..631fb8178175 100644 --- a/tools/tools/shlib-compat/test/libtestsys/Makefile +++ b/tools/tools/shlib-compat/test/libtestsys/Makefile @@ -1,4 +1,3 @@ - TESTNUM= sys CLEANFILES+= test.c diff --git a/tools/tools/sortbench/Makefile b/tools/tools/sortbench/Makefile index a3a6dc410af1..33d3b73442e8 100644 --- a/tools/tools/sortbench/Makefile +++ b/tools/tools/sortbench/Makefile @@ -1,4 +1,3 @@ - PROG= sort_bench MAN= diff --git a/tools/tools/switch_tls/Makefile b/tools/tools/switch_tls/Makefile index 796b9c5c9c3f..00bb882cc600 100644 --- a/tools/tools/switch_tls/Makefile +++ b/tools/tools/switch_tls/Makefile @@ -1,4 +1,3 @@ - PROG= switch_tls MAN= diff --git a/tools/tools/sysdoc/Makefile b/tools/tools/sysdoc/Makefile index 2dec25afb9a2..e00cdad8ea52 100644 --- a/tools/tools/sysdoc/Makefile +++ b/tools/tools/sysdoc/Makefile @@ -1,4 +1,3 @@ - sysctl.5: sh ${.CURDIR}/sysdoc.sh -k /boot/kernel diff --git a/tools/tools/tionxcl/Makefile b/tools/tools/tionxcl/Makefile index 0bb9f733d227..a7987d9e6df6 100644 --- a/tools/tools/tionxcl/Makefile +++ b/tools/tools/tionxcl/Makefile @@ -1,4 +1,3 @@ - PROG= tionxcl MAN= diff --git a/tools/tools/track/Makefile b/tools/tools/track/Makefile index c494c7375a49..c5acc6e28036 100644 --- a/tools/tools/track/Makefile +++ b/tools/tools/track/Makefile @@ -1,4 +1,3 @@ - PREFIX?= /usr/local BINDIR?= ${PREFIX}/bin SCRIPTS= track.sh diff --git a/tools/tools/tscdrift/Makefile b/tools/tools/tscdrift/Makefile index 190bb4ecee3d..28d9493643f9 100644 --- a/tools/tools/tscdrift/Makefile +++ b/tools/tools/tscdrift/Makefile @@ -1,4 +1,3 @@ - PROG= tscdrift MAN= diff --git a/tools/tools/umastat/Makefile b/tools/tools/umastat/Makefile index 97ac4cdb32ce..29c128b6a868 100644 --- a/tools/tools/umastat/Makefile +++ b/tools/tools/umastat/Makefile @@ -1,4 +1,3 @@ - PROG= umastat MAN= WARNS?= 3 diff --git a/tools/tools/vimage/Makefile b/tools/tools/vimage/Makefile index a52562abfd60..0536413b26f0 100644 --- a/tools/tools/vimage/Makefile +++ b/tools/tools/vimage/Makefile @@ -1,4 +1,3 @@ - PROG= vimage LIBADD= jail diff --git a/tools/tools/vt/mkkfont/Makefile b/tools/tools/vt/mkkfont/Makefile index 3044eff66c36..f9758be0ef15 100644 --- a/tools/tools/vt/mkkfont/Makefile +++ b/tools/tools/vt/mkkfont/Makefile @@ -1,4 +1,3 @@ - PROG= mkkfont MAN1= diff --git a/tools/tools/whereintheworld/Makefile b/tools/tools/whereintheworld/Makefile index 374a2196df11..96e3d7eabe37 100644 --- a/tools/tools/whereintheworld/Makefile +++ b/tools/tools/whereintheworld/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= whereintheworld.pl .include diff --git a/tools/tools/wtap/Makefile b/tools/tools/wtap/Makefile index e34cb2e325a1..24768af795e1 100644 --- a/tools/tools/wtap/Makefile +++ b/tools/tools/wtap/Makefile @@ -1,4 +1,3 @@ - SUBDIR= wtap vis_map .include diff --git a/tools/tools/wtap/vis_map/Makefile b/tools/tools/wtap/vis_map/Makefile index 41c1c643754b..4510ccc6ae76 100644 --- a/tools/tools/wtap/vis_map/Makefile +++ b/tools/tools/wtap/vis_map/Makefile @@ -1,4 +1,3 @@ - BINDIR?= /usr/local/bin/ PROG= vis_map SRC= vis_map.c diff --git a/tools/tools/wtap/wtap/Makefile b/tools/tools/wtap/wtap/Makefile index 9cc83c77d04d..9d66f6d64368 100644 --- a/tools/tools/wtap/wtap/Makefile +++ b/tools/tools/wtap/wtap/Makefile @@ -1,4 +1,3 @@ - BINDIR?= /usr/local/bin PROG= wtap SRC= wtap.c diff --git a/tools/tools/zfsboottest/Makefile b/tools/tools/zfsboottest/Makefile index cc8f0ab78606..458e39aab6c7 100644 --- a/tools/tools/zfsboottest/Makefile +++ b/tools/tools/zfsboottest/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/stand/zfs ${SRCTOP}/sys/cddl/boot/zfs BINDIR?= /usr/bin diff --git a/usr.bin/Makefile b/usr.bin/Makefile index a9d5c1563797..039dd8ed2f87 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= alias \ diff --git a/usr.bin/Makefile.amd64 b/usr.bin/Makefile.amd64 index cf4d9c94d058..8763d7fe0f2c 100644 --- a/usr.bin/Makefile.amd64 +++ b/usr.bin/Makefile.amd64 @@ -1,2 +1 @@ - SUBDIR+= smbutil diff --git a/usr.bin/Makefile.arm b/usr.bin/Makefile.arm index 8b137891791f..e69de29bb2d1 100644 --- a/usr.bin/Makefile.arm +++ b/usr.bin/Makefile.arm @@ -1 +0,0 @@ - diff --git a/usr.bin/Makefile.i386 b/usr.bin/Makefile.i386 index cf4d9c94d058..8763d7fe0f2c 100644 --- a/usr.bin/Makefile.i386 +++ b/usr.bin/Makefile.i386 @@ -1,2 +1 @@ - SUBDIR+= smbutil diff --git a/usr.bin/Makefile.inc b/usr.bin/Makefile.inc index ff74a2dff9c3..c24c4b1a950f 100644 --- a/usr.bin/Makefile.inc +++ b/usr.bin/Makefile.inc @@ -1,2 +1 @@ - BINDIR?= /usr/bin diff --git a/usr.bin/Makefile.powerpc b/usr.bin/Makefile.powerpc index cf4d9c94d058..8763d7fe0f2c 100644 --- a/usr.bin/Makefile.powerpc +++ b/usr.bin/Makefile.powerpc @@ -1,2 +1 @@ - SUBDIR+= smbutil diff --git a/usr.bin/addr2line/Makefile b/usr.bin/addr2line/Makefile index 1451823b1f88..652282152269 100644 --- a/usr.bin/addr2line/Makefile +++ b/usr.bin/addr2line/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/alias/Makefile b/usr.bin/alias/Makefile index 01fa422fdd27..1098c7b7ef1f 100644 --- a/usr.bin/alias/Makefile +++ b/usr.bin/alias/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=generic.sh SCRIPTSNAME=alias diff --git a/usr.bin/apply/Makefile b/usr.bin/apply/Makefile index 50c224496ef7..86852d41d279 100644 --- a/usr.bin/apply/Makefile +++ b/usr.bin/apply/Makefile @@ -1,4 +1,3 @@ - .include PROG= apply diff --git a/usr.bin/apply/tests/Makefile b/usr.bin/apply/tests/Makefile index 0a15f37c4efb..249b76b63fce 100644 --- a/usr.bin/apply/tests/Makefile +++ b/usr.bin/apply/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/ar/Makefile b/usr.bin/ar/Makefile index 43ef14a2884f..b926e942795e 100644 --- a/usr.bin/ar/Makefile +++ b/usr.bin/ar/Makefile @@ -1,4 +1,3 @@ - .include PROG= ar diff --git a/usr.bin/at/Makefile b/usr.bin/at/Makefile index 23e8e3c1da76..daf93c472982 100644 --- a/usr.bin/at/Makefile +++ b/usr.bin/at/Makefile @@ -1,4 +1,3 @@ - .include "${.CURDIR}/Makefile.inc" CONFS= atrun diff --git a/usr.bin/at/Makefile.inc b/usr.bin/at/Makefile.inc index f7ca73a98230..903b7a9c9997 100644 --- a/usr.bin/at/Makefile.inc +++ b/usr.bin/at/Makefile.inc @@ -1,4 +1,3 @@ - LOCKFILE = .lockfile ATSPOOL_DIR=/var/at/spool ATJOB_DIR=/var/at/jobs diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile index 199c05de5206..c9d61e594146 100644 --- a/usr.bin/awk/Makefile +++ b/usr.bin/awk/Makefile @@ -1,4 +1,3 @@ - .include AWKSRC= ${SRCTOP}/contrib/one-true-awk diff --git a/usr.bin/awk/tests/Makefile b/usr.bin/awk/tests/Makefile index 5493aa743e1f..f9196563341a 100644 --- a/usr.bin/awk/tests/Makefile +++ b/usr.bin/awk/tests/Makefile @@ -1,4 +1,3 @@ - .include TESTS_SUBDIRS+= bugs-fixed diff --git a/usr.bin/awk/tests/bugs-fixed/Makefile b/usr.bin/awk/tests/bugs-fixed/Makefile index 190066426e62..626069647624 100644 --- a/usr.bin/awk/tests/bugs-fixed/Makefile +++ b/usr.bin/awk/tests/bugs-fixed/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/awk/${.CURDIR:T} diff --git a/usr.bin/awk/tests/netbsd/Makefile b/usr.bin/awk/tests/netbsd/Makefile index a21305128857..5357b99dd972 100644 --- a/usr.bin/awk/tests/netbsd/Makefile +++ b/usr.bin/awk/tests/netbsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/awk/${.CURDIR:T} diff --git a/usr.bin/backlight/Makefile b/usr.bin/backlight/Makefile index 218d2189de79..f1b310bb1e77 100644 --- a/usr.bin/backlight/Makefile +++ b/usr.bin/backlight/Makefile @@ -1,4 +1,3 @@ - PROG= backlight MAN= backlight.8 diff --git a/usr.bin/banner/Makefile b/usr.bin/banner/Makefile index cd51944e825b..f3af9a652f56 100644 --- a/usr.bin/banner/Makefile +++ b/usr.bin/banner/Makefile @@ -1,4 +1,3 @@ - PROG= banner MAN= banner.6 diff --git a/usr.bin/basename/Makefile b/usr.bin/basename/Makefile index f1a729df2ddc..fb590532152a 100644 --- a/usr.bin/basename/Makefile +++ b/usr.bin/basename/Makefile @@ -1,4 +1,3 @@ - .include PROG= basename diff --git a/usr.bin/basename/tests/Makefile b/usr.bin/basename/tests/Makefile index 3bdacfad80a1..a2cd60c6d0ce 100644 --- a/usr.bin/basename/tests/Makefile +++ b/usr.bin/basename/tests/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_SH= basename_test .include diff --git a/usr.bin/beep/Makefile b/usr.bin/beep/Makefile index 6b60c7191d09..f252ab64f843 100644 --- a/usr.bin/beep/Makefile +++ b/usr.bin/beep/Makefile @@ -1,4 +1,3 @@ - PROG= beep MAN= beep.1 diff --git a/usr.bin/biff/Makefile b/usr.bin/biff/Makefile index 9e20c4580fc6..6ba161554ccc 100644 --- a/usr.bin/biff/Makefile +++ b/usr.bin/biff/Makefile @@ -1,4 +1,3 @@ - PROG= biff .include diff --git a/usr.bin/bintrans/Makefile b/usr.bin/bintrans/Makefile index 751e66dab55d..9e5a0000b0a1 100644 --- a/usr.bin/bintrans/Makefile +++ b/usr.bin/bintrans/Makefile @@ -1,4 +1,3 @@ - .include PROG= bintrans diff --git a/usr.bin/bintrans/tests/Makefile b/usr.bin/bintrans/tests/Makefile index 5e3c0457bb28..8aa936c61334 100644 --- a/usr.bin/bintrans/tests/Makefile +++ b/usr.bin/bintrans/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= bintrans_test diff --git a/usr.bin/bluetooth/Makefile.inc b/usr.bin/bluetooth/Makefile.inc index 1a5ecfe73253..de15587ee7cd 100644 --- a/usr.bin/bluetooth/Makefile.inc +++ b/usr.bin/bluetooth/Makefile.inc @@ -1,3 +1,2 @@ - .include "${SRCTOP}/usr.bin/Makefile.inc" diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index d6c21bed76b1..5140bd18bb37 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -1,4 +1,3 @@ - # we do not need this MK_host_egacy= no diff --git a/usr.bin/bmake/tests/Makefile b/usr.bin/bmake/tests/Makefile index 99b4f1302c1e..4dabc8879b4e 100644 --- a/usr.bin/bmake/tests/Makefile +++ b/usr.bin/bmake/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ${PACKAGE}FILES+= common.sh diff --git a/usr.bin/bmake/tests/Makefile.inc b/usr.bin/bmake/tests/Makefile.inc index 9ba2ea555e24..eb3565f76d52 100644 --- a/usr.bin/bmake/tests/Makefile.inc +++ b/usr.bin/bmake/tests/Makefile.inc @@ -1,2 +1 @@ - SUBDIR_PARALLEL= t diff --git a/usr.bin/bmake/tests/archives/Makefile b/usr.bin/bmake/tests/archives/Makefile index 6cbb72811423..01437afa8c3c 100644 --- a/usr.bin/bmake/tests/archives/Makefile +++ b/usr.bin/bmake/tests/archives/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/archives TESTS_SUBDIRS= fmt_44bsd fmt_44bsd_mod fmt_oldbsd diff --git a/usr.bin/bmake/tests/archives/fmt_44bsd/Makefile b/usr.bin/bmake/tests/archives/fmt_44bsd/Makefile index 87a871e48789..7afea8dd044b 100644 --- a/usr.bin/bmake/tests/archives/fmt_44bsd/Makefile +++ b/usr.bin/bmake/tests/archives/fmt_44bsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/archives/fmt_44bsd diff --git a/usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile b/usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile index 2ff5d66b42e3..ec8d7437ae9e 100644 --- a/usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile +++ b/usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/archives/fmt_44bsd_mod diff --git a/usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile b/usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile index b1f4f4fc93f9..f30bfd2ed5d7 100644 --- a/usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile +++ b/usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/archives/fmt_oldbsd diff --git a/usr.bin/bmake/tests/basic/Makefile b/usr.bin/bmake/tests/basic/Makefile index c5d6ae81c153..129ca34c06f9 100644 --- a/usr.bin/bmake/tests/basic/Makefile +++ b/usr.bin/bmake/tests/basic/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/basic TESTS_SUBDIRS= t0 t1 t2 t3 diff --git a/usr.bin/bmake/tests/basic/t0/Makefile b/usr.bin/bmake/tests/basic/t0/Makefile index d4a2e277304e..6f7cf0fec6f5 100644 --- a/usr.bin/bmake/tests/basic/t0/Makefile +++ b/usr.bin/bmake/tests/basic/t0/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/basic/t0 diff --git a/usr.bin/bmake/tests/basic/t1/Makefile b/usr.bin/bmake/tests/basic/t1/Makefile index 250b3ea1bb19..921c35705f2f 100644 --- a/usr.bin/bmake/tests/basic/t1/Makefile +++ b/usr.bin/bmake/tests/basic/t1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/basic/t1 diff --git a/usr.bin/bmake/tests/basic/t2/Makefile b/usr.bin/bmake/tests/basic/t2/Makefile index 22020462dbe9..c75e752580bb 100644 --- a/usr.bin/bmake/tests/basic/t2/Makefile +++ b/usr.bin/bmake/tests/basic/t2/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/basic/t2 diff --git a/usr.bin/bmake/tests/basic/t3/Makefile b/usr.bin/bmake/tests/basic/t3/Makefile index ed9e68a27727..292071adcbc7 100644 --- a/usr.bin/bmake/tests/basic/t3/Makefile +++ b/usr.bin/bmake/tests/basic/t3/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/basic/t3 diff --git a/usr.bin/bmake/tests/execution/Makefile b/usr.bin/bmake/tests/execution/Makefile index 390ae91ed127..c979fd447b8c 100644 --- a/usr.bin/bmake/tests/execution/Makefile +++ b/usr.bin/bmake/tests/execution/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/execution TESTS_SUBDIRS= ellipsis empty joberr plus diff --git a/usr.bin/bmake/tests/execution/ellipsis/Makefile b/usr.bin/bmake/tests/execution/ellipsis/Makefile index 3e0d23356a3a..b4f9a0362556 100644 --- a/usr.bin/bmake/tests/execution/ellipsis/Makefile +++ b/usr.bin/bmake/tests/execution/ellipsis/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/execution/ellipsis diff --git a/usr.bin/bmake/tests/execution/ellipsis/Makefile.test b/usr.bin/bmake/tests/execution/ellipsis/Makefile.test index df42c0a516f6..a208171e29ad 100644 --- a/usr.bin/bmake/tests/execution/ellipsis/Makefile.test +++ b/usr.bin/bmake/tests/execution/ellipsis/Makefile.test @@ -1,4 +1,3 @@ - ELLIPSIS= ... check-ellipsis: diff --git a/usr.bin/bmake/tests/execution/empty/Makefile b/usr.bin/bmake/tests/execution/empty/Makefile index 65cb11055a6b..0917b2881011 100644 --- a/usr.bin/bmake/tests/execution/empty/Makefile +++ b/usr.bin/bmake/tests/execution/empty/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/execution/empty diff --git a/usr.bin/bmake/tests/execution/empty/Makefile.test b/usr.bin/bmake/tests/execution/empty/Makefile.test index ff169c5324c3..d7567955e6d9 100644 --- a/usr.bin/bmake/tests/execution/empty/Makefile.test +++ b/usr.bin/bmake/tests/execution/empty/Makefile.test @@ -1,4 +1,3 @@ - EMPTY= check-empty: diff --git a/usr.bin/bmake/tests/execution/joberr/Makefile b/usr.bin/bmake/tests/execution/joberr/Makefile index 8d80a596dda8..89d93bbee65f 100644 --- a/usr.bin/bmake/tests/execution/joberr/Makefile +++ b/usr.bin/bmake/tests/execution/joberr/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/execution/joberr diff --git a/usr.bin/bmake/tests/execution/joberr/Makefile.test b/usr.bin/bmake/tests/execution/joberr/Makefile.test index 74a5a2488c54..8849a3d39651 100644 --- a/usr.bin/bmake/tests/execution/joberr/Makefile.test +++ b/usr.bin/bmake/tests/execution/joberr/Makefile.test @@ -1,4 +1,3 @@ - check-joberr: .for _t in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 @-${MAKE} -f ${MAKEFILE} -j2 do-$@ diff --git a/usr.bin/bmake/tests/execution/plus/Makefile b/usr.bin/bmake/tests/execution/plus/Makefile index 565e290a4747..1e7ea12a087d 100644 --- a/usr.bin/bmake/tests/execution/plus/Makefile +++ b/usr.bin/bmake/tests/execution/plus/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/execution/plus diff --git a/usr.bin/bmake/tests/execution/plus/Makefile.test b/usr.bin/bmake/tests/execution/plus/Makefile.test index 593092dd30fd..d423d8a7c405 100644 --- a/usr.bin/bmake/tests/execution/plus/Makefile.test +++ b/usr.bin/bmake/tests/execution/plus/Makefile.test @@ -1,4 +1,3 @@ - check-+: @${MAKE} -f ${MAKEFILE} -j2 -n do-$@ diff --git a/usr.bin/bmake/tests/shell/Makefile b/usr.bin/bmake/tests/shell/Makefile index d844f8119719..7d15b940f412 100644 --- a/usr.bin/bmake/tests/shell/Makefile +++ b/usr.bin/bmake/tests/shell/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell TESTS_SUBDIRS= builtin meta path path_select replace select diff --git a/usr.bin/bmake/tests/shell/builtin/Makefile b/usr.bin/bmake/tests/shell/builtin/Makefile index 66ab3f9dd38a..802d4511e56d 100644 --- a/usr.bin/bmake/tests/shell/builtin/Makefile +++ b/usr.bin/bmake/tests/shell/builtin/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/builtin diff --git a/usr.bin/bmake/tests/shell/meta/Makefile b/usr.bin/bmake/tests/shell/meta/Makefile index 9cf38507bbe5..0fde362c203c 100644 --- a/usr.bin/bmake/tests/shell/meta/Makefile +++ b/usr.bin/bmake/tests/shell/meta/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/meta diff --git a/usr.bin/bmake/tests/shell/path/Makefile b/usr.bin/bmake/tests/shell/path/Makefile index 6baf42b2b058..78eae358de7f 100644 --- a/usr.bin/bmake/tests/shell/path/Makefile +++ b/usr.bin/bmake/tests/shell/path/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/path diff --git a/usr.bin/bmake/tests/shell/path_select/Makefile b/usr.bin/bmake/tests/shell/path_select/Makefile index 5465022615d5..15aa45f061a9 100644 --- a/usr.bin/bmake/tests/shell/path_select/Makefile +++ b/usr.bin/bmake/tests/shell/path_select/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/path_select diff --git a/usr.bin/bmake/tests/shell/replace/Makefile b/usr.bin/bmake/tests/shell/replace/Makefile index 777770184fe3..e2e7ad948db2 100644 --- a/usr.bin/bmake/tests/shell/replace/Makefile +++ b/usr.bin/bmake/tests/shell/replace/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/replace diff --git a/usr.bin/bmake/tests/shell/select/Makefile b/usr.bin/bmake/tests/shell/select/Makefile index 1d90d1ebd451..851077c23635 100644 --- a/usr.bin/bmake/tests/shell/select/Makefile +++ b/usr.bin/bmake/tests/shell/select/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/select diff --git a/usr.bin/bmake/tests/suffixes/Makefile b/usr.bin/bmake/tests/suffixes/Makefile index f1a50a8a8afd..d8132bcca685 100644 --- a/usr.bin/bmake/tests/suffixes/Makefile +++ b/usr.bin/bmake/tests/suffixes/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/suffixes TESTS_SUBDIRS= basic src_wild1 src_wild2 diff --git a/usr.bin/bmake/tests/suffixes/basic/Makefile b/usr.bin/bmake/tests/suffixes/basic/Makefile index 4caac0c8f4e6..cfdc32fd8d00 100644 --- a/usr.bin/bmake/tests/suffixes/basic/Makefile +++ b/usr.bin/bmake/tests/suffixes/basic/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/suffixes/basic diff --git a/usr.bin/bmake/tests/suffixes/src_wild1/Makefile b/usr.bin/bmake/tests/suffixes/src_wild1/Makefile index 2c1802671ecf..b941895bf798 100644 --- a/usr.bin/bmake/tests/suffixes/src_wild1/Makefile +++ b/usr.bin/bmake/tests/suffixes/src_wild1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/suffixes/src_wild1 diff --git a/usr.bin/bmake/tests/suffixes/src_wild1/Makefile.test b/usr.bin/bmake/tests/suffixes/src_wild1/Makefile.test index bd143f315a54..08a9c3ab3cb4 100644 --- a/usr.bin/bmake/tests/suffixes/src_wild1/Makefile.test +++ b/usr.bin/bmake/tests/suffixes/src_wild1/Makefile.test @@ -1,4 +1,3 @@ - test1: TEST1.b cat TEST1.a TEST2.a | diff -u - TEST1.b diff --git a/usr.bin/bmake/tests/suffixes/src_wild2/Makefile b/usr.bin/bmake/tests/suffixes/src_wild2/Makefile index fa703dd73819..8f048e9b50d6 100644 --- a/usr.bin/bmake/tests/suffixes/src_wild2/Makefile +++ b/usr.bin/bmake/tests/suffixes/src_wild2/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/suffixes/src_wild2 diff --git a/usr.bin/bmake/tests/syntax/Makefile b/usr.bin/bmake/tests/syntax/Makefile index cd245affa0f9..bed2ece9b2a7 100644 --- a/usr.bin/bmake/tests/syntax/Makefile +++ b/usr.bin/bmake/tests/syntax/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/syntax TESTS_SUBDIRS= directive-t0 enl funny-targets semi diff --git a/usr.bin/bmake/tests/syntax/directive-t0/Makefile b/usr.bin/bmake/tests/syntax/directive-t0/Makefile index 60f334184984..62945b572d14 100644 --- a/usr.bin/bmake/tests/syntax/directive-t0/Makefile +++ b/usr.bin/bmake/tests/syntax/directive-t0/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/syntax/directive-t0 diff --git a/usr.bin/bmake/tests/syntax/enl/Makefile b/usr.bin/bmake/tests/syntax/enl/Makefile index 31314fda7a7b..cab0648e3b87 100644 --- a/usr.bin/bmake/tests/syntax/enl/Makefile +++ b/usr.bin/bmake/tests/syntax/enl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/syntax/enl diff --git a/usr.bin/bmake/tests/syntax/funny-targets/Makefile b/usr.bin/bmake/tests/syntax/funny-targets/Makefile index 499d206380cd..803e745c65a8 100644 --- a/usr.bin/bmake/tests/syntax/funny-targets/Makefile +++ b/usr.bin/bmake/tests/syntax/funny-targets/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/syntax/funny-targets diff --git a/usr.bin/bmake/tests/syntax/semi/Makefile b/usr.bin/bmake/tests/syntax/semi/Makefile index 5f1325693892..0af26aed75e6 100644 --- a/usr.bin/bmake/tests/syntax/semi/Makefile +++ b/usr.bin/bmake/tests/syntax/semi/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/syntax/semi diff --git a/usr.bin/bmake/tests/sysmk/Makefile b/usr.bin/bmake/tests/sysmk/Makefile index 464bb9246a8d..302e8059d0e6 100644 --- a/usr.bin/bmake/tests/sysmk/Makefile +++ b/usr.bin/bmake/tests/sysmk/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk TESTS_SUBDIRS= t0 t1 t2 diff --git a/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile index 2bf2389e23ae..69c6ecb522fa 100644 --- a/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile +++ b/usr.bin/bmake/tests/sysmk/t0/2/1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/2/1 diff --git a/usr.bin/bmake/tests/sysmk/t0/2/Makefile b/usr.bin/bmake/tests/sysmk/t0/2/Makefile index 447cd7efad49..9fbcc9527124 100644 --- a/usr.bin/bmake/tests/sysmk/t0/2/Makefile +++ b/usr.bin/bmake/tests/sysmk/t0/2/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/2 TESTS_SUBDIRS= 1 diff --git a/usr.bin/bmake/tests/sysmk/t0/Makefile b/usr.bin/bmake/tests/sysmk/t0/Makefile index 61eb371efca5..0ffd2fe9edd6 100644 --- a/usr.bin/bmake/tests/sysmk/t0/Makefile +++ b/usr.bin/bmake/tests/sysmk/t0/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0 TESTS_SUBDIRS= 2 diff --git a/usr.bin/bmake/tests/sysmk/t0/mk/Makefile b/usr.bin/bmake/tests/sysmk/t0/mk/Makefile index 7a9397360304..b02918923a3a 100644 --- a/usr.bin/bmake/tests/sysmk/t0/mk/Makefile +++ b/usr.bin/bmake/tests/sysmk/t0/mk/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t0/mk diff --git a/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile index 9b9c390136ce..5e448e91e48c 100644 --- a/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile +++ b/usr.bin/bmake/tests/sysmk/t1/2/1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/2/1 diff --git a/usr.bin/bmake/tests/sysmk/t1/2/Makefile b/usr.bin/bmake/tests/sysmk/t1/2/Makefile index 6d3495e9f9dc..652066ddea0e 100644 --- a/usr.bin/bmake/tests/sysmk/t1/2/Makefile +++ b/usr.bin/bmake/tests/sysmk/t1/2/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/2 TESTS_SUBDIRS= 1 diff --git a/usr.bin/bmake/tests/sysmk/t1/Makefile b/usr.bin/bmake/tests/sysmk/t1/Makefile index 9992c1ec7df1..07a2962e6f49 100644 --- a/usr.bin/bmake/tests/sysmk/t1/Makefile +++ b/usr.bin/bmake/tests/sysmk/t1/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1 TESTS_SUBDIRS= 2 diff --git a/usr.bin/bmake/tests/sysmk/t1/mk/Makefile b/usr.bin/bmake/tests/sysmk/t1/mk/Makefile index aa2e39da1167..3d9597d8580e 100644 --- a/usr.bin/bmake/tests/sysmk/t1/mk/Makefile +++ b/usr.bin/bmake/tests/sysmk/t1/mk/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t1/mk diff --git a/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile b/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile index 362d2f58e4df..a3b7a56993b5 100644 --- a/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile +++ b/usr.bin/bmake/tests/sysmk/t2/2/1/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/2/1 diff --git a/usr.bin/bmake/tests/sysmk/t2/2/Makefile b/usr.bin/bmake/tests/sysmk/t2/2/Makefile index ba4e042e1ad3..04a4f5b41bc2 100644 --- a/usr.bin/bmake/tests/sysmk/t2/2/Makefile +++ b/usr.bin/bmake/tests/sysmk/t2/2/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/2 TESTS_SUBDIRS= 1 diff --git a/usr.bin/bmake/tests/sysmk/t2/Makefile b/usr.bin/bmake/tests/sysmk/t2/Makefile index cabdaedc9726..9d06ee857c21 100644 --- a/usr.bin/bmake/tests/sysmk/t2/Makefile +++ b/usr.bin/bmake/tests/sysmk/t2/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2 TESTS_SUBDIRS= 2 diff --git a/usr.bin/bmake/tests/sysmk/t2/mk/Makefile b/usr.bin/bmake/tests/sysmk/t2/mk/Makefile index 64659a017245..2f08ba2cea58 100644 --- a/usr.bin/bmake/tests/sysmk/t2/mk/Makefile +++ b/usr.bin/bmake/tests/sysmk/t2/mk/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/sysmk/t2/mk diff --git a/usr.bin/bmake/tests/variables/Makefile b/usr.bin/bmake/tests/variables/Makefile index 2d5c9590d8d6..f138b4b0c436 100644 --- a/usr.bin/bmake/tests/variables/Makefile +++ b/usr.bin/bmake/tests/variables/Makefile @@ -1,4 +1,3 @@ - TESTSDIR= ${TESTSBASE}/usr.bin/bmake/variables TESTS_SUBDIRS= modifier_M modifier_t opt_V t0 diff --git a/usr.bin/bmake/tests/variables/modifier_M/Makefile b/usr.bin/bmake/tests/variables/modifier_M/Makefile index 6969977ab1bc..484de9de0bdc 100644 --- a/usr.bin/bmake/tests/variables/modifier_M/Makefile +++ b/usr.bin/bmake/tests/variables/modifier_M/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/variables/modifier_M diff --git a/usr.bin/bmake/tests/variables/modifier_t/Makefile b/usr.bin/bmake/tests/variables/modifier_t/Makefile index 6d1432cb517c..2553e4517c4b 100644 --- a/usr.bin/bmake/tests/variables/modifier_t/Makefile +++ b/usr.bin/bmake/tests/variables/modifier_t/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/variables/modifier_t diff --git a/usr.bin/bmake/tests/variables/opt_V/Makefile b/usr.bin/bmake/tests/variables/opt_V/Makefile index 1277ee0c4b97..534b3e4246f6 100644 --- a/usr.bin/bmake/tests/variables/opt_V/Makefile +++ b/usr.bin/bmake/tests/variables/opt_V/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/variables/opt_V diff --git a/usr.bin/bmake/tests/variables/t0/Makefile b/usr.bin/bmake/tests/variables/t0/Makefile index 99b8975adfe0..7cf7bd7dac9a 100644 --- a/usr.bin/bmake/tests/variables/t0/Makefile +++ b/usr.bin/bmake/tests/variables/t0/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/bmake/variables/t0 diff --git a/usr.bin/brandelf/Makefile b/usr.bin/brandelf/Makefile index 919cb95ae831..8c80ff805311 100644 --- a/usr.bin/brandelf/Makefile +++ b/usr.bin/brandelf/Makefile @@ -1,4 +1,3 @@ - .include PROG= brandelf diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index 8e730e634ea6..032207217be6 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -1,4 +1,3 @@ - .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/bsdcat/tests/Makefile b/usr.bin/bsdcat/tests/Makefile index 02382137aa16..c323da34e080 100644 --- a/usr.bin/bsdcat/tests/Makefile +++ b/usr.bin/bsdcat/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/bsdiff/Makefile b/usr.bin/bsdiff/Makefile index e6cc5d28cce6..ed9dd0f8db5a 100644 --- a/usr.bin/bsdiff/Makefile +++ b/usr.bin/bsdiff/Makefile @@ -1,4 +1,3 @@ - SUBDIR= bsdiff bspatch .include diff --git a/usr.bin/bsdiff/Makefile.inc b/usr.bin/bsdiff/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/usr.bin/bsdiff/Makefile.inc +++ b/usr.bin/bsdiff/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/usr.bin/bsdiff/bsdiff/Makefile b/usr.bin/bsdiff/bsdiff/Makefile index 250fe6f5e5ab..7af4fc873e13 100644 --- a/usr.bin/bsdiff/bsdiff/Makefile +++ b/usr.bin/bsdiff/bsdiff/Makefile @@ -1,4 +1,3 @@ - PROG= bsdiff # libdivsufsort configured with: diff --git a/usr.bin/bsdiff/bspatch/Makefile b/usr.bin/bsdiff/bspatch/Makefile index b034321f1487..12b67fe97577 100644 --- a/usr.bin/bsdiff/bspatch/Makefile +++ b/usr.bin/bsdiff/bspatch/Makefile @@ -1,4 +1,3 @@ - PROG= bspatch LIBADD= bz2 diff --git a/usr.bin/bzip2/Makefile b/usr.bin/bzip2/Makefile index f2d203630560..99679cc00c44 100644 --- a/usr.bin/bzip2/Makefile +++ b/usr.bin/bzip2/Makefile @@ -1,4 +1,3 @@ - BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} diff --git a/usr.bin/bzip2recover/Makefile b/usr.bin/bzip2recover/Makefile index 0edf208aa463..2b11d3a45694 100644 --- a/usr.bin/bzip2recover/Makefile +++ b/usr.bin/bzip2recover/Makefile @@ -1,4 +1,3 @@ - BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} diff --git a/usr.bin/c89/Makefile b/usr.bin/c89/Makefile index 35565c08546a..325588a3d7a8 100644 --- a/usr.bin/c89/Makefile +++ b/usr.bin/c89/Makefile @@ -1,4 +1,3 @@ - PROG= c89 .include diff --git a/usr.bin/c99/Makefile b/usr.bin/c99/Makefile index 3ab880777dab..98be921c974c 100644 --- a/usr.bin/c99/Makefile +++ b/usr.bin/c99/Makefile @@ -1,4 +1,3 @@ - PROG= c99 .include diff --git a/usr.bin/caesar/Makefile b/usr.bin/caesar/Makefile index e9b1d371a6f0..e7496fbb2925 100644 --- a/usr.bin/caesar/Makefile +++ b/usr.bin/caesar/Makefile @@ -1,4 +1,3 @@ - PACKAGE= games PROG= caesar diff --git a/usr.bin/calendar/Makefile b/usr.bin/calendar/Makefile index 8d5851cc089e..d931f2f837da 100644 --- a/usr.bin/calendar/Makefile +++ b/usr.bin/calendar/Makefile @@ -1,4 +1,3 @@ - .include PROG= calendar diff --git a/usr.bin/calendar/tests/Makefile b/usr.bin/calendar/tests/Makefile index e24527f8ce16..24ab9572413a 100644 --- a/usr.bin/calendar/tests/Makefile +++ b/usr.bin/calendar/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= comment_test cond_test legacy_test diff --git a/usr.bin/cap_mkdb/Makefile b/usr.bin/cap_mkdb/Makefile index 45d3f0205045..4beb70d551bd 100644 --- a/usr.bin/cap_mkdb/Makefile +++ b/usr.bin/cap_mkdb/Makefile @@ -1,4 +1,3 @@ - PROG= cap_mkdb .include diff --git a/usr.bin/chat/Makefile b/usr.bin/chat/Makefile index 36d33fc34a1a..dfe76f71aba7 100644 --- a/usr.bin/chat/Makefile +++ b/usr.bin/chat/Makefile @@ -1,4 +1,3 @@ - # I once used this extensively, but no longer have a modem. Feel free # to ask me questions about it, but I disclaim ownership now. -Peter diff --git a/usr.bin/chkey/Makefile b/usr.bin/chkey/Makefile index 7ab2ec431b76..4b734787c0a3 100644 --- a/usr.bin/chkey/Makefile +++ b/usr.bin/chkey/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/usr.bin/newkey diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile index a8ab10a19ceb..0bf39deeab88 100644 --- a/usr.bin/chpass/Makefile +++ b/usr.bin/chpass/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/lib/libc/gen diff --git a/usr.bin/cksum/Makefile b/usr.bin/cksum/Makefile index a6f35aca0b84..c8d34f7fe5d5 100644 --- a/usr.bin/cksum/Makefile +++ b/usr.bin/cksum/Makefile @@ -1,4 +1,3 @@ - PROG= cksum SRCS= cksum.c crc.c print.c sum1.c sum2.c crc32.c LINKS= ${BINDIR}/cksum ${BINDIR}/sum diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile index 30ec1ab65e0f..a0cc015590f0 100644 --- a/usr.bin/clang/Makefile +++ b/usr.bin/clang/Makefile @@ -1,4 +1,3 @@ - .include .if ${MK_CLANG} != "no" diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc index 99e993b57cb2..bf9fad4032e2 100644 --- a/usr.bin/clang/Makefile.inc +++ b/usr.bin/clang/Makefile.inc @@ -1,4 +1,3 @@ - .include MK_PIE:= no # Explicit libXXX.a references diff --git a/usr.bin/clang/bugpoint/Makefile b/usr.bin/clang/bugpoint/Makefile index 909254c44928..700cc6a3c78a 100644 --- a/usr.bin/clang/bugpoint/Makefile +++ b/usr.bin/clang/bugpoint/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= bugpoint SRCDIR= llvm/tools/bugpoint diff --git a/usr.bin/clang/clang-format/Makefile b/usr.bin/clang/clang-format/Makefile index 1595c7506832..8b69ba5294cf 100644 --- a/usr.bin/clang/clang-format/Makefile +++ b/usr.bin/clang/clang-format/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= clang-format MAN= diff --git a/usr.bin/clang/clang-tblgen/Makefile b/usr.bin/clang/clang-tblgen/Makefile index 8fab4c4a17e3..5963da3a2e83 100644 --- a/usr.bin/clang/clang-tblgen/Makefile +++ b/usr.bin/clang/clang-tblgen/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= clang-tblgen MAN= diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile index a271a8e9e4e3..50806483b39e 100644 --- a/usr.bin/clang/clang/Makefile +++ b/usr.bin/clang/clang/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= clang diff --git a/usr.bin/clang/llc/Makefile b/usr.bin/clang/llc/Makefile index c154974715a9..ed5c80907920 100644 --- a/usr.bin/clang/llc/Makefile +++ b/usr.bin/clang/llc/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llc SRCDIR= llvm/tools/llc diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile index 8fbc41ee992a..1c99bd716069 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -1,4 +1,3 @@ - .include LLVM_BASE= ${SRCTOP}/contrib/llvm-project diff --git a/usr.bin/clang/lldb-server/Makefile b/usr.bin/clang/lldb-server/Makefile index 3a16c470fe2b..b4d6131d81ab 100644 --- a/usr.bin/clang/lldb-server/Makefile +++ b/usr.bin/clang/lldb-server/Makefile @@ -1,4 +1,3 @@ - .include "${SRCTOP}/lib/clang/lldb.pre.mk" PACKAGE= lldb diff --git a/usr.bin/clang/lldb-tblgen/Makefile b/usr.bin/clang/lldb-tblgen/Makefile index 49e6a61f841d..2a069939e195 100644 --- a/usr.bin/clang/lldb-tblgen/Makefile +++ b/usr.bin/clang/lldb-tblgen/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= lldb-tblgen MAN= diff --git a/usr.bin/clang/lldb/Makefile b/usr.bin/clang/lldb/Makefile index f9c09c8d697b..4f01b1d8f0e0 100644 --- a/usr.bin/clang/lldb/Makefile +++ b/usr.bin/clang/lldb/Makefile @@ -1,4 +1,3 @@ - .include "${SRCTOP}/lib/clang/lldb.pre.mk" PACKAGE= lldb diff --git a/usr.bin/clang/lli/Makefile b/usr.bin/clang/lli/Makefile index 6fe2b673ee3c..eed2d8b874b5 100644 --- a/usr.bin/clang/lli/Makefile +++ b/usr.bin/clang/lli/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= lli SRCDIR= llvm/tools/lli diff --git a/usr.bin/clang/llvm-ar/Makefile b/usr.bin/clang/llvm-ar/Makefile index 0414542fa5fa..fd12b1ddef57 100644 --- a/usr.bin/clang/llvm-ar/Makefile +++ b/usr.bin/clang/llvm-ar/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-ar diff --git a/usr.bin/clang/llvm-as/Makefile b/usr.bin/clang/llvm-as/Makefile index d96120311da5..e6a6edfdb864 100644 --- a/usr.bin/clang/llvm-as/Makefile +++ b/usr.bin/clang/llvm-as/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-as SRCDIR= llvm/tools/llvm-as diff --git a/usr.bin/clang/llvm-bcanalyzer/Makefile b/usr.bin/clang/llvm-bcanalyzer/Makefile index e17ddedaf8ad..2c796a362f57 100644 --- a/usr.bin/clang/llvm-bcanalyzer/Makefile +++ b/usr.bin/clang/llvm-bcanalyzer/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-bcanalyzer SRCDIR= llvm/tools/llvm-bcanalyzer diff --git a/usr.bin/clang/llvm-cov/Makefile b/usr.bin/clang/llvm-cov/Makefile index b0d0d43cffb6..3eb14eb37139 100644 --- a/usr.bin/clang/llvm-cov/Makefile +++ b/usr.bin/clang/llvm-cov/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-cov diff --git a/usr.bin/clang/llvm-cxxdump/Makefile b/usr.bin/clang/llvm-cxxdump/Makefile index 13098a0c40cd..40fccfefdafe 100644 --- a/usr.bin/clang/llvm-cxxdump/Makefile +++ b/usr.bin/clang/llvm-cxxdump/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-cxxdump MAN= diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile index 05d29f9fab42..f9621da8da89 100644 --- a/usr.bin/clang/llvm-cxxfilt/Makefile +++ b/usr.bin/clang/llvm-cxxfilt/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-cxxfilt diff --git a/usr.bin/clang/llvm-diff/Makefile b/usr.bin/clang/llvm-diff/Makefile index b7180b97b4e4..90eddc9551d9 100644 --- a/usr.bin/clang/llvm-diff/Makefile +++ b/usr.bin/clang/llvm-diff/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-diff SRCDIR= llvm/tools/llvm-diff diff --git a/usr.bin/clang/llvm-dis/Makefile b/usr.bin/clang/llvm-dis/Makefile index dc8b796d366b..a290c4647c31 100644 --- a/usr.bin/clang/llvm-dis/Makefile +++ b/usr.bin/clang/llvm-dis/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-dis SRCDIR= llvm/tools/llvm-dis diff --git a/usr.bin/clang/llvm-dwarfdump/Makefile b/usr.bin/clang/llvm-dwarfdump/Makefile index ac330d00e317..cdbf9822b2ac 100644 --- a/usr.bin/clang/llvm-dwarfdump/Makefile +++ b/usr.bin/clang/llvm-dwarfdump/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-dwarfdump SRCDIR= llvm/tools/llvm-dwarfdump diff --git a/usr.bin/clang/llvm-dwarfutil/Makefile b/usr.bin/clang/llvm-dwarfutil/Makefile index e97e37dda062..884ce922492e 100644 --- a/usr.bin/clang/llvm-dwarfutil/Makefile +++ b/usr.bin/clang/llvm-dwarfutil/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-dwarfutil SRCDIR= llvm/tools/llvm-dwarfutil diff --git a/usr.bin/clang/llvm-dwp/Makefile b/usr.bin/clang/llvm-dwp/Makefile index fb1bc1338034..1d66929143e1 100644 --- a/usr.bin/clang/llvm-dwp/Makefile +++ b/usr.bin/clang/llvm-dwp/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-dwp MAN= diff --git a/usr.bin/clang/llvm-extract/Makefile b/usr.bin/clang/llvm-extract/Makefile index 780c2ee0bd16..898414d0fca1 100644 --- a/usr.bin/clang/llvm-extract/Makefile +++ b/usr.bin/clang/llvm-extract/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-extract SRCDIR= llvm/tools/llvm-extract diff --git a/usr.bin/clang/llvm-link/Makefile b/usr.bin/clang/llvm-link/Makefile index 7d736049275a..a83de498fd32 100644 --- a/usr.bin/clang/llvm-link/Makefile +++ b/usr.bin/clang/llvm-link/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-link SRCDIR= llvm/tools/llvm-link diff --git a/usr.bin/clang/llvm-lto/Makefile b/usr.bin/clang/llvm-lto/Makefile index 3209016e8492..8793b8e6a674 100644 --- a/usr.bin/clang/llvm-lto/Makefile +++ b/usr.bin/clang/llvm-lto/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-lto MAN= diff --git a/usr.bin/clang/llvm-lto2/Makefile b/usr.bin/clang/llvm-lto2/Makefile index 354b1df5b974..68c16d422051 100644 --- a/usr.bin/clang/llvm-lto2/Makefile +++ b/usr.bin/clang/llvm-lto2/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-lto2 MAN= diff --git a/usr.bin/clang/llvm-mc/Makefile b/usr.bin/clang/llvm-mc/Makefile index 8970f4971593..876720b09b70 100644 --- a/usr.bin/clang/llvm-mc/Makefile +++ b/usr.bin/clang/llvm-mc/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-mc MAN= diff --git a/usr.bin/clang/llvm-mca/Makefile b/usr.bin/clang/llvm-mca/Makefile index 1966418965f8..274b7a43e5fe 100644 --- a/usr.bin/clang/llvm-mca/Makefile +++ b/usr.bin/clang/llvm-mca/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-mca SRCDIR= llvm/tools/llvm-mca diff --git a/usr.bin/clang/llvm-min-tblgen/Makefile b/usr.bin/clang/llvm-min-tblgen/Makefile index bf8c2f3730f8..702184a813c5 100644 --- a/usr.bin/clang/llvm-min-tblgen/Makefile +++ b/usr.bin/clang/llvm-min-tblgen/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-min-tblgen MAN= diff --git a/usr.bin/clang/llvm-modextract/Makefile b/usr.bin/clang/llvm-modextract/Makefile index fe17ff12717a..6e9a79a16495 100644 --- a/usr.bin/clang/llvm-modextract/Makefile +++ b/usr.bin/clang/llvm-modextract/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-modextract MAN= diff --git a/usr.bin/clang/llvm-nm/Makefile b/usr.bin/clang/llvm-nm/Makefile index 7b3c3cf03deb..825faf74719b 100644 --- a/usr.bin/clang/llvm-nm/Makefile +++ b/usr.bin/clang/llvm-nm/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-nm diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile index 224ebbf528bc..fcf59e4b4bca 100644 --- a/usr.bin/clang/llvm-objcopy/Makefile +++ b/usr.bin/clang/llvm-objcopy/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-objcopy diff --git a/usr.bin/clang/llvm-objdump/Makefile b/usr.bin/clang/llvm-objdump/Makefile index 416eb083850f..ad1c7beee95f 100644 --- a/usr.bin/clang/llvm-objdump/Makefile +++ b/usr.bin/clang/llvm-objdump/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-objdump diff --git a/usr.bin/clang/llvm-pdbutil/Makefile b/usr.bin/clang/llvm-pdbutil/Makefile index aac625fd9475..ddbfc91e0b55 100644 --- a/usr.bin/clang/llvm-pdbutil/Makefile +++ b/usr.bin/clang/llvm-pdbutil/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-pdbutil SRCDIR= llvm/tools/llvm-pdbutil diff --git a/usr.bin/clang/llvm-profdata/Makefile b/usr.bin/clang/llvm-profdata/Makefile index 30145cb63159..aba60836da5d 100644 --- a/usr.bin/clang/llvm-profdata/Makefile +++ b/usr.bin/clang/llvm-profdata/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-profdata SRCDIR= llvm/tools/llvm-profdata diff --git a/usr.bin/clang/llvm-readobj/Makefile b/usr.bin/clang/llvm-readobj/Makefile index 6d48eebadb48..f532358ea79e 100644 --- a/usr.bin/clang/llvm-readobj/Makefile +++ b/usr.bin/clang/llvm-readobj/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-readobj diff --git a/usr.bin/clang/llvm-rtdyld/Makefile b/usr.bin/clang/llvm-rtdyld/Makefile index 4d16b6ca4bd0..66f491324172 100644 --- a/usr.bin/clang/llvm-rtdyld/Makefile +++ b/usr.bin/clang/llvm-rtdyld/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-rtdyld MAN= diff --git a/usr.bin/clang/llvm-size/Makefile b/usr.bin/clang/llvm-size/Makefile index cc9f52554bdd..2860a0069538 100644 --- a/usr.bin/clang/llvm-size/Makefile +++ b/usr.bin/clang/llvm-size/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-size diff --git a/usr.bin/clang/llvm-strings/Makefile b/usr.bin/clang/llvm-strings/Makefile index 78fc8c2922b0..f01a012b0cb9 100644 --- a/usr.bin/clang/llvm-strings/Makefile +++ b/usr.bin/clang/llvm-strings/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-strings diff --git a/usr.bin/clang/llvm-symbolizer/Makefile b/usr.bin/clang/llvm-symbolizer/Makefile index 53134cc3972c..c45300c92a90 100644 --- a/usr.bin/clang/llvm-symbolizer/Makefile +++ b/usr.bin/clang/llvm-symbolizer/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= llvm-symbolizer diff --git a/usr.bin/clang/llvm-tblgen/Makefile b/usr.bin/clang/llvm-tblgen/Makefile index b38a73eb54b6..4461fa02083f 100644 --- a/usr.bin/clang/llvm-tblgen/Makefile +++ b/usr.bin/clang/llvm-tblgen/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-tblgen MAN= diff --git a/usr.bin/clang/llvm-xray/Makefile b/usr.bin/clang/llvm-xray/Makefile index 423b69b9bb99..43f596b32c0b 100644 --- a/usr.bin/clang/llvm-xray/Makefile +++ b/usr.bin/clang/llvm-xray/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= llvm-xray MAN= diff --git a/usr.bin/clang/opt/Makefile b/usr.bin/clang/opt/Makefile index 5c48b8023794..b3fdad82ecdb 100644 --- a/usr.bin/clang/opt/Makefile +++ b/usr.bin/clang/opt/Makefile @@ -1,4 +1,3 @@ - PROG_CXX= opt SRCDIR= llvm/tools/opt diff --git a/usr.bin/cmp/Makefile b/usr.bin/cmp/Makefile index 09ad93d95cc8..6f4720226a3e 100644 --- a/usr.bin/cmp/Makefile +++ b/usr.bin/cmp/Makefile @@ -1,4 +1,3 @@ - .include PROG= cmp diff --git a/usr.bin/cmp/tests/Makefile b/usr.bin/cmp/tests/Makefile index 6f00ecddb05c..8524fbaee43c 100644 --- a/usr.bin/cmp/tests/Makefile +++ b/usr.bin/cmp/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/usr.bin/col/Makefile b/usr.bin/col/Makefile index e154dab740d3..ce4cc73337a6 100644 --- a/usr.bin/col/Makefile +++ b/usr.bin/col/Makefile @@ -1,4 +1,3 @@ - .include PROG= col diff --git a/usr.bin/col/tests/Makefile b/usr.bin/col/tests/Makefile index 61f394c1e128..c51bd57a5651 100644 --- a/usr.bin/col/tests/Makefile +++ b/usr.bin/col/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= col_test diff --git a/usr.bin/colrm/Makefile b/usr.bin/colrm/Makefile index 43048657706e..0da3b5a30c37 100644 --- a/usr.bin/colrm/Makefile +++ b/usr.bin/colrm/Makefile @@ -1,4 +1,3 @@ - PROG= colrm .include diff --git a/usr.bin/column/Makefile b/usr.bin/column/Makefile index 27c3bbe291a5..b0b88c086b41 100644 --- a/usr.bin/column/Makefile +++ b/usr.bin/column/Makefile @@ -1,4 +1,3 @@ - PROG= column .include diff --git a/usr.bin/comm/Makefile b/usr.bin/comm/Makefile index e48ec9341eb8..03eabaf8704b 100644 --- a/usr.bin/comm/Makefile +++ b/usr.bin/comm/Makefile @@ -1,4 +1,3 @@ - .include PROG= comm diff --git a/usr.bin/comm/tests/Makefile b/usr.bin/comm/tests/Makefile index 12c3d26d2d56..85ba59ad4ccb 100644 --- a/usr.bin/comm/tests/Makefile +++ b/usr.bin/comm/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/compile_et/Makefile b/usr.bin/compile_et/Makefile index e95f9d363915..6305bfe3ddfd 100644 --- a/usr.bin/compile_et/Makefile +++ b/usr.bin/compile_et/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/com_err PACKAGE= kerberos diff --git a/usr.bin/compress/Makefile b/usr.bin/compress/Makefile index 8ea375b51f9a..1c62ad96a74e 100644 --- a/usr.bin/compress/Makefile +++ b/usr.bin/compress/Makefile @@ -1,4 +1,3 @@ - .include PROG= compress diff --git a/usr.bin/compress/tests/Makefile b/usr.bin/compress/tests/Makefile index 570a42f820e6..a981110d2981 100644 --- a/usr.bin/compress/tests/Makefile +++ b/usr.bin/compress/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= compress_test diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index b52c9645ebb5..46fe36d8c18e 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -1,4 +1,3 @@ - .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/cpio/tests/Makefile b/usr.bin/cpio/tests/Makefile index a44abfbee846..385112c1a9a2 100644 --- a/usr.bin/cpio/tests/Makefile +++ b/usr.bin/cpio/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/csplit/Makefile b/usr.bin/csplit/Makefile index c258d2f859b2..4b577b7edf6f 100644 --- a/usr.bin/csplit/Makefile +++ b/usr.bin/csplit/Makefile @@ -1,4 +1,3 @@ - .include PROG= csplit diff --git a/usr.bin/csplit/tests/Makefile b/usr.bin/csplit/tests/Makefile index 751ade1e3be7..498f68544f6e 100644 --- a/usr.bin/csplit/tests/Makefile +++ b/usr.bin/csplit/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= csplit_test diff --git a/usr.bin/ctags/Makefile b/usr.bin/ctags/Makefile index fcc5e1581166..a0d0c8522914 100644 --- a/usr.bin/ctags/Makefile +++ b/usr.bin/ctags/Makefile @@ -1,4 +1,3 @@ - PROG= ctags SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c CFLAGS+=-I${.CURDIR} diff --git a/usr.bin/ctlstat/Makefile b/usr.bin/ctlstat/Makefile index 876f0114eeaf..aa7c6f2a2641 100644 --- a/usr.bin/ctlstat/Makefile +++ b/usr.bin/ctlstat/Makefile @@ -1,4 +1,3 @@ - PROG= ctlstat MAN= ctlstat.8 SDIR= ${SRCTOP}/sys diff --git a/usr.bin/cut/Makefile b/usr.bin/cut/Makefile index c5e221107a18..bdb5040c21d8 100644 --- a/usr.bin/cut/Makefile +++ b/usr.bin/cut/Makefile @@ -1,4 +1,3 @@ - .include PROG= cut diff --git a/usr.bin/cut/tests/Makefile b/usr.bin/cut/tests/Makefile index 598f45e09106..bd02245ced1f 100644 --- a/usr.bin/cut/tests/Makefile +++ b/usr.bin/cut/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= cut2_test diff --git a/usr.bin/cxxfilt/Makefile b/usr.bin/cxxfilt/Makefile index 7df2d50104a7..fe7fe2d579e5 100644 --- a/usr.bin/cxxfilt/Makefile +++ b/usr.bin/cxxfilt/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/dc/tests/Makefile b/usr.bin/dc/tests/Makefile index b990337293f3..ac2204e3cba7 100644 --- a/usr.bin/dc/tests/Makefile +++ b/usr.bin/dc/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= inout diff --git a/usr.bin/diff/tests/Makefile b/usr.bin/diff/tests/Makefile index 9f3d29918414..242e76260249 100644 --- a/usr.bin/diff/tests/Makefile +++ b/usr.bin/diff/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= diff_test diff --git a/usr.bin/diff3/Makefile b/usr.bin/diff3/Makefile index 1546547dda4c..828743d092c7 100644 --- a/usr.bin/diff3/Makefile +++ b/usr.bin/diff3/Makefile @@ -1,4 +1,3 @@ - .include PROG= diff3 diff --git a/usr.bin/diff3/tests/Makefile b/usr.bin/diff3/tests/Makefile index 3b720586d148..864f27beede8 100644 --- a/usr.bin/diff3/tests/Makefile +++ b/usr.bin/diff3/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= diff3_test diff --git a/usr.bin/dirname/Makefile b/usr.bin/dirname/Makefile index cc420f8ad599..cc7d1a1b16b9 100644 --- a/usr.bin/dirname/Makefile +++ b/usr.bin/dirname/Makefile @@ -1,4 +1,3 @@ - .include PROG= dirname diff --git a/usr.bin/dirname/tests/Makefile b/usr.bin/dirname/tests/Makefile index 3d5f97adca75..d254264c8990 100644 --- a/usr.bin/dirname/tests/Makefile +++ b/usr.bin/dirname/tests/Makefile @@ -1,4 +1,3 @@ - NETBSD_ATF_TESTS_SH= dirname_test .include diff --git a/usr.bin/dpv/Makefile b/usr.bin/dpv/Makefile index 4aa3a09ae2be..104c865626b9 100644 --- a/usr.bin/dpv/Makefile +++ b/usr.bin/dpv/Makefile @@ -1,4 +1,3 @@ - PACKAGE= dpv PROG= dpv diff --git a/usr.bin/drill/Makefile b/usr.bin/drill/Makefile index 9abc05a84d7a..0b321765c054 100644 --- a/usr.bin/drill/Makefile +++ b/usr.bin/drill/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns diff --git a/usr.bin/du/Makefile b/usr.bin/du/Makefile index 7fb61d0423df..b12a05447999 100644 --- a/usr.bin/du/Makefile +++ b/usr.bin/du/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/du/tests/Makefile b/usr.bin/du/tests/Makefile index aadebdf57458..678bd616c729 100644 --- a/usr.bin/du/tests/Makefile +++ b/usr.bin/du/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= du_test .include diff --git a/usr.bin/ee/Makefile b/usr.bin/ee/Makefile index 4ffe57c5f29c..5f83bf775e4d 100644 --- a/usr.bin/ee/Makefile +++ b/usr.bin/ee/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/ee CFLAGS+= -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ diff --git a/usr.bin/elfctl/Makefile b/usr.bin/elfctl/Makefile index 57d95899ac97..82d5f3e7c4fb 100644 --- a/usr.bin/elfctl/Makefile +++ b/usr.bin/elfctl/Makefile @@ -1,4 +1,3 @@ - ELFTCDIR= ${SRCTOP}/contrib/elftoolchain PROG= elfctl diff --git a/usr.bin/elfdump/Makefile b/usr.bin/elfdump/Makefile index 12d0f5eb7f7b..5b48a8b6174d 100644 --- a/usr.bin/elfdump/Makefile +++ b/usr.bin/elfdump/Makefile @@ -1,4 +1,3 @@ - PROG= elfdump .include diff --git a/usr.bin/enigma/Makefile b/usr.bin/enigma/Makefile index a43702f21067..d3625d18354c 100644 --- a/usr.bin/enigma/Makefile +++ b/usr.bin/enigma/Makefile @@ -1,4 +1,3 @@ - PROG= enigma LINKS= ${BINDIR}/enigma ${BINDIR}/crypt diff --git a/usr.bin/env/Makefile b/usr.bin/env/Makefile index 05899ad4295d..81f18e58f80e 100644 --- a/usr.bin/env/Makefile +++ b/usr.bin/env/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= env SRCS= env.c envopts.c diff --git a/usr.bin/etdump/Makefile b/usr.bin/etdump/Makefile index 974345967f58..8c451bf2c574 100644 --- a/usr.bin/etdump/Makefile +++ b/usr.bin/etdump/Makefile @@ -1,4 +1,3 @@ - PROG= etdump MAKEFS_SRC= ${SRCTOP}/usr.sbin/makefs diff --git a/usr.bin/expand/Makefile b/usr.bin/expand/Makefile index 25f2e1f9014e..bba5bd3e5065 100644 --- a/usr.bin/expand/Makefile +++ b/usr.bin/expand/Makefile @@ -1,4 +1,3 @@ - PROG= expand MLINKS= expand.1 unexpand.1 diff --git a/usr.bin/factor/Makefile b/usr.bin/factor/Makefile index 96d9ae4026aa..a0109462fcb3 100644 --- a/usr.bin/factor/Makefile +++ b/usr.bin/factor/Makefile @@ -1,4 +1,3 @@ - .include PROG= factor diff --git a/usr.bin/false/Makefile b/usr.bin/false/Makefile index 2a6e7e62bb80..79221864a4aa 100644 --- a/usr.bin/false/Makefile +++ b/usr.bin/false/Makefile @@ -1,4 +1,3 @@ - PROG= false .include diff --git a/usr.bin/fetch/Makefile b/usr.bin/fetch/Makefile index 9035c6fe16e8..a4d501075324 100644 --- a/usr.bin/fetch/Makefile +++ b/usr.bin/fetch/Makefile @@ -1,4 +1,3 @@ - PACKAGE= fetch PROG= fetch LIBADD= fetch diff --git a/usr.bin/file2c/Makefile b/usr.bin/file2c/Makefile index c09447f938e3..b71834e10035 100644 --- a/usr.bin/file2c/Makefile +++ b/usr.bin/file2c/Makefile @@ -1,4 +1,3 @@ - .include PROG= file2c diff --git a/usr.bin/file2c/tests/Makefile b/usr.bin/file2c/tests/Makefile index 4370cdbca705..f54e3c5cf275 100644 --- a/usr.bin/file2c/tests/Makefile +++ b/usr.bin/file2c/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile index 3a1387c20c16..904c08620833 100644 --- a/usr.bin/find/Makefile +++ b/usr.bin/find/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/find/tests/Makefile b/usr.bin/find/tests/Makefile index 0ebeff9143fa..be688347c11b 100644 --- a/usr.bin/find/tests/Makefile +++ b/usr.bin/find/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= find_test .include diff --git a/usr.bin/finger/Makefile b/usr.bin/finger/Makefile index 6eb114df2490..638a603f9ed6 100644 --- a/usr.bin/finger/Makefile +++ b/usr.bin/finger/Makefile @@ -1,4 +1,3 @@ - PROG= finger SRCS= finger.c lprint.c net.c sprint.c util.c MAN= finger.1 finger.conf.5 diff --git a/usr.bin/fmt/Makefile b/usr.bin/fmt/Makefile index 3ad2c94384fb..48f96db9ad42 100644 --- a/usr.bin/fmt/Makefile +++ b/usr.bin/fmt/Makefile @@ -1,4 +1,3 @@ - PROG= fmt .include diff --git a/usr.bin/fold/Makefile b/usr.bin/fold/Makefile index 38f75e1a6cb2..e7509f024c53 100644 --- a/usr.bin/fold/Makefile +++ b/usr.bin/fold/Makefile @@ -1,4 +1,3 @@ - .include PROG= fold diff --git a/usr.bin/fold/tests/Makefile b/usr.bin/fold/tests/Makefile index e6bf71e8bee6..13965aabd0ba 100644 --- a/usr.bin/fold/tests/Makefile +++ b/usr.bin/fold/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= fold_test .include diff --git a/usr.bin/fortune/Makefile b/usr.bin/fortune/Makefile index 210747dd3c9a..0499a0fa1da3 100644 --- a/usr.bin/fortune/Makefile +++ b/usr.bin/fortune/Makefile @@ -1,4 +1,3 @@ - SUBDIR= fortune strfile datfiles unstr SUBDIR_DEPEND_datfiles= strfile diff --git a/usr.bin/fortune/Makefile.inc b/usr.bin/fortune/Makefile.inc index 70a36f8c98c5..cc361d4cf070 100644 --- a/usr.bin/fortune/Makefile.inc +++ b/usr.bin/fortune/Makefile.inc @@ -1,4 +1,3 @@ - FORTUNE_SRC= ${SRCTOP}/usr.bin/fortune FORTUNE_OBJ= ${OBJTOP}/usr.bin/fortune diff --git a/usr.bin/fortune/datfiles/Makefile b/usr.bin/fortune/datfiles/Makefile index f035d30be1aa..7bf545e298d7 100644 --- a/usr.bin/fortune/datfiles/Makefile +++ b/usr.bin/fortune/datfiles/Makefile @@ -1,4 +1,3 @@ - DB= freebsd-tips BLDS= ${DB:S/$/.dat/} diff --git a/usr.bin/fortune/fortune/Makefile b/usr.bin/fortune/fortune/Makefile index c4c013cfc532..c33a68f2295e 100644 --- a/usr.bin/fortune/fortune/Makefile +++ b/usr.bin/fortune/fortune/Makefile @@ -1,4 +1,3 @@ - PROG= fortune MAN= fortune.6 CFLAGS+=-DDEBUG -I${FORTUNE_SRC}/strfile diff --git a/usr.bin/fortune/strfile/Makefile b/usr.bin/fortune/strfile/Makefile index 56e8fca4fc65..8434ead23bd2 100644 --- a/usr.bin/fortune/strfile/Makefile +++ b/usr.bin/fortune/strfile/Makefile @@ -1,4 +1,3 @@ - PROG= strfile MAN= strfile.8 MLINKS= strfile.8 unstr.8 diff --git a/usr.bin/fortune/unstr/Makefile b/usr.bin/fortune/unstr/Makefile index d10682cbc159..ed1f1b7790a7 100644 --- a/usr.bin/fortune/unstr/Makefile +++ b/usr.bin/fortune/unstr/Makefile @@ -1,4 +1,3 @@ - PROG= unstr MAN= CFLAGS+= -I${FORTUNE_SRC}/strfile diff --git a/usr.bin/from/Makefile b/usr.bin/from/Makefile index 1f21a84f0d4e..c27be3f50a25 100644 --- a/usr.bin/from/Makefile +++ b/usr.bin/from/Makefile @@ -1,4 +1,3 @@ - PROG= from .include diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile index d0153afe4936..fa51a92eb52f 100644 --- a/usr.bin/fstat/Makefile +++ b/usr.bin/fstat/Makefile @@ -1,4 +1,3 @@ - PROG= fstat SRCS= fstat.c fuser.c main.c LINKS= ${BINDIR}/fstat ${BINDIR}/fuser diff --git a/usr.bin/fsync/Makefile b/usr.bin/fsync/Makefile index 08d509c13b91..79c1b4579005 100644 --- a/usr.bin/fsync/Makefile +++ b/usr.bin/fsync/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= fsync diff --git a/usr.bin/gcore/Makefile b/usr.bin/gcore/Makefile index 9ca1d5a3f61b..398f7d2a36d6 100644 --- a/usr.bin/gcore/Makefile +++ b/usr.bin/gcore/Makefile @@ -1,4 +1,3 @@ - PROG= gcore SRCS= elfcore.c gcore.c LIBADD= sbuf util diff --git a/usr.bin/gencat/Makefile b/usr.bin/gencat/Makefile index b30c2917206d..3fabbff02c40 100644 --- a/usr.bin/gencat/Makefile +++ b/usr.bin/gencat/Makefile @@ -1,4 +1,3 @@ - PROG= gencat .include diff --git a/usr.bin/getconf/Makefile b/usr.bin/getconf/Makefile index c7968477eae3..e2ec0543634b 100644 --- a/usr.bin/getconf/Makefile +++ b/usr.bin/getconf/Makefile @@ -1,4 +1,3 @@ - .include PROG= getconf diff --git a/usr.bin/getconf/tests/Makefile b/usr.bin/getconf/tests/Makefile index f434667b96de..e29a1876a826 100644 --- a/usr.bin/getconf/tests/Makefile +++ b/usr.bin/getconf/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= getconf_test PROGS+= arch_type diff --git a/usr.bin/getent/Makefile b/usr.bin/getent/Makefile index 2745b7387644..f6df38652766 100644 --- a/usr.bin/getent/Makefile +++ b/usr.bin/getent/Makefile @@ -1,4 +1,3 @@ - PROG= getent .include diff --git a/usr.bin/gh-bc/Makefile b/usr.bin/gh-bc/Makefile index e78ab4b2994b..0fdc687c0e50 100644 --- a/usr.bin/gh-bc/Makefile +++ b/usr.bin/gh-bc/Makefile @@ -1,4 +1,3 @@ - .include PROG= gh-bc diff --git a/usr.bin/gh-bc/tests/Makefile b/usr.bin/gh-bc/tests/Makefile index 15b5a78c1a9b..464ae4b5d3c3 100644 --- a/usr.bin/gh-bc/tests/Makefile +++ b/usr.bin/gh-bc/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/usr.bin/gprof/Makefile b/usr.bin/gprof/Makefile index c71f56dd0503..e486dd8ce6d9 100644 --- a/usr.bin/gprof/Makefile +++ b/usr.bin/gprof/Makefile @@ -1,4 +1,3 @@ - PROG= gprof SRCS= gprof.c arcs.c dfn.c elf.c lookup.c hertz.c \ printgprof.c printlist.c kernel.c diff --git a/usr.bin/grdc/Makefile b/usr.bin/grdc/Makefile index 0487e6fcd5bc..de541283e3a4 100644 --- a/usr.bin/grdc/Makefile +++ b/usr.bin/grdc/Makefile @@ -1,4 +1,3 @@ - PACKAGE= games PROG= grdc diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile index eb8e867c675c..b3c79657e53c 100644 --- a/usr.bin/grep/tests/Makefile +++ b/usr.bin/grep/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= grep_freebsd_test diff --git a/usr.bin/gzip/tests/Makefile b/usr.bin/gzip/tests/Makefile index c38e9e798669..96783eec23ea 100644 --- a/usr.bin/gzip/tests/Makefile +++ b/usr.bin/gzip/tests/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= tests diff --git a/usr.bin/head/Makefile b/usr.bin/head/Makefile index 70ee3447cc60..aaf41e24baa1 100644 --- a/usr.bin/head/Makefile +++ b/usr.bin/head/Makefile @@ -1,4 +1,3 @@ - .include PROG= head diff --git a/usr.bin/head/tests/Makefile b/usr.bin/head/tests/Makefile index a2e5f879827b..0ca086db4151 100644 --- a/usr.bin/head/tests/Makefile +++ b/usr.bin/head/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= head_test diff --git a/usr.bin/hesinfo/Makefile b/usr.bin/hesinfo/Makefile index ddaeebc845b5..bb95e6200d1c 100644 --- a/usr.bin/hesinfo/Makefile +++ b/usr.bin/hesinfo/Makefile @@ -1,4 +1,3 @@ - PROG= hesinfo .include diff --git a/usr.bin/hexdump/Makefile b/usr.bin/hexdump/Makefile index a1af8d673435..d7a10ceb7aa7 100644 --- a/usr.bin/hexdump/Makefile +++ b/usr.bin/hexdump/Makefile @@ -1,4 +1,3 @@ - .include PROG= hexdump diff --git a/usr.bin/hexdump/tests/Makefile b/usr.bin/hexdump/tests/Makefile index 8d41382140d0..151407d3459c 100644 --- a/usr.bin/hexdump/tests/Makefile +++ b/usr.bin/hexdump/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= hexdump_test od_test diff --git a/usr.bin/host/Makefile b/usr.bin/host/Makefile index 0b532ae1bb42..45ca3698abd5 100644 --- a/usr.bin/host/Makefile +++ b/usr.bin/host/Makefile @@ -1,4 +1,3 @@ - LDNSDIR= ${SRCTOP}/contrib/ldns LDNSHOSTDIR= ${SRCTOP}/contrib/ldns-host diff --git a/usr.bin/id/Makefile b/usr.bin/id/Makefile index 6b83fa394cc0..bc19e94b1f76 100644 --- a/usr.bin/id/Makefile +++ b/usr.bin/id/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/ident/Makefile b/usr.bin/ident/Makefile index b4017326ea8b..8695ae3e6003 100644 --- a/usr.bin/ident/Makefile +++ b/usr.bin/ident/Makefile @@ -1,4 +1,3 @@ - .include PROG= ident diff --git a/usr.bin/ident/tests/Makefile b/usr.bin/ident/tests/Makefile index 3d03ff5e42d0..d7b7256f07c0 100644 --- a/usr.bin/ident/tests/Makefile +++ b/usr.bin/ident/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= ident_test diff --git a/usr.bin/indent/Makefile b/usr.bin/indent/Makefile index 7691a9207422..3f7ee955a228 100644 --- a/usr.bin/indent/Makefile +++ b/usr.bin/indent/Makefile @@ -1,4 +1,3 @@ - .include PROG= indent diff --git a/usr.bin/indent/tests/Makefile b/usr.bin/indent/tests/Makefile index 2369999e268d..4e84917f8a40 100644 --- a/usr.bin/indent/tests/Makefile +++ b/usr.bin/indent/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ${PACKAGE}FILES+= binary.0 diff --git a/usr.bin/ipcrm/Makefile b/usr.bin/ipcrm/Makefile index cde998fad2ae..797b9f3dc5a9 100644 --- a/usr.bin/ipcrm/Makefile +++ b/usr.bin/ipcrm/Makefile @@ -1,4 +1,3 @@ - PROG= ipcrm SRCS= ipcrm.c ipc.c LIBADD= kvm diff --git a/usr.bin/ipcs/Makefile b/usr.bin/ipcs/Makefile index 1dc1c27b0c16..22a2543e9eda 100644 --- a/usr.bin/ipcs/Makefile +++ b/usr.bin/ipcs/Makefile @@ -1,4 +1,3 @@ - PROG= ipcs SRCS= ipcs.c ipc.c LIBADD= kvm diff --git a/usr.bin/iscsictl/Makefile b/usr.bin/iscsictl/Makefile index 473a1beee169..6c09faa3d915 100644 --- a/usr.bin/iscsictl/Makefile +++ b/usr.bin/iscsictl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= iscsi PROG= iscsictl SRCS= iscsictl.c periphs.c parse.y token.l y.tab.h diff --git a/usr.bin/join/Makefile b/usr.bin/join/Makefile index d591913c0a7c..4ec29f14e3c9 100644 --- a/usr.bin/join/Makefile +++ b/usr.bin/join/Makefile @@ -1,4 +1,3 @@ - .include PROG= join diff --git a/usr.bin/join/tests/Makefile b/usr.bin/join/tests/Makefile index a3b88f8b1dcb..51e46dc2f189 100644 --- a/usr.bin/join/tests/Makefile +++ b/usr.bin/join/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/jot/Makefile b/usr.bin/jot/Makefile index 0990679b8b2c..7c9c1a745a12 100644 --- a/usr.bin/jot/Makefile +++ b/usr.bin/jot/Makefile @@ -1,4 +1,3 @@ - .include PROG= jot diff --git a/usr.bin/jot/tests/Makefile b/usr.bin/jot/tests/Makefile index 06339a9af799..6b47c7251904 100644 --- a/usr.bin/jot/tests/Makefile +++ b/usr.bin/jot/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile index b2eba487979e..2c5c456a6de5 100644 --- a/usr.bin/kdump/Makefile +++ b/usr.bin/kdump/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/usr.bin/ktrace diff --git a/usr.bin/keylogin/Makefile b/usr.bin/keylogin/Makefile index 77f589532f4b..7a267e4c5a72 100644 --- a/usr.bin/keylogin/Makefile +++ b/usr.bin/keylogin/Makefile @@ -1,4 +1,3 @@ - PROG= keylogin LIBADD= rpcsvc diff --git a/usr.bin/keylogout/Makefile b/usr.bin/keylogout/Makefile index eaf78c3097d8..244d6d2d0be7 100644 --- a/usr.bin/keylogout/Makefile +++ b/usr.bin/keylogout/Makefile @@ -1,4 +1,3 @@ - PROG= keylogout .include diff --git a/usr.bin/killall/Makefile b/usr.bin/killall/Makefile index 2e35471d76a7..4088d0a58005 100644 --- a/usr.bin/killall/Makefile +++ b/usr.bin/killall/Makefile @@ -1,4 +1,3 @@ - PROG= killall LIBADD= jail diff --git a/usr.bin/ktrace/Makefile b/usr.bin/ktrace/Makefile index a6b4b2a6f1af..6c1f454725c2 100644 --- a/usr.bin/ktrace/Makefile +++ b/usr.bin/ktrace/Makefile @@ -1,4 +1,3 @@ - PROG= ktrace SRCS= ktrace.c subr.c MLINKS= ktrace.1 trace.1 diff --git a/usr.bin/ktrdump/Makefile b/usr.bin/ktrdump/Makefile index 911fa2bec1f1..2bea92917d2b 100644 --- a/usr.bin/ktrdump/Makefile +++ b/usr.bin/ktrdump/Makefile @@ -1,4 +1,3 @@ - PROG= ktrdump LIBADD= kvm MAN= ktrdump.8 diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 953bb46589b1..5160d1ed6328 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -1,4 +1,3 @@ - .include KYUA_CONFDIR= /etc/kyua diff --git a/usr.bin/lam/Makefile b/usr.bin/lam/Makefile index 5fe50646e310..e47ea0a98eaa 100644 --- a/usr.bin/lam/Makefile +++ b/usr.bin/lam/Makefile @@ -1,4 +1,3 @@ - PROG= lam .include diff --git a/usr.bin/last/Makefile b/usr.bin/last/Makefile index a429fdfe8805..eb32dcfb35b7 100644 --- a/usr.bin/last/Makefile +++ b/usr.bin/last/Makefile @@ -1,4 +1,3 @@ - PROG= last PACKAGE= acct LIBADD= xo diff --git a/usr.bin/lastcomm/Makefile b/usr.bin/lastcomm/Makefile index 20b737422f90..48c49cc2df3d 100644 --- a/usr.bin/lastcomm/Makefile +++ b/usr.bin/lastcomm/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=acct diff --git a/usr.bin/lastcomm/tests/Makefile b/usr.bin/lastcomm/tests/Makefile index fc58c7729161..8a00382979b1 100644 --- a/usr.bin/lastcomm/tests/Makefile +++ b/usr.bin/lastcomm/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/ldd/Makefile b/usr.bin/ldd/Makefile index 11fdf3d41954..3abaf20af1b3 100644 --- a/usr.bin/ldd/Makefile +++ b/usr.bin/ldd/Makefile @@ -1,4 +1,3 @@ - PROG?= ldd SRCS= ldd.c diff --git a/usr.bin/ldd32/Makefile b/usr.bin/ldd32/Makefile index 59cfd50d6152..5b028560ba6b 100644 --- a/usr.bin/ldd32/Makefile +++ b/usr.bin/ldd32/Makefile @@ -1,4 +1,3 @@ - NEED_COMPAT= 32 .include diff --git a/usr.bin/leave/Makefile b/usr.bin/leave/Makefile index 507f0f0ca08e..31e9b12e975d 100644 --- a/usr.bin/leave/Makefile +++ b/usr.bin/leave/Makefile @@ -1,4 +1,3 @@ - PROG= leave NO_WFORMAT= diff --git a/usr.bin/less/Makefile b/usr.bin/less/Makefile index 1c142da359c2..23fc6579818b 100644 --- a/usr.bin/less/Makefile +++ b/usr.bin/less/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= less SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c command.c cvt.c \ diff --git a/usr.bin/less/Makefile.common b/usr.bin/less/Makefile.common index 349f275ad785..f0fcc9150087 100644 --- a/usr.bin/less/Makefile.common +++ b/usr.bin/less/Makefile.common @@ -1,4 +1,3 @@ - LSDIR= ${SRCTOP}/contrib/less .PATH: ${LSDIR} diff --git a/usr.bin/lessecho/Makefile b/usr.bin/lessecho/Makefile index 6b2ca7621d90..d8571677f0ac 100644 --- a/usr.bin/lessecho/Makefile +++ b/usr.bin/lessecho/Makefile @@ -1,4 +1,3 @@ - PROG= lessecho SRCS= lessecho.c version.c CLEANFILES= lessecho.1 diff --git a/usr.bin/lesskey/Makefile b/usr.bin/lesskey/Makefile index f6bb8eac1f2b..e1fd0d557136 100644 --- a/usr.bin/lesskey/Makefile +++ b/usr.bin/lesskey/Makefile @@ -1,4 +1,3 @@ - PROG= lesskey SRCS= lesskey.c lesskey_parse.c version.c xbuf.c CLEANFILES= lesskey.1 diff --git a/usr.bin/lex/lib/Makefile b/usr.bin/lex/lib/Makefile index 848c0dc8bc69..f3ea5c6a71ff 100644 --- a/usr.bin/lex/lib/Makefile +++ b/usr.bin/lex/lib/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/flex/src diff --git a/usr.bin/limits/Makefile b/usr.bin/limits/Makefile index 93a4ea8450cd..1c7e91de9e49 100644 --- a/usr.bin/limits/Makefile +++ b/usr.bin/limits/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/limits/tests/Makefile b/usr.bin/limits/tests/Makefile index 1d50e4bc13c9..7098c21aa454 100644 --- a/usr.bin/limits/tests/Makefile +++ b/usr.bin/limits/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= limits_test .include diff --git a/usr.bin/locale/Makefile b/usr.bin/locale/Makefile index 9be90f2bb11f..33b72ae07b2c 100644 --- a/usr.bin/locale/Makefile +++ b/usr.bin/locale/Makefile @@ -1,4 +1,3 @@ - .include PROG= locale diff --git a/usr.bin/locale/tests/Makefile b/usr.bin/locale/tests/Makefile index ba696103e633..7b26f0632607 100644 --- a/usr.bin/locale/tests/Makefile +++ b/usr.bin/locale/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= locale_test diff --git a/usr.bin/localedef/Makefile b/usr.bin/localedef/Makefile index 21b71b795013..bfc51d33c653 100644 --- a/usr.bin/localedef/Makefile +++ b/usr.bin/localedef/Makefile @@ -1,4 +1,3 @@ - PROG= localedef SRCS= charmap.c \ collate.c \ diff --git a/usr.bin/locate/Makefile b/usr.bin/locate/Makefile index a57a04dbea3c..b1f74a2d443d 100644 --- a/usr.bin/locate/Makefile +++ b/usr.bin/locate/Makefile @@ -1,5 +1,4 @@ - SUBDIR= bigram code locate .include diff --git a/usr.bin/locate/Makefile.inc b/usr.bin/locate/Makefile.inc index 070f751c5aa4..a247370497a9 100644 --- a/usr.bin/locate/Makefile.inc +++ b/usr.bin/locate/Makefile.inc @@ -1,4 +1,3 @@ - LIBEXECDIR?= /usr/libexec WARNS?= 0 diff --git a/usr.bin/locate/bigram/Makefile b/usr.bin/locate/bigram/Makefile index 158f647f31d2..1cd04c88496a 100644 --- a/usr.bin/locate/bigram/Makefile +++ b/usr.bin/locate/bigram/Makefile @@ -1,4 +1,3 @@ - PROG= locate.bigram MAN= BINDIR= ${LIBEXECDIR} diff --git a/usr.bin/locate/code/Makefile b/usr.bin/locate/code/Makefile index f9b88a2240b4..e50f1f202937 100644 --- a/usr.bin/locate/code/Makefile +++ b/usr.bin/locate/code/Makefile @@ -1,4 +1,3 @@ - PROG= locate.code CFLAGS+=-I${.CURDIR}/../locate MAN= diff --git a/usr.bin/locate/locate/Makefile b/usr.bin/locate/locate/Makefile index 815c6fe626cb..64822fd2ef63 100644 --- a/usr.bin/locate/locate/Makefile +++ b/usr.bin/locate/locate/Makefile @@ -1,4 +1,3 @@ - CONFS= locate.rc PROG= locate SRCS= util.c locate.c diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile index 056194415bb9..48fd0ba5e1ed 100644 --- a/usr.bin/lock/Makefile +++ b/usr.bin/lock/Makefile @@ -1,4 +1,3 @@ - PROG= lock BINOWN= root BINMODE=4555 diff --git a/usr.bin/lockf/Makefile b/usr.bin/lockf/Makefile index b7d916f20d13..36740dbd3a95 100644 --- a/usr.bin/lockf/Makefile +++ b/usr.bin/lockf/Makefile @@ -1,4 +1,3 @@ - .include PROG= lockf diff --git a/usr.bin/lockf/tests/Makefile b/usr.bin/lockf/tests/Makefile index 88a936cc583d..a7c6f45290c9 100644 --- a/usr.bin/lockf/tests/Makefile +++ b/usr.bin/lockf/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= lockf_test diff --git a/usr.bin/logger/Makefile b/usr.bin/logger/Makefile index 4ce072cbf940..85870b85a4dc 100644 --- a/usr.bin/logger/Makefile +++ b/usr.bin/logger/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile index 5afcb0b3bb85..b88796e97691 100644 --- a/usr.bin/login/Makefile +++ b/usr.bin/login/Makefile @@ -1,4 +1,3 @@ - .include .include diff --git a/usr.bin/logins/Makefile b/usr.bin/logins/Makefile index b264605854f3..44989870b319 100644 --- a/usr.bin/logins/Makefile +++ b/usr.bin/logins/Makefile @@ -1,4 +1,3 @@ - PROG= logins .include diff --git a/usr.bin/logname/Makefile b/usr.bin/logname/Makefile index 85286a3fddf4..b7422cbd53ae 100644 --- a/usr.bin/logname/Makefile +++ b/usr.bin/logname/Makefile @@ -1,4 +1,3 @@ - PROG= logname .include diff --git a/usr.bin/look/Makefile b/usr.bin/look/Makefile index ddbe20b05d90..e1331bfdce0d 100644 --- a/usr.bin/look/Makefile +++ b/usr.bin/look/Makefile @@ -1,4 +1,3 @@ - PROG= look .include diff --git a/usr.bin/lsvfs/Makefile b/usr.bin/lsvfs/Makefile index bea5c0ff7652..70c8f642897a 100644 --- a/usr.bin/lsvfs/Makefile +++ b/usr.bin/lsvfs/Makefile @@ -1,4 +1,3 @@ - PROG= lsvfs .include diff --git a/usr.bin/lzmainfo/Makefile b/usr.bin/lzmainfo/Makefile index 03c56aa06976..471d9055e8c7 100644 --- a/usr.bin/lzmainfo/Makefile +++ b/usr.bin/lzmainfo/Makefile @@ -1,4 +1,3 @@ - PROG= lzmainfo XZDIR= ${SRCTOP}/contrib/xz/src diff --git a/usr.bin/m4/tests/Makefile b/usr.bin/m4/tests/Makefile index cb3ca6b72652..45245d75e85d 100644 --- a/usr.bin/m4/tests/Makefile +++ b/usr.bin/m4/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/mail/Makefile b/usr.bin/mail/Makefile index 7a4054f60110..c20060d88ebf 100644 --- a/usr.bin/mail/Makefile +++ b/usr.bin/mail/Makefile @@ -1,4 +1,3 @@ - CONFS= misc/mail.rc PROG= mail SRCS= version.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ diff --git a/usr.bin/man/Makefile b/usr.bin/man/Makefile index 01b861697510..9c9098270735 100644 --- a/usr.bin/man/Makefile +++ b/usr.bin/man/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= man.sh LINKS= ${BINDIR}/man ${BINDIR}/manpath diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 76c63c0f745a..dcc6ea2e9073 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -1,4 +1,3 @@ - .include MANDOCDIR= ${SRCTOP}/contrib/mandoc diff --git a/usr.bin/mesg/Makefile b/usr.bin/mesg/Makefile index f35bf7702695..02a02d89bd36 100644 --- a/usr.bin/mesg/Makefile +++ b/usr.bin/mesg/Makefile @@ -1,4 +1,3 @@ - PROG= mesg .include diff --git a/usr.bin/mkcsmapper/Makefile b/usr.bin/mkcsmapper/Makefile index dfce96833788..d8e8dfab4f7d 100644 --- a/usr.bin/mkcsmapper/Makefile +++ b/usr.bin/mkcsmapper/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/iconv PROG= mkcsmapper diff --git a/usr.bin/mkcsmapper/Makefile.inc b/usr.bin/mkcsmapper/Makefile.inc index 5442e25b8d73..7189f83ba534 100644 --- a/usr.bin/mkcsmapper/Makefile.inc +++ b/usr.bin/mkcsmapper/Makefile.inc @@ -1,4 +1,3 @@ - .include SRCS+= lex.l yacc.y diff --git a/usr.bin/mkcsmapper_static/Makefile b/usr.bin/mkcsmapper_static/Makefile index 8b9fce51a46c..777f29bd9403 100644 --- a/usr.bin/mkcsmapper_static/Makefile +++ b/usr.bin/mkcsmapper_static/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkcsmapper PROG= mkcsmapper_static diff --git a/usr.bin/mkdep/Makefile b/usr.bin/mkdep/Makefile index 3cfea688be56..3a0500c9510c 100644 --- a/usr.bin/mkdep/Makefile +++ b/usr.bin/mkdep/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= mkdep.gcc.sh MAN= mkdep.1 SCRIPTSNAME= mkdep diff --git a/usr.bin/mkesdb/Makefile b/usr.bin/mkesdb/Makefile index 923c3f26c019..275a8f65cb1a 100644 --- a/usr.bin/mkesdb/Makefile +++ b/usr.bin/mkesdb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/iconv PROG= mkesdb diff --git a/usr.bin/mkesdb/Makefile.inc b/usr.bin/mkesdb/Makefile.inc index 79dc1a6f5732..ffc3f4505fb2 100644 --- a/usr.bin/mkesdb/Makefile.inc +++ b/usr.bin/mkesdb/Makefile.inc @@ -1,4 +1,3 @@ - SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \ -I${.CURDIR}/../../lib/libc/iconv diff --git a/usr.bin/mkesdb_static/Makefile b/usr.bin/mkesdb_static/Makefile index 96711506f67d..3d41dbafeac5 100644 --- a/usr.bin/mkesdb_static/Makefile +++ b/usr.bin/mkesdb_static/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/iconv ${SRCTOP}/usr.bin/mkesdb PROG= mkesdb_static diff --git a/usr.bin/mkfifo/Makefile b/usr.bin/mkfifo/Makefile index a07c9fa27346..aa19b2abf758 100644 --- a/usr.bin/mkfifo/Makefile +++ b/usr.bin/mkfifo/Makefile @@ -1,4 +1,3 @@ - PROG= mkfifo .include diff --git a/usr.bin/mkimg/Makefile b/usr.bin/mkimg/Makefile index 26fd01a6d845..9e39b7abc956 100644 --- a/usr.bin/mkimg/Makefile +++ b/usr.bin/mkimg/Makefile @@ -1,4 +1,3 @@ - .include PROG= mkimg diff --git a/usr.bin/mkimg/tests/Makefile b/usr.bin/mkimg/tests/Makefile index b98fb6ddb65a..0cd08b6f1230 100644 --- a/usr.bin/mkimg/tests/Makefile +++ b/usr.bin/mkimg/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR} PACKAGE= tests diff --git a/usr.bin/mkstr/Makefile b/usr.bin/mkstr/Makefile index 7291981bdf51..1a691e6d78d5 100644 --- a/usr.bin/mkstr/Makefile +++ b/usr.bin/mkstr/Makefile @@ -1,4 +1,3 @@ - PROG= mkstr WARNS?= 2 diff --git a/usr.bin/mktemp/Makefile b/usr.bin/mktemp/Makefile index 713bc7f43ea3..2da8049b28f7 100644 --- a/usr.bin/mktemp/Makefile +++ b/usr.bin/mktemp/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/mktemp/tests/Makefile b/usr.bin/mktemp/tests/Makefile index 164586d23063..c1de03fd1963 100644 --- a/usr.bin/mktemp/tests/Makefile +++ b/usr.bin/mktemp/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= mktemp_test diff --git a/usr.bin/mkuzip/Makefile b/usr.bin/mkuzip/Makefile index 3cc1953f4a0a..a2224f4b6758 100644 --- a/usr.bin/mkuzip/Makefile +++ b/usr.bin/mkuzip/Makefile @@ -1,4 +1,3 @@ - PROG= mkuzip MAN= mkuzip.8 SRCS= mkuzip.c mkuz_blockcache.c mkuz_lzma.c mkuz_zlib.c mkuz_conveyor.c \ diff --git a/usr.bin/morse/Makefile b/usr.bin/morse/Makefile index 34a256683391..669ece99f898 100644 --- a/usr.bin/morse/Makefile +++ b/usr.bin/morse/Makefile @@ -1,4 +1,3 @@ - PROG= morse MAN= morse.6 diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile index 10c0fd0d9928..f30ced394797 100644 --- a/usr.bin/msgs/Makefile +++ b/usr.bin/msgs/Makefile @@ -1,4 +1,3 @@ - PROG= msgs LIBADD= tinfow diff --git a/usr.bin/mt/Makefile b/usr.bin/mt/Makefile index 453f7174d2a0..405e195c856b 100644 --- a/usr.bin/mt/Makefile +++ b/usr.bin/mt/Makefile @@ -1,4 +1,3 @@ - PROG= mt LIBADD= mt diff --git a/usr.bin/nc/Makefile b/usr.bin/nc/Makefile index d7efed2a9c53..411f558d7ba3 100644 --- a/usr.bin/nc/Makefile +++ b/usr.bin/nc/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/netcat diff --git a/usr.bin/ncal/Makefile b/usr.bin/ncal/Makefile index 2b9edc9bcd86..85affcf983b5 100644 --- a/usr.bin/ncal/Makefile +++ b/usr.bin/ncal/Makefile @@ -1,4 +1,3 @@ - .include PROG= ncal diff --git a/usr.bin/ncal/tests/Makefile b/usr.bin/ncal/tests/Makefile index 4afaf41c56c8..96b9751c43e1 100644 --- a/usr.bin/ncal/tests/Makefile +++ b/usr.bin/ncal/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index 4efcfda58f79..742de485a6b5 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -1,4 +1,3 @@ - .include PROG= netstat diff --git a/usr.bin/newgrp/Makefile b/usr.bin/newgrp/Makefile index 245863d1e0c0..3fcd0292909a 100644 --- a/usr.bin/newgrp/Makefile +++ b/usr.bin/newgrp/Makefile @@ -1,4 +1,3 @@ - PROG= newgrp LIBADD= crypt util diff --git a/usr.bin/newkey/Makefile b/usr.bin/newkey/Makefile index fa5ecabe0ddf..a081774288ac 100644 --- a/usr.bin/newkey/Makefile +++ b/usr.bin/newkey/Makefile @@ -1,4 +1,3 @@ - .include PROG= newkey diff --git a/usr.bin/nfsstat/Makefile b/usr.bin/nfsstat/Makefile index 780725b3ca53..25e617bc576f 100644 --- a/usr.bin/nfsstat/Makefile +++ b/usr.bin/nfsstat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= nfsstat diff --git a/usr.bin/nice/Makefile b/usr.bin/nice/Makefile index a22fe07526c2..4098b3b39b6f 100644 --- a/usr.bin/nice/Makefile +++ b/usr.bin/nice/Makefile @@ -1,4 +1,3 @@ - PROG= nice .include diff --git a/usr.bin/nl/Makefile b/usr.bin/nl/Makefile index fc793c9abf0f..66a14832e2a3 100644 --- a/usr.bin/nl/Makefile +++ b/usr.bin/nl/Makefile @@ -1,4 +1,3 @@ - PROG= nl .include diff --git a/usr.bin/nm/Makefile b/usr.bin/nm/Makefile index e642f61f2f3b..c4c75725dd1c 100644 --- a/usr.bin/nm/Makefile +++ b/usr.bin/nm/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/nohup/Makefile b/usr.bin/nohup/Makefile index 7010b6420641..5698f6a5b474 100644 --- a/usr.bin/nohup/Makefile +++ b/usr.bin/nohup/Makefile @@ -1,4 +1,3 @@ - PROG= nohup .include diff --git a/usr.bin/number/Makefile b/usr.bin/number/Makefile index deac71ffce00..e2af22dc3697 100644 --- a/usr.bin/number/Makefile +++ b/usr.bin/number/Makefile @@ -1,4 +1,3 @@ - PROG= number MAN= number.6 diff --git a/usr.bin/objcopy/Makefile b/usr.bin/objcopy/Makefile index e7ce15286dcf..101c84cc5206 100644 --- a/usr.bin/objcopy/Makefile +++ b/usr.bin/objcopy/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/ofed/Makefile b/usr.bin/ofed/Makefile index a0ac9fdb2e38..59637dbe4760 100644 --- a/usr.bin/ofed/Makefile +++ b/usr.bin/ofed/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= \ diff --git a/usr.bin/ofed/infiniband-diags/Makefile b/usr.bin/ofed/infiniband-diags/Makefile index 0425f628f01d..c25b24d5af52 100644 --- a/usr.bin/ofed/infiniband-diags/Makefile +++ b/usr.bin/ofed/infiniband-diags/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= \ diff --git a/usr.bin/ofed/infiniband-diags/Makefile.inc b/usr.bin/ofed/infiniband-diags/Makefile.inc index 5ed5c9074114..162fdade24ca 100644 --- a/usr.bin/ofed/infiniband-diags/Makefile.inc +++ b/usr.bin/ofed/infiniband-diags/Makefile.inc @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/infiniband-diags .PATH: ${_spath}/src ${_spath}/man diff --git a/usr.bin/ofed/infiniband-diags/dump_fts/Makefile b/usr.bin/ofed/infiniband-diags/dump_fts/Makefile index 7ffa135de1d1..a08caaa10319 100644 --- a/usr.bin/ofed/infiniband-diags/dump_fts/Makefile +++ b/usr.bin/ofed/infiniband-diags/dump_fts/Makefile @@ -1,4 +1,3 @@ - PROG= dump_fts SRCS= dump_fts.c LIBADD= ibnetdisc diff --git a/usr.bin/ofed/infiniband-diags/ibaddr/Makefile b/usr.bin/ofed/infiniband-diags/ibaddr/Makefile index f34b32454d72..5e797f4c0d68 100644 --- a/usr.bin/ofed/infiniband-diags/ibaddr/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibaddr/Makefile @@ -1,4 +1,3 @@ - PROG= ibaddr SRCS= ibaddr.c MAN= ibaddr.8 diff --git a/usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile b/usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile index 5dc24864dd34..87fc509f71aa 100644 --- a/usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibcacheedit/Makefile @@ -1,4 +1,3 @@ - PROG= ibcacheedit SRCS= ibcacheedit.c LIBADD= ibnetdisc diff --git a/usr.bin/ofed/infiniband-diags/ibccconfig/Makefile b/usr.bin/ofed/infiniband-diags/ibccconfig/Makefile index b48b937a5c91..0b53a27583fb 100644 --- a/usr.bin/ofed/infiniband-diags/ibccconfig/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibccconfig/Makefile @@ -1,4 +1,3 @@ - PROG= ibccconfig SRCS= ibccconfig.c MAN= ibccconfig.8 diff --git a/usr.bin/ofed/infiniband-diags/ibccquery/Makefile b/usr.bin/ofed/infiniband-diags/ibccquery/Makefile index 15bb199ac405..90ab8bc77777 100644 --- a/usr.bin/ofed/infiniband-diags/ibccquery/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibccquery/Makefile @@ -1,4 +1,3 @@ - PROG= ibccquery SRCS= ibccquery.c MAN= ibccquery.8 diff --git a/usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile b/usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile index 5079ba90400e..1075e6ae37ce 100644 --- a/usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile +++ b/usr.bin/ofed/infiniband-diags/iblinkinfo/Makefile @@ -1,4 +1,3 @@ - PROG= iblinkinfo SRCS= iblinkinfo.c LIBADD= ibnetdisc diff --git a/usr.bin/ofed/infiniband-diags/ibmirror/Makefile b/usr.bin/ofed/infiniband-diags/ibmirror/Makefile index 4cbdb3cafe1b..bf960827c56f 100644 --- a/usr.bin/ofed/infiniband-diags/ibmirror/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibmirror/Makefile @@ -1,4 +1,3 @@ - PROG= ibmirror SRCS= ibmirror.c MAN= diff --git a/usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile b/usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile index cf9b3495ea0b..cbb515883c27 100644 --- a/usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibnetdiscover/Makefile @@ -1,4 +1,3 @@ - PROG= ibnetdiscover SRCS= ibnetdiscover.c LIBADD= ibnetdisc diff --git a/usr.bin/ofed/infiniband-diags/ibping/Makefile b/usr.bin/ofed/infiniband-diags/ibping/Makefile index f2c35b066b22..15a645ad0752 100644 --- a/usr.bin/ofed/infiniband-diags/ibping/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibping/Makefile @@ -1,4 +1,3 @@ - PROG= ibping SRCS= ibping.c MAN= ibping.8 diff --git a/usr.bin/ofed/infiniband-diags/ibportstate/Makefile b/usr.bin/ofed/infiniband-diags/ibportstate/Makefile index b4275ed74aef..65a67dfd4880 100644 --- a/usr.bin/ofed/infiniband-diags/ibportstate/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibportstate/Makefile @@ -1,4 +1,3 @@ - PROG= ibportstate SRCS= ibportstate.c MAN= ibportstate.8 diff --git a/usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile b/usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile index 4826141aa58b..a0526b46e8f5 100644 --- a/usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibqueryerrors/Makefile @@ -1,4 +1,3 @@ - PROG= ibqueryerrors SRCS= ibqueryerrors.c LIBADD= ibnetdisc diff --git a/usr.bin/ofed/infiniband-diags/ibroute/Makefile b/usr.bin/ofed/infiniband-diags/ibroute/Makefile index a1a6ee661834..03cea57b8e5e 100644 --- a/usr.bin/ofed/infiniband-diags/ibroute/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibroute/Makefile @@ -1,4 +1,3 @@ - PROG= ibroute SRCS= ibroute.c MAN= ibroute.8 diff --git a/usr.bin/ofed/infiniband-diags/ibstat/Makefile b/usr.bin/ofed/infiniband-diags/ibstat/Makefile index cb340997c37f..2298970e42b9 100644 --- a/usr.bin/ofed/infiniband-diags/ibstat/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibstat/Makefile @@ -1,4 +1,3 @@ - PROG= ibstat SRCS= ibstat.c MAN= ibstat.8 diff --git a/usr.bin/ofed/infiniband-diags/ibsysstat/Makefile b/usr.bin/ofed/infiniband-diags/ibsysstat/Makefile index 289c8c06ab86..a8a72420e9c1 100644 --- a/usr.bin/ofed/infiniband-diags/ibsysstat/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibsysstat/Makefile @@ -1,4 +1,3 @@ - PROG= ibsysstat SRCS= ibsysstat.c MAN= ibsysstat.8 diff --git a/usr.bin/ofed/infiniband-diags/ibtracert/Makefile b/usr.bin/ofed/infiniband-diags/ibtracert/Makefile index f3086e27c59a..8bcd5192ade3 100644 --- a/usr.bin/ofed/infiniband-diags/ibtracert/Makefile +++ b/usr.bin/ofed/infiniband-diags/ibtracert/Makefile @@ -1,4 +1,3 @@ - PROG= ibtracert SRCS= ibtracert.c MAN= ibtracert.8 diff --git a/usr.bin/ofed/infiniband-diags/perfquery/Makefile b/usr.bin/ofed/infiniband-diags/perfquery/Makefile index 37c0c9ddbbe8..291cf168218d 100644 --- a/usr.bin/ofed/infiniband-diags/perfquery/Makefile +++ b/usr.bin/ofed/infiniband-diags/perfquery/Makefile @@ -1,4 +1,3 @@ - PROG= perfquery SRCS= perfquery.c MAN= perfquery.8 diff --git a/usr.bin/ofed/infiniband-diags/saquery/Makefile b/usr.bin/ofed/infiniband-diags/saquery/Makefile index dff1b9c214b9..739964215bdc 100644 --- a/usr.bin/ofed/infiniband-diags/saquery/Makefile +++ b/usr.bin/ofed/infiniband-diags/saquery/Makefile @@ -1,4 +1,3 @@ - PROG= saquery SRCS= saquery.c MAN= saquery.8 diff --git a/usr.bin/ofed/infiniband-diags/sminfo/Makefile b/usr.bin/ofed/infiniband-diags/sminfo/Makefile index 3999f1f90702..be63fb69fe5c 100644 --- a/usr.bin/ofed/infiniband-diags/sminfo/Makefile +++ b/usr.bin/ofed/infiniband-diags/sminfo/Makefile @@ -1,4 +1,3 @@ - PROG= sminfo SRCS= sminfo.c MAN= sminfo.8 diff --git a/usr.bin/ofed/infiniband-diags/smpdump/Makefile b/usr.bin/ofed/infiniband-diags/smpdump/Makefile index 6d73f21fd959..70fe61c05448 100644 --- a/usr.bin/ofed/infiniband-diags/smpdump/Makefile +++ b/usr.bin/ofed/infiniband-diags/smpdump/Makefile @@ -1,4 +1,3 @@ - PROG= smpdump SRCS= smpdump.c MAN= smpdump.8 diff --git a/usr.bin/ofed/infiniband-diags/smpquery/Makefile b/usr.bin/ofed/infiniband-diags/smpquery/Makefile index b467cb651a08..4c716f58387a 100644 --- a/usr.bin/ofed/infiniband-diags/smpquery/Makefile +++ b/usr.bin/ofed/infiniband-diags/smpquery/Makefile @@ -1,4 +1,3 @@ - PROG= smpquery SRCS= smpquery.c MAN= smpquery.8 diff --git a/usr.bin/ofed/infiniband-diags/vendstat/Makefile b/usr.bin/ofed/infiniband-diags/vendstat/Makefile index 3b46688a6520..9fea6878a25f 100644 --- a/usr.bin/ofed/infiniband-diags/vendstat/Makefile +++ b/usr.bin/ofed/infiniband-diags/vendstat/Makefile @@ -1,4 +1,3 @@ - PROG= vendstat SRCS= vendstat.c MAN= vendstat.8 diff --git a/usr.bin/ofed/libibverbs/Makefile b/usr.bin/ofed/libibverbs/Makefile index a6c366ce2ae0..f9aff0070f36 100644 --- a/usr.bin/ofed/libibverbs/Makefile +++ b/usr.bin/ofed/libibverbs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= FreeBSD-rdma SUBDIR= \ diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc index 461075a1592e..616c9bd54707 100644 --- a/usr.bin/ofed/libibverbs/Makefile.inc +++ b/usr.bin/ofed/libibverbs/Makefile.inc @@ -1,4 +1,3 @@ - _spath=${SRCTOP}/contrib/ofed/libibverbs .PATH: ${_spath}/examples ${_spath}/man diff --git a/usr.bin/ofed/libibverbs/asyncwatch/Makefile b/usr.bin/ofed/libibverbs/asyncwatch/Makefile index df9bcba25454..d7a910bf0944 100644 --- a/usr.bin/ofed/libibverbs/asyncwatch/Makefile +++ b/usr.bin/ofed/libibverbs/asyncwatch/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_asyncwatch MAN= ibv_asyncwatch.1 diff --git a/usr.bin/ofed/libibverbs/devices/Makefile b/usr.bin/ofed/libibverbs/devices/Makefile index f90c02cd4099..977d903d80fe 100644 --- a/usr.bin/ofed/libibverbs/devices/Makefile +++ b/usr.bin/ofed/libibverbs/devices/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_devices MAN= ibv_devices.1 diff --git a/usr.bin/ofed/libibverbs/devinfo/Makefile b/usr.bin/ofed/libibverbs/devinfo/Makefile index 210b01efd606..ef62919d2279 100644 --- a/usr.bin/ofed/libibverbs/devinfo/Makefile +++ b/usr.bin/ofed/libibverbs/devinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_devinfo MAN= ibv_devinfo.1 diff --git a/usr.bin/ofed/libibverbs/rc_pingpong/Makefile b/usr.bin/ofed/libibverbs/rc_pingpong/Makefile index 7b6a0fa87b4d..2ab8a1419b39 100644 --- a/usr.bin/ofed/libibverbs/rc_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/rc_pingpong/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_rc_pingpong MAN= ibv_rc_pingpong.1 diff --git a/usr.bin/ofed/libibverbs/srq_pingpong/Makefile b/usr.bin/ofed/libibverbs/srq_pingpong/Makefile index 13b203627c10..f15b021bc6e4 100644 --- a/usr.bin/ofed/libibverbs/srq_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/srq_pingpong/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_srq_pingpong MAN= ibv_srq_pingpong.1 diff --git a/usr.bin/ofed/libibverbs/uc_pingpong/Makefile b/usr.bin/ofed/libibverbs/uc_pingpong/Makefile index 4a804b562ffb..69a0e5f72808 100644 --- a/usr.bin/ofed/libibverbs/uc_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/uc_pingpong/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_uc_pingpong MAN= ibv_uc_pingpong.1 diff --git a/usr.bin/ofed/libibverbs/ud_pingpong/Makefile b/usr.bin/ofed/libibverbs/ud_pingpong/Makefile index ba1056d77717..932658508735 100644 --- a/usr.bin/ofed/libibverbs/ud_pingpong/Makefile +++ b/usr.bin/ofed/libibverbs/ud_pingpong/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ibv_ud_pingpong MAN= ibv_ud_pingpong.1 diff --git a/usr.bin/ofed/librdmacm/Makefile b/usr.bin/ofed/librdmacm/Makefile index 2f797fafa415..da14df38fbf2 100644 --- a/usr.bin/ofed/librdmacm/Makefile +++ b/usr.bin/ofed/librdmacm/Makefile @@ -1,4 +1,3 @@ - SUBDIR= ucmatose mckey rping udaddy SUBDIR_PARALLEL= diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc index 39cc7562e396..74f32fe08b42 100644 --- a/usr.bin/ofed/librdmacm/Makefile.inc +++ b/usr.bin/ofed/librdmacm/Makefile.inc @@ -1,4 +1,3 @@ - _spath=${SRCTOP}/contrib/ofed/librdmacm .PATH: ${_spath}/examples ${_spath}/man diff --git a/usr.bin/ofed/librdmacm/mckey/Makefile b/usr.bin/ofed/librdmacm/mckey/Makefile index b64b23bc97da..bdae45765b3f 100644 --- a/usr.bin/ofed/librdmacm/mckey/Makefile +++ b/usr.bin/ofed/librdmacm/mckey/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= mckey MAN= mckey.1 diff --git a/usr.bin/ofed/librdmacm/rping/Makefile b/usr.bin/ofed/librdmacm/rping/Makefile index 369a195bacf8..3406c6c576f5 100644 --- a/usr.bin/ofed/librdmacm/rping/Makefile +++ b/usr.bin/ofed/librdmacm/rping/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= rping MAN= rping.1 diff --git a/usr.bin/ofed/librdmacm/ucmatose/Makefile b/usr.bin/ofed/librdmacm/ucmatose/Makefile index ec805b13fbf1..0b4791c5404a 100644 --- a/usr.bin/ofed/librdmacm/ucmatose/Makefile +++ b/usr.bin/ofed/librdmacm/ucmatose/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= ucmatose MAN= ucmatose.1 diff --git a/usr.bin/ofed/librdmacm/udaddy/Makefile b/usr.bin/ofed/librdmacm/udaddy/Makefile index 2cc768580071..dc4105881d4a 100644 --- a/usr.bin/ofed/librdmacm/udaddy/Makefile +++ b/usr.bin/ofed/librdmacm/udaddy/Makefile @@ -1,4 +1,3 @@ - PACKAGE= rdma PROG= udaddy MAN= udaddy.1 diff --git a/usr.bin/ofed/opensm/Makefile b/usr.bin/ofed/opensm/Makefile index 6c3a8cf8e789..442a47bb160d 100644 --- a/usr.bin/ofed/opensm/Makefile +++ b/usr.bin/ofed/opensm/Makefile @@ -1,4 +1,3 @@ - _spath= ${SRCTOP}/contrib/ofed/opensm/opensm .PATH: ${_spath} ${_spath:H}/man diff --git a/usr.bin/pagesize/Makefile b/usr.bin/pagesize/Makefile index 38ab443d59a0..56dc6fdb697c 100644 --- a/usr.bin/pagesize/Makefile +++ b/usr.bin/pagesize/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=pagesize.sh MAN= pagesize.1 diff --git a/usr.bin/pamtest/Makefile b/usr.bin/pamtest/Makefile index 3269537e699b..99ee62e03b22 100644 --- a/usr.bin/pamtest/Makefile +++ b/usr.bin/pamtest/Makefile @@ -1,4 +1,3 @@ - OPENPAM= ${SRCTOP}/contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/bin/pamtest diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile index 0598454f7d84..f8734053deb0 100644 --- a/usr.bin/passwd/Makefile +++ b/usr.bin/passwd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE = runtime diff --git a/usr.bin/paste/Makefile b/usr.bin/paste/Makefile index 198c8e6c5653..e4f9e6d817b5 100644 --- a/usr.bin/paste/Makefile +++ b/usr.bin/paste/Makefile @@ -1,4 +1,3 @@ - PROG= paste .include diff --git a/usr.bin/patch/tests/Makefile b/usr.bin/patch/tests/Makefile index 2a924b72f1a0..bb113b5a260f 100644 --- a/usr.bin/patch/tests/Makefile +++ b/usr.bin/patch/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= unified_patch_test diff --git a/usr.bin/pathchk/Makefile b/usr.bin/pathchk/Makefile index b15a781a1cd1..a3ea46c30c5f 100644 --- a/usr.bin/pathchk/Makefile +++ b/usr.bin/pathchk/Makefile @@ -1,4 +1,3 @@ - PROG= pathchk .include diff --git a/usr.bin/perror/Makefile b/usr.bin/perror/Makefile index 8fae8955f16e..a83cd29dbc22 100644 --- a/usr.bin/perror/Makefile +++ b/usr.bin/perror/Makefile @@ -1,4 +1,3 @@ - PROG= perror .include diff --git a/usr.bin/pom/Makefile b/usr.bin/pom/Makefile index 4b4fb411a635..54b62eface74 100644 --- a/usr.bin/pom/Makefile +++ b/usr.bin/pom/Makefile @@ -1,4 +1,3 @@ - PACKAGE= games PROG= pom diff --git a/usr.bin/posixshmcontrol/Makefile b/usr.bin/posixshmcontrol/Makefile index 1d927667ed18..dc3d268f4a74 100644 --- a/usr.bin/posixshmcontrol/Makefile +++ b/usr.bin/posixshmcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= posixshmcontrol LIBADD= jail util diff --git a/usr.bin/pr/Makefile b/usr.bin/pr/Makefile index b033ee2d8a62..965ebc8d4637 100644 --- a/usr.bin/pr/Makefile +++ b/usr.bin/pr/Makefile @@ -1,4 +1,3 @@ - .include PROG= pr diff --git a/usr.bin/pr/tests/Makefile b/usr.bin/pr/tests/Makefile index 7d68f2e9938c..593e03ae1176 100644 --- a/usr.bin/pr/tests/Makefile +++ b/usr.bin/pr/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= basic2_test diff --git a/usr.bin/primes/Makefile b/usr.bin/primes/Makefile index 5cf6ad650e01..d2332d6bdd6b 100644 --- a/usr.bin/primes/Makefile +++ b/usr.bin/primes/Makefile @@ -1,4 +1,3 @@ - PROG= primes SRCS= pattern.c pr_tbl.c primes.c spsp.c MAN= diff --git a/usr.bin/printenv/Makefile b/usr.bin/printenv/Makefile index d8a4db8939d8..0add0695a1d7 100644 --- a/usr.bin/printenv/Makefile +++ b/usr.bin/printenv/Makefile @@ -1,4 +1,3 @@ - .include PROG= printenv diff --git a/usr.bin/printf/Makefile b/usr.bin/printf/Makefile index 6e9def2e11c4..f6339749708b 100644 --- a/usr.bin/printf/Makefile +++ b/usr.bin/printf/Makefile @@ -1,4 +1,3 @@ - .include PROG= printf diff --git a/usr.bin/printf/tests/Makefile b/usr.bin/printf/tests/Makefile index 8f2abefbfed3..4577434014ad 100644 --- a/usr.bin/printf/tests/Makefile +++ b/usr.bin/printf/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/proccontrol/Makefile b/usr.bin/proccontrol/Makefile index e1d7955d86a8..347063b3b565 100644 --- a/usr.bin/proccontrol/Makefile +++ b/usr.bin/proccontrol/Makefile @@ -1,4 +1,3 @@ - PROG= proccontrol .include diff --git a/usr.bin/procstat/Makefile b/usr.bin/procstat/Makefile index cd62c6a96674..56847625521f 100644 --- a/usr.bin/procstat/Makefile +++ b/usr.bin/procstat/Makefile @@ -1,4 +1,3 @@ - .include PROG= procstat diff --git a/usr.bin/procstat/tests/Makefile b/usr.bin/procstat/tests/Makefile index ba083a27abf8..9309bf30128c 100644 --- a/usr.bin/procstat/tests/Makefile +++ b/usr.bin/procstat/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= procstat_test PROGS+= while1 diff --git a/usr.bin/protect/Makefile b/usr.bin/protect/Makefile index 5bc569d5c769..bb7f2fbe7ec2 100644 --- a/usr.bin/protect/Makefile +++ b/usr.bin/protect/Makefile @@ -1,4 +1,3 @@ - PROG= protect .include diff --git a/usr.bin/quota/Makefile b/usr.bin/quota/Makefile index fc9ff8cc244b..3b7a6227bc86 100644 --- a/usr.bin/quota/Makefile +++ b/usr.bin/quota/Makefile @@ -1,4 +1,3 @@ - PROG= quota BINOWN= root BINMODE=4555 diff --git a/usr.bin/random/Makefile b/usr.bin/random/Makefile index 5e24c89cd982..8d0fc2be6f09 100644 --- a/usr.bin/random/Makefile +++ b/usr.bin/random/Makefile @@ -1,4 +1,3 @@ - PROG= random MAN= random.6 SRCS= random.c randomize_fd.c diff --git a/usr.bin/rctl/Makefile b/usr.bin/rctl/Makefile index c731b14c6366..d98e5c1ad9b0 100644 --- a/usr.bin/rctl/Makefile +++ b/usr.bin/rctl/Makefile @@ -1,4 +1,3 @@ - PROG= rctl MAN= rctl.8 diff --git a/usr.bin/readelf/Makefile b/usr.bin/readelf/Makefile index 3ab5f6e77dfc..d2a386fb0d40 100644 --- a/usr.bin/readelf/Makefile +++ b/usr.bin/readelf/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/renice/Makefile b/usr.bin/renice/Makefile index 73658c356089..6b99072b24c7 100644 --- a/usr.bin/renice/Makefile +++ b/usr.bin/renice/Makefile @@ -1,4 +1,3 @@ - .include PROG= renice diff --git a/usr.bin/resizewin/Makefile b/usr.bin/resizewin/Makefile index 3fc71846192b..edc1914e2553 100644 --- a/usr.bin/resizewin/Makefile +++ b/usr.bin/resizewin/Makefile @@ -1,4 +1,3 @@ - PROG= resizewin .include diff --git a/usr.bin/rev/Makefile b/usr.bin/rev/Makefile index 645aedd79b81..92540c110938 100644 --- a/usr.bin/rev/Makefile +++ b/usr.bin/rev/Makefile @@ -1,4 +1,3 @@ - PROG= rev .include diff --git a/usr.bin/revoke/Makefile b/usr.bin/revoke/Makefile index 574c488365f9..f468f6483b51 100644 --- a/usr.bin/revoke/Makefile +++ b/usr.bin/revoke/Makefile @@ -1,4 +1,3 @@ - PROG= revoke .include diff --git a/usr.bin/rpcgen/Makefile b/usr.bin/rpcgen/Makefile index 4ae15c5ca477..aafa97fd0c3d 100644 --- a/usr.bin/rpcgen/Makefile +++ b/usr.bin/rpcgen/Makefile @@ -1,4 +1,3 @@ - PROG= rpcgen SRCS= rpc_main.c rpc_clntout.c rpc_cout.c rpc_hout.c rpc_parse.c \ rpc_sample.c rpc_scan.c rpc_svcout.c rpc_tblout.c rpc_util.c diff --git a/usr.bin/rpcinfo/Makefile b/usr.bin/rpcinfo/Makefile index e44367324b3a..a55485e4f718 100644 --- a/usr.bin/rpcinfo/Makefile +++ b/usr.bin/rpcinfo/Makefile @@ -1,4 +1,3 @@ - PROG= rpcinfo SRCS= rpcinfo.c MAN= rpcinfo.8 diff --git a/usr.bin/rs/Makefile b/usr.bin/rs/Makefile index 86fdfe49064b..ed98f6826ce4 100644 --- a/usr.bin/rs/Makefile +++ b/usr.bin/rs/Makefile @@ -1,4 +1,3 @@ - .include PROG_CXX= rs diff --git a/usr.bin/rs/tests/Makefile b/usr.bin/rs/tests/Makefile index 7717466b5693..a11660690401 100644 --- a/usr.bin/rs/tests/Makefile +++ b/usr.bin/rs/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= rs_test .include diff --git a/usr.bin/rup/Makefile b/usr.bin/rup/Makefile index b9068fece39b..8cc5dc0f1af0 100644 --- a/usr.bin/rup/Makefile +++ b/usr.bin/rup/Makefile @@ -1,4 +1,3 @@ - PROG= rup LIBADD= rpcsvc diff --git a/usr.bin/ruptime/Makefile b/usr.bin/ruptime/Makefile index adc135153b1c..5c51c068ae73 100644 --- a/usr.bin/ruptime/Makefile +++ b/usr.bin/ruptime/Makefile @@ -1,4 +1,3 @@ - PROG= ruptime PACKAGE=rcmds diff --git a/usr.bin/rusers/Makefile b/usr.bin/rusers/Makefile index a2bfbf1e7cf9..f3b3a8bd7db0 100644 --- a/usr.bin/rusers/Makefile +++ b/usr.bin/rusers/Makefile @@ -1,4 +1,3 @@ - PROG = rusers LIBADD= rpcsvc diff --git a/usr.bin/rwall/Makefile b/usr.bin/rwall/Makefile index de7ed99d9598..88459adb760f 100644 --- a/usr.bin/rwall/Makefile +++ b/usr.bin/rwall/Makefile @@ -1,4 +1,3 @@ - PROG = rwall .include diff --git a/usr.bin/rwho/Makefile b/usr.bin/rwho/Makefile index 89a5e5cf1b98..b0d2d9f7faa1 100644 --- a/usr.bin/rwho/Makefile +++ b/usr.bin/rwho/Makefile @@ -1,4 +1,3 @@ - PROG= rwho PACKAGE=rcmds diff --git a/usr.bin/script/Makefile b/usr.bin/script/Makefile index e61c5d44ce82..99cb623ba5a9 100644 --- a/usr.bin/script/Makefile +++ b/usr.bin/script/Makefile @@ -1,4 +1,3 @@ - PROG= script LIBADD= util diff --git a/usr.bin/sdiff/Makefile b/usr.bin/sdiff/Makefile index 23edd45cd643..03587f373098 100644 --- a/usr.bin/sdiff/Makefile +++ b/usr.bin/sdiff/Makefile @@ -1,4 +1,3 @@ - .include PROG= sdiff diff --git a/usr.bin/sdiff/tests/Makefile b/usr.bin/sdiff/tests/Makefile index 6d06996ce47f..a849e4a2c0a0 100644 --- a/usr.bin/sdiff/tests/Makefile +++ b/usr.bin/sdiff/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= sdiff_test diff --git a/usr.bin/sdiotool/Makefile b/usr.bin/sdiotool/Makefile index 57a28de55eb7..42a237b2cd6c 100644 --- a/usr.bin/sdiotool/Makefile +++ b/usr.bin/sdiotool/Makefile @@ -1,4 +1,3 @@ - PROG= sdiotool SRCS= sdiotool.c cam_sdio.c linux_sdio_compat.c diff --git a/usr.bin/sed/Makefile b/usr.bin/sed/Makefile index d9d79779ad2f..9f999ae8e3e1 100644 --- a/usr.bin/sed/Makefile +++ b/usr.bin/sed/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/sed/tests/Makefile b/usr.bin/sed/tests/Makefile index db3d9f013364..d072e1d65b23 100644 --- a/usr.bin/sed/tests/Makefile +++ b/usr.bin/sed/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= sed2_test diff --git a/usr.bin/sed/tests/regress.multitest.out/Makefile b/usr.bin/sed/tests/regress.multitest.out/Makefile index 316770e9d55b..1636e64c7b67 100644 --- a/usr.bin/sed/tests/regress.multitest.out/Makefile +++ b/usr.bin/sed/tests/regress.multitest.out/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.bin/sed/regress.multitest.out diff --git a/usr.bin/seq/tests/Makefile b/usr.bin/seq/tests/Makefile index df1513458beb..a002ff883581 100644 --- a/usr.bin/seq/tests/Makefile +++ b/usr.bin/seq/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= seq_test diff --git a/usr.bin/shar/Makefile b/usr.bin/shar/Makefile index b487cee536c8..fc940c06d463 100644 --- a/usr.bin/shar/Makefile +++ b/usr.bin/shar/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=shar.sh MAN= shar.1 diff --git a/usr.bin/showmount/Makefile b/usr.bin/showmount/Makefile index d882c21b5db1..55f5de995422 100644 --- a/usr.bin/showmount/Makefile +++ b/usr.bin/showmount/Makefile @@ -1,4 +1,3 @@ - PROG= showmount MAN= showmount.8 diff --git a/usr.bin/size/Makefile b/usr.bin/size/Makefile index f097e5617009..3951cedbfa05 100644 --- a/usr.bin/size/Makefile +++ b/usr.bin/size/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= elftoolchain diff --git a/usr.bin/smbutil/Makefile b/usr.bin/smbutil/Makefile index 0f6d7e5e5153..de80d48282ea 100644 --- a/usr.bin/smbutil/Makefile +++ b/usr.bin/smbutil/Makefile @@ -1,4 +1,3 @@ - PROG= smbutil PACKAGE= smbutils SRCS= smbutil.c dumptree.c login.c lookup.c view.c print.c diff --git a/usr.bin/sockstat/Makefile b/usr.bin/sockstat/Makefile index ca31cd5d56ee..188432dfc27e 100644 --- a/usr.bin/sockstat/Makefile +++ b/usr.bin/sockstat/Makefile @@ -1,4 +1,3 @@ - .include PROG= sockstat diff --git a/usr.bin/soelim/Makefile b/usr.bin/soelim/Makefile index 89c40b34113f..00b694d6e0b6 100644 --- a/usr.bin/soelim/Makefile +++ b/usr.bin/soelim/Makefile @@ -1,4 +1,3 @@ - .include PROG= soelim diff --git a/usr.bin/soelim/tests/Makefile b/usr.bin/soelim/tests/Makefile index c236a4c0fcad..6e3b7a25ecc7 100644 --- a/usr.bin/soelim/tests/Makefile +++ b/usr.bin/soelim/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= soelim_test diff --git a/usr.bin/sort/Makefile b/usr.bin/sort/Makefile index 7e65d6d5a4de..561af217af79 100644 --- a/usr.bin/sort/Makefile +++ b/usr.bin/sort/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/sort/tests/Makefile b/usr.bin/sort/tests/Makefile index 752dec06bbff..7514bf6b300f 100644 --- a/usr.bin/sort/tests/Makefile +++ b/usr.bin/sort/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests NETBSD_ATF_TESTS_SH= sort_test diff --git a/usr.bin/split/Makefile b/usr.bin/split/Makefile index 09bf829d2674..99021342ec32 100644 --- a/usr.bin/split/Makefile +++ b/usr.bin/split/Makefile @@ -1,4 +1,3 @@ - .include PROG= split diff --git a/usr.bin/split/tests/Makefile b/usr.bin/split/tests/Makefile index 34e7b9770993..65f62cff26f1 100644 --- a/usr.bin/split/tests/Makefile +++ b/usr.bin/split/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= split_test diff --git a/usr.bin/ssh-copy-id/Makefile b/usr.bin/ssh-copy-id/Makefile index 96631d8337a8..66a742726d6e 100644 --- a/usr.bin/ssh-copy-id/Makefile +++ b/usr.bin/ssh-copy-id/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= ssh-copy-id.sh MAN= ssh-copy-id.1 PACKAGE= ssh diff --git a/usr.bin/stat/Makefile b/usr.bin/stat/Makefile index d57293abbd64..1694310a7a6b 100644 --- a/usr.bin/stat/Makefile +++ b/usr.bin/stat/Makefile @@ -1,4 +1,3 @@ - .include PROG= stat diff --git a/usr.bin/stat/tests/Makefile b/usr.bin/stat/tests/Makefile index 6986de3303d5..d48648c55916 100644 --- a/usr.bin/stat/tests/Makefile +++ b/usr.bin/stat/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= readlink_test ATF_TESTS_SH+= stat_test diff --git a/usr.bin/stdbuf/Makefile b/usr.bin/stdbuf/Makefile index 5610012a28e9..538cea76c519 100644 --- a/usr.bin/stdbuf/Makefile +++ b/usr.bin/stdbuf/Makefile @@ -1,4 +1,3 @@ - PROG= stdbuf SRCS= stdbuf.c diff --git a/usr.bin/strings/Makefile b/usr.bin/strings/Makefile index 77032ee94916..8e2572810947 100644 --- a/usr.bin/strings/Makefile +++ b/usr.bin/strings/Makefile @@ -1,4 +1,3 @@ - .include ELFTCDIR= ${SRCTOP}/contrib/elftoolchain diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile index 8079b5b2c6ec..f6d95defa195 100644 --- a/usr.bin/su/Makefile +++ b/usr.bin/su/Makefile @@ -1,4 +1,3 @@ - .include PROG= su diff --git a/usr.bin/systat/Makefile b/usr.bin/systat/Makefile index 205e365d507b..b3ca1a6f962c 100644 --- a/usr.bin/systat/Makefile +++ b/usr.bin/systat/Makefile @@ -1,4 +1,3 @@ - .include PROG= systat diff --git a/usr.bin/tabs/Makefile b/usr.bin/tabs/Makefile index d3befd0d2d9e..b80b201431c0 100644 --- a/usr.bin/tabs/Makefile +++ b/usr.bin/tabs/Makefile @@ -1,4 +1,3 @@ - PROG= tabs LIBADD= tinfow diff --git a/usr.bin/tail/Makefile b/usr.bin/tail/Makefile index fbf819e06356..47c21f7f9318 100644 --- a/usr.bin/tail/Makefile +++ b/usr.bin/tail/Makefile @@ -1,4 +1,3 @@ - .include PROG= tail diff --git a/usr.bin/tail/tests/Makefile b/usr.bin/tail/tests/Makefile index e0782e7dfb1b..bb8fdc1016e2 100644 --- a/usr.bin/tail/tests/Makefile +++ b/usr.bin/tail/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= tail_test diff --git a/usr.bin/talk/Makefile b/usr.bin/talk/Makefile index 701c81cf6a2b..40dfae8a1932 100644 --- a/usr.bin/talk/Makefile +++ b/usr.bin/talk/Makefile @@ -1,4 +1,3 @@ - PROG= talk SRCS= ctl.c ctl_transact.c display.c get_addrs.c get_iface.c get_names.c \ init_disp.c invite.c io.c look_up.c msgs.c talk.c diff --git a/usr.bin/tar/tests/Makefile b/usr.bin/tar/tests/Makefile index ce01f04c7789..4f143993f8f1 100644 --- a/usr.bin/tar/tests/Makefile +++ b/usr.bin/tar/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests WARNS?= 3 diff --git a/usr.bin/tcopy/Makefile b/usr.bin/tcopy/Makefile index c253a44cc1be..86eb0dd42165 100644 --- a/usr.bin/tcopy/Makefile +++ b/usr.bin/tcopy/Makefile @@ -1,4 +1,3 @@ - PROG= tcopy .include diff --git a/usr.bin/tee/Makefile b/usr.bin/tee/Makefile index 1984422276ca..ab7b93575967 100644 --- a/usr.bin/tee/Makefile +++ b/usr.bin/tee/Makefile @@ -1,4 +1,3 @@ - PROG= tee .include diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index 12c582ffb3d9..930d70faa8ba 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= telnet diff --git a/usr.bin/tests/Makefile b/usr.bin/tests/Makefile index 5010a929da84..e513e315473c 100644 --- a/usr.bin/tests/Makefile +++ b/usr.bin/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .PATH: ${SRCTOP}/tests diff --git a/usr.bin/tftp/Makefile b/usr.bin/tftp/Makefile index 3b7831c0b674..952246d3fd5d 100644 --- a/usr.bin/tftp/Makefile +++ b/usr.bin/tftp/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/libexec/tftpd diff --git a/usr.bin/tftp/tests/Makefile b/usr.bin/tftp/tests/Makefile index 06778e175ec6..9d6d6c0bc874 100644 --- a/usr.bin/tftp/tests/Makefile +++ b/usr.bin/tftp/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= tftp_test diff --git a/usr.bin/time/Makefile b/usr.bin/time/Makefile index fb357a176040..a91e94f20070 100644 --- a/usr.bin/time/Makefile +++ b/usr.bin/time/Makefile @@ -1,4 +1,3 @@ - PROG= time .include diff --git a/usr.bin/tip/Makefile b/usr.bin/tip/Makefile index 0eadb9bb00c2..f33bfe16f17e 100644 --- a/usr.bin/tip/Makefile +++ b/usr.bin/tip/Makefile @@ -1,4 +1,3 @@ - SUBDIR=tip .include diff --git a/usr.bin/tip/Makefile.inc b/usr.bin/tip/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/usr.bin/tip/Makefile.inc +++ b/usr.bin/tip/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/usr.bin/top/Makefile b/usr.bin/top/Makefile index ed92d5b6f113..007c9b306d23 100644 --- a/usr.bin/top/Makefile +++ b/usr.bin/top/Makefile @@ -1,4 +1,3 @@ - .include PROG= top diff --git a/usr.bin/tr/Makefile b/usr.bin/tr/Makefile index 17b633a7827b..d789e500c237 100644 --- a/usr.bin/tr/Makefile +++ b/usr.bin/tr/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/tr/tests/Makefile b/usr.bin/tr/tests/Makefile index 81d7b37e35de..ed2d548b8277 100644 --- a/usr.bin/tr/tests/Makefile +++ b/usr.bin/tr/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/true/Makefile b/usr.bin/true/Makefile index 42716d310fff..1285b818d78e 100644 --- a/usr.bin/true/Makefile +++ b/usr.bin/true/Makefile @@ -1,4 +1,3 @@ - PROG= true .include diff --git a/usr.bin/truncate/Makefile b/usr.bin/truncate/Makefile index f4ce511215d7..0b27f0c87588 100644 --- a/usr.bin/truncate/Makefile +++ b/usr.bin/truncate/Makefile @@ -1,4 +1,3 @@ - .include PROG= truncate diff --git a/usr.bin/truncate/tests/Makefile b/usr.bin/truncate/tests/Makefile index f82d438132cf..64e05e50b87f 100644 --- a/usr.bin/truncate/tests/Makefile +++ b/usr.bin/truncate/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= truncate_test .include diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index da46bc122f8a..a31f985cbb01 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -1,4 +1,3 @@ - PROG= truss SRCS= main.c setup.c syscalls.c diff --git a/usr.bin/tsort/Makefile b/usr.bin/tsort/Makefile index 47cd40e9851f..4603b97959bc 100644 --- a/usr.bin/tsort/Makefile +++ b/usr.bin/tsort/Makefile @@ -1,4 +1,3 @@ - .include PROG= tsort diff --git a/usr.bin/tty/Makefile b/usr.bin/tty/Makefile index b7b0084298a9..e0e47132f825 100644 --- a/usr.bin/tty/Makefile +++ b/usr.bin/tty/Makefile @@ -1,4 +1,3 @@ - PROG= tty .include diff --git a/usr.bin/ul/Makefile b/usr.bin/ul/Makefile index a808f0f575c8..48a487781b33 100644 --- a/usr.bin/ul/Makefile +++ b/usr.bin/ul/Makefile @@ -1,4 +1,3 @@ - PROG= ul LIBADD= tinfow diff --git a/usr.bin/uname/Makefile b/usr.bin/uname/Makefile index 71ddbc3b6fb5..fdfce1ec1974 100644 --- a/usr.bin/uname/Makefile +++ b/usr.bin/uname/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= uname diff --git a/usr.bin/unexpand/Makefile b/usr.bin/unexpand/Makefile index 659f9e8814fc..ef5cf30459b2 100644 --- a/usr.bin/unexpand/Makefile +++ b/usr.bin/unexpand/Makefile @@ -1,4 +1,3 @@ - PROG= unexpand MAN= diff --git a/usr.bin/unifdef/tests/Makefile b/usr.bin/unifdef/tests/Makefile index a75d405c9d3a..67e98fa70480 100644 --- a/usr.bin/unifdef/tests/Makefile +++ b/usr.bin/unifdef/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= unifdef_test diff --git a/usr.bin/uniq/Makefile b/usr.bin/uniq/Makefile index 63aa1233c36e..0d4d89fdaa6b 100644 --- a/usr.bin/uniq/Makefile +++ b/usr.bin/uniq/Makefile @@ -1,4 +1,3 @@ - .include PROG= uniq diff --git a/usr.bin/units/Makefile b/usr.bin/units/Makefile index 9d717d121240..0f24f0a25f64 100644 --- a/usr.bin/units/Makefile +++ b/usr.bin/units/Makefile @@ -1,4 +1,3 @@ - .include PROG= units diff --git a/usr.bin/units/tests/Makefile b/usr.bin/units/tests/Makefile index 3237b967d3f5..f330d0fc8950 100644 --- a/usr.bin/units/tests/Makefile +++ b/usr.bin/units/tests/Makefile @@ -1,4 +1,3 @@ - .include TAP_TESTS_SH= basics_test diff --git a/usr.bin/unvis/Makefile b/usr.bin/unvis/Makefile index b805d3e0b9c7..1189bd1c4ecc 100644 --- a/usr.bin/unvis/Makefile +++ b/usr.bin/unvis/Makefile @@ -1,4 +1,3 @@ - PROG= unvis .PATH: ${SRCTOP}/contrib/unvis diff --git a/usr.bin/unzip/Makefile b/usr.bin/unzip/Makefile index 7193ab58b5a3..2db5e9ac4c99 100644 --- a/usr.bin/unzip/Makefile +++ b/usr.bin/unzip/Makefile @@ -1,4 +1,3 @@ - .include _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/unzip/tests/Makefile b/usr.bin/unzip/tests/Makefile index 85fc4b88cd78..404a546410e4 100644 --- a/usr.bin/unzip/tests/Makefile +++ b/usr.bin/unzip/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive diff --git a/usr.bin/users/Makefile b/usr.bin/users/Makefile index 04353e2b03bc..dfaf41dc2857 100644 --- a/usr.bin/users/Makefile +++ b/usr.bin/users/Makefile @@ -1,4 +1,3 @@ - WARNS?= 3 PROG_CXX= users PACKAGE= acct diff --git a/usr.bin/vacation/Makefile b/usr.bin/vacation/Makefile index 3503bc99cc66..db69e1d6cb80 100644 --- a/usr.bin/vacation/Makefile +++ b/usr.bin/vacation/Makefile @@ -1,4 +1,3 @@ - SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/vacation diff --git a/usr.bin/vgrind/Makefile b/usr.bin/vgrind/Makefile index d4730fe49fde..6ab148768aa6 100644 --- a/usr.bin/vgrind/Makefile +++ b/usr.bin/vgrind/Makefile @@ -1,4 +1,3 @@ - PROG= vfontedpr SRCS= regexp.c vfontedpr.c SCRIPTS=vgrind.sh diff --git a/usr.bin/vis/Makefile b/usr.bin/vis/Makefile index d980f32bf397..ad60828bad90 100644 --- a/usr.bin/vis/Makefile +++ b/usr.bin/vis/Makefile @@ -1,4 +1,3 @@ - PROG= vis SRCS= vis.c foldit.c diff --git a/usr.bin/vmstat/Makefile b/usr.bin/vmstat/Makefile index 8322c4e41475..6efbb186f43a 100644 --- a/usr.bin/vmstat/Makefile +++ b/usr.bin/vmstat/Makefile @@ -1,4 +1,3 @@ - .include PROG= vmstat diff --git a/usr.bin/vmstat/tests/Makefile b/usr.bin/vmstat/tests/Makefile index 12ad705fa5ce..67c759df3864 100644 --- a/usr.bin/vmstat/tests/Makefile +++ b/usr.bin/vmstat/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests NETBSD_ATF_TESTS_SH= vmstat_test diff --git a/usr.bin/vtfontcvt/Makefile b/usr.bin/vtfontcvt/Makefile index 62b6da8163f1..de011660ca28 100644 --- a/usr.bin/vtfontcvt/Makefile +++ b/usr.bin/vtfontcvt/Makefile @@ -1,4 +1,3 @@ - PROG= vtfontcvt SRCS= vtfontcvt.c lz4.c MAN8= vtfontcvt.8 diff --git a/usr.bin/w/Makefile b/usr.bin/w/Makefile index ed0a887a53fc..7ebf27d40ca5 100644 --- a/usr.bin/w/Makefile +++ b/usr.bin/w/Makefile @@ -1,4 +1,3 @@ - PROG= w SRCS= fmt.c pr_time.c proc_compare.c w.c MAN= w.1 uptime.1 diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile index 0b3e6d55ccde..1b0df1271354 100644 --- a/usr.bin/wall/Makefile +++ b/usr.bin/wall/Makefile @@ -1,4 +1,3 @@ - PROG= wall SRCS= ttymsg.c wall.c BINGRP= tty diff --git a/usr.bin/wc/Makefile b/usr.bin/wc/Makefile index 7dea1ef9788a..e4fe6cb452d6 100644 --- a/usr.bin/wc/Makefile +++ b/usr.bin/wc/Makefile @@ -1,4 +1,3 @@ - .include PROG= wc diff --git a/usr.bin/wc/tests/Makefile b/usr.bin/wc/tests/Makefile index 37d6b504923a..18002a8d70f4 100644 --- a/usr.bin/wc/tests/Makefile +++ b/usr.bin/wc/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= wc_test diff --git a/usr.bin/wg/Makefile b/usr.bin/wg/Makefile index 6627dfd69e30..4d7ffc19764c 100644 --- a/usr.bin/wg/Makefile +++ b/usr.bin/wg/Makefile @@ -1,4 +1,3 @@ - PROG= wg MAN= wg.8 diff --git a/usr.bin/what/Makefile b/usr.bin/what/Makefile index 891598d8ac7e..7b242889d371 100644 --- a/usr.bin/what/Makefile +++ b/usr.bin/what/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= what diff --git a/usr.bin/whereis/Makefile b/usr.bin/whereis/Makefile index 308338b22066..5803279820fe 100644 --- a/usr.bin/whereis/Makefile +++ b/usr.bin/whereis/Makefile @@ -1,4 +1,3 @@ - PROG= whereis .include diff --git a/usr.bin/which/Makefile b/usr.bin/which/Makefile index 14a003ef00bc..097d238dfbb6 100644 --- a/usr.bin/which/Makefile +++ b/usr.bin/which/Makefile @@ -1,4 +1,3 @@ - PROG= which .include diff --git a/usr.bin/who/Makefile b/usr.bin/who/Makefile index 5bed74f3c066..77626f51824a 100644 --- a/usr.bin/who/Makefile +++ b/usr.bin/who/Makefile @@ -1,4 +1,3 @@ - PROG= who PACKAGE= acct diff --git a/usr.bin/whois/Makefile b/usr.bin/whois/Makefile index 744c733b430e..794d9a06ee89 100644 --- a/usr.bin/whois/Makefile +++ b/usr.bin/whois/Makefile @@ -1,4 +1,3 @@ - PROG= whois .if defined(SOCKS) diff --git a/usr.bin/write/Makefile b/usr.bin/write/Makefile index 3ccedef7fc04..d7e362cc9c8f 100644 --- a/usr.bin/write/Makefile +++ b/usr.bin/write/Makefile @@ -1,4 +1,3 @@ - PROG= write BINMODE=2555 BINGRP= tty diff --git a/usr.bin/xargs/Makefile b/usr.bin/xargs/Makefile index d3ab18d4fd9a..3202d0e7322a 100644 --- a/usr.bin/xargs/Makefile +++ b/usr.bin/xargs/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/xargs/tests/Makefile b/usr.bin/xargs/tests/Makefile index 50545c11f90e..b1e6782069de 100644 --- a/usr.bin/xargs/tests/Makefile +++ b/usr.bin/xargs/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile index 1ae117441b7b..fd95b97160fe 100644 --- a/usr.bin/xinstall/Makefile +++ b/usr.bin/xinstall/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.bin/xinstall/tests/Makefile b/usr.bin/xinstall/tests/Makefile index c0ea7354b340..46b47dc97c65 100644 --- a/usr.bin/xinstall/tests/Makefile +++ b/usr.bin/xinstall/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= install_test .include diff --git a/usr.bin/xo/Makefile b/usr.bin/xo/Makefile index d0756d68f20e..82c0940f490f 100644 --- a/usr.bin/xo/Makefile +++ b/usr.bin/xo/Makefile @@ -1,4 +1,3 @@ - .include LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/usr.bin/xo/tests/Makefile b/usr.bin/xo/tests/Makefile index 4cceb7ada02c..6bb9d9c00292 100644 --- a/usr.bin/xo/tests/Makefile +++ b/usr.bin/xo/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests .include diff --git a/usr.bin/xohtml/Makefile b/usr.bin/xohtml/Makefile index 12a2cdebe83e..7b79280f36b3 100644 --- a/usr.bin/xohtml/Makefile +++ b/usr.bin/xohtml/Makefile @@ -1,4 +1,3 @@ - .include LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/usr.bin/xolint/Makefile b/usr.bin/xolint/Makefile index c180003d8e08..2a35bc946f49 100644 --- a/usr.bin/xolint/Makefile +++ b/usr.bin/xolint/Makefile @@ -1,4 +1,3 @@ - .include LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/usr.bin/xopo/Makefile b/usr.bin/xopo/Makefile index 70c70f61be79..6dae6ac233b8 100644 --- a/usr.bin/xopo/Makefile +++ b/usr.bin/xopo/Makefile @@ -1,4 +1,3 @@ - .include LIBXOSRC= ${SRCTOP}/contrib/libxo diff --git a/usr.bin/xstr/Makefile b/usr.bin/xstr/Makefile index 777c2ca74ad8..290d553a4ed6 100644 --- a/usr.bin/xstr/Makefile +++ b/usr.bin/xstr/Makefile @@ -1,4 +1,3 @@ - PROG= xstr .include diff --git a/usr.bin/xzdec/Makefile b/usr.bin/xzdec/Makefile index 3425b4b6b918..361315fab8b9 100644 --- a/usr.bin/xzdec/Makefile +++ b/usr.bin/xzdec/Makefile @@ -1,4 +1,3 @@ - PROG= xzdec LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec diff --git a/usr.bin/yacc/Makefile b/usr.bin/yacc/Makefile index 1204bb2d5add..42ee10952e06 100644 --- a/usr.bin/yacc/Makefile +++ b/usr.bin/yacc/Makefile @@ -1,4 +1,3 @@ - .include BYACC_SRC= ${SRCTOP}/contrib/byacc diff --git a/usr.bin/yacc/tests/Makefile b/usr.bin/yacc/tests/Makefile index 5f105be69a02..c2832bc06853 100644 --- a/usr.bin/yacc/tests/Makefile +++ b/usr.bin/yacc/tests/Makefile @@ -1,4 +1,3 @@ - .include TEST_DIR= ${SRCTOP}/contrib/byacc/test diff --git a/usr.bin/yes/Makefile b/usr.bin/yes/Makefile index ea20842b98bf..b1d4075b5917 100644 --- a/usr.bin/yes/Makefile +++ b/usr.bin/yes/Makefile @@ -1,4 +1,3 @@ - PROG= yes .include diff --git a/usr.bin/ypcat/Makefile b/usr.bin/ypcat/Makefile index d6f5bf5f6538..15a48cf94e9a 100644 --- a/usr.bin/ypcat/Makefile +++ b/usr.bin/ypcat/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= ypcat diff --git a/usr.bin/ypmatch/Makefile b/usr.bin/ypmatch/Makefile index 89033086136f..2d04ff96116c 100644 --- a/usr.bin/ypmatch/Makefile +++ b/usr.bin/ypmatch/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= ypmatch diff --git a/usr.bin/ypwhich/Makefile b/usr.bin/ypwhich/Makefile index e9a219d901b2..eaca41db1bf9 100644 --- a/usr.bin/ypwhich/Makefile +++ b/usr.bin/ypwhich/Makefile @@ -1,4 +1,3 @@ - YPSERV=${SRCTOP}/usr.sbin/ypserv/common .PATH: ${YPSERV} diff --git a/usr.bin/zstd/Makefile b/usr.bin/zstd/Makefile index 2e5c2d3495ed..dd54acbf83cd 100644 --- a/usr.bin/zstd/Makefile +++ b/usr.bin/zstd/Makefile @@ -1,4 +1,3 @@ - PROG= zstd SRCS= \ benchfn.c \ diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 0aac7062146d..9d6c90d09461 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= adduser \ diff --git a/usr.sbin/Makefile.amd64 b/usr.sbin/Makefile.amd64 index da4ffd2a6b00..4ee0bab60e35 100644 --- a/usr.sbin/Makefile.amd64 +++ b/usr.sbin/Makefile.amd64 @@ -1,4 +1,3 @@ - # mptable: broken (not 64 bit clean) # pnpinfo: crashes (not really useful anyway) .if ${MK_ACPI} != "no" diff --git a/usr.sbin/Makefile.i386 b/usr.sbin/Makefile.i386 index da8f18efbef2..4c1418eb2660 100644 --- a/usr.sbin/Makefile.i386 +++ b/usr.sbin/Makefile.i386 @@ -1,4 +1,3 @@ - .if ${MK_ACPI} != "no" SUBDIR+= acpi .endif diff --git a/usr.sbin/Makefile.inc b/usr.sbin/Makefile.inc index 523a0dd44643..1890d51e7669 100644 --- a/usr.sbin/Makefile.inc +++ b/usr.sbin/Makefile.inc @@ -1,2 +1 @@ - BINDIR?= /usr/sbin diff --git a/usr.sbin/Makefile.powerpc b/usr.sbin/Makefile.powerpc index d6b05857e152..6387cd8840d6 100644 --- a/usr.sbin/Makefile.powerpc +++ b/usr.sbin/Makefile.powerpc @@ -1,4 +1,3 @@ - .if ${MACHINE_ARCH} != "powerpcspe" SUBDIR+= nvram .endif diff --git a/usr.sbin/ac/Makefile b/usr.sbin/ac/Makefile index 9a90c4566433..f41716d3d3bf 100644 --- a/usr.sbin/ac/Makefile +++ b/usr.sbin/ac/Makefile @@ -1,4 +1,3 @@ - PROG= ac PACKAGE= acct MAN= ac.8 diff --git a/usr.sbin/accton/Makefile b/usr.sbin/accton/Makefile index 01abcda32e02..a2b74d8a37ed 100644 --- a/usr.sbin/accton/Makefile +++ b/usr.sbin/accton/Makefile @@ -1,4 +1,3 @@ - PROG= accton MAN= accton.8 diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile index dc3a871edf3f..377846a016ae 100644 --- a/usr.sbin/acpi/acpidb/Makefile +++ b/usr.sbin/acpi/acpidb/Makefile @@ -1,4 +1,3 @@ - PROG= acpidb SRCS= acpidb.c diff --git a/usr.sbin/acpi/acpidump/Makefile b/usr.sbin/acpi/acpidump/Makefile index d0bb14284c1a..0b4dd02d920c 100644 --- a/usr.sbin/acpi/acpidump/Makefile +++ b/usr.sbin/acpi/acpidump/Makefile @@ -1,4 +1,3 @@ - PROG= acpidump MAN= acpidump.8 SRCS= acpi.c acpi_user.c acpidump.c diff --git a/usr.sbin/acpi/iasl/Makefile b/usr.sbin/acpi/iasl/Makefile index 79ea48dde8ef..5b163b9d8885 100644 --- a/usr.sbin/acpi/iasl/Makefile +++ b/usr.sbin/acpi/iasl/Makefile @@ -1,4 +1,3 @@ - PROG= iasl # common diff --git a/usr.sbin/adduser/Makefile b/usr.sbin/adduser/Makefile index 2f18381073a0..607acdade874 100644 --- a/usr.sbin/adduser/Makefile +++ b/usr.sbin/adduser/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=adduser.sh rmuser.sh MAN= adduser.conf.5 adduser.8 rmuser.8 diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index c18a841b9c16..f6c42194401f 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -1,4 +1,3 @@ - PROG= apm MAN= apm.8 MLINKS= apm.8 apmconf.8 diff --git a/usr.sbin/apmd/Makefile b/usr.sbin/apmd/Makefile index 57c07bff721d..bfe59cc7cd7d 100644 --- a/usr.sbin/apmd/Makefile +++ b/usr.sbin/apmd/Makefile @@ -1,4 +1,3 @@ - CONFS= apmd.conf PROG= apmd MAN= apmd.8 diff --git a/usr.sbin/arp/Makefile b/usr.sbin/arp/Makefile index 0730be75b894..7b6911f8e0f4 100644 --- a/usr.sbin/arp/Makefile +++ b/usr.sbin/arp/Makefile @@ -1,4 +1,3 @@ - .include PROG= arp diff --git a/usr.sbin/authpf/Makefile b/usr.sbin/authpf/Makefile index 44cd1838af7f..d4035f6ff493 100644 --- a/usr.sbin/authpf/Makefile +++ b/usr.sbin/authpf/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/pf/authpf PACKAGE=pf diff --git a/usr.sbin/autofs/Makefile b/usr.sbin/autofs/Makefile index 195281df7cf2..2d0c1bcb8806 100644 --- a/usr.sbin/autofs/Makefile +++ b/usr.sbin/autofs/Makefile @@ -1,4 +1,3 @@ - CONFS= auto_master PACKAGE=autofs PROG= automountd diff --git a/usr.sbin/autofs/autofs/Makefile b/usr.sbin/autofs/autofs/Makefile index d602381bbced..699c9dcde2cd 100644 --- a/usr.sbin/autofs/autofs/Makefile +++ b/usr.sbin/autofs/autofs/Makefile @@ -1,4 +1,3 @@ - PACKAGE= autofs CONFS= include_ldap \ diff --git a/usr.sbin/bhyve/kbdlayout/Makefile b/usr.sbin/bhyve/kbdlayout/Makefile index ed3f3dc9fbc4..2a7b3f2b39a5 100644 --- a/usr.sbin/bhyve/kbdlayout/Makefile +++ b/usr.sbin/bhyve/kbdlayout/Makefile @@ -1,4 +1,3 @@ - PACKAGE= bhyve FILESDIR= ${SHAREDIR}/bhyve/kbdlayout FILES= default \ diff --git a/usr.sbin/bhyveload/Makefile b/usr.sbin/bhyveload/Makefile index f4091f8a092d..bc134fa630d5 100644 --- a/usr.sbin/bhyveload/Makefile +++ b/usr.sbin/bhyveload/Makefile @@ -1,4 +1,3 @@ - PROG= bhyveload SRCS= bhyveload.c MAN= bhyveload.8 diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile index 065c17843cee..7bdff4158bb4 100644 --- a/usr.sbin/blacklistctl/Makefile +++ b/usr.sbin/blacklistctl/Makefile @@ -1,4 +1,3 @@ - BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist .PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile index 92928ca3e60f..e0a3ddd80881 100644 --- a/usr.sbin/blacklistd/Makefile +++ b/usr.sbin/blacklistd/Makefile @@ -1,4 +1,3 @@ - BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist .PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port diff --git a/usr.sbin/bluetooth/Makefile.inc b/usr.sbin/bluetooth/Makefile.inc index ebb2c23220d8..e4fa9787eb5f 100644 --- a/usr.sbin/bluetooth/Makefile.inc +++ b/usr.sbin/bluetooth/Makefile.inc @@ -1,2 +1 @@ - .include "${.CURDIR:H:H}/Makefile.inc" diff --git a/usr.sbin/bluetooth/ath3kfw/Makefile b/usr.sbin/bluetooth/ath3kfw/Makefile index 97f2f0083914..39dcde33df80 100644 --- a/usr.sbin/bluetooth/ath3kfw/Makefile +++ b/usr.sbin/bluetooth/ath3kfw/Makefile @@ -1,4 +1,3 @@ - PACKAGE= bluetooth PROG= ath3kfw MAN= ath3kfw.8 diff --git a/usr.sbin/bluetooth/bluetooth-config/Makefile b/usr.sbin/bluetooth/bluetooth-config/Makefile index 19598ebb112c..435ac6546b19 100644 --- a/usr.sbin/bluetooth/bluetooth-config/Makefile +++ b/usr.sbin/bluetooth/bluetooth-config/Makefile @@ -1,4 +1,3 @@ - PACKAGE= bluetooth SCRIPTS=bluetooth-config.sh MAN= bluetooth-config.8 diff --git a/usr.sbin/bluetooth/iwmbtfw/Makefile b/usr.sbin/bluetooth/iwmbtfw/Makefile index 0a81d7fdbc32..dde586b3aa99 100644 --- a/usr.sbin/bluetooth/iwmbtfw/Makefile +++ b/usr.sbin/bluetooth/iwmbtfw/Makefile @@ -1,4 +1,3 @@ - PACKAGE= bluetooth CONFS= iwmbtfw.conf CONFSDIR= /etc/devd diff --git a/usr.sbin/boot0cfg/Makefile b/usr.sbin/boot0cfg/Makefile index 3fa3344aeb0e..df79ff7a444f 100644 --- a/usr.sbin/boot0cfg/Makefile +++ b/usr.sbin/boot0cfg/Makefile @@ -1,4 +1,3 @@ - PROG= boot0cfg MAN= boot0cfg.8 diff --git a/usr.sbin/bootparamd/Makefile b/usr.sbin/bootparamd/Makefile index c4f61985a209..e89c1859a015 100644 --- a/usr.sbin/bootparamd/Makefile +++ b/usr.sbin/bootparamd/Makefile @@ -1,4 +1,3 @@ - SUBDIR= bootparamd callbootd .include diff --git a/usr.sbin/bootparamd/Makefile.inc b/usr.sbin/bootparamd/Makefile.inc index e5b8262ffd7d..ec1bce434577 100644 --- a/usr.sbin/bootparamd/Makefile.inc +++ b/usr.sbin/bootparamd/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/sbin NO_WCAST_ALIGN= diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile index ca1b26b62bc6..182cd0d13097 100644 --- a/usr.sbin/bootparamd/bootparamd/Makefile +++ b/usr.sbin/bootparamd/bootparamd/Makefile @@ -1,4 +1,3 @@ - .include PROG= bootparamd diff --git a/usr.sbin/bootparamd/callbootd/Makefile b/usr.sbin/bootparamd/callbootd/Makefile index f5e102a5a60b..0228b3ef041a 100644 --- a/usr.sbin/bootparamd/callbootd/Makefile +++ b/usr.sbin/bootparamd/callbootd/Makefile @@ -1,4 +1,3 @@ - PROG= callbootd MAN= SRCS= callbootd.c ${GENSRCS} diff --git a/usr.sbin/bsdconfig/Makefile b/usr.sbin/bsdconfig/Makefile index 0e2586d276cb..5b03ebbe39f9 100644 --- a/usr.sbin/bsdconfig/Makefile +++ b/usr.sbin/bsdconfig/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= console \ diff --git a/usr.sbin/bsdconfig/console/Makefile b/usr.sbin/bsdconfig/console/Makefile index dbe69e4f2a3b..2e1c1ba8de1b 100644 --- a/usr.sbin/bsdconfig/console/Makefile +++ b/usr.sbin/bsdconfig/console/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console diff --git a/usr.sbin/bsdconfig/console/include/Makefile b/usr.sbin/bsdconfig/console/include/Makefile index 771c54f0a8cf..09c1f631fcc5 100644 --- a/usr.sbin/bsdconfig/console/include/Makefile +++ b/usr.sbin/bsdconfig/console/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/diskmgmt/Makefile b/usr.sbin/bsdconfig/diskmgmt/Makefile index cdeafba6a559..668f3fab93a0 100644 --- a/usr.sbin/bsdconfig/diskmgmt/Makefile +++ b/usr.sbin/bsdconfig/diskmgmt/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/050.diskmgmt diff --git a/usr.sbin/bsdconfig/diskmgmt/include/Makefile b/usr.sbin/bsdconfig/diskmgmt/include/Makefile index 40afa94a21d3..36bbedc9e8b4 100644 --- a/usr.sbin/bsdconfig/diskmgmt/include/Makefile +++ b/usr.sbin/bsdconfig/diskmgmt/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/050.diskmgmt/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/docsinstall/Makefile b/usr.sbin/bsdconfig/docsinstall/Makefile index 0a4b3a62061c..e3a7ea81b045 100644 --- a/usr.sbin/bsdconfig/docsinstall/Makefile +++ b/usr.sbin/bsdconfig/docsinstall/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall diff --git a/usr.sbin/bsdconfig/docsinstall/include/Makefile b/usr.sbin/bsdconfig/docsinstall/include/Makefile index 17ee3a491497..3518ac9cdb06 100644 --- a/usr.sbin/bsdconfig/docsinstall/include/Makefile +++ b/usr.sbin/bsdconfig/docsinstall/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/dot/Makefile b/usr.sbin/bsdconfig/dot/Makefile index 51bca33942ca..9a8ab1538550 100644 --- a/usr.sbin/bsdconfig/dot/Makefile +++ b/usr.sbin/bsdconfig/dot/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/dot diff --git a/usr.sbin/bsdconfig/dot/include/Makefile b/usr.sbin/bsdconfig/dot/include/Makefile index b9ff1af38cb6..629bf74c7cd4 100644 --- a/usr.sbin/bsdconfig/dot/include/Makefile +++ b/usr.sbin/bsdconfig/dot/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/dot/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/examples/Makefile b/usr.sbin/bsdconfig/examples/Makefile index 8a716f9553ce..3f7d638e2fa5 100644 --- a/usr.sbin/bsdconfig/examples/Makefile +++ b/usr.sbin/bsdconfig/examples/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/examples/bsdconfig FILES= add_some_packages.sh browse_packages_http.sh bsdconfigrc diff --git a/usr.sbin/bsdconfig/include/Makefile b/usr.sbin/bsdconfig/include/Makefile index 00ebf0b7e37e..aa35368b5b84 100644 --- a/usr.sbin/bsdconfig/include/Makefile +++ b/usr.sbin/bsdconfig/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/include FILES= bsdconfig.hlp media.hlp messages.subr network_device.hlp \ options.hlp tcp.hlp usage.hlp diff --git a/usr.sbin/bsdconfig/includes/Makefile b/usr.sbin/bsdconfig/includes/Makefile index a477fce4362f..3392af7cb64a 100644 --- a/usr.sbin/bsdconfig/includes/Makefile +++ b/usr.sbin/bsdconfig/includes/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/includes diff --git a/usr.sbin/bsdconfig/includes/include/Makefile b/usr.sbin/bsdconfig/includes/include/Makefile index 2a0c1d234e76..1c1aff1b2fc3 100644 --- a/usr.sbin/bsdconfig/includes/include/Makefile +++ b/usr.sbin/bsdconfig/includes/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/includes/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/mouse/Makefile b/usr.sbin/bsdconfig/mouse/Makefile index e31a29b34032..4a3ddd46220c 100644 --- a/usr.sbin/bsdconfig/mouse/Makefile +++ b/usr.sbin/bsdconfig/mouse/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/110.mouse diff --git a/usr.sbin/bsdconfig/mouse/include/Makefile b/usr.sbin/bsdconfig/mouse/include/Makefile index 0d33ec61c8ed..9b5fa8aa2c44 100644 --- a/usr.sbin/bsdconfig/mouse/include/Makefile +++ b/usr.sbin/bsdconfig/mouse/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/110.mouse/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/networking/Makefile b/usr.sbin/bsdconfig/networking/Makefile index f870d3df63a5..3a51adb82fa9 100644 --- a/usr.sbin/bsdconfig/networking/Makefile +++ b/usr.sbin/bsdconfig/networking/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking diff --git a/usr.sbin/bsdconfig/networking/include/Makefile b/usr.sbin/bsdconfig/networking/include/Makefile index 22fd0ea262f3..52e8654d2527 100644 --- a/usr.sbin/bsdconfig/networking/include/Makefile +++ b/usr.sbin/bsdconfig/networking/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/networking/share/Makefile b/usr.sbin/bsdconfig/networking/share/Makefile index 8b8a4cc71929..1cd5dbb4c17f 100644 --- a/usr.sbin/bsdconfig/networking/share/Makefile +++ b/usr.sbin/bsdconfig/networking/share/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/networking FILES= common.subr device.subr hostname.subr ipaddr.subr media.subr \ netmask.subr resolv.subr routing.subr services.subr diff --git a/usr.sbin/bsdconfig/packages/Makefile b/usr.sbin/bsdconfig/packages/Makefile index e5d4796de5fa..9081b784b912 100644 --- a/usr.sbin/bsdconfig/packages/Makefile +++ b/usr.sbin/bsdconfig/packages/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages diff --git a/usr.sbin/bsdconfig/packages/include/Makefile b/usr.sbin/bsdconfig/packages/include/Makefile index 80fe431c56f3..593c8eb80695 100644 --- a/usr.sbin/bsdconfig/packages/include/Makefile +++ b/usr.sbin/bsdconfig/packages/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/password/Makefile b/usr.sbin/bsdconfig/password/Makefile index d31ca8a906be..ebb6ee28a705 100644 --- a/usr.sbin/bsdconfig/password/Makefile +++ b/usr.sbin/bsdconfig/password/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/040.password diff --git a/usr.sbin/bsdconfig/password/include/Makefile b/usr.sbin/bsdconfig/password/include/Makefile index 530a41bdc326..481761278729 100644 --- a/usr.sbin/bsdconfig/password/include/Makefile +++ b/usr.sbin/bsdconfig/password/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/040.password/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/password/share/Makefile b/usr.sbin/bsdconfig/password/share/Makefile index 49edf9ae212e..f21b6e8f961d 100644 --- a/usr.sbin/bsdconfig/password/share/Makefile +++ b/usr.sbin/bsdconfig/password/share/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/password FILES= password.subr diff --git a/usr.sbin/bsdconfig/security/Makefile b/usr.sbin/bsdconfig/security/Makefile index 46742f93ba67..d8744fefb2c5 100644 --- a/usr.sbin/bsdconfig/security/Makefile +++ b/usr.sbin/bsdconfig/security/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security diff --git a/usr.sbin/bsdconfig/security/include/Makefile b/usr.sbin/bsdconfig/security/include/Makefile index 55a9ec018b00..73f8bb67a65d 100644 --- a/usr.sbin/bsdconfig/security/include/Makefile +++ b/usr.sbin/bsdconfig/security/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security/include FILES= messages.subr securelevel.hlp diff --git a/usr.sbin/bsdconfig/share/Makefile b/usr.sbin/bsdconfig/share/Makefile index 69d045c6f1bc..d485577da5da 100644 --- a/usr.sbin/bsdconfig/share/Makefile +++ b/usr.sbin/bsdconfig/share/Makefile @@ -1,4 +1,3 @@ - SUBDIR= media packages FILESDIR= ${SHAREDIR}/bsdconfig diff --git a/usr.sbin/bsdconfig/share/media/Makefile b/usr.sbin/bsdconfig/share/media/Makefile index e90b87f70cc2..9e4a3793b4b2 100644 --- a/usr.sbin/bsdconfig/share/media/Makefile +++ b/usr.sbin/bsdconfig/share/media/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/media FILES= any.subr cdrom.subr common.subr directory.subr dos.subr \ http.subr httpproxy.subr network.subr \ diff --git a/usr.sbin/bsdconfig/share/packages/Makefile b/usr.sbin/bsdconfig/share/packages/Makefile index c8e710902bec..939938e3f61a 100644 --- a/usr.sbin/bsdconfig/share/packages/Makefile +++ b/usr.sbin/bsdconfig/share/packages/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/packages FILES= categories.subr index.awk index.subr musthavepkg.subr packages.subr diff --git a/usr.sbin/bsdconfig/startup/Makefile b/usr.sbin/bsdconfig/startup/Makefile index b9fd43a101e2..7090c4d3e537 100644 --- a/usr.sbin/bsdconfig/startup/Makefile +++ b/usr.sbin/bsdconfig/startup/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/140.startup diff --git a/usr.sbin/bsdconfig/startup/include/Makefile b/usr.sbin/bsdconfig/startup/include/Makefile index 7edef4f2406f..55a2b021c568 100644 --- a/usr.sbin/bsdconfig/startup/include/Makefile +++ b/usr.sbin/bsdconfig/startup/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/140.startup/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/startup/share/Makefile b/usr.sbin/bsdconfig/startup/share/Makefile index b58fbf2f53a8..9f65a585e8f9 100644 --- a/usr.sbin/bsdconfig/startup/share/Makefile +++ b/usr.sbin/bsdconfig/startup/share/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/startup FILES= rcconf.subr rcedit.subr rcvar.subr diff --git a/usr.sbin/bsdconfig/timezone/Makefile b/usr.sbin/bsdconfig/timezone/Makefile index 4d01453e4ce7..eb1cbb931f6a 100644 --- a/usr.sbin/bsdconfig/timezone/Makefile +++ b/usr.sbin/bsdconfig/timezone/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/090.timezone diff --git a/usr.sbin/bsdconfig/timezone/include/Makefile b/usr.sbin/bsdconfig/timezone/include/Makefile index 1137f01da109..45bf75955579 100644 --- a/usr.sbin/bsdconfig/timezone/include/Makefile +++ b/usr.sbin/bsdconfig/timezone/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/090.timezone/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/timezone/share/Makefile b/usr.sbin/bsdconfig/timezone/share/Makefile index 1a9557a1c101..8a4ba14b3a8f 100644 --- a/usr.sbin/bsdconfig/timezone/share/Makefile +++ b/usr.sbin/bsdconfig/timezone/share/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/timezone FILES= continents.subr countries.subr iso3166.subr menus.subr \ zones.subr diff --git a/usr.sbin/bsdconfig/ttys/Makefile b/usr.sbin/bsdconfig/ttys/Makefile index c9e1081c99e0..6bae46540dc7 100644 --- a/usr.sbin/bsdconfig/ttys/Makefile +++ b/usr.sbin/bsdconfig/ttys/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/150.ttys diff --git a/usr.sbin/bsdconfig/ttys/include/Makefile b/usr.sbin/bsdconfig/ttys/include/Makefile index df8b5c262684..60f7201b10c5 100644 --- a/usr.sbin/bsdconfig/ttys/include/Makefile +++ b/usr.sbin/bsdconfig/ttys/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/150.ttys/include FILES= messages.subr diff --git a/usr.sbin/bsdconfig/usermgmt/Makefile b/usr.sbin/bsdconfig/usermgmt/Makefile index 2408331a508f..47865d1c021f 100644 --- a/usr.sbin/bsdconfig/usermgmt/Makefile +++ b/usr.sbin/bsdconfig/usermgmt/Makefile @@ -1,4 +1,3 @@ - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt diff --git a/usr.sbin/bsdconfig/usermgmt/include/Makefile b/usr.sbin/bsdconfig/usermgmt/include/Makefile index be07c74cb89b..5725bfde360b 100644 --- a/usr.sbin/bsdconfig/usermgmt/include/Makefile +++ b/usr.sbin/bsdconfig/usermgmt/include/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt/include FILES= messages.subr usermgmt.hlp diff --git a/usr.sbin/bsdconfig/usermgmt/share/Makefile b/usr.sbin/bsdconfig/usermgmt/share/Makefile index 62230e9a0d25..6c111d5a1ba1 100644 --- a/usr.sbin/bsdconfig/usermgmt/share/Makefile +++ b/usr.sbin/bsdconfig/usermgmt/share/Makefile @@ -1,4 +1,3 @@ - FILESDIR= ${SHAREDIR}/bsdconfig/usermgmt FILES= group.subr group_input.subr user.subr user_input.subr diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index ec7ff2aebafa..c9ba7cb52cd6 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -1,4 +1,3 @@ - SUBDIR= distextract distfetch include partedit runconsoles scripts SUBDIR_PARALLEL= SUBDIR_DEPEND_distextract = include diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile index 6813c9a79391..d29b0deba020 100644 --- a/usr.sbin/bsdinstall/distextract/Makefile +++ b/usr.sbin/bsdinstall/distextract/Makefile @@ -1,4 +1,3 @@ - BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract LIBADD= archive bsddialog m diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile index 8a9011734592..3f63e87856c5 100644 --- a/usr.sbin/bsdinstall/distfetch/Makefile +++ b/usr.sbin/bsdinstall/distfetch/Makefile @@ -1,4 +1,3 @@ - BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch LIBADD= fetch bsddialog diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile index 397e404a126f..7c784addaec0 100644 --- a/usr.sbin/bsdinstall/partedit/Makefile +++ b/usr.sbin/bsdinstall/partedit/Makefile @@ -1,4 +1,3 @@ - BINDIR= ${LIBEXECDIR}/bsdinstall PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index e4ef00ecba59..0ac511120103 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=auto \ adduser \ bootconfig \ diff --git a/usr.sbin/bsnmpd/Makefile b/usr.sbin/bsnmpd/Makefile index 0ce03a3a4dc4..fce332458dbb 100644 --- a/usr.sbin/bsnmpd/Makefile +++ b/usr.sbin/bsnmpd/Makefile @@ -1,4 +1,3 @@ - SUBDIR= gensnmptree \ bsnmpd \ modules \ diff --git a/usr.sbin/bsnmpd/Makefile.inc b/usr.sbin/bsnmpd/Makefile.inc index 62cabd439578..876d6f891e7f 100644 --- a/usr.sbin/bsnmpd/Makefile.inc +++ b/usr.sbin/bsnmpd/Makefile.inc @@ -1,3 +1,2 @@ - PACKAGE= bsnmp .include "../Makefile.inc" diff --git a/usr.sbin/bsnmpd/modules/Makefile b/usr.sbin/bsnmpd/modules/Makefile index ac1d4ecc647b..25017057f15a 100644 --- a/usr.sbin/bsnmpd/modules/Makefile +++ b/usr.sbin/bsnmpd/modules/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/bsnmp/snmpd diff --git a/usr.sbin/bsnmpd/modules/Makefile.inc b/usr.sbin/bsnmpd/modules/Makefile.inc index abdd059b3683..e7f9156f0e7b 100644 --- a/usr.sbin/bsnmpd/modules/Makefile.inc +++ b/usr.sbin/bsnmpd/modules/Makefile.inc @@ -1,4 +1,3 @@ - SHLIB_MAJOR= 6 PACKAGE= bsnmp diff --git a/usr.sbin/bsnmpd/modules/snmp_hast/Makefile b/usr.sbin/bsnmpd/modules/snmp_hast/Makefile index 9fabe06d3f45..ddaa6ef13e6e 100644 --- a/usr.sbin/bsnmpd/modules/snmp_hast/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_hast/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/sbin/hastd diff --git a/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile b/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile index d6eb9caab74f..b388adc0885e 100644 --- a/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile @@ -1,4 +1,3 @@ - .include MOD= lm75 diff --git a/usr.sbin/btxld/Makefile b/usr.sbin/btxld/Makefile index ec28d20b49df..3b754647da4f 100644 --- a/usr.sbin/btxld/Makefile +++ b/usr.sbin/btxld/Makefile @@ -1,4 +1,3 @@ - PROG= btxld MAN= btxld.8 SRCS= btxld.c elfh.c diff --git a/usr.sbin/camdd/Makefile b/usr.sbin/camdd/Makefile index 3762762ad528..8640c96d2de7 100644 --- a/usr.sbin/camdd/Makefile +++ b/usr.sbin/camdd/Makefile @@ -1,4 +1,3 @@ - PROG= camdd SRCS= camdd.c SDIR= ${SRCTOP}/sys diff --git a/usr.sbin/cdcontrol/Makefile b/usr.sbin/cdcontrol/Makefile index 8bbd515f4683..f95e59e51c4e 100644 --- a/usr.sbin/cdcontrol/Makefile +++ b/usr.sbin/cdcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= cdcontrol LIBADD= edit diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 69894f8a8234..88c024daf7e6 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= certctl SCRIPTS=certctl.sh MAN= certctl.8 diff --git a/usr.sbin/chkgrp/Makefile b/usr.sbin/chkgrp/Makefile index a079ddb7b185..41ff5ecfa3b2 100644 --- a/usr.sbin/chkgrp/Makefile +++ b/usr.sbin/chkgrp/Makefile @@ -1,4 +1,3 @@ - PROG= chkgrp MAN= chkgrp.8 diff --git a/usr.sbin/chown/Makefile b/usr.sbin/chown/Makefile index 705e20fa6552..3e6ce8bfbd8c 100644 --- a/usr.sbin/chown/Makefile +++ b/usr.sbin/chown/Makefile @@ -1,4 +1,3 @@ - .include PROG= chown diff --git a/usr.sbin/chown/tests/Makefile b/usr.sbin/chown/tests/Makefile index f0c8eb8a318c..c4b17dfe6e22 100644 --- a/usr.sbin/chown/tests/Makefile +++ b/usr.sbin/chown/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH+= chown_test .include diff --git a/usr.sbin/chroot/Makefile b/usr.sbin/chroot/Makefile index 7935fa4b568a..f4c0c2b95610 100644 --- a/usr.sbin/chroot/Makefile +++ b/usr.sbin/chroot/Makefile @@ -1,4 +1,3 @@ - PROG= chroot MAN= chroot.8 diff --git a/usr.sbin/ckdist/Makefile b/usr.sbin/ckdist/Makefile index 14ed52e5f274..c574ed86132b 100644 --- a/usr.sbin/ckdist/Makefile +++ b/usr.sbin/ckdist/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/usr.bin/cksum PROG= ckdist diff --git a/usr.sbin/clear_locks/Makefile b/usr.sbin/clear_locks/Makefile index 93eb95d8cad0..505b61fccd6b 100644 --- a/usr.sbin/clear_locks/Makefile +++ b/usr.sbin/clear_locks/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= clear_locks diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile index 5b10ac40df74..93011f404585 100644 --- a/usr.sbin/config/Makefile +++ b/usr.sbin/config/Makefile @@ -1,4 +1,3 @@ - SRCDIR:=${.PARSEDIR:tA} PROG_CXX= config diff --git a/usr.sbin/cpucontrol/Makefile b/usr.sbin/cpucontrol/Makefile index a468ca59b461..875c1eec4121 100644 --- a/usr.sbin/cpucontrol/Makefile +++ b/usr.sbin/cpucontrol/Makefile @@ -1,4 +1,3 @@ - PROG= cpucontrol MAN= cpucontrol.8 SRCS= cpucontrol.c intel.c amd.c amd10h.c via.c ucode_subr.c diff --git a/usr.sbin/crashinfo/Makefile b/usr.sbin/crashinfo/Makefile index f65bed154872..859fa8ff6081 100644 --- a/usr.sbin/crashinfo/Makefile +++ b/usr.sbin/crashinfo/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= crashinfo.sh MAN= crashinfo.8 diff --git a/usr.sbin/cron/Makefile b/usr.sbin/cron/Makefile index e24c33cb1a80..1131cff7b17f 100644 --- a/usr.sbin/cron/Makefile +++ b/usr.sbin/cron/Makefile @@ -1,4 +1,3 @@ - SUBDIR= lib cron crontab .include diff --git a/usr.sbin/cron/Makefile.inc b/usr.sbin/cron/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/usr.sbin/cron/Makefile.inc +++ b/usr.sbin/cron/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile index 206f001b8387..c86f4fc56b71 100644 --- a/usr.sbin/cron/cron/Makefile +++ b/usr.sbin/cron/cron/Makefile @@ -1,4 +1,3 @@ - PACKAGE=cron CONFS= crontab PROG= cron diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 5fbd2b44b2fa..8c60575e7d70 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -1,4 +1,3 @@ - BINDIR= /usr/bin PACKAGE=cron diff --git a/usr.sbin/cron/lib/Makefile b/usr.sbin/cron/lib/Makefile index cf41f2e72d2c..475683cc7a6f 100644 --- a/usr.sbin/cron/lib/Makefile +++ b/usr.sbin/cron/lib/Makefile @@ -1,4 +1,3 @@ - LIB= cron INTERNALLIB= SRCS= entry.c env.c misc.c diff --git a/usr.sbin/crunch/Makefile b/usr.sbin/crunch/Makefile index 79c2ab096bbb..e3d1c9d73b18 100644 --- a/usr.sbin/crunch/Makefile +++ b/usr.sbin/crunch/Makefile @@ -1,4 +1,3 @@ - SUBDIR= crunchgen crunchide .include diff --git a/usr.sbin/crunch/Makefile.inc b/usr.sbin/crunch/Makefile.inc index 880f05576e1b..da4210505219 100644 --- a/usr.sbin/crunch/Makefile.inc +++ b/usr.sbin/crunch/Makefile.inc @@ -1,3 +1,2 @@ - # modify to taste BINDIR?= /usr/bin diff --git a/usr.sbin/crunch/crunchgen/Makefile b/usr.sbin/crunch/crunchgen/Makefile index 93d067461d74..4b2c34375f5e 100644 --- a/usr.sbin/crunch/crunchgen/Makefile +++ b/usr.sbin/crunch/crunchgen/Makefile @@ -1,4 +1,3 @@ - PROG= crunchgen SRCS= crunchgen.c crunched_skel.c CLEANFILES+= crunched_skel.c diff --git a/usr.sbin/crunch/crunchide/Makefile b/usr.sbin/crunch/crunchide/Makefile index 6467e951e0c7..40dc1d3673cb 100644 --- a/usr.sbin/crunch/crunchide/Makefile +++ b/usr.sbin/crunch/crunchide/Makefile @@ -1,4 +1,3 @@ - PROG= crunchide SRCS= crunchide.c exec_elf32.c exec_elf64.c diff --git a/usr.sbin/crunch/examples/Makefile b/usr.sbin/crunch/examples/Makefile index baef8f899cfc..24c151438911 100644 --- a/usr.sbin/crunch/examples/Makefile +++ b/usr.sbin/crunch/examples/Makefile @@ -1,4 +1,3 @@ - CRUNCHED= fixit # below is boiler-plate to make $(CRUNCHED) from $(CRUNCHED).conf diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile index b563891672be..7d2ec477a4f3 100644 --- a/usr.sbin/ctladm/Makefile +++ b/usr.sbin/ctladm/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= iscsi diff --git a/usr.sbin/ctladm/tests/Makefile b/usr.sbin/ctladm/tests/Makefile index 825e38e6c6e3..fd71da5aec41 100644 --- a/usr.sbin/ctladm/tests/Makefile +++ b/usr.sbin/ctladm/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= port diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile index b14daccff257..d6bef1032c5a 100644 --- a/usr.sbin/ctld/Makefile +++ b/usr.sbin/ctld/Makefile @@ -1,4 +1,3 @@ - .include CFLAGS+=-I${SRCTOP}/contrib/libucl/include diff --git a/usr.sbin/cxgbetool/Makefile b/usr.sbin/cxgbetool/Makefile index 356e93c910a4..cc5290b8aaf5 100644 --- a/usr.sbin/cxgbetool/Makefile +++ b/usr.sbin/cxgbetool/Makefile @@ -1,4 +1,3 @@ - PACKAGE= cxgbe-tools PROG= cxgbetool MAN= cxgbetool.8 diff --git a/usr.sbin/daemon/Makefile b/usr.sbin/daemon/Makefile index f839079be4e8..46500e5d2a3c 100644 --- a/usr.sbin/daemon/Makefile +++ b/usr.sbin/daemon/Makefile @@ -1,4 +1,3 @@ - PROG= daemon MAN= daemon.8 diff --git a/usr.sbin/daemon/tests/Makefile b/usr.sbin/daemon/tests/Makefile index c5c6470416db..2c0312e7679e 100644 --- a/usr.sbin/daemon/tests/Makefile +++ b/usr.sbin/daemon/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= daemon_test diff --git a/usr.sbin/dconschat/Makefile b/usr.sbin/dconschat/Makefile index f5f7795f284b..70f59d7a5d34 100644 --- a/usr.sbin/dconschat/Makefile +++ b/usr.sbin/dconschat/Makefile @@ -1,4 +1,3 @@ - PROG= dconschat MAN= dconschat.8 diff --git a/usr.sbin/devctl/Makefile b/usr.sbin/devctl/Makefile index cf52a8632292..376e05f5c0f3 100644 --- a/usr.sbin/devctl/Makefile +++ b/usr.sbin/devctl/Makefile @@ -1,4 +1,3 @@ - PROG= devctl MAN= devctl.8 diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile index 35444d5d5e68..f6506c176c9c 100644 --- a/usr.sbin/devinfo/Makefile +++ b/usr.sbin/devinfo/Makefile @@ -1,4 +1,3 @@ - PACKAGE= devmatch PROG= devinfo MAN= devinfo.8 diff --git a/usr.sbin/diskinfo/Makefile b/usr.sbin/diskinfo/Makefile index d6e2b3c3a94a..c8eb9f45f3b5 100644 --- a/usr.sbin/diskinfo/Makefile +++ b/usr.sbin/diskinfo/Makefile @@ -1,4 +1,3 @@ - PROG= diskinfo MAN= diskinfo.8 diff --git a/usr.sbin/editmap/Makefile b/usr.sbin/editmap/Makefile index 0935595fd2c9..e4300016aa1e 100644 --- a/usr.sbin/editmap/Makefile +++ b/usr.sbin/editmap/Makefile @@ -1,4 +1,3 @@ - SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/editmap diff --git a/usr.sbin/edquota/Makefile b/usr.sbin/edquota/Makefile index 3e9d0ede6721..518cd7f8e4ef 100644 --- a/usr.sbin/edquota/Makefile +++ b/usr.sbin/edquota/Makefile @@ -1,4 +1,3 @@ - PROG= edquota MAN= edquota.8 diff --git a/usr.sbin/efidp/Makefile b/usr.sbin/efidp/Makefile index a1edd8ac5e51..bbadb6c50bbe 100644 --- a/usr.sbin/efidp/Makefile +++ b/usr.sbin/efidp/Makefile @@ -1,4 +1,3 @@ - PACKAGE= efi-tools PROG= efidp diff --git a/usr.sbin/efitable/Makefile b/usr.sbin/efitable/Makefile index 81777bf73885..e9dd84fedd07 100644 --- a/usr.sbin/efitable/Makefile +++ b/usr.sbin/efitable/Makefile @@ -1,4 +1,3 @@ - PACKAGE= efi-tools PROG= efitable diff --git a/usr.sbin/efivar/Makefile b/usr.sbin/efivar/Makefile index 2e794e13968f..dd655f6b953d 100644 --- a/usr.sbin/efivar/Makefile +++ b/usr.sbin/efivar/Makefile @@ -1,4 +1,3 @@ - PACKAGE= efi-tools PROG= efivar diff --git a/usr.sbin/efiwake/Makefile b/usr.sbin/efiwake/Makefile index 0e6da2802055..710890c50313 100644 --- a/usr.sbin/efiwake/Makefile +++ b/usr.sbin/efiwake/Makefile @@ -1,4 +1,3 @@ - PACKAGE= efi-tools PROG= efiwake diff --git a/usr.sbin/etcupdate/Makefile b/usr.sbin/etcupdate/Makefile index f2b6bd9ab374..df1fcbeaf128 100644 --- a/usr.sbin/etcupdate/Makefile +++ b/usr.sbin/etcupdate/Makefile @@ -1,4 +1,3 @@ - .include SCRIPTS=etcupdate.sh diff --git a/usr.sbin/etcupdate/tests/Makefile b/usr.sbin/etcupdate/tests/Makefile index 77cd0b87a21c..ba0b6223576b 100644 --- a/usr.sbin/etcupdate/tests/Makefile +++ b/usr.sbin/etcupdate/tests/Makefile @@ -1,4 +1,3 @@ - PLAIN_TESTS_SH= .for test in always_test \ conflicts_test \ diff --git a/usr.sbin/extattr/Makefile b/usr.sbin/extattr/Makefile index 61171ef385d7..b2951dabf935 100644 --- a/usr.sbin/extattr/Makefile +++ b/usr.sbin/extattr/Makefile @@ -1,4 +1,3 @@ - PROG= rmextattr MAN= rmextattr.8 diff --git a/usr.sbin/extattr/tests/Makefile b/usr.sbin/extattr/tests/Makefile index 3e3218032d07..a39bf21c7863 100644 --- a/usr.sbin/extattr/tests/Makefile +++ b/usr.sbin/extattr/tests/Makefile @@ -1,4 +1,3 @@ - ATF_TESTS_SH= extattr_test .include diff --git a/usr.sbin/extattrctl/Makefile b/usr.sbin/extattrctl/Makefile index 9365aff89230..9d6ecde2b179 100644 --- a/usr.sbin/extattrctl/Makefile +++ b/usr.sbin/extattrctl/Makefile @@ -1,4 +1,3 @@ - PROG= extattrctl MAN= extattrctl.8 diff --git a/usr.sbin/fdcontrol/Makefile b/usr.sbin/fdcontrol/Makefile index f3d7cc2af36b..daaae25815aa 100644 --- a/usr.sbin/fdcontrol/Makefile +++ b/usr.sbin/fdcontrol/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/fdread PROG= fdcontrol diff --git a/usr.sbin/fdformat/Makefile b/usr.sbin/fdformat/Makefile index f2cd4e4841e9..2b6891027b22 100644 --- a/usr.sbin/fdformat/Makefile +++ b/usr.sbin/fdformat/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/fdread PROG= fdformat diff --git a/usr.sbin/fdread/Makefile b/usr.sbin/fdread/Makefile index 4b7570868ccb..eb205604cde0 100644 --- a/usr.sbin/fdread/Makefile +++ b/usr.sbin/fdread/Makefile @@ -1,4 +1,3 @@ - PROG= fdread SRCS= fdread.c fdutil.c diff --git a/usr.sbin/fifolog/Makefile b/usr.sbin/fifolog/Makefile index 779fec1860de..b906d5a9dbda 100644 --- a/usr.sbin/fifolog/Makefile +++ b/usr.sbin/fifolog/Makefile @@ -1,4 +1,3 @@ - SUBDIR= lib .WAIT \ fifolog_create fifolog_writer fifolog_reader SUBDIR_PARALLEL= diff --git a/usr.sbin/fifolog/Makefile.inc b/usr.sbin/fifolog/Makefile.inc index d3b5cbd3a79b..01b5f23410c8 100644 --- a/usr.sbin/fifolog/Makefile.inc +++ b/usr.sbin/fifolog/Makefile.inc @@ -1,2 +1 @@ - .include "../Makefile.inc" diff --git a/usr.sbin/fifolog/fifolog_create/Makefile b/usr.sbin/fifolog/fifolog_create/Makefile index 79dfedbcb83a..0fe8f02bc70e 100644 --- a/usr.sbin/fifolog/fifolog_create/Makefile +++ b/usr.sbin/fifolog/fifolog_create/Makefile @@ -1,4 +1,3 @@ - PROG= fifolog_create CFLAGS+= -I${.CURDIR:H}/lib diff --git a/usr.sbin/fifolog/fifolog_reader/Makefile b/usr.sbin/fifolog/fifolog_reader/Makefile index fd3e09aed919..7d5ca0fe81e9 100644 --- a/usr.sbin/fifolog/fifolog_reader/Makefile +++ b/usr.sbin/fifolog/fifolog_reader/Makefile @@ -1,4 +1,3 @@ - PROG= fifolog_reader CFLAGS+= -I${.CURDIR:H}/lib diff --git a/usr.sbin/fifolog/fifolog_writer/Makefile b/usr.sbin/fifolog/fifolog_writer/Makefile index ade8308db418..1d5db922283e 100644 --- a/usr.sbin/fifolog/fifolog_writer/Makefile +++ b/usr.sbin/fifolog/fifolog_writer/Makefile @@ -1,4 +1,3 @@ - PROG= fifolog_writer CFLAGS+= -I${.CURDIR:H}/lib diff --git a/usr.sbin/fifolog/lib/Makefile b/usr.sbin/fifolog/lib/Makefile index 831285df8fac..e4aa62fb680f 100644 --- a/usr.sbin/fifolog/lib/Makefile +++ b/usr.sbin/fifolog/lib/Makefile @@ -1,4 +1,3 @@ - LIB= fifolog INTERNALLIB= # API not published or supported. diff --git a/usr.sbin/freebsd-update/Makefile b/usr.sbin/freebsd-update/Makefile index 14e522adb1a0..ebdf1e17d340 100644 --- a/usr.sbin/freebsd-update/Makefile +++ b/usr.sbin/freebsd-update/Makefile @@ -1,4 +1,3 @@ - CONFS= freebsd-update.conf SCRIPTS=freebsd-update.sh MAN= freebsd-update.8 diff --git a/usr.sbin/fstyp/Makefile b/usr.sbin/fstyp/Makefile index 0ec14daeb773..20f71aab44c9 100644 --- a/usr.sbin/fstyp/Makefile +++ b/usr.sbin/fstyp/Makefile @@ -1,4 +1,3 @@ - .include PROG= fstyp diff --git a/usr.sbin/fstyp/tests/Makefile b/usr.sbin/fstyp/tests/Makefile index 99e7d4e2c51f..9f40e86ed8bf 100644 --- a/usr.sbin/fstyp/tests/Makefile +++ b/usr.sbin/fstyp/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH= fstyp_test diff --git a/usr.sbin/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/Makefile index dc7ad7096448..b6568ccb976b 100644 --- a/usr.sbin/ftp-proxy/Makefile +++ b/usr.sbin/ftp-proxy/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/pf/ftp-proxy PACKAGE= pf diff --git a/usr.sbin/fwcontrol/Makefile b/usr.sbin/fwcontrol/Makefile index ae87135af919..e2201c2fcb73 100644 --- a/usr.sbin/fwcontrol/Makefile +++ b/usr.sbin/fwcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= fwcontrol SRCS= fwcontrol.c fwcrom.c fwdv.c fwmpegts.c MAN= fwcontrol.8 diff --git a/usr.sbin/getfmac/Makefile b/usr.sbin/getfmac/Makefile index d01845caf2ff..6971eda404cd 100644 --- a/usr.sbin/getfmac/Makefile +++ b/usr.sbin/getfmac/Makefile @@ -1,4 +1,3 @@ - PROG= getfmac MAN= getfmac.8 diff --git a/usr.sbin/getpmac/Makefile b/usr.sbin/getpmac/Makefile index b8da866b212e..ada82bf1cebc 100644 --- a/usr.sbin/getpmac/Makefile +++ b/usr.sbin/getpmac/Makefile @@ -1,4 +1,3 @@ - PROG= getpmac MAN= getpmac.8 diff --git a/usr.sbin/gpioctl/Makefile b/usr.sbin/gpioctl/Makefile index dead7a46e202..85bc18fde4d0 100644 --- a/usr.sbin/gpioctl/Makefile +++ b/usr.sbin/gpioctl/Makefile @@ -1,4 +1,3 @@ - PROG= gpioctl MAN= gpioctl.8 diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile index 9621363296b5..e30463ddf50b 100644 --- a/usr.sbin/gssd/Makefile +++ b/usr.sbin/gssd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= kerberos diff --git a/usr.sbin/gstat/Makefile b/usr.sbin/gstat/Makefile index 033ebb157f61..03cdf56162aa 100644 --- a/usr.sbin/gstat/Makefile +++ b/usr.sbin/gstat/Makefile @@ -1,4 +1,3 @@ - PROG= gstat MAN= gstat.8 LIBADD= devstat geom edit tinfow ncursesw diff --git a/usr.sbin/hyperv/Makefile b/usr.sbin/hyperv/Makefile index f5a4cbd4810a..7caa880598b7 100644 --- a/usr.sbin/hyperv/Makefile +++ b/usr.sbin/hyperv/Makefile @@ -1,4 +1,3 @@ - .include SUBDIR= \ diff --git a/usr.sbin/hyperv/Makefile.inc b/usr.sbin/hyperv/Makefile.inc index ceaf3870d9bd..d79234b3f2c9 100644 --- a/usr.sbin/hyperv/Makefile.inc +++ b/usr.sbin/hyperv/Makefile.inc @@ -1,3 +1,2 @@ - CFLAGS.gcc+= -Wno-uninitialized .include "../Makefile.inc" diff --git a/usr.sbin/hyperv/tools/Makefile.inc b/usr.sbin/hyperv/tools/Makefile.inc index 1dc11073a2f3..9420227ff26f 100644 --- a/usr.sbin/hyperv/tools/Makefile.inc +++ b/usr.sbin/hyperv/tools/Makefile.inc @@ -1,3 +1,2 @@ - CFLAGS.gcc+= -Wno-uninitialized .include "../../Makefile.inc" diff --git a/usr.sbin/hyperv/tools/kvp/Makefile b/usr.sbin/hyperv/tools/kvp/Makefile index a74af47c3f48..98cb23392cc3 100644 --- a/usr.sbin/hyperv/tools/kvp/Makefile +++ b/usr.sbin/hyperv/tools/kvp/Makefile @@ -1,4 +1,3 @@ - .include HV_KVP_DAEMON_DISTDIR?= ${SRCTOP}/contrib/hyperv/tools diff --git a/usr.sbin/i2c/Makefile b/usr.sbin/i2c/Makefile index 37bff6c42314..1302fd748695 100644 --- a/usr.sbin/i2c/Makefile +++ b/usr.sbin/i2c/Makefile @@ -1,4 +1,3 @@ - PROG= i2c MAN= i2c.8 diff --git a/usr.sbin/ifmcstat/Makefile b/usr.sbin/ifmcstat/Makefile index faf6908e9204..6a312fb977f5 100644 --- a/usr.sbin/ifmcstat/Makefile +++ b/usr.sbin/ifmcstat/Makefile @@ -1,4 +1,3 @@ - .include PROG= ifmcstat diff --git a/usr.sbin/inetd/Makefile b/usr.sbin/inetd/Makefile index c62efc8dabb0..a5a080f60538 100644 --- a/usr.sbin/inetd/Makefile +++ b/usr.sbin/inetd/Makefile @@ -1,4 +1,3 @@ - .include CONFS= inetd.conf diff --git a/usr.sbin/iostat/Makefile b/usr.sbin/iostat/Makefile index fa9640267d3d..7ea659db5e1c 100644 --- a/usr.sbin/iostat/Makefile +++ b/usr.sbin/iostat/Makefile @@ -1,4 +1,3 @@ - PROG= iostat MAN= iostat.8 diff --git a/usr.sbin/iovctl/Makefile b/usr.sbin/iovctl/Makefile index 599fc41785e0..3298a6a21217 100644 --- a/usr.sbin/iovctl/Makefile +++ b/usr.sbin/iovctl/Makefile @@ -1,4 +1,3 @@ - PROG= iovctl SRCS= iovctl.c parse.c validate.c LIBADD= nv ucl m diff --git a/usr.sbin/ip6addrctl/Makefile b/usr.sbin/ip6addrctl/Makefile index 6fc277d39e63..ba38dc1162d9 100644 --- a/usr.sbin/ip6addrctl/Makefile +++ b/usr.sbin/ip6addrctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= ip6addrctl MAN= ip6addrctl.8 diff --git a/usr.sbin/iscsid/Makefile b/usr.sbin/iscsid/Makefile index a4fbcb368650..4403e796f89d 100644 --- a/usr.sbin/iscsid/Makefile +++ b/usr.sbin/iscsid/Makefile @@ -1,4 +1,3 @@ - PACKAGE= iscsi PROG= iscsid SRCS= discovery.c iscsid.c login.c diff --git a/usr.sbin/jail/Makefile b/usr.sbin/jail/Makefile index 60234c8255d9..babe7b9459c0 100644 --- a/usr.sbin/jail/Makefile +++ b/usr.sbin/jail/Makefile @@ -1,4 +1,3 @@ - .include PROG= jail diff --git a/usr.sbin/jail/tests/Makefile b/usr.sbin/jail/tests/Makefile index 66f52faebaa9..6a64557cafa8 100644 --- a/usr.sbin/jail/tests/Makefile +++ b/usr.sbin/jail/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests ATF_TESTS_SH+= jail_basic_test diff --git a/usr.sbin/jexec/Makefile b/usr.sbin/jexec/Makefile index 89445c600a8a..2f32dc945401 100644 --- a/usr.sbin/jexec/Makefile +++ b/usr.sbin/jexec/Makefile @@ -1,4 +1,3 @@ - PROG= jexec MAN= jexec.8 LIBADD= jail util diff --git a/usr.sbin/jls/Makefile b/usr.sbin/jls/Makefile index ffe5704859eb..ee9665356c79 100644 --- a/usr.sbin/jls/Makefile +++ b/usr.sbin/jls/Makefile @@ -1,4 +1,3 @@ - .include PROG= jls diff --git a/usr.sbin/kbdcontrol/Makefile b/usr.sbin/kbdcontrol/Makefile index 982fa42e1564..737cd0187399 100644 --- a/usr.sbin/kbdcontrol/Makefile +++ b/usr.sbin/kbdcontrol/Makefile @@ -1,4 +1,3 @@ - PACKAGE= console-tools PROG= kbdcontrol MAN= kbdcontrol.1 kbdmap.5 diff --git a/usr.sbin/kbdmap/Makefile b/usr.sbin/kbdmap/Makefile index d1957485830d..0b79de962382 100644 --- a/usr.sbin/kbdmap/Makefile +++ b/usr.sbin/kbdmap/Makefile @@ -1,4 +1,3 @@ - PACKAGE= console-tools PROG= kbdmap CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile index 18eee0701606..dccc73251d42 100644 --- a/usr.sbin/keyserv/Makefile +++ b/usr.sbin/keyserv/Makefile @@ -1,4 +1,3 @@ - PROG= keyserv MAN= keyserv.8 SRCS= keyserv.c setkey.c crypt_svc.c crypt_server.c crypt.h diff --git a/usr.sbin/kldxref/Makefile b/usr.sbin/kldxref/Makefile index 7b392e020939..fc9b0b4215fc 100644 --- a/usr.sbin/kldxref/Makefile +++ b/usr.sbin/kldxref/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= kldxref MAN= kldxref.8 diff --git a/usr.sbin/lastlogin/Makefile b/usr.sbin/lastlogin/Makefile index b595837075ee..929012823cac 100644 --- a/usr.sbin/lastlogin/Makefile +++ b/usr.sbin/lastlogin/Makefile @@ -1,4 +1,3 @@ - PROG= lastlogin PACKAGE= acct MAN= lastlogin.8 diff --git a/usr.sbin/lpr/Makefile b/usr.sbin/lpr/Makefile index a36ad649501d..84b07538e0df 100644 --- a/usr.sbin/lpr/Makefile +++ b/usr.sbin/lpr/Makefile @@ -1,4 +1,3 @@ - SUBDIR= common_source .WAIT \ chkprintcap lp lpc lpd lpq lpr lprm lptest pac \ filters filters.ru diff --git a/usr.sbin/lpr/Makefile.inc b/usr.sbin/lpr/Makefile.inc index 20800c3bb080..d72fbaacf631 100644 --- a/usr.sbin/lpr/Makefile.inc +++ b/usr.sbin/lpr/Makefile.inc @@ -1,4 +1,3 @@ - .include .if ${MK_INET6_SUPPORT} != "no" diff --git a/usr.sbin/lpr/chkprintcap/Makefile b/usr.sbin/lpr/chkprintcap/Makefile index 600b71237426..91f4c180f258 100644 --- a/usr.sbin/lpr/chkprintcap/Makefile +++ b/usr.sbin/lpr/chkprintcap/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common_source PACKAGE=lp diff --git a/usr.sbin/lpr/common_source/Makefile b/usr.sbin/lpr/common_source/Makefile index 1d3a10a60ae3..a5d901a2d160 100644 --- a/usr.sbin/lpr/common_source/Makefile +++ b/usr.sbin/lpr/common_source/Makefile @@ -1,4 +1,3 @@ - # # Library of internal routines for the print spooler suite. # Originally these were compiled separately into each program, diff --git a/usr.sbin/lpr/filters.ru/Makefile b/usr.sbin/lpr/filters.ru/Makefile index 05971920182c..c100352d8af7 100644 --- a/usr.sbin/lpr/filters.ru/Makefile +++ b/usr.sbin/lpr/filters.ru/Makefile @@ -1,4 +1,3 @@ - SUBDIR= koi2alt koi2855 PACKAGE=lp diff --git a/usr.sbin/lpr/filters.ru/Makefile.inc b/usr.sbin/lpr/filters.ru/Makefile.inc index ee7dbae5aef7..2a311e5201db 100644 --- a/usr.sbin/lpr/filters.ru/Makefile.inc +++ b/usr.sbin/lpr/filters.ru/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR= /usr/libexec/lpr/ru WARNS?= 3 diff --git a/usr.sbin/lpr/filters.ru/koi2855/Makefile b/usr.sbin/lpr/filters.ru/koi2855/Makefile index 53d6a5bd9869..d551cce69094 100644 --- a/usr.sbin/lpr/filters.ru/koi2855/Makefile +++ b/usr.sbin/lpr/filters.ru/koi2855/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lp PROG= koi2855 MAN= diff --git a/usr.sbin/lpr/filters.ru/koi2alt/Makefile b/usr.sbin/lpr/filters.ru/koi2alt/Makefile index 6b005afac0a6..5b3bfab3e93c 100644 --- a/usr.sbin/lpr/filters.ru/koi2alt/Makefile +++ b/usr.sbin/lpr/filters.ru/koi2alt/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lp PROG= koi2alt MAN= diff --git a/usr.sbin/lpr/filters/Makefile b/usr.sbin/lpr/filters/Makefile index b3d7cbab9c56..3cca478a0e9b 100644 --- a/usr.sbin/lpr/filters/Makefile +++ b/usr.sbin/lpr/filters/Makefile @@ -1,4 +1,3 @@ - BINDIR= ${LIBEXECDIR}/lpr PACKAGE=lp diff --git a/usr.sbin/lpr/lp/Makefile b/usr.sbin/lpr/lp/Makefile index 59562bdc6f13..3edd8023c89a 100644 --- a/usr.sbin/lpr/lp/Makefile +++ b/usr.sbin/lpr/lp/Makefile @@ -1,4 +1,3 @@ - BINDIR= /usr/bin PACKAGE=lp diff --git a/usr.sbin/lpr/lpc/Makefile b/usr.sbin/lpr/lpc/Makefile index ccc7fb503ee0..ca9dd2531fb2 100644 --- a/usr.sbin/lpr/lpc/Makefile +++ b/usr.sbin/lpr/lpc/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common_source PACKAGE=lp diff --git a/usr.sbin/lpr/lpd/Makefile b/usr.sbin/lpr/lpd/Makefile index c4f4f5e0e56a..199f03ed16a0 100644 --- a/usr.sbin/lpr/lpd/Makefile +++ b/usr.sbin/lpr/lpd/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lp CONFS= hosts.lpd printcap PROG= lpd diff --git a/usr.sbin/lpr/lpq/Makefile b/usr.sbin/lpr/lpq/Makefile index d8fe64de2c84..2e29a0386204 100644 --- a/usr.sbin/lpr/lpq/Makefile +++ b/usr.sbin/lpr/lpq/Makefile @@ -1,4 +1,3 @@ - BINDIR= /usr/bin PACKAGE=lp diff --git a/usr.sbin/lpr/lpr/Makefile b/usr.sbin/lpr/lpr/Makefile index 84f965b728b8..2c3b14874e7d 100644 --- a/usr.sbin/lpr/lpr/Makefile +++ b/usr.sbin/lpr/lpr/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common_source BINDIR= /usr/bin diff --git a/usr.sbin/lpr/lprm/Makefile b/usr.sbin/lpr/lprm/Makefile index 1fac5ce73471..49682eb88700 100644 --- a/usr.sbin/lpr/lprm/Makefile +++ b/usr.sbin/lpr/lprm/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common_source BINDIR= /usr/bin diff --git a/usr.sbin/lpr/lptest/Makefile b/usr.sbin/lpr/lptest/Makefile index a48836389049..cc2243d46ec0 100644 --- a/usr.sbin/lpr/lptest/Makefile +++ b/usr.sbin/lpr/lptest/Makefile @@ -1,4 +1,3 @@ - PACKAGE=lp PROG= lptest diff --git a/usr.sbin/lpr/pac/Makefile b/usr.sbin/lpr/pac/Makefile index eb40bfa7a4d2..96a3b3c87232 100644 --- a/usr.sbin/lpr/pac/Makefile +++ b/usr.sbin/lpr/pac/Makefile @@ -1,4 +1,3 @@ - .PATH: ${.CURDIR:H}/common_source PACKAGE=lp diff --git a/usr.sbin/lptcontrol/Makefile b/usr.sbin/lptcontrol/Makefile index 2a34ba9d6382..64a2fba46dcc 100644 --- a/usr.sbin/lptcontrol/Makefile +++ b/usr.sbin/lptcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= lptcontrol MAN= lptcontrol.8 diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile index 2da9169090fd..0de1fb10dccd 100644 --- a/usr.sbin/mailstats/Makefile +++ b/usr.sbin/mailstats/Makefile @@ -1,4 +1,3 @@ - SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/mailstats diff --git a/usr.sbin/mailwrapper/Makefile b/usr.sbin/mailwrapper/Makefile index 237be9d6e1b6..c1b395c81e4e 100644 --- a/usr.sbin/mailwrapper/Makefile +++ b/usr.sbin/mailwrapper/Makefile @@ -1,4 +1,3 @@ - .include .if ${MK_MAILWRAPPER} != "no" diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index c0f4469d29f1..75733714fcc2 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -1,4 +1,3 @@ - SRCDIR:=${.PARSEDIR:tA} .include diff --git a/usr.sbin/makefs/tests/Makefile b/usr.sbin/makefs/tests/Makefile index 98cc89031c64..39844827f999 100644 --- a/usr.sbin/makefs/tests/Makefile +++ b/usr.sbin/makefs/tests/Makefile @@ -1,4 +1,3 @@ - .include ATF_TESTS_SH+= makefs_cd9660_tests diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile index 8d558a7b6795..25b4b629f87b 100644 --- a/usr.sbin/makemap/Makefile +++ b/usr.sbin/makemap/Makefile @@ -1,4 +1,3 @@ - SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/makemap diff --git a/usr.sbin/manctl/Makefile b/usr.sbin/manctl/Makefile index e550b78644d8..286d72045282 100644 --- a/usr.sbin/manctl/Makefile +++ b/usr.sbin/manctl/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=manctl.sh MAN= manctl.8 diff --git a/usr.sbin/memcontrol/Makefile b/usr.sbin/memcontrol/Makefile index 6010a24ad082..bbc685e21844 100644 --- a/usr.sbin/memcontrol/Makefile +++ b/usr.sbin/memcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= memcontrol MAN= memcontrol.8 diff --git a/usr.sbin/mergemaster/Makefile b/usr.sbin/mergemaster/Makefile index 9dd7e2193db3..2edda1b9bc05 100644 --- a/usr.sbin/mergemaster/Makefile +++ b/usr.sbin/mergemaster/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=mergemaster.sh MAN= mergemaster.8 diff --git a/usr.sbin/mixer/Makefile b/usr.sbin/mixer/Makefile index 0dab386e0873..7789a28e99ad 100644 --- a/usr.sbin/mixer/Makefile +++ b/usr.sbin/mixer/Makefile @@ -1,4 +1,3 @@ - .include PROG= mixer diff --git a/usr.sbin/mlx5tool/Makefile b/usr.sbin/mlx5tool/Makefile index b6896b270b89..778ebad657e8 100644 --- a/usr.sbin/mlx5tool/Makefile +++ b/usr.sbin/mlx5tool/Makefile @@ -1,4 +1,3 @@ - PACKAGE= mlx-tools PROG= mlx5tool diff --git a/usr.sbin/mlxcontrol/Makefile b/usr.sbin/mlxcontrol/Makefile index d18ed4ac77a5..e9832876da36 100644 --- a/usr.sbin/mlxcontrol/Makefile +++ b/usr.sbin/mlxcontrol/Makefile @@ -1,4 +1,3 @@ - PROG= mlxcontrol MAN= mlxcontrol.8 SRCS= command.c config.c interface.c util.c diff --git a/usr.sbin/mount_smbfs/Makefile b/usr.sbin/mount_smbfs/Makefile index 1ba3430551dd..8bd1b0f34d99 100644 --- a/usr.sbin/mount_smbfs/Makefile +++ b/usr.sbin/mount_smbfs/Makefile @@ -1,4 +1,3 @@ - PROG= mount_smbfs PACKAGE= smbutils SRCS= mount_smbfs.c getmntopts.c diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile index 980842b93b19..e63b03bbfe45 100644 --- a/usr.sbin/mountd/Makefile +++ b/usr.sbin/mountd/Makefile @@ -1,4 +1,3 @@ - PROG= mountd SRCS= mountd.c getmntopts.c MAN= exports.5 netgroup.5 mountd.8 diff --git a/usr.sbin/moused/Makefile b/usr.sbin/moused/Makefile index 030fefbaa313..2a7aa0484542 100644 --- a/usr.sbin/moused/Makefile +++ b/usr.sbin/moused/Makefile @@ -1,4 +1,3 @@ - PACKAGE= console-tools PROG= moused MAN= moused.8 diff --git a/usr.sbin/mptable/Makefile b/usr.sbin/mptable/Makefile index 08a0bc1024e3..ca93525cfd03 100644 --- a/usr.sbin/mptable/Makefile +++ b/usr.sbin/mptable/Makefile @@ -1,4 +1,3 @@ - PROG= mptable .include diff --git a/usr.sbin/mptutil/Makefile b/usr.sbin/mptutil/Makefile index 6d7e79338f6a..1d1e904b8273 100644 --- a/usr.sbin/mptutil/Makefile +++ b/usr.sbin/mptutil/Makefile @@ -1,4 +1,3 @@ - PROG= mptutil SRCS= mptutil.c mpt_cam.c mpt_cmd.c mpt_config.c mpt_drive.c mpt_evt.c \ mpt_show.c mpt_volume.c diff --git a/usr.sbin/mtest/Makefile b/usr.sbin/mtest/Makefile index 9efd1e8d716f..6d503c173fa1 100644 --- a/usr.sbin/mtest/Makefile +++ b/usr.sbin/mtest/Makefile @@ -1,4 +1,3 @@ - .include PROG= mtest diff --git a/usr.sbin/newsyslog/Makefile b/usr.sbin/newsyslog/Makefile index b2e945b6215a..0afbe3b814a7 100644 --- a/usr.sbin/newsyslog/Makefile +++ b/usr.sbin/newsyslog/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= newsyslog diff --git a/usr.sbin/newsyslog/newsyslog.conf.d/Makefile b/usr.sbin/newsyslog/newsyslog.conf.d/Makefile index e0451c228f5a..8ef3af253a50 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.d/Makefile +++ b/usr.sbin/newsyslog/newsyslog.conf.d/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= newsyslog diff --git a/usr.sbin/newsyslog/tests/Makefile b/usr.sbin/newsyslog/tests/Makefile index 3adc1eec5d42..6c282f8f58b9 100644 --- a/usr.sbin/newsyslog/tests/Makefile +++ b/usr.sbin/newsyslog/tests/Makefile @@ -1,4 +1,3 @@ - TAP_TESTS_SH= legacy_test .include diff --git a/usr.sbin/nfscbd/Makefile b/usr.sbin/nfscbd/Makefile index 5703601b9ac3..c511e118b026 100644 --- a/usr.sbin/nfscbd/Makefile +++ b/usr.sbin/nfscbd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= nfscbd diff --git a/usr.sbin/nfsd/Makefile b/usr.sbin/nfsd/Makefile index 424d35872dad..d7ca8c380c48 100644 --- a/usr.sbin/nfsd/Makefile +++ b/usr.sbin/nfsd/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= nfsd diff --git a/usr.sbin/nfsdumpstate/Makefile b/usr.sbin/nfsdumpstate/Makefile index c55425965630..636adaf783ec 100644 --- a/usr.sbin/nfsdumpstate/Makefile +++ b/usr.sbin/nfsdumpstate/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= nfs diff --git a/usr.sbin/nfsrevoke/Makefile b/usr.sbin/nfsrevoke/Makefile index f4c1146e2084..3f21cf287a8e 100644 --- a/usr.sbin/nfsrevoke/Makefile +++ b/usr.sbin/nfsrevoke/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= nfsrevoke diff --git a/usr.sbin/nfsuserd/Makefile b/usr.sbin/nfsuserd/Makefile index be27b4d044c1..bf94096c6607 100644 --- a/usr.sbin/nfsuserd/Makefile +++ b/usr.sbin/nfsuserd/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= nfs diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile index 45610b0b2965..dd04c084e1a8 100644 --- a/usr.sbin/nmtree/Makefile +++ b/usr.sbin/nmtree/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/mtree diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile index 2a5e2e2d92a4..d884df11e1fc 100644 --- a/usr.sbin/nmtree/tests/Makefile +++ b/usr.sbin/nmtree/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.sbin/mtree diff --git a/usr.sbin/nologin/Makefile b/usr.sbin/nologin/Makefile index 79fa75d34a73..7e3e40babdab 100644 --- a/usr.sbin/nologin/Makefile +++ b/usr.sbin/nologin/Makefile @@ -1,4 +1,3 @@ - PROG= nologin MAN= nologin.5 nologin.8 diff --git a/usr.sbin/nscd/Makefile b/usr.sbin/nscd/Makefile index 105801a7b9ac..85bea62cef49 100644 --- a/usr.sbin/nscd/Makefile +++ b/usr.sbin/nscd/Makefile @@ -1,4 +1,3 @@ - CONFS= nscd.conf PROG= nscd MAN= nscd.conf.5 nscd.8 diff --git a/usr.sbin/nscd/agents/Makefile.inc b/usr.sbin/nscd/agents/Makefile.inc index 243f00c5b994..81c603407c8c 100644 --- a/usr.sbin/nscd/agents/Makefile.inc +++ b/usr.sbin/nscd/agents/Makefile.inc @@ -1,2 +1 @@ - SRCS += passwd.c group.c services.c diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index a4174bb99393..5801d91aac46 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -1,4 +1,3 @@ - .include DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile index e87f4f734343..2da65eccc1f0 100644 --- a/usr.sbin/ntp/doc/Makefile +++ b/usr.sbin/ntp/doc/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=ntp diff --git a/usr.sbin/ntp/doc/drivers/Makefile b/usr.sbin/ntp/doc/drivers/Makefile index 304d212b116b..6186e15eaba7 100644 --- a/usr.sbin/ntp/doc/drivers/Makefile +++ b/usr.sbin/ntp/doc/drivers/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/drivers/icons/Makefile b/usr.sbin/ntp/doc/drivers/icons/Makefile index 6c78893bfb58..dbaaff0da9c9 100644 --- a/usr.sbin/ntp/doc/drivers/icons/Makefile +++ b/usr.sbin/ntp/doc/drivers/icons/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/drivers/scripts/Makefile b/usr.sbin/ntp/doc/drivers/scripts/Makefile index 633c90fdc3e1..a49f9d3388a4 100644 --- a/usr.sbin/ntp/doc/drivers/scripts/Makefile +++ b/usr.sbin/ntp/doc/drivers/scripts/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/hints/Makefile b/usr.sbin/ntp/doc/hints/Makefile index aa3f25a5a268..5bd25363ea0e 100644 --- a/usr.sbin/ntp/doc/hints/Makefile +++ b/usr.sbin/ntp/doc/hints/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/icons/Makefile b/usr.sbin/ntp/doc/icons/Makefile index d6c026341e09..6f34ea8c384e 100644 --- a/usr.sbin/ntp/doc/icons/Makefile +++ b/usr.sbin/ntp/doc/icons/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/pic/Makefile b/usr.sbin/ntp/doc/pic/Makefile index 1c1ede47ac04..2ebf72fe2f00 100644 --- a/usr.sbin/ntp/doc/pic/Makefile +++ b/usr.sbin/ntp/doc/pic/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/doc/scripts/Makefile b/usr.sbin/ntp/doc/scripts/Makefile index c0f57e97a164..19c2d775bc44 100644 --- a/usr.sbin/ntp/doc/scripts/Makefile +++ b/usr.sbin/ntp/doc/scripts/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ntp diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile index f9234eae6b00..2fe143281d39 100644 --- a/usr.sbin/ntp/libntp/Makefile +++ b/usr.sbin/ntp/libntp/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/ntp/libntp \ ${SRCTOP}/contrib/ntp/libntp/lib/isc \ ${SRCTOP}/contrib/ntp/libntp/lib/isc/nls \ diff --git a/usr.sbin/ntp/libntpevent/Makefile b/usr.sbin/ntp/libntpevent/Makefile index e36b2f51e497..06b7edb875e7 100644 --- a/usr.sbin/ntp/libntpevent/Makefile +++ b/usr.sbin/ntp/libntpevent/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/libevent diff --git a/usr.sbin/ntp/libopts/Makefile b/usr.sbin/ntp/libopts/Makefile index 97ae9fc4635b..720478c36b55 100644 --- a/usr.sbin/ntp/libopts/Makefile +++ b/usr.sbin/ntp/libopts/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/ntp/sntp/libopts PACKAGE=ntp diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile index f79e2c761840..9b96f0731775 100644 --- a/usr.sbin/ntp/libparse/Makefile +++ b/usr.sbin/ntp/libparse/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/ntp/libparse PACKAGE=ntp diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile index a667e218a211..7f147c6f2faa 100644 --- a/usr.sbin/ntp/ntp-keygen/Makefile +++ b/usr.sbin/ntp/ntp-keygen/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile index bb7f6aeaed5e..33d3598f985f 100644 --- a/usr.sbin/ntp/ntpd/Makefile +++ b/usr.sbin/ntp/ntpd/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile index 439a4decc678..8e53ced468bb 100644 --- a/usr.sbin/ntp/ntpdate/Makefile +++ b/usr.sbin/ntp/ntpdate/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/ntp/ntpdate diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile index d666b460fdce..a239476a50b9 100644 --- a/usr.sbin/ntp/ntpdc/Makefile +++ b/usr.sbin/ntp/ntpdc/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile index 5b994c4fee52..5fa672782165 100644 --- a/usr.sbin/ntp/ntpq/Makefile +++ b/usr.sbin/ntp/ntpq/Makefile @@ -1,4 +1,3 @@ - MAN= .include diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile index 821e4e5d5cc3..a736681d2bef 100644 --- a/usr.sbin/ntp/ntptime/Makefile +++ b/usr.sbin/ntp/ntptime/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/ntp/util PACKAGE=ntp diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile index a29a0c97b9dc..628ef77d6e47 100644 --- a/usr.sbin/ntp/sntp/Makefile +++ b/usr.sbin/ntp/sntp/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/ntp/sntp diff --git a/usr.sbin/nvram/Makefile b/usr.sbin/nvram/Makefile index 66ae05294526..7d27790ed132 100644 --- a/usr.sbin/nvram/Makefile +++ b/usr.sbin/nvram/Makefile @@ -1,4 +1,3 @@ - PROG= nvram MAN= nvram.8 MANSUBDIR= /powerpc diff --git a/usr.sbin/ofwdump/Makefile b/usr.sbin/ofwdump/Makefile index cd867da9d0fa..0565d3af9044 100644 --- a/usr.sbin/ofwdump/Makefile +++ b/usr.sbin/ofwdump/Makefile @@ -1,4 +1,3 @@ - PROG= ofwdump MAN= ofwdump.8 SRCS= ofwdump.c ofw_util.c diff --git a/usr.sbin/periodic/Makefile b/usr.sbin/periodic/Makefile index f991bbd6ae1e..c71dad51baf5 100644 --- a/usr.sbin/periodic/Makefile +++ b/usr.sbin/periodic/Makefile @@ -1,4 +1,3 @@ - PACKAGE= periodic CONFS= periodic.conf diff --git a/usr.sbin/periodic/etc/Makefile b/usr.sbin/periodic/etc/Makefile index 6678f16a49d4..b93d2515ccb4 100644 --- a/usr.sbin/periodic/etc/Makefile +++ b/usr.sbin/periodic/etc/Makefile @@ -1,4 +1,3 @@ - SUBDIR= daily security weekly monthly SUBDIR_PARALLEL= diff --git a/usr.sbin/periodic/etc/Makefile.inc b/usr.sbin/periodic/etc/Makefile.inc index dcd34a07dee9..4eb9943df8d2 100644 --- a/usr.sbin/periodic/etc/Makefile.inc +++ b/usr.sbin/periodic/etc/Makefile.inc @@ -1,4 +1,3 @@ - CONFMODE= 755 CONFDIR= ETC_PERIODIC_${.CURDIR:T:U} ETC_PERIODIC_${.CURDIR:T:U}= /etc/periodic/${.CURDIR:T} diff --git a/usr.sbin/periodic/etc/daily/Makefile b/usr.sbin/periodic/etc/daily/Makefile index fa3291d097ff..d1b000df01e4 100644 --- a/usr.sbin/periodic/etc/daily/Makefile +++ b/usr.sbin/periodic/etc/daily/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= periodic diff --git a/usr.sbin/periodic/etc/monthly/Makefile b/usr.sbin/periodic/etc/monthly/Makefile index 8de5d5d81c03..a158426c68b2 100644 --- a/usr.sbin/periodic/etc/monthly/Makefile +++ b/usr.sbin/periodic/etc/monthly/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= periodic diff --git a/usr.sbin/periodic/etc/security/Makefile b/usr.sbin/periodic/etc/security/Makefile index f70aa23a1445..4c6b39d9062d 100644 --- a/usr.sbin/periodic/etc/security/Makefile +++ b/usr.sbin/periodic/etc/security/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= periodic diff --git a/usr.sbin/periodic/etc/weekly/Makefile b/usr.sbin/periodic/etc/weekly/Makefile index 4d21c098dd10..d194a988acf0 100644 --- a/usr.sbin/periodic/etc/weekly/Makefile +++ b/usr.sbin/periodic/etc/weekly/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= periodic diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile index 3e0e047382ca..27d607380006 100644 --- a/usr.sbin/pkg/Makefile +++ b/usr.sbin/pkg/Makefile @@ -1,4 +1,3 @@ - PACKAGE= pkg-bootstrap _BRANCH!= ${MAKE} -C ${SRCTOP}/release -V BRANCH diff --git a/usr.sbin/pmcstudy/Makefile b/usr.sbin/pmcstudy/Makefile index af3fab50b95a..ca0efde8d61a 100644 --- a/usr.sbin/pmcstudy/Makefile +++ b/usr.sbin/pmcstudy/Makefile @@ -1,4 +1,3 @@ - PROG= pmcstudy MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c diff --git a/usr.sbin/pnfsdscopymr/Makefile b/usr.sbin/pnfsdscopymr/Makefile index dcce66b0b6ac..831d37e3483f 100644 --- a/usr.sbin/pnfsdscopymr/Makefile +++ b/usr.sbin/pnfsdscopymr/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= pnfsdscopymr diff --git a/usr.sbin/pnfsdsfile/Makefile b/usr.sbin/pnfsdsfile/Makefile index 55af5d58816e..054ea0808b39 100644 --- a/usr.sbin/pnfsdsfile/Makefile +++ b/usr.sbin/pnfsdsfile/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= pnfsdsfile diff --git a/usr.sbin/pnfsdskill/Makefile b/usr.sbin/pnfsdskill/Makefile index c7f74773f9e1..032f3c9212ab 100644 --- a/usr.sbin/pnfsdskill/Makefile +++ b/usr.sbin/pnfsdskill/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= pnfsdskill diff --git a/usr.sbin/pnpinfo/Makefile b/usr.sbin/pnpinfo/Makefile index 3a8579835499..4abc092302a4 100644 --- a/usr.sbin/pnpinfo/Makefile +++ b/usr.sbin/pnpinfo/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/pnpinfo PROG= pnpinfo diff --git a/usr.sbin/powerd/Makefile b/usr.sbin/powerd/Makefile index 323a85e821ad..8a700b014e47 100644 --- a/usr.sbin/powerd/Makefile +++ b/usr.sbin/powerd/Makefile @@ -1,4 +1,3 @@ - PROG= powerd MAN= powerd.8 diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index d729d8adc748..59a835b3ebb3 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= ppp diff --git a/usr.sbin/pppctl/Makefile b/usr.sbin/pppctl/Makefile index 2c0204c26630..d04e7f022f56 100644 --- a/usr.sbin/pppctl/Makefile +++ b/usr.sbin/pppctl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= ppp PROG= pppctl MAN= pppctl.8 diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile index ef2682a8729f..6d02f88a4190 100644 --- a/usr.sbin/praliases/Makefile +++ b/usr.sbin/praliases/Makefile @@ -1,4 +1,3 @@ - SENDMAIL_DIR= ${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/praliases diff --git a/usr.sbin/praudit/tests/Makefile b/usr.sbin/praudit/tests/Makefile index 89cd1e462be8..3b0cd7bd6c4f 100644 --- a/usr.sbin/praudit/tests/Makefile +++ b/usr.sbin/praudit/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/usr.sbin/praudit diff --git a/usr.sbin/prometheus_sysctl_exporter/Makefile b/usr.sbin/prometheus_sysctl_exporter/Makefile index 20eabbb7dbc4..1b16f049bae6 100644 --- a/usr.sbin/prometheus_sysctl_exporter/Makefile +++ b/usr.sbin/prometheus_sysctl_exporter/Makefile @@ -1,4 +1,3 @@ - PROG= prometheus_sysctl_exporter MAN= prometheus_sysctl_exporter.8 diff --git a/usr.sbin/pstat/Makefile b/usr.sbin/pstat/Makefile index 62d07c92a3c3..9a19914c1301 100644 --- a/usr.sbin/pstat/Makefile +++ b/usr.sbin/pstat/Makefile @@ -1,4 +1,3 @@ - PROG= pstat LINKS= ${BINDIR}/pstat ${BINDIR}/swapinfo MAN= pstat.8 diff --git a/usr.sbin/pw/Makefile b/usr.sbin/pw/Makefile index a1e0167e04d7..cd93a227fa6f 100644 --- a/usr.sbin/pw/Makefile +++ b/usr.sbin/pw/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime PROG= pw MAN= pw.conf.5 pw.8 diff --git a/usr.sbin/pw/tests/Makefile b/usr.sbin/pw/tests/Makefile index 4704adbf995f..910a563d680d 100644 --- a/usr.sbin/pw/tests/Makefile +++ b/usr.sbin/pw/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests BINDIR= ${TESTSDIR} diff --git a/usr.sbin/pwd_mkdb/Makefile b/usr.sbin/pwd_mkdb/Makefile index e9a4aa09d911..708d32d231e3 100644 --- a/usr.sbin/pwd_mkdb/Makefile +++ b/usr.sbin/pwd_mkdb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/lib/libc/gen # for pw_scan.c PACKAGE= runtime diff --git a/usr.sbin/pwm/Makefile b/usr.sbin/pwm/Makefile index 044b1b1b72f1..17ec1dbfbb4a 100644 --- a/usr.sbin/pwm/Makefile +++ b/usr.sbin/pwm/Makefile @@ -1,4 +1,3 @@ - PROG= pwm MAN= pwm.8 diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile index b18c37126448..ed8360ae938e 100644 --- a/usr.sbin/quot/Makefile +++ b/usr.sbin/quot/Makefile @@ -1,4 +1,3 @@ - PROG= quot MAN= quot.8 LIBADD= ufs diff --git a/usr.sbin/quotaon/Makefile b/usr.sbin/quotaon/Makefile index 41464cbf071b..9e4ef6e5953c 100644 --- a/usr.sbin/quotaon/Makefile +++ b/usr.sbin/quotaon/Makefile @@ -1,4 +1,3 @@ - PROG= quotaon LINKS= ${BINDIR}/quotaon ${BINDIR}/quotaoff MAN= quotaon.8 diff --git a/usr.sbin/rarpd/Makefile b/usr.sbin/rarpd/Makefile index 93974cd11613..3cca57479819 100644 --- a/usr.sbin/rarpd/Makefile +++ b/usr.sbin/rarpd/Makefile @@ -1,4 +1,3 @@ - PROG= rarpd MAN= rarpd.8 diff --git a/usr.sbin/repquota/Makefile b/usr.sbin/repquota/Makefile index feb2a13410e2..be1b323b04ae 100644 --- a/usr.sbin/repquota/Makefile +++ b/usr.sbin/repquota/Makefile @@ -1,4 +1,3 @@ - PROG= repquota MAN= repquota.8 LIBADD= util diff --git a/usr.sbin/rip6query/Makefile b/usr.sbin/rip6query/Makefile index 7f954ca55674..e12637e1e1e4 100644 --- a/usr.sbin/rip6query/Makefile +++ b/usr.sbin/rip6query/Makefile @@ -1,4 +1,3 @@ - PROG= rip6query MAN= rip6query.8 diff --git a/usr.sbin/rmt/Makefile b/usr.sbin/rmt/Makefile index 6bd58fae3afd..2279aafd98f9 100644 --- a/usr.sbin/rmt/Makefile +++ b/usr.sbin/rmt/Makefile @@ -1,4 +1,3 @@ - PROG= rmt MAN= rmt.8 diff --git a/usr.sbin/route6d/Makefile b/usr.sbin/route6d/Makefile index 03e54ad34e80..059d329f5f09 100644 --- a/usr.sbin/route6d/Makefile +++ b/usr.sbin/route6d/Makefile @@ -1,4 +1,3 @@ - PROG= route6d MAN= route6d.8 diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile index 161eebe9dc78..044ad3602a2a 100644 --- a/usr.sbin/rpc.statd/Makefile +++ b/usr.sbin/rpc.statd/Makefile @@ -1,4 +1,3 @@ - PROG= rpc.statd MAN= rpc.statd.8 SRCS= file.c sm_inter_svc.c sm_inter.h statd.c procs.c diff --git a/usr.sbin/rpc.tlsclntd/Makefile b/usr.sbin/rpc.tlsclntd/Makefile index 2dbde13463ca..ac3d25dc66cc 100644 --- a/usr.sbin/rpc.tlsclntd/Makefile +++ b/usr.sbin/rpc.tlsclntd/Makefile @@ -1,4 +1,3 @@ - .include PROG= rpc.tlsclntd diff --git a/usr.sbin/rpc.tlsservd/Makefile b/usr.sbin/rpc.tlsservd/Makefile index fb73d2edf7a0..52de80f0c787 100644 --- a/usr.sbin/rpc.tlsservd/Makefile +++ b/usr.sbin/rpc.tlsservd/Makefile @@ -1,4 +1,3 @@ - .include PROG= rpc.tlsservd diff --git a/usr.sbin/rpc.umntall/Makefile b/usr.sbin/rpc.umntall/Makefile index a8cd0b478729..d9143020bc0c 100644 --- a/usr.sbin/rpc.umntall/Makefile +++ b/usr.sbin/rpc.umntall/Makefile @@ -1,4 +1,3 @@ - PACKAGE= nfs PROG= rpc.umntall diff --git a/usr.sbin/rpc.yppasswdd/Makefile b/usr.sbin/rpc.yppasswdd/Makefile index 4b539f66fa81..b3f6b762d8eb 100644 --- a/usr.sbin/rpc.yppasswdd/Makefile +++ b/usr.sbin/rpc.yppasswdd/Makefile @@ -1,4 +1,3 @@ - RPCDIR= ${DESTDIR}/usr/include/rpcsvc .PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/usr.bin/chpass \ diff --git a/usr.sbin/rpc.ypupdated/Makefile b/usr.sbin/rpc.ypupdated/Makefile index 1c35f377002b..78ee19fc7a6d 100644 --- a/usr.sbin/rpc.ypupdated/Makefile +++ b/usr.sbin/rpc.ypupdated/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr PACKAGE=yp diff --git a/usr.sbin/rpc.ypxfrd/Makefile b/usr.sbin/rpc.ypxfrd/Makefile index a761275b6377..2e0decd7a763 100644 --- a/usr.sbin/rpc.ypxfrd/Makefile +++ b/usr.sbin/rpc.ypxfrd/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/usr.sbin/ypserv PACKAGE=yp diff --git a/usr.sbin/rpcbind/tests/Makefile b/usr.sbin/rpcbind/tests/Makefile index f5647c997480..f37d0433abc2 100644 --- a/usr.sbin/rpcbind/tests/Makefile +++ b/usr.sbin/rpcbind/tests/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${.CURDIR}/.. diff --git a/usr.sbin/rtprio/Makefile b/usr.sbin/rtprio/Makefile index c9c72a9b4e0c..e970bd10c544 100644 --- a/usr.sbin/rtprio/Makefile +++ b/usr.sbin/rtprio/Makefile @@ -1,4 +1,3 @@ - PROG= rtprio LINKS= ${BINDIR}/rtprio ${BINDIR}/idprio MLINKS= rtprio.1 idprio.1 diff --git a/usr.sbin/rwhod/Makefile b/usr.sbin/rwhod/Makefile index 3196179da14f..65dbd3b390dc 100644 --- a/usr.sbin/rwhod/Makefile +++ b/usr.sbin/rwhod/Makefile @@ -1,4 +1,3 @@ - PROG= rwhod MAN= rwhod.8 diff --git a/usr.sbin/sa/Makefile b/usr.sbin/sa/Makefile index 2b7aa79154d0..84bd7f996bb3 100644 --- a/usr.sbin/sa/Makefile +++ b/usr.sbin/sa/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/usr.bin/lastcomm diff --git a/usr.sbin/sa/tests/Makefile b/usr.sbin/sa/tests/Makefile index c049ae25368f..b10191a2e466 100644 --- a/usr.sbin/sa/tests/Makefile +++ b/usr.sbin/sa/tests/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TAP_TESTS_SH= legacy_test diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index b062d417a042..178b35bf7852 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE=sendmail diff --git a/usr.sbin/service/Makefile b/usr.sbin/service/Makefile index 95244ab69685..66bf0deb760b 100644 --- a/usr.sbin/service/Makefile +++ b/usr.sbin/service/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime SCRIPTS=service.sh MAN= service.8 diff --git a/usr.sbin/services_mkdb/Makefile b/usr.sbin/services_mkdb/Makefile index 8d8e0f1c0626..c1c7ca0bfcff 100644 --- a/usr.sbin/services_mkdb/Makefile +++ b/usr.sbin/services_mkdb/Makefile @@ -1,4 +1,3 @@ - PACKAGE= runtime CONFS= services diff --git a/usr.sbin/sesutil/Makefile b/usr.sbin/sesutil/Makefile index 4e8e08eabd15..cb408ed82af4 100644 --- a/usr.sbin/sesutil/Makefile +++ b/usr.sbin/sesutil/Makefile @@ -1,4 +1,3 @@ - PROG= sesutil SRCS= sesutil.c eltsub.c MAN= sesutil.8 diff --git a/usr.sbin/setfib/Makefile b/usr.sbin/setfib/Makefile index 45d4667e6a94..c69d133d6a8a 100644 --- a/usr.sbin/setfib/Makefile +++ b/usr.sbin/setfib/Makefile @@ -1,4 +1,3 @@ - PROG= setfib .include diff --git a/usr.sbin/setfmac/Makefile b/usr.sbin/setfmac/Makefile index fc2d9fc9917f..7115a9ba7104 100644 --- a/usr.sbin/setfmac/Makefile +++ b/usr.sbin/setfmac/Makefile @@ -1,4 +1,3 @@ - PROG= setfmac LINKS= ${BINDIR}/setfmac ${BINDIR}/setfsmac MAN= setfmac.8 setfsmac.8 diff --git a/usr.sbin/setpmac/Makefile b/usr.sbin/setpmac/Makefile index 4f134b8e23cb..d18c606bd101 100644 --- a/usr.sbin/setpmac/Makefile +++ b/usr.sbin/setpmac/Makefile @@ -1,4 +1,3 @@ - PROG= setpmac MAN= setpmac.8 diff --git a/usr.sbin/spi/Makefile b/usr.sbin/spi/Makefile index 17d651ce80eb..73f5af6fc3cc 100644 --- a/usr.sbin/spi/Makefile +++ b/usr.sbin/spi/Makefile @@ -1,4 +1,3 @@ - #.include PROG= spi diff --git a/usr.sbin/spkrtest/Makefile b/usr.sbin/spkrtest/Makefile index 1a67586a360c..137c626ebcad 100644 --- a/usr.sbin/spkrtest/Makefile +++ b/usr.sbin/spkrtest/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=spkrtest.sh MAN= spkrtest.8 diff --git a/usr.sbin/spray/Makefile b/usr.sbin/spray/Makefile index 4342c9658f9b..7a7d82fc27bb 100644 --- a/usr.sbin/spray/Makefile +++ b/usr.sbin/spray/Makefile @@ -1,4 +1,3 @@ - PROG= spray MAN= spray.8 diff --git a/usr.sbin/syslogd/Makefile b/usr.sbin/syslogd/Makefile index 492b5529fc89..bc4a34367195 100644 --- a/usr.sbin/syslogd/Makefile +++ b/usr.sbin/syslogd/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/usr.bin/wall diff --git a/usr.sbin/sysrc/Makefile b/usr.sbin/sysrc/Makefile index 831ce5d135bd..0f2f98e8b0e8 100644 --- a/usr.sbin/sysrc/Makefile +++ b/usr.sbin/sysrc/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= sysrc MAN= sysrc.8 diff --git a/usr.sbin/tcpdchk/Makefile b/usr.sbin/tcpdchk/Makefile index 93fc23169ea0..c07f7f8b6b0e 100644 --- a/usr.sbin/tcpdchk/Makefile +++ b/usr.sbin/tcpdchk/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/tcp_wrappers diff --git a/usr.sbin/tcpdmatch/Makefile b/usr.sbin/tcpdmatch/Makefile index e12bde64c493..f57350cb762d 100644 --- a/usr.sbin/tcpdmatch/Makefile +++ b/usr.sbin/tcpdmatch/Makefile @@ -1,4 +1,3 @@ - .include .PATH: ${SRCTOP}/contrib/tcp_wrappers diff --git a/usr.sbin/tcpdump/Makefile b/usr.sbin/tcpdump/Makefile index dd899258ebae..69b7bb109c14 100644 --- a/usr.sbin/tcpdump/Makefile +++ b/usr.sbin/tcpdump/Makefile @@ -1,4 +1,3 @@ - SUBDIR= tcpdump .include diff --git a/usr.sbin/tcpdump/Makefile.inc b/usr.sbin/tcpdump/Makefile.inc index c5de27435b82..abbdc366c6a0 100644 --- a/usr.sbin/tcpdump/Makefile.inc +++ b/usr.sbin/tcpdump/Makefile.inc @@ -1,4 +1,3 @@ - BINDIR?= /usr/sbin WARNS?= 3 diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile index ff0106d29336..bfbe750c25be 100644 --- a/usr.sbin/tcpdump/tcpdump/Makefile +++ b/usr.sbin/tcpdump/tcpdump/Makefile @@ -1,4 +1,3 @@ - .include TCPDUMP_DISTDIR?= ${SRCTOP}/contrib/tcpdump diff --git a/usr.sbin/tests/Makefile b/usr.sbin/tests/Makefile index b8996030aafc..29b1b564beca 100644 --- a/usr.sbin/tests/Makefile +++ b/usr.sbin/tests/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/tests KYUAFILE= yes diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile index 45a80174f5ab..62d82a47d953 100644 --- a/usr.sbin/traceroute/Makefile +++ b/usr.sbin/traceroute/Makefile @@ -1,4 +1,3 @@ - .include PACKAGE= runtime diff --git a/usr.sbin/trim/Makefile b/usr.sbin/trim/Makefile index cb609121be7b..1263c0c6819e 100644 --- a/usr.sbin/trim/Makefile +++ b/usr.sbin/trim/Makefile @@ -1,4 +1,3 @@ - PROG= trim MAN= trim.8 LIBADD= util diff --git a/usr.sbin/tzsetup/Makefile b/usr.sbin/tzsetup/Makefile index 2522fb06c22a..f20834baf25d 100644 --- a/usr.sbin/tzsetup/Makefile +++ b/usr.sbin/tzsetup/Makefile @@ -1,4 +1,3 @@ - .include PROG= tzsetup diff --git a/usr.sbin/uathload/Makefile b/usr.sbin/uathload/Makefile index a3895d2019c4..11194b081eca 100644 --- a/usr.sbin/uathload/Makefile +++ b/usr.sbin/uathload/Makefile @@ -1,4 +1,3 @@ - PROG= uathload MAN= uathload.8 diff --git a/usr.sbin/uefisign/Makefile b/usr.sbin/uefisign/Makefile index 8c6314fe0f3e..b389af5cac43 100644 --- a/usr.sbin/uefisign/Makefile +++ b/usr.sbin/uefisign/Makefile @@ -1,4 +1,3 @@ - PROG= uefisign SRCS= uefisign.c child.c pe.c MAN= uefisign.8 diff --git a/usr.sbin/ugidfw/Makefile b/usr.sbin/ugidfw/Makefile index 959e4d4c1aa2..b223a03c4b1b 100644 --- a/usr.sbin/ugidfw/Makefile +++ b/usr.sbin/ugidfw/Makefile @@ -1,4 +1,3 @@ - PROG= ugidfw MAN= ugidfw.8 diff --git a/usr.sbin/uhsoctl/Makefile b/usr.sbin/uhsoctl/Makefile index 9d731bbf09dc..a899b257be4f 100644 --- a/usr.sbin/uhsoctl/Makefile +++ b/usr.sbin/uhsoctl/Makefile @@ -1,4 +1,3 @@ - PROG= uhsoctl MAN= uhsoctl.1 WARNS?= 1 diff --git a/usr.sbin/unbound/Makefile b/usr.sbin/unbound/Makefile index a4fbd0b4a67b..6f0c9cc155f6 100644 --- a/usr.sbin/unbound/Makefile +++ b/usr.sbin/unbound/Makefile @@ -1,4 +1,3 @@ - SUBDIR= daemon anchor checkconf control SUBDIR+= setup SUBDIR_PARALLEL= diff --git a/usr.sbin/unbound/Makefile.inc b/usr.sbin/unbound/Makefile.inc index 8e4e8818522b..a28e388e47c0 100644 --- a/usr.sbin/unbound/Makefile.inc +++ b/usr.sbin/unbound/Makefile.inc @@ -1,4 +1,3 @@ - MK_WERROR= no NO_WTHREAD_SAFETY= true PACKAGE= unbound diff --git a/usr.sbin/unbound/anchor/Makefile b/usr.sbin/unbound/anchor/Makefile index 91ae1090415a..3f94473ed1f0 100644 --- a/usr.sbin/unbound/anchor/Makefile +++ b/usr.sbin/unbound/anchor/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns UNBOUNDDIR= ${SRCTOP}/contrib/unbound diff --git a/usr.sbin/unbound/checkconf/Makefile b/usr.sbin/unbound/checkconf/Makefile index c8d8397225b0..319fc14ca9e8 100644 --- a/usr.sbin/unbound/checkconf/Makefile +++ b/usr.sbin/unbound/checkconf/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns UNBOUNDDIR= ${SRCTOP}/contrib/unbound diff --git a/usr.sbin/unbound/control/Makefile b/usr.sbin/unbound/control/Makefile index ad5f7eb21f09..ff09f12caa2e 100644 --- a/usr.sbin/unbound/control/Makefile +++ b/usr.sbin/unbound/control/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns UNBOUNDDIR= ${SRCTOP}/contrib/unbound diff --git a/usr.sbin/unbound/daemon/Makefile b/usr.sbin/unbound/daemon/Makefile index 28b451aa5061..b43d381fa230 100644 --- a/usr.sbin/unbound/daemon/Makefile +++ b/usr.sbin/unbound/daemon/Makefile @@ -1,4 +1,3 @@ - # Vendor sources and generated files LDNSDIR= ${SRCTOP}/contrib/ldns UNBOUNDDIR= ${SRCTOP}/contrib/unbound diff --git a/usr.sbin/unbound/setup/Makefile b/usr.sbin/unbound/setup/Makefile index b7b811238b9c..e7c8ea914d69 100644 --- a/usr.sbin/unbound/setup/Makefile +++ b/usr.sbin/unbound/setup/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= local-unbound-setup.sh MAN= # diff --git a/usr.sbin/usbdump/Makefile b/usr.sbin/usbdump/Makefile index fd57c087c998..617da33d5c9a 100644 --- a/usr.sbin/usbdump/Makefile +++ b/usr.sbin/usbdump/Makefile @@ -1,4 +1,3 @@ - PROG= usbdump SRCS= usbdump.c MAN= usbdump.8 diff --git a/usr.sbin/utx/Makefile b/usr.sbin/utx/Makefile index 98ba06acb92e..5b2812e87f64 100644 --- a/usr.sbin/utx/Makefile +++ b/usr.sbin/utx/Makefile @@ -1,4 +1,3 @@ - PACKAGE= acct PROG= utx diff --git a/usr.sbin/valectl/Makefile b/usr.sbin/valectl/Makefile index 5ecc5fac7ca8..c9f1288c76db 100644 --- a/usr.sbin/valectl/Makefile +++ b/usr.sbin/valectl/Makefile @@ -1,4 +1,3 @@ - PACKAGE= netmap PROG= valectl MAN= valectl.8 diff --git a/usr.sbin/vidcontrol/Makefile b/usr.sbin/vidcontrol/Makefile index 47a8e01362fe..9fe0a6ce8ea6 100644 --- a/usr.sbin/vidcontrol/Makefile +++ b/usr.sbin/vidcontrol/Makefile @@ -1,4 +1,3 @@ - PACKAGE= console-tools PROG= vidcontrol SRCS= vidcontrol.c decode.c diff --git a/usr.sbin/vigr/Makefile b/usr.sbin/vigr/Makefile index 575b2aa5e39b..94c19c8bf730 100644 --- a/usr.sbin/vigr/Makefile +++ b/usr.sbin/vigr/Makefile @@ -1,4 +1,3 @@ - SCRIPTS= vigr MAN= vigr.8 CLEANFILES= vigr diff --git a/usr.sbin/vipw/Makefile b/usr.sbin/vipw/Makefile index 17ffd4859bf6..a58f407fa877 100644 --- a/usr.sbin/vipw/Makefile +++ b/usr.sbin/vipw/Makefile @@ -1,4 +1,3 @@ - PROG= vipw MAN= vipw.8 diff --git a/usr.sbin/wake/Makefile b/usr.sbin/wake/Makefile index 5da46d9880f4..f96467ca259a 100644 --- a/usr.sbin/wake/Makefile +++ b/usr.sbin/wake/Makefile @@ -1,4 +1,3 @@ - PROG= wake MAN= wake.8 diff --git a/usr.sbin/watch/Makefile b/usr.sbin/watch/Makefile index 9bf1f6857128..33ce10b37593 100644 --- a/usr.sbin/watch/Makefile +++ b/usr.sbin/watch/Makefile @@ -1,4 +1,3 @@ - PROG= watch MAN= watch.8 diff --git a/usr.sbin/watchdogd/Makefile b/usr.sbin/watchdogd/Makefile index 1ba414f79846..66a377bc351f 100644 --- a/usr.sbin/watchdogd/Makefile +++ b/usr.sbin/watchdogd/Makefile @@ -1,4 +1,3 @@ - PROG= watchdogd LINKS= ${BINDIR}/watchdogd ${BINDIR}/watchdog MAN= watchdogd.8 watchdog.8 diff --git a/usr.sbin/wlandebug/Makefile b/usr.sbin/wlandebug/Makefile index fe694847cf72..43fdfe565226 100644 --- a/usr.sbin/wlandebug/Makefile +++ b/usr.sbin/wlandebug/Makefile @@ -1,4 +1,3 @@ - PROG= wlandebug MAN= wlandebug.8 diff --git a/usr.sbin/wpa/Makefile b/usr.sbin/wpa/Makefile index 426c6aabab20..9869d6edffe1 100644 --- a/usr.sbin/wpa/Makefile +++ b/usr.sbin/wpa/Makefile @@ -1,4 +1,3 @@ - SUBDIR= src .WAIT \ wpa_supplicant \ wpa_cli \ diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto index 7208a4b4fabf..d4b5ea25cbb9 100644 --- a/usr.sbin/wpa/Makefile.crypto +++ b/usr.sbin/wpa/Makefile.crypto @@ -1,4 +1,3 @@ - .if ${MK_OPENSSL} != "no" LIBADD+= ssl crypto CFLAGS+= -DCONFIG_SHA256 diff --git a/usr.sbin/wpa/Makefile.inc b/usr.sbin/wpa/Makefile.inc index ce4f1ec38b4b..7aa0ae903333 100644 --- a/usr.sbin/wpa/Makefile.inc +++ b/usr.sbin/wpa/Makefile.inc @@ -1,4 +1,3 @@ - .include BINDIR?= /usr/sbin diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile index 04176419084f..1f89fb72e18b 100644 --- a/usr.sbin/wpa/hostapd/Makefile +++ b/usr.sbin/wpa/hostapd/Makefile @@ -1,4 +1,3 @@ - .include .include "../Makefile.inc" diff --git a/usr.sbin/wpa/hostapd_cli/Makefile b/usr.sbin/wpa/hostapd_cli/Makefile index 4c66c2078f4b..7d63c39a7cdf 100644 --- a/usr.sbin/wpa/hostapd_cli/Makefile +++ b/usr.sbin/wpa/hostapd_cli/Makefile @@ -1,4 +1,3 @@ - .include "../Makefile.inc" .include "../Makefile.crypto" diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile index be5896e74d6d..7d7207197ce6 100644 --- a/usr.sbin/wpa/wpa_cli/Makefile +++ b/usr.sbin/wpa/wpa_cli/Makefile @@ -1,4 +1,3 @@ - .include .include "../Makefile.inc" diff --git a/usr.sbin/wpa/wpa_passphrase/Makefile b/usr.sbin/wpa/wpa_passphrase/Makefile index eeb71a31ec9d..21eec1a7884b 100644 --- a/usr.sbin/wpa/wpa_passphrase/Makefile +++ b/usr.sbin/wpa/wpa_passphrase/Makefile @@ -1,4 +1,3 @@ - .include "../Makefile.inc" .include "../Makefile.crypto" diff --git a/usr.sbin/wpa/wpa_priv/Makefile b/usr.sbin/wpa/wpa_priv/Makefile index 4ed75bd22511..465956c2958f 100644 --- a/usr.sbin/wpa/wpa_priv/Makefile +++ b/usr.sbin/wpa/wpa_priv/Makefile @@ -1,4 +1,3 @@ - .include "../Makefile.inc" .include "../Makefile.crypto" diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index d82d18ac025e..e31dcea8dc7e 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -1,4 +1,3 @@ - .include .include "../Makefile.inc" diff --git a/usr.sbin/yp_mkdb/Makefile b/usr.sbin/yp_mkdb/Makefile index a556510b8b40..090509f2673b 100644 --- a/usr.sbin/yp_mkdb/Makefile +++ b/usr.sbin/yp_mkdb/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/libexec/ypxfr ${SRCTOP}/usr.sbin/ypserv PACKAGE= yp diff --git a/usr.sbin/ypbind/Makefile b/usr.sbin/ypbind/Makefile index 27e041ebce5d..cf25eea65015 100644 --- a/usr.sbin/ypbind/Makefile +++ b/usr.sbin/ypbind/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= ypbind MAN= ypbind.8 diff --git a/usr.sbin/yppoll/Makefile b/usr.sbin/yppoll/Makefile index aa8879d777f9..215602e5812e 100644 --- a/usr.sbin/yppoll/Makefile +++ b/usr.sbin/yppoll/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= yppoll MAN= yppoll.8 diff --git a/usr.sbin/yppush/Makefile b/usr.sbin/yppush/Makefile index 9dfdd6d7ab65..c849d5e08a6b 100644 --- a/usr.sbin/yppush/Makefile +++ b/usr.sbin/yppush/Makefile @@ -1,4 +1,3 @@ - RPCDIR= ${SRCTOP}/include/rpcsvc .PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index 18869d5c3345..ba7eb1f86267 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -1,4 +1,3 @@ - .include RPCDIR= ${SRCTOP}/include/rpcsvc diff --git a/usr.sbin/ypset/Makefile b/usr.sbin/ypset/Makefile index 38f645516433..d945f278426d 100644 --- a/usr.sbin/ypset/Makefile +++ b/usr.sbin/ypset/Makefile @@ -1,4 +1,3 @@ - PACKAGE= yp PROG= ypset MAN= ypset.8 diff --git a/usr.sbin/zdump/Makefile b/usr.sbin/zdump/Makefile index 6b18107c2f75..356411af7040 100644 --- a/usr.sbin/zdump/Makefile +++ b/usr.sbin/zdump/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/tzcode PROG= zdump diff --git a/usr.sbin/zic/Makefile b/usr.sbin/zic/Makefile index fdfe6870583a..73875386c79a 100644 --- a/usr.sbin/zic/Makefile +++ b/usr.sbin/zic/Makefile @@ -1,4 +1,3 @@ - .PATH: ${SRCTOP}/contrib/tzcode PROG= zic diff --git a/usr.sbin/zonectl/Makefile b/usr.sbin/zonectl/Makefile index 9c86470f785e..69915ec4916c 100644 --- a/usr.sbin/zonectl/Makefile +++ b/usr.sbin/zonectl/Makefile @@ -1,4 +1,3 @@ - PROG= zonectl SRCS= zonectl.c SDIR= ${SRCTOP}/sys diff --git a/usr.sbin/zzz/Makefile b/usr.sbin/zzz/Makefile index 85191008a0b3..4d1a2dd9dc34 100644 --- a/usr.sbin/zzz/Makefile +++ b/usr.sbin/zzz/Makefile @@ -1,4 +1,3 @@ - SCRIPTS=zzz.sh MAN= zzz.8 From 4ee66cdf4ed487a1fc087ba7bf0fca4bf74667b5 Mon Sep 17 00:00:00 2001 From: Zhao Yongming Date: Tue, 16 Jul 2024 11:58:00 +1200 Subject: [PATCH 080/151] Add building support for Artix Linux (#16265) Artix Linux is systemd free distribution based on Arch Linux, with openrc dinit runit s6 as init alternatives. This patch will make init scripts installation work the way Gentoo Linux with openrc. The scripts tweaking for other init will be left to packager. Signed-off-by: Yongming Zhao Reviewed-by: Rob Norris Reviewed-by: Tony Hutter --- config/zfs-build.m4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 368684e1c512..255813f46d19 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -516,6 +516,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ VENDOR=alpine ; elif test -f /etc/arch-release ; then VENDOR=arch ; + elif test -f /etc/artix-release ; then + VENDOR=artix ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; elif test -f /bin/freebsd-version ; then @@ -551,7 +553,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default package type]) case "$VENDOR" in - alpine|arch|gentoo|lunar|slackware) + alpine|arch|artix|gentoo|lunar|slackware) DEFAULT_PACKAGE=tgz ;; debian|ubuntu) DEFAULT_PACKAGE=deb ;; @@ -576,6 +578,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ case "$VENDOR" in alpine|gentoo) DEFAULT_INIT_SHELL=/sbin/openrc-run IS_SYSV_RC=false ;; + artix) DEFAULT_INIT_SHELL=/usr/bin/openrc-run + IS_SYSV_RC=false ;; *) DEFAULT_INIT_SHELL=/bin/sh IS_SYSV_RC=true ;; esac @@ -594,7 +598,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default init config directory]) case "$VENDOR" in - alpine|gentoo) + alpine|artix|gentoo) initconfdir=/etc/conf.d ;; fedora|openeuler|redhat|sles|toss) @@ -623,7 +627,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default bash completion directory]) case "$VENDOR" in - alpine|debian|gentoo|ubuntu) + alpine|artix|debian|gentoo|ubuntu) bashcompletiondir=/usr/share/bash-completion/completions ;; freebsd) From b409892ae5028965a6fe98dde1346594807e6e45 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 27 May 2024 21:32:07 -0400 Subject: [PATCH 081/151] Linux 6.10: rework queue limits setup Linux has started moving to a model where instead of applying block queue limits through individual modification functions, a complete limits structure is built up and applied atomically, either when the block device or open, or some time afterwards. As of 6.10 this transition appears only partly completed. This commit matches that model within OpenZFS in a way that should work for past and future kernels. We set up a queue limits structure with any limits that have had their modification functions removed. For newer kernels that can have limits applied at block device open (HAVE_BLK_ALLOC_DISK_2ARG), we have a conversion function to turn the OpenZFS queue limits structure into Linux's queue_limits structure, which can then be passed in. For older kernels, we provide an application function that just calls the old functions for each limit in the structure. Signed-off-by: Rob Norris Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf --- config/kernel-blk-queue.m4 | 4 +- module/os/linux/zfs/zvol_os.c | 186 +++++++++++++++++++++------------- 2 files changed, 118 insertions(+), 72 deletions(-) diff --git a/config/kernel-blk-queue.m4 b/config/kernel-blk-queue.m4 index 15dbe1c7dff0..2f0b386e6637 100644 --- a/config/kernel-blk-queue.m4 +++ b/config/kernel-blk-queue.m4 @@ -332,7 +332,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS], [ ZFS_LINUX_TEST_RESULT([blk_queue_max_hw_sectors], [ AC_MSG_RESULT(yes) ],[ - ZFS_LINUX_TEST_ERROR([blk_queue_max_hw_sectors]) + AC_MSG_RESULT(no) ]) ]) @@ -355,7 +355,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS], [ ZFS_LINUX_TEST_RESULT([blk_queue_max_segments], [ AC_MSG_RESULT(yes) ], [ - ZFS_LINUX_TEST_ERROR([blk_queue_max_segments]) + AC_MSG_RESULT(no) ]) ]) diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 1d5d54b80ea1..c01caa6da8b4 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -1076,8 +1076,106 @@ static const struct block_device_operations zvol_ops = { #endif }; +typedef struct zvol_queue_limits { + unsigned int zql_max_hw_sectors; + unsigned short zql_max_segments; + unsigned int zql_max_segment_size; + unsigned int zql_io_opt; +} zvol_queue_limits_t; + +static void +zvol_queue_limits_init(zvol_queue_limits_t *limits, zvol_state_t *zv, + boolean_t use_blk_mq) +{ + limits->zql_max_hw_sectors = (DMU_MAX_ACCESS / 4) >> 9; + + if (use_blk_mq) { + /* + * IO requests can be really big (1MB). When an IO request + * comes in, it is passed off to zvol_read() or zvol_write() + * in a new thread, where it is chunked up into 'volblocksize' + * sized pieces and processed. So for example, if the request + * is a 1MB write and your volblocksize is 128k, one zvol_write + * thread will take that request and sequentially do ten 128k + * IOs. This is due to the fact that the thread needs to lock + * each volblocksize sized block. So you might be wondering: + * "instead of passing the whole 1MB request to one thread, + * why not pass ten individual 128k chunks to ten threads and + * process the whole write in parallel?" The short answer is + * that there's a sweet spot number of chunks that balances + * the greater parallelism with the added overhead of more + * threads. The sweet spot can be different depending on if you + * have a read or write heavy workload. Writes typically want + * high chunk counts while reads typically want lower ones. On + * a test pool with 6 NVMe drives in a 3x 2-disk mirror + * configuration, with volblocksize=8k, the sweet spot for good + * sequential reads and writes was at 8 chunks. + */ + + /* + * Below we tell the kernel how big we want our requests + * to be. You would think that blk_queue_io_opt() would be + * used to do this since it is used to "set optimal request + * size for the queue", but that doesn't seem to do + * anything - the kernel still gives you huge requests + * with tons of little PAGE_SIZE segments contained within it. + * + * Knowing that the kernel will just give you PAGE_SIZE segments + * no matter what, you can say "ok, I want PAGE_SIZE byte + * segments, and I want 'N' of them per request", where N is + * the correct number of segments for the volblocksize and + * number of chunks you want. + */ +#ifdef HAVE_BLK_MQ + if (zvol_blk_mq_blocks_per_thread != 0) { + unsigned int chunks; + chunks = MIN(zvol_blk_mq_blocks_per_thread, UINT16_MAX); + + limits->zql_max_segment_size = PAGE_SIZE; + limits->zql_max_segments = + (zv->zv_volblocksize * chunks) / PAGE_SIZE; + } else { + /* + * Special case: zvol_blk_mq_blocks_per_thread = 0 + * Max everything out. + */ + limits->zql_max_segments = UINT16_MAX; + limits->zql_max_segment_size = UINT_MAX; + } + } else { +#endif + limits->zql_max_segments = UINT16_MAX; + limits->zql_max_segment_size = UINT_MAX; + } + + limits->zql_io_opt = zv->zv_volblocksize; +} + +#ifdef HAVE_BLK_ALLOC_DISK_2ARG +static void +zvol_queue_limits_convert(zvol_queue_limits_t *limits, + struct queue_limits *qlimits) +{ + memset(qlimits, 0, sizeof (struct queue_limits)); + qlimits->max_hw_sectors = limits->zql_max_hw_sectors; + qlimits->max_segments = limits->zql_max_segments; + qlimits->max_segment_size = limits->zql_max_segment_size; + qlimits->io_opt = limits->zql_io_opt; +} +#else +static void +zvol_queue_limits_apply(zvol_queue_limits_t *limits, + struct request_queue *queue) +{ + blk_queue_max_hw_sectors(queue, limits->zql_max_hw_sectors); + blk_queue_max_segments(queue, limits->zql_max_segments); + blk_queue_max_segment_size(queue, limits->zql_max_segment_size); + blk_queue_io_opt(queue, limits->zql_io_opt); +} +#endif + static int -zvol_alloc_non_blk_mq(struct zvol_state_os *zso) +zvol_alloc_non_blk_mq(struct zvol_state_os *zso, zvol_queue_limits_t *limits) { #if defined(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS) #if defined(HAVE_BLK_ALLOC_DISK) @@ -1087,8 +1185,11 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) zso->zvo_disk->minors = ZVOL_MINORS; zso->zvo_queue = zso->zvo_disk->queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #elif defined(HAVE_BLK_ALLOC_DISK_2ARG) - struct gendisk *disk = blk_alloc_disk(NULL, NUMA_NO_NODE); + struct queue_limits qlimits; + zvol_queue_limits_convert(limits, &qlimits); + struct gendisk *disk = blk_alloc_disk(&qlimits, NUMA_NO_NODE); if (IS_ERR(disk)) { zso->zvo_disk = NULL; return (1); @@ -1109,6 +1210,7 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) } zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif /* HAVE_BLK_ALLOC_DISK */ #else zso->zvo_queue = blk_generic_alloc_queue(zvol_request, NUMA_NO_NODE); @@ -1122,13 +1224,14 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) } zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif /* HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ return (0); } static int -zvol_alloc_blk_mq(zvol_state_t *zv) +zvol_alloc_blk_mq(zvol_state_t *zv, zvol_queue_limits_t *limits) { #ifdef HAVE_BLK_MQ struct zvol_state_os *zso = zv->zv_zso; @@ -1144,9 +1247,12 @@ zvol_alloc_blk_mq(zvol_state_t *zv) return (1); } zso->zvo_queue = zso->zvo_disk->queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); zso->zvo_disk->minors = ZVOL_MINORS; #elif defined(HAVE_BLK_ALLOC_DISK_2ARG) - struct gendisk *disk = blk_mq_alloc_disk(&zso->tag_set, NULL, zv); + struct queue_limits qlimits; + zvol_queue_limits_convert(limits, &qlimits); + struct gendisk *disk = blk_mq_alloc_disk(&zso->tag_set, &qlimits, zv); if (IS_ERR(disk)) { zso->zvo_disk = NULL; blk_mq_free_tag_set(&zso->tag_set); @@ -1172,6 +1278,7 @@ zvol_alloc_blk_mq(zvol_state_t *zv) /* Our queue is now created, assign it to our disk */ zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif #endif @@ -1211,6 +1318,9 @@ zvol_alloc(dev_t dev, const char *name) zv->zv_zso->use_blk_mq = zvol_use_blk_mq; #endif + zvol_queue_limits_t limits; + zvol_queue_limits_init(&limits, zv, zv->zv_zso->use_blk_mq); + /* * The block layer has 3 interfaces for getting BIOs: * @@ -1227,10 +1337,10 @@ zvol_alloc(dev_t dev, const char *name) * disk and the queue separately. (5.13 kernel or older) */ if (zv->zv_zso->use_blk_mq) { - ret = zvol_alloc_blk_mq(zv); + ret = zvol_alloc_blk_mq(zv, &limits); zso->zvo_disk->fops = &zvol_ops_blk_mq; } else { - ret = zvol_alloc_non_blk_mq(zso); + ret = zvol_alloc_non_blk_mq(zso, &limits); zso->zvo_disk->fops = &zvol_ops; } if (ret != 0) @@ -1514,74 +1624,10 @@ zvol_os_create_minor(const char *name) set_capacity(zv->zv_zso->zvo_disk, zv->zv_volsize >> 9); - blk_queue_max_hw_sectors(zv->zv_zso->zvo_queue, - (DMU_MAX_ACCESS / 4) >> 9); - if (zv->zv_zso->use_blk_mq) { - /* - * IO requests can be really big (1MB). When an IO request - * comes in, it is passed off to zvol_read() or zvol_write() - * in a new thread, where it is chunked up into 'volblocksize' - * sized pieces and processed. So for example, if the request - * is a 1MB write and your volblocksize is 128k, one zvol_write - * thread will take that request and sequentially do ten 128k - * IOs. This is due to the fact that the thread needs to lock - * each volblocksize sized block. So you might be wondering: - * "instead of passing the whole 1MB request to one thread, - * why not pass ten individual 128k chunks to ten threads and - * process the whole write in parallel?" The short answer is - * that there's a sweet spot number of chunks that balances - * the greater parallelism with the added overhead of more - * threads. The sweet spot can be different depending on if you - * have a read or write heavy workload. Writes typically want - * high chunk counts while reads typically want lower ones. On - * a test pool with 6 NVMe drives in a 3x 2-disk mirror - * configuration, with volblocksize=8k, the sweet spot for good - * sequential reads and writes was at 8 chunks. - */ - - /* - * Below we tell the kernel how big we want our requests - * to be. You would think that blk_queue_io_opt() would be - * used to do this since it is used to "set optimal request - * size for the queue", but that doesn't seem to do - * anything - the kernel still gives you huge requests - * with tons of little PAGE_SIZE segments contained within it. - * - * Knowing that the kernel will just give you PAGE_SIZE segments - * no matter what, you can say "ok, I want PAGE_SIZE byte - * segments, and I want 'N' of them per request", where N is - * the correct number of segments for the volblocksize and - * number of chunks you want. - */ -#ifdef HAVE_BLK_MQ - if (zvol_blk_mq_blocks_per_thread != 0) { - unsigned int chunks; - chunks = MIN(zvol_blk_mq_blocks_per_thread, UINT16_MAX); - - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, - PAGE_SIZE); - blk_queue_max_segments(zv->zv_zso->zvo_queue, - (zv->zv_volblocksize * chunks) / PAGE_SIZE); - } else { - /* - * Special case: zvol_blk_mq_blocks_per_thread = 0 - * Max everything out. - */ - blk_queue_max_segments(zv->zv_zso->zvo_queue, - UINT16_MAX); - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, - UINT_MAX); - } -#endif - } else { - blk_queue_max_segments(zv->zv_zso->zvo_queue, UINT16_MAX); - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, UINT_MAX); - } blk_queue_physical_block_size(zv->zv_zso->zvo_queue, zv->zv_volblocksize); - blk_queue_io_opt(zv->zv_zso->zvo_queue, zv->zv_volblocksize); blk_queue_max_discard_sectors(zv->zv_zso->zvo_queue, (zvol_max_discard_blocks * zv->zv_volblocksize) >> 9); blk_queue_discard_granularity(zv->zv_zso->zvo_queue, From e951dba48a6330aca9c161c50189f6974e6877f0 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 28 May 2024 11:56:41 -0400 Subject: [PATCH 082/151] Linux 6.10: work harder to avoid kmem_cache_alloc reuse Linux 6.10 change kmem_cache_alloc to be a macro, rather than a function, such that the old #undef for it in spl-kmem-cache.c would remove its definition completely, breaking the build. This inverts the model used before. Rather than always defining the kmem_cache_* macro, then undefining then inside spl-kmem-cache.c, instead we make a special tag to indicate we're currently inside spl-kmem-cache.c, and not defining those in macros in the first place, so we can use the kernel-supplied kmem_cache_* functions to implement spl_kmem_cache_*, as we expect. For all other callers, we create the macros as normal and remove access to the kernel's own conflicting names. Signed-off-by: Rob Norris Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf --- include/os/linux/spl/sys/kmem_cache.h | 19 +++++++++++-------- module/os/linux/spl/spl-kmem-cache.c | 12 ++---------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/include/os/linux/spl/sys/kmem_cache.h b/include/os/linux/spl/sys/kmem_cache.h index b159bb52d111..905ff57a1434 100644 --- a/include/os/linux/spl/sys/kmem_cache.h +++ b/include/os/linux/spl/sys/kmem_cache.h @@ -192,22 +192,25 @@ extern void spl_kmem_reap(void); extern uint64_t spl_kmem_cache_inuse(kmem_cache_t *cache); extern uint64_t spl_kmem_cache_entry_size(kmem_cache_t *cache); +#ifndef SPL_KMEM_CACHE_IMPLEMENTING +/* + * Macros for the kmem_cache_* API expected by ZFS and SPL clients. We don't + * define them inside spl-kmem-cache.c, as that uses the kernel's incompatible + * kmem_cache_* facilities to implement ours. + */ + +/* Avoid conflicts with kernel names that might be implemented as macros. */ +#undef kmem_cache_alloc + #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \ spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) #define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) #define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) -/* - * This is necessary to be compatible with other kernel modules - * or in-tree filesystem that may define kmem_cache_alloc, - * like bcachefs does it now. - */ -#ifdef kmem_cache_alloc -#undef kmem_cache_alloc -#endif #define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) #define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) #define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) #define kmem_reap() spl_kmem_reap() +#endif /* * The following functions are only available for internal use. diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c index 42821ad60256..737c2e063f71 100644 --- a/module/os/linux/spl/spl-kmem-cache.c +++ b/module/os/linux/spl/spl-kmem-cache.c @@ -21,6 +21,8 @@ * with the SPL. If not, see . */ +#define SPL_KMEM_CACHE_IMPLEMENTING + #include #include #include @@ -33,16 +35,6 @@ #include #include -/* - * Within the scope of spl-kmem.c file the kmem_cache_* definitions - * are removed to allow access to the real Linux slab allocator. - */ -#undef kmem_cache_destroy -#undef kmem_cache_create -#undef kmem_cache_alloc -#undef kmem_cache_free - - /* * Linux 3.16 replaced smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() * with smp_mb__{before,after}_atomic() because they were redundant. This is From 7ca7bb7fd723a91366ce767aea53c4f5c2d65afb Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 28 May 2024 16:16:28 -0400 Subject: [PATCH 083/151] Linux 5.16: use bdev_nr_bytes() to get device capacity This helper was introduced long ago, in 5.16. Since 6.10, bd_inode no longer exists, but the helper has been updated, so detect it and use it in all versions where it is available. Signed-off-by: Rob Norris Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf --- config/kernel-blkdev.m4 | 26 ++++++++++++++++++++++++++ module/os/linux/zfs/vdev_disk.c | 14 +++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/config/kernel-blkdev.m4 b/config/kernel-blkdev.m4 index b6ce1e1cf083..4f60f96acb56 100644 --- a/config/kernel-blkdev.m4 +++ b/config/kernel-blkdev.m4 @@ -534,6 +534,30 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE], [ ]) ]) +dnl # +dnl # 5.16 API change +dnl # Added bdev_nr_bytes() helper. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES], [ + ZFS_LINUX_TEST_SRC([bdev_nr_bytes], [ + #include + ],[ + struct block_device *bdev = NULL; + loff_t nr_bytes __attribute__ ((unused)) = 0; + nr_bytes = bdev_nr_bytes(bdev); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES], [ + AC_MSG_CHECKING([whether bdev_nr_bytes() is available]) + ZFS_LINUX_TEST_RESULT([bdev_nr_bytes], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BDEV_NR_BYTES, 1, [bdev_nr_bytes() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 5.20 API change, dnl # Removed bdevname(), snprintf(.., %pg) should be used. @@ -747,6 +771,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [ ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE + ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_DISCARD ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ @@ -767,6 +792,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [ ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE + ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES ZFS_AC_KERNEL_BLKDEV_BDEVNAME ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS ZFS_AC_KERNEL_BLKDEV_ISSUE_DISCARD diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c index 7284b922b3bf..e69c5f3841ec 100644 --- a/module/os/linux/zfs/vdev_disk.c +++ b/module/os/linux/zfs/vdev_disk.c @@ -150,7 +150,11 @@ vdev_bdev_mode(spa_mode_t smode) static uint64_t bdev_capacity(struct block_device *bdev) { +#ifdef HAVE_BDEV_NR_BYTES + return (bdev_nr_bytes(bdev)); +#else return (i_size_read(bdev->bd_inode)); +#endif } #if !defined(HAVE_BDEV_WHOLE) @@ -209,7 +213,7 @@ bdev_max_capacity(struct block_device *bdev, uint64_t wholedisk) * "reserved" EFI partition: in such cases return the device * usable capacity. */ - available = i_size_read(bdev_whole(bdev)->bd_inode) - + available = bdev_capacity(bdev_whole(bdev)) - ((EFI_MIN_RESV_SIZE + NEW_START_BLOCK + PARTITION_END_ALIGNMENT) << SECTOR_BITS); psize = MAX(available, bdev_capacity(bdev)); @@ -925,12 +929,12 @@ vdev_disk_io_rw(zio_t *zio) /* * Accessing outside the block device is never allowed. */ - if (zio->io_offset + zio->io_size > bdev->bd_inode->i_size) { + if (zio->io_offset + zio->io_size > bdev_capacity(bdev)) { vdev_dbgmsg(zio->io_vd, "Illegal access %llu size %llu, device size %llu", (u_longlong_t)zio->io_offset, (u_longlong_t)zio->io_size, - (u_longlong_t)i_size_read(bdev->bd_inode)); + (u_longlong_t)bdev_capacity(bdev)); return (SET_ERROR(EIO)); } @@ -1123,12 +1127,12 @@ vdev_classic_physio(zio_t *zio) /* * Accessing outside the block device is never allowed. */ - if (io_offset + io_size > bdev->bd_inode->i_size) { + if (io_offset + io_size > bdev_capacity(bdev)) { vdev_dbgmsg(zio->io_vd, "Illegal access %llu size %llu, device size %llu", (u_longlong_t)io_offset, (u_longlong_t)io_size, - (u_longlong_t)i_size_read(bdev->bd_inode)); + (u_longlong_t)bdev_capacity(bdev)); return (SET_ERROR(EIO)); } From a39decd73f82c74cbe2cecb8f71ca5d3417e5978 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 15 Jul 2024 21:36:34 -0400 Subject: [PATCH 084/151] etcupdate: remove mergemaster cross-reference It will be retired soon. Sponsored by: The FreeBSD Foundation --- usr.sbin/etcupdate/etcupdate.8 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index 82c36fc9cb68..22d3d91bb6eb 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 9, 2022 +.Dd July 15, 2024 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -894,7 +894,6 @@ but it has been removed in the destination directory. .Xr make 1 , .Xr newaliases 1 , .Xr sh 1 , -.Xr mergemaster 8 , .Xr pwd_mkdb 8 , .Xr services_mkdb 8 , .Xr tzsetup 8 From 9c73f38cd3abc21e88ec446d44a35b27ee4439ea Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Tue, 16 Jul 2024 06:47:28 +0200 Subject: [PATCH 085/151] stress2: Add a new test scenario. Update the exclude list --- tools/test/stress2/misc/all.exclude | 3 ++- tools/test/stress2/misc/swapoff6.sh | 42 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100755 tools/test/stress2/misc/swapoff6.sh diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 07cff21a1d9a..f8936d9efee8 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -60,6 +60,7 @@ suj36.sh https://people.freebsd.org/~pho/stress/log/log0392.txt 20221114 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff3.sh Excessive OOM killing 20220403 swapoff5.sh log0005.txt, known issue 20210111 +swapoff6.sh https://people.freebsd.org/~pho/stress/log/log0540.txt 20240716 systrace.sh WiP 20200227 systrace2.sh WiP 20200227 syzkaller16.sh zonelimit issue 20210722 @@ -70,8 +71,8 @@ syzkaller59.sh Page fault 20220625 syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318 syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621 syzkaller67.sh panic: ASan: Invalid access, 8-byte read at ... 20230621 +quota6.sh https://people.freebsd.org/~pho/stress/log/log0456.txt 20240707 truss3.sh WiP 20200915 -unionfs19.sh https://people.freebsd.org/~pho/stress/log/log0519.txt 20240702 # Test not to run for other reasons: diff --git a/tools/test/stress2/misc/swapoff6.sh b/tools/test/stress2/misc/swapoff6.sh new file mode 100755 index 000000000000..b6ab08784f87 --- /dev/null +++ b/tools/test/stress2/misc/swapoff6.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# A swap test scenario, using swapoff(8) and sort(1) for VM pressure + +# Out of free pages seen:://people.freebsd.org/~pho/stress/log/log0540.txt + +. ../default.cfg +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 + +[ `swapinfo | wc -l` -eq 1 ] && exit 0 +set -u +nmax=`sysctl -n hw.ncpu` +[ $nmax -gt 4 ] && nmax=4 + +for i in `jot $nmax`; do + timeout -k 2m 1m sort /dev/zero & + sleep .`jot -r 1 1 9` +done +while [ `swapinfo | tail -1 | awk '{sub("%","");print $NF}'` -lt 2 ]; do sleep 1; done + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 300 ]; do + while ! swapoff -a > /dev/null 2>&1; do sleep .1; done + swapon -a > /dev/null + ncur=`pgrep sort | wc -l` + if [ $ncur -lt $nmax ]; then + echo "Starting $((nmax - ncur)) sort" + for i in `jot $((nmax - ncur))`; do + timeout -k 2m 1m sort /dev/zero & + sleep .`jot -r 1 1 9` + done + fi +done +pkill -9 sort +wait +exit 0 From 838b6caababbaaab65659d40a41c2dd46b3a5fd2 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:27 -0500 Subject: [PATCH 086/151] openssl: use getrandom(2) instead of probing for getentropy(2) The probing for getentropy(2) relies on re-declaring getentropy(2) as weak and checking the address, but this is incompatible with the _FORTIFY_SOURCE symbol renaming scheme. It's always present on all supported FreeBSD versions now so we could cut it down to unconditional use, but there's another segment for getrandom(2) already that's cleaner to just add us to. We should upstream this. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- .../providers/implementations/rands/seeding/rand_unix.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c index 750afca58ed7..eadacedbe40c 100644 --- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c +++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c @@ -356,7 +356,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) * Note: Sometimes getentropy() can be provided but not implemented * internally. So we need to check errno for ENOSYS */ -# if !defined(__DragonFly__) && !defined(__NetBSD__) +# if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__) # if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) extern int getentropy(void *buffer, size_t length) __attribute__((weak)); @@ -393,11 +393,12 @@ static ssize_t syscall_random(void *buf, size_t buflen) /* Linux supports this since version 3.17 */ # if defined(__linux) && defined(__NR_getrandom) return syscall(__NR_getrandom, buf, buflen, 0); -# elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND) - return sysctl_random(buf, buflen); # elif (defined(__DragonFly__) && __DragonFly_version >= 500700) \ - || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000) + || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000) \ + || defined(__FreeBSD__) return getrandom(buf, buflen, 0); +# elif defined(__NetBSD__) && defined(KERN_ARND) + return sysctl_random(buf, buflen); # else errno = ENOSYS; return -1; From b8730c11a395dacc089311ead1c9e015682a1ccb Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:27 -0500 Subject: [PATCH 087/151] include: ssp: fix the build with earlier C standards `inline` isn't always a keyword, so we should be using __ssp_inline as we do everywhere else in the _FORTIFY_SOURCE support. Variable declarations in a loop initializer are also not always supported, so declare any loop vars in advance. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- include/ssp/socket.h | 3 ++- include/ssp/ssp.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/ssp/socket.h b/include/ssp/socket.h index 6c0051ad72dc..30a8f0adf1ea 100644 --- a/include/ssp/socket.h +++ b/include/ssp/socket.h @@ -101,11 +101,12 @@ __ssp_redirect_raw_impl(ssize_t, recvmmsg, recvmmsg, const struct timespec *__restrict timeout)) { const size_t vecsz = __ssp_bos(hdrvec); + size_t i; if (vecsz != (size_t)-1 && vecsz / sizeof(*hdrvec) < vlen) __chk_fail(); - for (size_t i = 0; i < vlen; i++) { + for (i = 0; i < vlen; i++) { __ssp_check_msghdr(&hdrvec[i].msg_hdr); } diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index bdc14137d45b..a161df31d3d4 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -89,7 +89,7 @@ __ssp_redirect_raw_impl(rtype, fun, symbol, args) { \ #include -static inline int +__ssp_inline int __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) { __uintptr_t left = (__uintptr_t)leftp; @@ -112,11 +112,12 @@ __ssp_inline void __ssp_check_iovec(const struct iovec *iov, int iovcnt) { const size_t iovsz = __ssp_bos(iov); + int i; if (iovsz != (size_t)-1 && iovsz / sizeof(*iov) < (size_t)iovcnt) __chk_fail(); - for (int i = 0; i < iovcnt; i++) { + for (i = 0; i < iovcnt; i++) { if (__ssp_bos(iov[i].iov_base) < iov[i].iov_len) __chk_fail(); } From 0c47b9c211ede221629914ae0c5553586e772109 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:28 -0500 Subject: [PATCH 088/151] include: ssp: don't shadow the mempcpy builtin GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-existing __builtin___mempcpy_chk(). Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- include/ssp/string.h | 16 ++---------- include/string.h | 2 +- lib/libc/secure/Makefile.inc | 2 +- lib/libc/secure/Symbol.map | 1 + lib/libc/secure/mempcpy_chk.c | 49 +++++++++++++++++++++++++++++++++++ lib/libc/string/mempcpy.c | 2 +- 6 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 lib/libc/secure/mempcpy_chk.c diff --git a/include/ssp/string.h b/include/ssp/string.h index b9f2dceb1df5..9f24254d9c01 100644 --- a/include/ssp/string.h +++ b/include/ssp/string.h @@ -106,6 +106,7 @@ __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { \ __BEGIN_DECLS __ssp_bos_icheck3_restrict(memcpy, void *, const void *) +__ssp_bos_icheck3_restrict(mempcpy, void *, const void *) __ssp_bos_icheck3(memmove, void *, const void *) __ssp_bos_icheck3(memset, void *, int) __ssp_bos_icheck2_restrict(stpcpy, char *, const char *) @@ -116,23 +117,10 @@ __ssp_redirect0(int, strerror_r, (int __errnum, char *__buf, size_t __len), (__errnum, __buf, __len)); __ssp_bos_icheck3_restrict(strncpy, char *, const char *) __ssp_bos_icheck3_restrict(strncat, char *, const char *) - -__ssp_redirect_raw_impl(void *, mempcpy, mempcpy, - (void *__restrict buf, const void *__restrict src, size_t len)) -{ - const size_t slen = __ssp_bos(buf); - - if (len > slen) - __chk_fail(); - - if (__ssp_overlap(src, buf, len)) - __chk_fail(); - - return (__ssp_real(mempcpy)(buf, src, len)); -} __END_DECLS #define memcpy(dst, src, len) __ssp_bos_check3(memcpy, dst, src, len) +#define mempcpy(dst, src, len) __ssp_bos_check3(mempcpy, dst, src, len) #define memmove(dst, src, len) __ssp_bos_check3(memmove, dst, src, len) #define memset(dst, val, len) \ __ssp_bos_check3_typed(memset, void *, dst, int, val, len) diff --git a/include/string.h b/include/string.h index c9d3e1add1a1..d9adcf4e0e41 100644 --- a/include/string.h +++ b/include/string.h @@ -68,7 +68,7 @@ void *memmem(const void *, size_t, const void *, size_t) __pure; #endif void *(memmove)(void *, const void *, size_t); #if __BSD_VISIBLE -void *mempcpy(void * __restrict, const void * __restrict, size_t); +void *(mempcpy)(void * __restrict, const void * __restrict, size_t); #endif void *(memset)(void *, int, size_t); #if __POSIX_VISIBLE >= 200809 diff --git a/lib/libc/secure/Makefile.inc b/lib/libc/secure/Makefile.inc index 5d10612e67a8..e5286a5a380f 100644 --- a/lib/libc/secure/Makefile.inc +++ b/lib/libc/secure/Makefile.inc @@ -4,7 +4,7 @@ .PATH: ${LIBC_SRCTOP}/secure # _FORTIFY_SOURCE -SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \ +SRCS+= fgets_chk.c memcpy_chk.c memmove_chk.c mempcpy_chk.c memset_chk.c \ snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \ strcat_chk.c strcpy_chk.c strlcat_chk.c strncat_chk.c strlcpy_chk.c \ strncpy_chk.c vsnprintf_chk.c vsprintf_chk.c diff --git a/lib/libc/secure/Symbol.map b/lib/libc/secure/Symbol.map index 1f12fe059367..df0a2d1ac93d 100644 --- a/lib/libc/secure/Symbol.map +++ b/lib/libc/secure/Symbol.map @@ -8,6 +8,7 @@ FBSD_1.8 { __fgets_chk; __memcpy_chk; __memmove_chk; + __mempcpy_chk; __memset_chk; __snprintf_chk; __sprintf_chk; diff --git a/lib/libc/secure/mempcpy_chk.c b/lib/libc/secure/mempcpy_chk.c new file mode 100644 index 000000000000..ca4ae150bc94 --- /dev/null +++ b/lib/libc/secure/mempcpy_chk.c @@ -0,0 +1,49 @@ +/*- + * + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2006 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include +#undef mempcpy + +void * +__mempcpy_chk(void * __restrict dst, const void * __restrict src, size_t len, + size_t slen) +{ + if (len > slen) + __chk_fail(); + + if (__ssp_overlap(src, dst, len)) + __chk_fail(); + + return (mempcpy(dst, src, len)); +} diff --git a/lib/libc/string/mempcpy.c b/lib/libc/string/mempcpy.c index 86e44cdebb85..4ea0af87aef1 100644 --- a/lib/libc/string/mempcpy.c +++ b/lib/libc/string/mempcpy.c @@ -32,7 +32,7 @@ #include void * -__ssp_real(mempcpy)(void *__restrict dst, const void *__restrict src, +(mempcpy)(void *__restrict dst, const void *__restrict src, size_t len) { return ((char *)memcpy(dst, src, len) + len); From d5f8270917bfee4242778544b990bb7f82f8a4de Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:28 -0500 Subject: [PATCH 089/151] libc: switch to __weak_symbol for fortified interpose stubs GCC doesn't like `#pragma weak macro(foo)`, but that's fine; just slap a __weak_symbol on the definition to more reliably make it weak anyways. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- lib/libc/sys/poll.c | 3 +-- lib/libc/sys/ppoll.c | 3 +-- lib/libc/sys/readv.c | 3 +-- lib/libc/sys/recvfrom.c | 3 +-- lib/libc/sys/recvmsg.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 7a418afbbf49..5e000f7e728f 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_poll, __poll); -#pragma weak __ssp_real(poll) -int +int __weak_symbol __ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) { return (INTERPOS_SYS(poll, pfd, nfds, timeout)); diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index ef72a902548b..72c0b5d5e421 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_ppoll, __ppoll); -#pragma weak __ssp_real(ppoll) -int +int __weak_symbol __ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict timeout, const sigset_t *__restrict newsigmask) diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index d58dba1fc47e..2729f6ed99da 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -38,8 +38,7 @@ __weak_reference(__sys_readv, __readv); -#pragma weak readv -ssize_t +ssize_t __weak_symbol __ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt) { return (INTERPOS_SYS(readv, fd, iov, iovcnt)); diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index 6247b315d078..0cdbd8a4ccaa 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvfrom, __recvfrom); -#pragma weak recvfrom -ssize_t +ssize_t __weak_symbol __ssp_real(recvfrom)(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) { diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index 334049d6cfad..ce0f5e0478cd 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvmsg, __recvmsg); -#pragma weak recvmsg -ssize_t +ssize_t __weak_symbol __ssp_real(recvmsg)(int s, struct msghdr *msg, int flags) { return (INTERPOS_SYS(recvmsg, s, msg, flags)); From 4928dcc0ebdb7bac56840930e44c38f8f061f09e Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:28 -0500 Subject: [PATCH 090/151] sys/select.h: const'ify the fd_set that __fdset_idx() takes Some callers may be operating on a const fd_set and we don't particularly care, so const'ify it. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- sys/sys/select.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/select.h b/sys/sys/select.h index 9b734754b944..fefc9961d63a 100644 --- a/sys/sys/select.h +++ b/sys/sys/select.h @@ -86,7 +86,7 @@ typedef struct fd_set { #define __fdset_idx(p, n) __fdset_idx_(p, n) #else __ssp_inline unsigned long -__fdset_idx(fd_set *p, unsigned long idx) +__fdset_idx(const fd_set *p, unsigned long idx) { __size_t psz = __ssp_bos0(p); unsigned long sidx = __fdset_idx_(p, idx); From db3a524c8a965d3adcf03fe08b28b37f63e1126b Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 16 Jul 2024 00:12:29 -0500 Subject: [PATCH 091/151] bsnmpd: FreeBSD has strlcpy(3) Fixes the fortified build of bsnmp, which otherwise fails because of the shadowed declaration. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- usr.sbin/bsnmpd/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsnmpd/Makefile.inc b/usr.sbin/bsnmpd/Makefile.inc index 876d6f891e7f..7f666307467c 100644 --- a/usr.sbin/bsnmpd/Makefile.inc +++ b/usr.sbin/bsnmpd/Makefile.inc @@ -1,2 +1,3 @@ +CFLAGS+= -DHAVE_STRLCPY PACKAGE= bsnmp .include "../Makefile.inc" From f2055611fe5624017bd7769c8dc6419c348806ff Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sat, 9 Sep 2023 09:17:16 -0400 Subject: [PATCH 092/151] mergemaster: remove from the tree Mergemaster has been deprecated for many years, replaced by etcupdate(8). Remove it now, in advance of FreeBSD 15.0. PR: 252417 Reviewed by: imp Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45622 --- ObsoleteFiles.inc | 4 + targets/pseudo/userland/Makefile.depend | 1 - usr.sbin/Makefile | 1 - usr.sbin/mergemaster/Makefile | 5 - usr.sbin/mergemaster/Makefile.depend | 10 - usr.sbin/mergemaster/mergemaster.8 | 485 ------- usr.sbin/mergemaster/mergemaster.sh | 1568 ----------------------- 7 files changed, 4 insertions(+), 2070 deletions(-) delete mode 100644 usr.sbin/mergemaster/Makefile delete mode 100644 usr.sbin/mergemaster/Makefile.depend delete mode 100644 usr.sbin/mergemaster/mergemaster.8 delete mode 100755 usr.sbin/mergemaster/mergemaster.sh diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 19eefda42fe9..f8f0309d6ccf 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20240716: retire mergemaster +OLD_FILES+=usr/sbin/mergemaster +OLD_FILES+=usr/share/man/man8/mergemaster.8.gz + # 20240527: csh: Remove hardlink /.cshrc OLD_FILES+=.cshrc diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index 378531b68cc1..6a844630c999 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -589,7 +589,6 @@ DIRDEPS+= \ usr.sbin/makemap \ usr.sbin/manctl \ usr.sbin/memcontrol \ - usr.sbin/mergemaster \ usr.sbin/mfiutil \ usr.sbin/mixer \ usr.sbin/mld6query \ diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 9d6c90d09461..e039cea6ee16 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -38,7 +38,6 @@ SUBDIR= adduser \ mailwrapper \ makefs \ memcontrol \ - mergemaster \ mfiutil \ mixer \ mlxcontrol \ diff --git a/usr.sbin/mergemaster/Makefile b/usr.sbin/mergemaster/Makefile deleted file mode 100644 index 2edda1b9bc05..000000000000 --- a/usr.sbin/mergemaster/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SCRIPTS=mergemaster.sh -MAN= mergemaster.8 - -.include - diff --git a/usr.sbin/mergemaster/Makefile.depend b/usr.sbin/mergemaster/Makefile.depend deleted file mode 100644 index 11aba52f82cf..000000000000 --- a/usr.sbin/mergemaster/Makefile.depend +++ /dev/null @@ -1,10 +0,0 @@ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.sbin/mergemaster/mergemaster.8 b/usr.sbin/mergemaster/mergemaster.8 deleted file mode 100644 index 20d746de347c..000000000000 --- a/usr.sbin/mergemaster/mergemaster.8 +++ /dev/null @@ -1,485 +0,0 @@ -.\" Copyright (c) 1998-2011 Douglas Barton -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd April 16, 2024 -.Dt MERGEMASTER 8 -.Os -.Sh NAME -.Nm mergemaster -.Nd merge configuration files, et al during an upgrade -.Sh SYNOPSIS -.Nm -.Op Fl scrvhpCP -.Op Fl a|iFU -.Op Fl -run-updates=[always|never] -.Op Fl m Ar /path/to/sources -.Op Fl t Ar /path/to/temp/root -.Op Fl d -.Op Fl u Ar N -.Op Fl w Ar N -.Op Fl A Ar Target architecture -.Op Fl D Ar /destdir/path -.Sh DESCRIPTION -.Bf -symbolic -The -.Nm -utility is deprecated and may not be available in -.Fx 15.0 -or later. -Users are advised to use -.Xr etcupdate 8 -instead. -.Ef -.Pp -The -.Nm -utility is a Bourne shell script which is designed to aid you -in updating the various configuration and other files -associated with -.Fx . -It is -.Sy HIGHLY -recommended that you back up your -.Pa /etc -directory before beginning this process. -.Pp -The script uses -.Pa /usr/src/Makefile -to build a temporary root environment from -.Pa / -down, populating that environment with the various -files. -You can specify a different source directory -with the -.Fl m -command line option, or specify the destination -directory with the -.Fl D -option. -It then compares each file in that environment -to its installed counterpart. -When the script finds a -change in the new file, or there is no installed -version of the new file it gives you four options to -deal with it. -You can install the new file as is, -delete the new file, merge the old and new -files (as appropriate) using -.Xr sdiff 1 -or leave the file in the temporary root environment to -merge by hand later. -.Pp -By default it creates the temporary root in -.Pa /var/tmp/temproot -and compares the -Version Control System (VCS) Id strings ($FreeBSD) -for files that have them, deleting -the temporary file if the strings match. -If there is -no Id string, or if the strings are different it -compares the files themselves. -You can -also specify that the script ignore the Id strings and -compare every file with the -.Fl s -option. -Using the -.Fl F -option -.Nm -will install the new file for you if they differ only by -VCS strings. -.Pp -The merge menu option is designed to let you easily combine your -customizations from the old version of a file into the new one. -While you can use the merge function to incorporate changes from -files that you have not customized, -it is not recommended. -.Pp -The -.Nm -utility checks your umask and issues a warning for anything -other than 022. -While it is not mandatory to grant -world read permissions for most configuration files, you -may run into problems without them. -If you choose a -umask other than 022 and experience trouble later this -could be the cause. -.Pa /etc/master.passwd -is treated as a special case. -If you choose to install -this file or a merged version of it the file permissions -are always 600 (rw-------) for security reasons. -After -installing an updated version of this file you should -probably run -.Xr pwd_mkdb 8 -with the -.Fl p -option to rebuild your password databases -and recreate -.Pa /etc/passwd . -.Pp -The script uses the owner and group ids -that the files are created with by -.Pa /usr/src/etc/Makefile , -and file permissions as specified by the umask. -Unified diffs are used by default to display any -differences unless you choose context diffs. -.Pp -The -.Nm -utility will source scripts that you specify right before -it starts the comparison, and after it is done running. -The easiest way to handle this is to place the path -to the script(s) in the appropriate variables in your -.Pa .mergemasterrc -file. -The script sourced before comparison is named in -.Ev MM_PRE_COMPARE_SCRIPT , -and the one sourced after the script is done is -.Ev MM_EXIT_SCRIPT . -This is the recommended way to specify local modifications, -or files that you want to give special handling to. -This includes files that you want to be deleted without -being compared. -Because the named scripts are sourced from within -.Nm , -all of the script's variables are available for use in -your custom script. -You can also use -.Pa /etc/mergemaster.rc -which will be read before -.Pa .mergemasterrc . -Options specified on the command line are updated last, -and therefore can override both files. -.Pp -When the comparison is done if there are any files remaining -in the temproot directory they will be listed, and if the -.Fl a -option is not in use the user will be given the option of -deleting the temproot directory. -If there are no files remaining in the temproot directory -it will be deleted. -.Pp -The options are as follows: -.Bl -tag -width Fl -.It Fl s -Perform a strict comparison, diffing every pair of files. -This comparison is performed line by line, -without regard to VCS Ids. -.It Fl c -Use context diffs instead of unified diffs. -.It Fl r -Re-run -.Nm -on a previously cleaned directory, skipping the creation of -the temporary root environment. -This option is compatible -with all other options. -.It Fl v -Be more verbose about the process. -You should probably use -this option the first time you run -.Nm . -This option also gives you a list of files that exist -only in the installed version of -.Pa /etc . -.It Fl a -Run automatically. -This option will leave all the files that -differ from the installed versions in the temporary directory -to be dealt with by hand. -If the -.Pa temproot -directory exists, it creates a new one in a previously -non-existent directory. -This option unsets the verbose flag, -and is not compatible with -.Fl i , -.Fl F , -or -.Fl U . -Setting -.Fl a -makes -.Fl w -superfluous. -.It Fl h -Display usage and help information. -.It Fl i -Automatically install any files that do not exist in the -destination directory. -.It Fl p -Pre-buildworld mode. -Compares only files known to be essential to the success of -{build|install}world, i.e., -.Pa /etc/group -and -.Pa /etc/master.passwd . -.It Fl F -If the files differ only by VCS Id ($FreeBSD) -install the new file. -.It Fl C -After a standard -.Nm -run, -compares your rc.conf[.local] options to the defaults. -.It Fl P -Preserve files that you replace in -.Pa /var/tmp/mergemaster/preserved-files- , -or another directory you specify in your -.Nm -rc file. -.It Fl U -Attempt to auto upgrade files that have not been user modified. -This option can be dangerous when there are critical changes -in the new versions that affect your running system. -.It Fl -run-updates=[always|never] -Specify always or never to run newaliases, pwd_mkdb, etc. -at the end of the comparison run. -If this option is omitted the default is to prompt the user -for each update as necessary. -.It Fl m Ar /path/to/sources -Specify the path to the directory where you want to do the -.Xr make 1 . -(In other words, where your sources are, but -s was already -taken.) -In older versions of -.Nm -the path to -.Pa src/etc -was required. -.Nm -will convert the path if this older method is used. -.It Fl t Ar /path/to/temp/root -Create the temporary root environment in -.Pa /path/to/temp/root -instead of the default -.Pa /var/tmp/temproot . -.It Fl d -Add the date and time to the name of the temporary -root directory. -If -.Fl t -is specified, this option must -follow it if you want the date added too. -.It Fl u Ar N -Specify a numeric umask. -The default is 022. -.It Fl w Ar N -Supply an alternate screen width to the -.Xr sdiff 1 -command in numbers of columns. -The default is 80. -.It Fl A Ar Target architecture -Specify an alternative -.Ev TARGET_ARCH -architecture name. -.It Fl D Ar /path -Specify the destination directory for the installed files. -.El -.Sh ENVIRONMENT -The -.Nm -utility uses the -.Ev PAGER -environment variable if set. -Otherwise it uses -.Xr less 1 . -If -.Ev PAGER -specifies a program outside -its -limited -.Ev PATH -without specifying the full path, -.Nm -prompts you with options on how to proceed. -The -.Ev MM_PRE_COMPARE_SCRIPT -and -.Ev MM_EXIT_SCRIPT -variables are used as described above. -Other variables that are used by the script internally -can be specified in -.Pa .mergemasterrc -as described in more detail below. -.Sh FILES -.Bl -tag -width $HOME/.mergemasterrc -compact -.It Pa /etc/mergemaster.rc -.It Pa $HOME/.mergemasterrc -.El -.Pp -The -.Nm -utility will -.Ic .\& -(source) these files if they exist. -Command line options -will override rc file options. -.Pa $HOME/.mergemasterrc -overrides -.Pa /etc/mergemaster.rc . -Here is an example -with all values commented out: -.Bd -literal -# These are options for mergemaster, with their default values listed -# The following options have command line overrides -# -# The target architecture (-A, unset by default) -#ARCHSTRING='TARGET_ARCH=' -# -# Sourcedir is the directory to do the 'make' in (-m) -#SOURCEDIR='/usr/src' -# -# Directory to install the temporary root environment into (-t) -#TEMPROOT='/var/tmp/temproot' -# -# Specify the destination directory for the installed files (-D) -#DESTDIR= -# -# Strict comparison skips the VCS Id test and compares every file (-s) -#STRICT=no -# -# Type of diff, such as unified, context, etc. (-c) -#DIFF_FLAG='-u' -# -# Install the new file if it differs only by VCS Id ($FreeBSD, -F) -#FREEBSD_ID= -# -# Verbose mode includes more details and additional checks (-v) -#VERBOSE= -# -# Automatically install files that do not exist on the system already (-i) -#AUTO_INSTALL= -# -# Automatically upgrade files that have not been user modified (-U) -# ***DANGEROUS*** -#AUTO_UPGRADE= -# -# Either always or never run newaliases, pwd_mkdb at the end (--run-updates) -#RUN_UPDATES= -# -# Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf (-C) -#COMP_CONFS= -# -# Preserve files that you replace (-P) -#PRESERVE_FILES= -#PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` -# -# The umask for mergemaster to compare the default file's modes to (-u) -#NEW_UMASK=022 -# -# The following options have no command line overrides -# -# Files to always avoid comparing -#IGNORE_FILES='/etc/motd /etc/printcap foo bar' -# -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-Bb' # Ignore changes in whitespace -# -# Location to store the list of mtree values for AUTO_UPGRADE purposes -#MTREEDB='/var/db' -# -# For those who just cannot stand including the full path to PAGER -#DONT_CHECK_PAGER= -# -# If you set 'yes' above, make sure to include the PATH to your pager -#PATH=/bin:/usr/bin:/usr/sbin -# -# Delete stale files in /etc/rc.d without prompting -#DELETE_STALE_RC_FILES= -# -# Specify the path to scripts to run before the comparison starts, -# and/or after the script has finished its work -#MM_PRE_COMPARE_SCRIPT= -#MM_EXIT_SCRIPT= -.Ed -.Sh EXIT STATUS -Exit status is 0 on successful completion, or if the user bails out -manually at some point during execution. -.Pp -Exit status is 1 if it fails for one of the following reasons: -.Pp -Invalid command line option -.Pp -Failure to create the temporary root environment -.Pp -Failure to populate the temporary root -.Pp -Presence of the 'nodev' option in -.Pa /etc/fstab -.Pp -Failure to install a file -.Sh EXAMPLES -Typically all you will need to do is type -.Nm -at the prompt and the script will do all the work for you. -.Pp -To use context diffs and have -.Nm -explain more things as it goes along, use: -.Pp -.Dl # mergemaster -cv -.Pp -To specify that -.Nm -put the temporary root environment in -.Pa /usr/tmp/root , -use: -.Pp -.Dl # mergemaster -t /usr/tmp/root -.Pp -To specify a 110 column screen with a strict -comparison, use: -.Pp -.Dl # mergemaster -sw 110 -.Sh SEE ALSO -.Xr diff 1 , -.Xr make 1 , -.Xr less 1 , -.Xr sdiff 1 , -.Xr etcupdate 8 , -.Xr pwd_mkdb 8 -.Pp -.Pa /usr/src/etc/Makefile -.Rs -.%U https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld -.%T The FreeBSD Handbook -.Re -.Sh HISTORY -The -.Nm -utility was first publicly available on one of my -web pages in a much simpler form under the name -.Pa comproot -on 13 March 1998. -The idea for creating the -temporary root environment comes from Nik Clayton's -make world tutorial which is referenced above. -.Sh AUTHORS -This manual page and the script itself were written by -.An Douglas Barton Aq Mt dougb@FreeBSD.org . diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh deleted file mode 100755 index 572415164101..000000000000 --- a/usr.sbin/mergemaster/mergemaster.sh +++ /dev/null @@ -1,1568 +0,0 @@ -#!/bin/sh - -# mergemaster - -# Compare files created by /usr/src/etc/Makefile (or the directory -# the user specifies) with the currently installed copies. - -# Copyright (c) 1998-2012 Douglas Barton, All rights reserved -# Please see detailed copyright below - -PATH=/bin:/usr/bin:/usr/sbin - -display_usage () { - VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` - echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]] [--run-updates=always|never]' - echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]' - echo "Options:" - echo " -s Strict comparison (diff every pair of files)" - echo " -c Use context diff instead of unified diff" - echo " -r Re-run on a previously cleaned directory (skip temproot creation)" - echo " -v Be more verbose about the process, include additional checks" - echo " -a Leave all files that differ to merge by hand" - echo " -h Display more complete help" - echo ' -i Automatically install files that do not exist in destination directory' - echo ' -p Pre-buildworld mode, only compares crucial files' - echo ' -F Install files that differ only by revision control Id ($FreeBSD)' - echo ' -C Compare local rc.conf variables to the defaults' - echo ' -P Preserve files that are overwritten' - echo " -U Attempt to auto upgrade files that have not been user modified" - echo ' ***DANGEROUS***' - echo ' --run-updates= Specify always or never to run newalises, pwd_mkdb, etc.' - echo '' - echo " -m /path/directory Specify location of source to do the make in" - echo " -t /path/directory Specify temp root directory" - echo " -d Add date and time to directory name (e.g., /var/tmp/temproot.`date +%m%d.%H.%M`)" - echo " -u N Specify a numeric umask" - echo " -w N Specify a screen width in columns to sdiff" - echo " -A architecture Alternative architecture name to pass to make" - echo ' -D /path/directory Specify the destination directory to install files to' - echo '' -} - -display_help () { - echo "* To specify a directory other than /var/tmp/temproot for the" - echo " temporary root environment, use -t /path/to/temp/root" - echo "* The -w option takes a number as an argument for the column width" - echo " of the screen. The default is 80." - echo '* The -a option causes mergemaster to run without prompting.' -} - -# Loop allowing the user to use sdiff to merge files and display the merged -# file. -merge_loop () { - case "${VERBOSE}" in - '') ;; - *) - echo " *** Type h at the sdiff prompt (%) to get usage help" - ;; - esac - echo '' - MERGE_AGAIN=yes - while [ "${MERGE_AGAIN}" = "yes" ]; do - # Prime file.merged so we don't blat the owner/group id's - cp -p "${COMPFILE}" "${COMPFILE}.merged" - sdiff -o "${COMPFILE}.merged" --text --suppress-common-lines \ - --width=${SCREEN_WIDTH:-80} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - INSTALL_MERGED=V - while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do - echo '' - echo " Use 'i' to install merged file" - echo " Use 'r' to re-do the merge" - echo " Use 'v' to view the merged file" - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n " *** How should I deal with the merged file? [Leave it for later] " - read INSTALL_MERGED - - case "${INSTALL_MERGED}" in - [iI]) - mv "${COMPFILE}.merged" "${COMPFILE}" - echo '' - if mm_install "${COMPFILE}"; then - echo " *** Merged version of ${COMPFILE} installed successfully" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later" - fi - unset MERGE_AGAIN - ;; - [rR]) - rm "${COMPFILE}.merged" - ;; - [vV]) - ${PAGER} "${COMPFILE}.merged" - ;; - '') - echo " *** ${COMPFILE} will remain for your consideration" - unset MERGE_AGAIN - ;; - *) - echo "invalid choice: ${INSTALL_MERGED}" - INSTALL_MERGED=V - ;; - esac - done - done -} - -# Loop showing user differences between files, allow merge, skip or install -# options -diff_loop () { - - HANDLE_COMPFILE=v - - while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o \ - "${HANDLE_COMPFILE}" = "NOT V" ]; do - if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then - if [ -n "${AUTO_UPGRADE}" -a -n "${CHANGED}" ]; then - case "${CHANGED}" in - *:${DESTDIR}${COMPFILE#.}:*) ;; # File has been modified - *) - echo '' - echo " *** ${COMPFILE} has not been user modified." - echo '' - - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} upgraded successfully" - echo '' - # Make the list print one file per line - AUTO_UPGRADED_FILES="${AUTO_UPGRADED_FILES} ${DESTDIR}${COMPFILE#.} -" - else - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" - fi - return - ;; - esac - fi - if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then - echo '' - echo ' ====================================================================== ' - echo '' - ( - echo " *** Displaying differences between installed version and ${COMPFILE}:" - echo '' - diff ${DIFF_FLAG} ${DIFF_OPTIONS} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - ) | ${PAGER} - echo '' - fi - else - echo '' - echo " *** There is no installed version of ${COMPFILE}" - echo '' - case "${AUTO_INSTALL}" in - [Yy][Ee][Ss]) - echo '' - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} installed successfully" - echo '' - # Make the list print one file per line - AUTO_INSTALLED_FILES="${AUTO_INSTALLED_FILES} ${DESTDIR}${COMPFILE#.} -" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" - fi - return - ;; - *) - NO_INSTALLED=yes - ;; - esac - fi - - echo " Use 'd' to delete the temporary ${COMPFILE}" - echo " Use 'i' to install the temporary ${COMPFILE}" - case "${NO_INSTALLED}" in - '') - echo " Use 'm' to merge the temporary and installed versions" - echo " Use 'v' to view the diff results again" - ;; - esac - echo '' - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n "How should I deal with this? [Leave it for later] " - read HANDLE_COMPFILE - - case "${HANDLE_COMPFILE}" in - [dD]) - rm "${COMPFILE}" - echo '' - echo " *** Deleting ${COMPFILE}" - ;; - [iI]) - echo '' - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} installed successfully" - else - echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" - fi - ;; - [mM]) - case "${NO_INSTALLED}" in - '') - # interact with user to merge files - merge_loop - ;; - *) - echo '' - echo " *** There is no installed version of ${COMPFILE}" - echo '' - HANDLE_COMPFILE="NOT V" - ;; - esac # End of "No installed version of file but user selected merge" test - ;; - [vV]) - continue - ;; - '') - echo '' - echo " *** ${COMPFILE} will remain for your consideration" - ;; - *) - # invalid choice, show menu again. - echo "invalid choice: ${HANDLE_COMPFILE}" - echo '' - HANDLE_COMPFILE="NOT V" - continue - ;; - esac # End of "How to handle files that are different" - done - unset NO_INSTALLED - echo '' - case "${VERBOSE}" in - '') ;; - *) - sleep 3 - ;; - esac -} - -press_to_continue () { - local DISCARD - echo -n ' *** Press the [Enter] or [Return] key to continue ' - read DISCARD -} - -# Set the default path for the temporary root environment -# -TEMPROOT='/var/tmp/temproot' - -# Read /etc/mergemaster.rc first so the one in $HOME can override -# -if [ -r /etc/mergemaster.rc ]; then - . /etc/mergemaster.rc -fi - -# Read .mergemasterrc before command line so CLI can override -# -if [ -r "$HOME/.mergemasterrc" ]; then - . "$HOME/.mergemasterrc" -fi - -for var in "$@" ; do - case "$var" in - --run-updates*) - RUN_UPDATES=`echo ${var#--run-updates=} | tr [:upper:] [:lower:]` - ;; - *) - newopts="$newopts $var" - ;; - esac -done - -set -- $newopts -unset var newopts - -# Check the command line options -# -while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do - case "${COMMAND_LINE_ARGUMENT}" in - A) - ARCHSTRING='TARGET_ARCH='${OPTARG} - ;; - F) - FREEBSD_ID=yes - ;; - U) - AUTO_UPGRADE=yes - ;; - s) - STRICT=yes - unset DIFF_OPTIONS - ;; - c) - DIFF_FLAG='-c' - ;; - r) - RERUN=yes - ;; - v) - case "${AUTO_RUN}" in - '') VERBOSE=yes ;; - esac - ;; - a) - AUTO_RUN=yes - unset VERBOSE - ;; - h) - display_usage - display_help - exit 0 - ;; - i) - AUTO_INSTALL=yes - ;; - C) - COMP_CONFS=yes - ;; - P) - PRESERVE_FILES=yes - ;; - p) - PRE_WORLD=yes - unset COMP_CONFS - unset AUTO_RUN - ;; - m) - SOURCEDIR=${OPTARG} - ;; - t) - TEMPROOT=${OPTARG} - ;; - d) - TEMPROOT=${TEMPROOT}.`date +%m%d.%H.%M` - ;; - u) - NEW_UMASK=${OPTARG} - ;; - w) - SCREEN_WIDTH=${OPTARG} - ;; - D) - DESTDIR=${OPTARG} - ;; - *) - display_usage - exit 1 - ;; - esac -done - -if [ -n "$AUTO_RUN" ]; then - if [ -n "$FREEBSD_ID" -o -n "$AUTO_UPGRADE" -o -n "$AUTO_INSTALL" ]; then - echo '' - echo "*** You have included the -a option along with one or more options" - echo ' that indicate that you wish mergemaster to actually make updates' - echo ' (-F, -U, or -i), however these options are not compatible.' - echo ' Please read mergemaster(8) for more information.' - echo '' - exit 1 - fi -fi - -# Assign the location of the mtree database -# -MTREEDB=${MTREEDB:-${DESTDIR}/var/db} -MTREEFILE="${MTREEDB}/mergemaster.mtree" - -# Don't force the user to set this in the mergemaster rc file -if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then - PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` - mkdir -p ${PRESERVE_FILES_DIR} -fi - -# Check for the mtree database in DESTDIR -case "${AUTO_UPGRADE}" in -'') ;; # If the option is not set no need to run the test or warn the user -*) - if [ ! -s "${MTREEFILE}" ]; then - echo '' - echo "*** Unable to find mtree database (${MTREEFILE})." - echo " Skipping auto-upgrade on this run." - echo " It will be created for the next run when this one is complete." - echo '' - case "${AUTO_RUN}" in - '') - press_to_continue - ;; - esac - unset AUTO_UPGRADE - fi - ;; -esac - -if [ -e "${DESTDIR}/etc/fstab" ]; then - if grep -q nodev ${DESTDIR}/etc/fstab; then - echo '' - echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." - echo " This can prevent the filesystem from being mounted on reboot." - echo " Please update your fstab before continuing." - echo " See fstab(5) for more information." - echo '' - exit 1 - fi -fi - -echo '' - -# If the user has a pager defined, make sure we can run it -# -case "${DONT_CHECK_PAGER}" in -'') -check_pager () { - while ! type "${PAGER%% *}" >/dev/null; do - echo " *** Your PAGER environment variable specifies '${PAGER}', but" - echo " due to the limited PATH that I use for security reasons," - echo " I cannot execute it. So, what would you like to do?" - echo '' - echo " Use 'e' to exit mergemaster and fix your PAGER variable" - echo " Use 'l' to set PAGER to 'less' for this run" - echo " Use 'm' to use plain old 'more' as your PAGER for this run" - echo '' - echo " or you may type an absolute path to PAGER for this run" - echo '' - echo " Default is to use 'less' " - echo '' - echo -n "What should I do? [Use 'less'] " - read FIXPAGER - - case "${FIXPAGER}" in - [eE]) - exit 0 - ;; - [lL]|'') - PAGER=less - ;; - [mM]) - PAGER=more - ;; - /*) - PAGER="$FIXPAGER" - ;; - *) - echo '' - echo "invalid choice: ${FIXPAGER}" - esac - echo '' - done -} - if [ -n "${PAGER}" ]; then - check_pager - fi - ;; -esac - -# If user has a pager defined, or got assigned one above, use it. -# If not, use less. -# -PAGER=${PAGER:-less} - -if [ -n "${VERBOSE}" -a ! "${PAGER}" = "less" ]; then - echo " *** You have ${PAGER} defined as your pager so we will use that" - echo '' - sleep 3 -fi - -# Assign the diff flag once so we will not have to keep testing it -# -DIFF_FLAG=${DIFF_FLAG:--u} - -# Assign the source directory -# -SOURCEDIR=${SOURCEDIR:-/usr/src} -if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ - -f ${SOURCEDIR}/../Makefile.inc1 ]; then - echo " *** The source directory you specified (${SOURCEDIR})" - echo " will be reset to ${SOURCEDIR}/.." - echo '' - sleep 3 - SOURCEDIR=${SOURCEDIR}/.. -fi -if [ ! -f ${SOURCEDIR}/Makefile.inc1 ]; then - echo "*** ${SOURCEDIR} was not found." - if [ -f ./Makefile.inc1 ]; then - echo " Found Makefile.inc1 in the current directory." - echo -n " Would you like to set SOURCEDIR to $(pwd)? [no and exit] " - read SRCDOT - case "${SRCDOT}" in - [yY]*) - echo " *** Setting SOURCEDIR to $(pwd)" - SOURCEDIR=$(pwd) - ;; - *) - echo " **** No suitable ${SOURCEDIR} found, exiting" - exit 1 - ;; - esac - else - echo " **** No suitable ${SOURCEDIR} found, exiting" - exit 1 - fi -fi -SOURCEDIR=$(realpath "$SOURCEDIR") - -# Setup make to use system files from SOURCEDIR -MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk -DNO_FILEMON" -MM_MAKE="${MM_MAKE} -j$(/sbin/sysctl -n hw.ncpu)" - -# Check DESTDIR against the mergemaster mtree database to see what -# files the user changed from the reference files. -# -if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then - # Force FreeBSD 9 compatible output when available. - if mtree -F freebsd9 -c -p /var/empty/ > /dev/null 2>&1; then - MTREE_FLAVOR="-F freebsd9" - else - MTREE_FLAVOR= - fi - CHANGED=: - for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ - 2>/dev/null | awk '($2 == "changed") {print $1}'`; do - if [ -f "${DESTDIR}/$file" ]; then - CHANGED="${CHANGED}${DESTDIR}/${file}:" - fi - done - [ "$CHANGED" = ':' ] && unset CHANGED -fi - -# Check the width of the user's terminal -# -if [ -t 0 ]; then - w=`tput columns` - case "${w}" in - 0|'') ;; # No-op, since the input is not valid - *) - case "${SCREEN_WIDTH}" in - '') SCREEN_WIDTH="${w}" ;; - "${w}") ;; # No-op, since they are the same - *) - echo -n "*** You entered ${SCREEN_WIDTH} as your screen width, but stty " - echo "thinks it is ${w}." - echo '' - echo -n "What would you like to use? [${w}] " - read SCREEN_WIDTH - case "${SCREEN_WIDTH}" in - '') SCREEN_WIDTH="${w}" ;; - esac - ;; - esac - esac -fi - -# Define what $Id tag to look for to aid portability. -# -ID_TAG=FreeBSD - -delete_temproot () { - rm -rf "${TEMPROOT}" 2>/dev/null - chflags -R 0 "${TEMPROOT}" 2>/dev/null - rm -rf "${TEMPROOT}" || { echo "*** Unable to delete ${TEMPROOT}"; exit 1; } -} - -case "${RERUN}" in -'') - # Set up the loop to test for the existence of the - # temp root directory. - # - TEST_TEMP_ROOT=yes - while [ "${TEST_TEMP_ROOT}" = "yes" ]; do - if [ -d "${TEMPROOT}" ]; then - echo "*** The directory specified for the temporary root environment," - echo " ${TEMPROOT}, exists. This can be a security risk if untrusted" - echo " users have access to the system." - echo '' - case "${AUTO_RUN}" in - '') - echo " Use 'd' to delete the old ${TEMPROOT} and continue" - echo " Use 't' to select a new temporary root directory" - echo " Use 'e' to exit mergemaster" - echo '' - echo " Default is to use ${TEMPROOT} as is" - echo '' - echo -n "How should I deal with this? [Use the existing ${TEMPROOT}] " - read DELORNOT - - case "${DELORNOT}" in - [dD]) - echo '' - echo " *** Deleting the old ${TEMPROOT}" - echo '' - delete_temproot - unset TEST_TEMP_ROOT - ;; - [tT]) - echo " *** Enter new directory name for temporary root environment" - read TEMPROOT - ;; - [eE]) - exit 0 - ;; - '') - echo '' - echo " *** Leaving ${TEMPROOT} intact" - echo '' - unset TEST_TEMP_ROOT - ;; - *) - echo '' - echo "invalid choice: ${DELORNOT}" - echo '' - ;; - esac - ;; - *) - # If this is an auto-run, try a hopefully safe alternative then - # re-test anyway. - TEMPROOT=/var/tmp/temproot.`date +%m%d.%H.%M.%S` - ;; - esac - else - unset TEST_TEMP_ROOT - fi - done - - echo "*** Creating the temporary root environment in ${TEMPROOT}" - - if mkdir -p "${TEMPROOT}"; then - echo " *** ${TEMPROOT} ready for use" - fi - - if [ ! -d "${TEMPROOT}" ]; then - echo '' - echo " *** FATAL ERROR: Cannot create ${TEMPROOT}" - echo '' - exit 1 - fi - - echo " *** Creating and populating directory structure in ${TEMPROOT}" - echo '' - - case "${VERBOSE}" in - '') ;; - *) - press_to_continue - ;; - esac - - case "${PRE_WORLD}" in - '') - { cd ${SOURCEDIR} && - case "${DESTDIR}" in - '') ;; - *) - ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs >/dev/null - ;; - esac - ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs >/dev/null && - ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null && - ${MM_MAKE} everything SUBDIR_OVERRIDE=etc >/dev/null && - ${MM_MAKE} DESTDIR=${TEMPROOT} distribution >/dev/null;} || - { echo ''; - echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; - echo " the temproot environment"; - echo ''; - exit 1;} - ;; - *) - # Only set up files that are crucial to {build|install}world - { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && - install -p -o root -g wheel -m 0644 ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || - { echo ''; - echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; - echo ''; - exit 1;} - ;; - esac - - # Doing the inventory and removing files that we don't want to compare only - # makes sense if we are not doing a rerun, since we have no way of knowing - # what happened to the files during previous incarnations. - case "${VERBOSE}" in - '') ;; - *) - echo '' - echo ' *** The following files exist only in the installed version of' - echo " ${DESTDIR}/etc. In the vast majority of cases these files" - echo ' are necessary parts of the system and should not be deleted.' - echo ' However because these files are not updated by this process you' - echo ' might want to verify their status before rebooting your system.' - echo '' - press_to_continue - diff -qr ${DESTDIR}/etc ${TEMPROOT}/etc | grep "^Only in ${DESTDIR}/etc" | ${PAGER} - echo '' - press_to_continue - ;; - esac - - case "${IGNORE_MOTD}" in - '') ;; - *) - echo '' - echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." - echo " This option is deprecated in favor of the IGNORE_FILES option." - echo " Please update your rc file accordingly." - echo '' - exit 1 - ;; - esac - - # Avoid comparing the following user specified files - for file in ${IGNORE_FILES}; do - test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} - done - - # We really don't want to have to deal with files like login.conf.db, pwd.db, - # or spwd.db. Instead, we want to compare the text versions, and run *_mkdb. - # Prompt the user to do so below, as needed. - # - rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \ - ${TEMPROOT}/var/db/services.db - - # We only need to compare things like freebsd.cf once - find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null - - # Delete stuff we do not need to keep the mtree database small, - # and to make the actual comparison faster. - find ${TEMPROOT}/usr -type l -delete 2>/dev/null - find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null - find -d ${TEMPROOT} -type d -empty -mindepth 1 -delete 2>/dev/null - - # Build the mtree database in a temporary location. - case "${PRE_WORLD}" in - '') MTREENEW=`mktemp -t mergemaster.mtree` - mtree -nci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null - ;; - *) # We don't want to mess with the mtree database on a pre-world run or - # when re-scanning a previously-built tree. - ;; - esac - ;; # End of the "RERUN" test -esac - -# Get ready to start comparing files - -# Check umask if not specified on the command line, -# and we are not doing an autorun -# -if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then - USER_UMASK=`umask` - case "${USER_UMASK}" in - 0022|022) ;; - *) - echo '' - echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" - echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" - echo " a umask of 022. This umask allows world read permission when" - echo " the file's default permissions have it." - echo '' - echo " No world permissions can sometimes cause problems. A umask of" - echo " 022 will restore the default behavior, but is not mandatory." - echo " /etc/master.passwd is a special case. Its file permissions" - echo " will be 600 (rw-------) if installed." - echo '' - echo -n "What umask should I use? [${USER_UMASK}] " - read NEW_UMASK - - NEW_UMASK="${NEW_UMASK:-$USER_UMASK}" - ;; - esac - echo '' -fi - -CONFIRMED_UMASK=${NEW_UMASK:-0022} - -# -# Warn users who still have old rc files -# -for file in atm devfs diskless1 diskless2 network network6 pccard \ - serial syscons sysctl alpha amd64 i386; do - if [ -f "${DESTDIR}/etc/rc.${file}" ]; then - OLD_RC_PRESENT=1 - break - fi -done - -case "${OLD_RC_PRESENT}" in -1) - echo '' - echo " *** There are elements of the old rc system in ${DESTDIR}/etc/." - echo '' - echo ' While these scripts will not hurt anything, they are not' - echo ' functional on an up to date system, and can be removed.' - echo '' - - case "${AUTO_RUN}" in - '') - echo -n 'Move these files to /var/tmp/mergemaster/old_rc? [yes] ' - read MOVE_OLD_RC - - case "${MOVE_OLD_RC}" in - [nN]*) ;; - *) - mkdir -p /var/tmp/mergemaster/old_rc - for file in atm devfs diskless1 diskless2 network network6 pccard \ - serial syscons sysctl alpha amd64 i386; do - if [ -f "${DESTDIR}/etc/rc.${file}" ]; then - mv ${DESTDIR}/etc/rc.${file} /var/tmp/mergemaster/old_rc/ - fi - done - echo ' The files have been moved' - press_to_continue - ;; - esac - ;; - *) ;; - esac -esac - -# Use the umask/mode information to install the files -# Create directories as needed -# -install_error () { - echo "*** FATAL ERROR: Unable to install ${1} to ${2}" - echo '' - exit 1 -} - -do_install_and_rm () { - case "${PRESERVE_FILES}" in - [Yy][Ee][Ss]) - if [ -f "${3}/${2##*/}" ]; then - mkdir -p ${PRESERVE_FILES_DIR}/${2%/*} - cp ${3}/${2##*/} ${PRESERVE_FILES_DIR}/${2%/*} - fi - ;; - esac - - if [ ! -d "${3}/${2##*/}" ]; then - if install -m ${1} ${2} ${3}; then - unlink ${2} - else - install_error ${2} ${3} - fi - else - install_error ${2} ${3} - fi -} - -# 4095 = "obase=10;ibase=8;07777" | bc -find_mode () { - local OCTAL - OCTAL=$(( ~$(echo "obase=10; ibase=8; ${CONFIRMED_UMASK}" | bc) & 4095 & - $(echo "obase=10; ibase=8; $(stat -f "%OMp%OLp" ${1})" | bc) )) - printf "%04o\n" ${OCTAL} -} - -mm_install () { - local INSTALL_DIR - INSTALL_DIR=${1#.} - INSTALL_DIR=${INSTALL_DIR%/*} - - case "${INSTALL_DIR}" in - '') - INSTALL_DIR=/ - ;; - esac - - if [ -n "${DESTDIR}${INSTALL_DIR}" -a ! -d "${DESTDIR}${INSTALL_DIR}" ]; then - DIR_MODE=`find_mode "${TEMPROOT}/${INSTALL_DIR}"` - install -d -o root -g wheel -m "${DIR_MODE}" "${DESTDIR}${INSTALL_DIR}" || - install_error $1 ${DESTDIR}${INSTALL_DIR} - fi - - FILE_MODE=`find_mode "${1}"` - - if [ ! -x "${1}" ]; then - case "${1#.}" in - /etc/mail/aliases) - NEED_NEWALIASES=yes - ;; - /usr/share/certs/trusted/* | /usr/share/certs/untrusted/*) - NEED_CERTCTL=yes - ;; - /etc/login.conf) - NEED_CAP_MKDB=yes - ;; - /etc/services) - NEED_SERVICES_MKDB=yes - ;; - /etc/master.passwd) - do_install_and_rm 600 "${1}" "${DESTDIR}${INSTALL_DIR}" - NEED_PWD_MKDB=yes - DONT_INSTALL=yes - ;; - /.cshrc | /.profile) - local st_nlink - - # install will unlink the file before it installs the new one, - # so we have to restore/create the link afterwards. - # - st_nlink=0 # In case the file does not yet exist - eval $(stat -s ${DESTDIR}${COMPFILE#.} 2>/dev/null) - - do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" - - if [ -n "${AUTO_INSTALL}" -a $st_nlink -gt 1 ]; then - HANDLE_LINK=l - else - case "${LINK_EXPLAINED}" in - '') - echo " *** Historically BSD derived systems have had a" - echo " hard link from /.cshrc and /.profile to" - echo " their namesakes in /root. Please indicate" - echo " your preference below for bringing your" - echo " installed files up to date." - echo '' - LINK_EXPLAINED=yes - ;; - esac - - echo " Use 'd' to delete the temporary ${COMPFILE}" - echo " Use 'l' to delete the existing ${DESTDIR}/root/${COMPFILE##*/} and create the link" - echo '' - echo " Default is to leave the temporary file to deal with by hand" - echo '' - echo -n " How should I handle ${COMPFILE}? [Leave it to install later] " - read HANDLE_LINK - fi - - case "${HANDLE_LINK}" in - [dD]*) - rm "${COMPFILE}" - echo '' - echo " *** Deleting ${COMPFILE}" - ;; - [lL]*) - echo '' - unlink ${DESTDIR}/root/${COMPFILE##*/} - if ln ${DESTDIR}${COMPFILE#.} ${DESTDIR}/root/${COMPFILE##*/}; then - echo " *** Link from ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/} installed successfully" - else - echo " *** Error linking ${DESTDIR}${COMPFILE#.} to ${DESTDIR}/root/${COMPFILE##*/}" - echo " *** ${COMPFILE} will remain for your consideration" - fi - ;; - *) - echo " *** ${COMPFILE} will remain for your consideration" - ;; - esac - return - ;; - esac - - case "${DONT_INSTALL}" in - '') - do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" - ;; - *) - unset DONT_INSTALL - ;; - esac - else # File matched -x - do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" - fi - return $? -} - -if [ ! -d "${TEMPROOT}" ]; then - echo "*** FATAL ERROR: The temproot directory (${TEMPROOT})" - echo ' has disappeared!' - echo '' - exit 1 -fi - -echo '' -echo "*** Beginning comparison" -echo '' - -# Pre-world does not populate /etc/rc.d. -# It is very possible that a previous run would have deleted files in -# ${TEMPROOT}/etc/rc.d, thus creating a lot of false positives. -if [ -z "${PRE_WORLD}" -a -z "${RERUN}" ]; then - echo " *** Checking ${DESTDIR}/etc/rc.d for stale files" - echo '' - cd "${DESTDIR}/etc/rc.d" && - for file in *; do - if [ ! -e "${TEMPROOT}/etc/rc.d/${file}" ]; then - STALE_RC_FILES="${STALE_RC_FILES} ${file}" - fi - done - case "${STALE_RC_FILES}" in - ''|' *') - echo ' *** No stale files found' - ;; - *) - echo " *** The following files exist in ${DESTDIR}/etc/rc.d but not in" - echo " ${TEMPROOT}/etc/rc.d/:" - echo '' - echo "${STALE_RC_FILES}" - echo '' - echo ' The presence of stale files in this directory can cause the' - echo ' dreaded unpredictable results, and therefore it is highly' - echo ' recommended that you delete them.' - case "${AUTO_RUN}" in - '') - echo '' - echo -n ' *** Delete them now? [n] ' - read DELETE_STALE_RC_FILES - case "${DELETE_STALE_RC_FILES}" in - [yY]) - echo ' *** Deleting ... ' - rm ${STALE_RC_FILES} - echo ' done.' - ;; - *) - echo ' *** Files will not be deleted' - ;; - esac - sleep 2 - ;; - *) - if [ -n "${DELETE_STALE_RC_FILES}" ]; then - echo ' *** Deleting ... ' - rm ${STALE_RC_FILES} - echo ' done.' - fi - esac - ;; - esac - echo '' -fi - -cd "${TEMPROOT}" - -if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; then - . "${MM_PRE_COMPARE_SCRIPT}" -fi - -# Things that were files/directories/links in one version can sometimes -# change to something else in a newer version. So we need to explicitly -# test for this, and warn the user if what we find does not match. -# -for COMPFILE in `find . | sort` ; do - if [ -e "${DESTDIR}${COMPFILE#.}" ]; then - INSTALLED_TYPE=`stat -f '%HT' ${DESTDIR}${COMPFILE#.}` - else - continue - fi - TEMPROOT_TYPE=`stat -f '%HT' $COMPFILE` - - if [ ! "$TEMPROOT_TYPE" = "$INSTALLED_TYPE" ]; then - [ "$COMPFILE" = '.' ] && continue - TEMPROOT_TYPE=`echo $TEMPROOT_TYPE | tr [:upper:] [:lower:]` - INSTALLED_TYPE=`echo $INSTALLED_TYPE | tr [:upper:] [:lower:]` - - echo "*** The installed file ${DESTDIR}${COMPFILE#.} has the type \"$INSTALLED_TYPE\"" - echo " but the new version has the type \"$TEMPROOT_TYPE\"" - echo '' - echo " How would you like to handle this?" - echo '' - echo " Use 'r' to remove ${DESTDIR}${COMPFILE#.}" - case "$TEMPROOT_TYPE" in - 'symbolic link') - TARGET=`readlink $COMPFILE` - echo " and create a link to $TARGET in its place" ;; - *) echo " You will be able to install it as a \"$TEMPROOT_TYPE\"" ;; - esac - echo '' - echo " Use 'i' to ignore this" - echo '' - echo -n " How to proceed? [i] " - read ANSWER - case "$ANSWER" in - [rR]) case "${PRESERVE_FILES}" in - [Yy][Ee][Ss]) - mv ${DESTDIR}${COMPFILE#.} ${PRESERVE_FILES_DIR}/ || exit 1 ;; - *) rm -rf ${DESTDIR}${COMPFILE#.} ;; - esac - case "$TEMPROOT_TYPE" in - 'symbolic link') ln -sf $TARGET ${DESTDIR}${COMPFILE#.} ;; - esac ;; - *) echo '' - echo "*** See the man page about adding ${COMPFILE#.} to the list of IGNORE_FILES" - press_to_continue ;; - esac - echo '' - fi -done - -# Compare regular files -for COMPFILE in `find . -type f | sort`; do - - # First, check to see if the file exists in DESTDIR. If not, the - # diff_loop function knows how to handle it. - # - if [ ! -e "${DESTDIR}${COMPFILE#.}" ]; then - case "${AUTO_RUN}" in - '') - diff_loop - ;; - *) - case "${AUTO_INSTALL}" in - '') - # If this is an auto run, make it official - echo " *** ${COMPFILE} will remain for your consideration" - ;; - *) - diff_loop - ;; - esac - ;; - esac # Auto run test - continue - fi - - case "${STRICT}" in - '' | [Nn][Oo]) - # Compare $Id's first so if the file hasn't been modified - # local changes will be ignored. - # If the files have the same $Id, delete the one in temproot so the - # user will have less to wade through if files are left to merge by hand. - # - ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - - case "${ID2}" in - "${ID1}") - echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" - rm "${COMPFILE}" - ;; - esac - ;; - esac - - # If the file is still here either because the $Ids are different, the - # file doesn't have an $Id, or we're using STRICT mode; look at the diff. - # - if [ -f "${COMPFILE}" ]; then - - # Do an absolute diff first to see if the files are actually different. - # If they're not different, delete the one in temproot. - # - if diff -q ${DIFF_OPTIONS} "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ - /dev/null 2>&1; then - echo " *** Temp ${COMPFILE} and installed are the same, deleting" - rm "${COMPFILE}" - else - # Ok, the files are different, so show the user where they differ. - # Use user's choice of diff methods; and user's pager if they have one. - # Use less if not. - # Use unified diffs by default. Context diffs give me a headache. :) - # - # If the user chose the -F option, test for that before proceeding - # - if [ -n "$FREEBSD_ID" ]; then - if diff -q -I'[$]FreeBSD.*[$]' "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" > \ - /dev/null 2>&1; then - if mm_install "${COMPFILE}"; then - echo "*** Updated revision control Id for ${DESTDIR}${COMPFILE#.}" - else - echo "*** Problem installing ${COMPFILE}, it will remain to merge by hand later" - fi - continue - fi - fi - case "${AUTO_RUN}" in - '') - # prompt user to install/delete/merge changes - diff_loop - ;; - *) - # If this is an auto run, make it official - echo " *** ${COMPFILE} will remain for your consideration" - ;; - esac # Auto run test - fi # Yes, the files are different - fi # Yes, the file still remains to be checked -done # This is for the for way up there at the beginning of the comparison - -ask_answer_for_symbolic_link () { - HANDLE_COMPSYMLINK='' - while true; do - echo " Use 'd' to delete the temporary ${COMPSYMLINK}" - echo " Use 'i' to install the temporary ${COMPSYMLINK}" - echo '' - echo " Default is to leave the temporary symbolic link to deal with by hand" - echo '' - echo -n "How should I deal with this? [Leave it for later] " - read HANDLE_COMPSYMLINK - case ${HANDLE_COMPSYMLINK} in - ''|[dDiI]) - break - ;; - *) - echo "invalid choice: ${HANDLE_COMPSYMLINK}" - echo '' - HANDLE_COMPSYMLINK='' - ;; - esac - done -} - -install_symbolic_link () { - rm -f ${DESTDIR}${COMPSYMLINK#.} > /dev/null 2>&1 - if [ -L ${DESTDIR}${COMPSYMLINK#.} ]; then - return 1 - fi - cp -a ${COMPSYMLINK} ${DESTDIR}${COMPSYMLINK#.} > /dev/null 2>&1 - if [ ! -L ${DESTDIR}${COMPSYMLINK#.} ]; then - return 1 - fi - return 0 -} - -handle_symbolic_link () { - case ${HANDLE_COMPSYMLINK} in - [dD]) - rm ${COMPSYMLINK} - echo '' - echo " *** Deleting ${COMPSYMLINK}" - echo '' - return 1 - ;; - [iI]) - echo '' - if install_symbolic_link; then - rm ${COMPSYMLINK} - echo " *** ${COMPSYMLINK} installed successfully" - return 2 - else - echo " *** Problem installing ${COMPSYMLINK}, it will remain to merge by hand" - return 3 - fi - echo '' - ;; - '') - echo '' - echo " *** ${COMPSYMLINK} will remain for your consideration" - echo '' - return 0 - ;; - esac -} - -# Compare symbolic links -for COMPSYMLINK in `find . -type l | sort`; do - if [ ! -L "${DESTDIR}${COMPSYMLINK#.}" ]; then - if [ -n "${AUTO_RUN}" -a -z "${AUTO_INSTALL}" ]; then - echo " *** ${COMPSYMLINK} will remain for your consideration" - continue - else - echo '' - echo " *** There is no installed version of ${COMPSYMLINK}" - echo '' - if [ -n "${AUTO_INSTALL}" ]; then - HANDLE_COMPSYMLINK="i" - else - ask_answer_for_symbolic_link - fi - handle_symbolic_link - if [ -n "${AUTO_INSTALL}" -a $? -eq 2 ]; then - AUTO_INSTALLED_FILES="${AUTO_INSTALLED_FILES} ${DESTDIR}${COMPSYMLINK#.} -" - fi - fi - elif [ $(readlink ${COMPSYMLINK}) = $(readlink ${DESTDIR}${COMPSYMLINK#.}) ]; then - echo " *** Temp ${COMPSYMLINK} and installed are the same, deleting" - rm ${COMPSYMLINK} - else - if [ -n "${AUTO_RUN}" -a -z "${AUTO_UPGRADE}" ]; then - echo " *** ${COMPSYMLINK} will remain for your consideration" - continue - else - echo '' - echo " *** Target of temp symbolic link is different from that of installed one" - echo " Temp (${COMPSYMLINK}): $(readlink ${COMPSYMLINK})" - echo " Installed (${DESTDIR}${COMPSYMLINK#.})): $(readlink ${DESTDIR}${COMPSYMLINK#.})" - echo '' - if [ -n "${AUTO_UPGRADE}" ]; then - HANDLE_COMPSYMLINK="i" - else - ask_answer_for_symbolic_link - fi - handle_symbolic_link - if [ -n "${AUTO_UPGRADE}" -a $? -eq 2 ]; then - AUTO_UPGRADED_FILES="${AUTO_UPGRADED_FILES} ${DESTDIR}${COMPSYMLINK#.} -" - fi - fi - fi -done - -echo '' -echo "*** Comparison complete" - -if [ -s "${MTREENEW}" ]; then - echo "*** Saving mtree database for future upgrades" - test -e "${MTREEFILE}" && unlink ${MTREEFILE} - mv ${MTREENEW} ${MTREEFILE} -fi - -echo '' - -TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 -or -type l 2>/dev/null` -if [ -n "${TEST_FOR_FILES}" ]; then - echo "*** Files that remain for you to merge by hand:" - find "${TEMPROOT}" -type f -size +0 -or -type l | sort - echo '' - - case "${AUTO_RUN}" in - '') - echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " - read DEL_TEMPROOT - case "${DEL_TEMPROOT}" in - [yY]*) - delete_temproot - ;; - *) - echo " *** ${TEMPROOT} will remain" - ;; - esac - ;; - *) ;; - esac -else - echo "*** ${TEMPROOT} is empty, deleting" - delete_temproot -fi - -case "${AUTO_INSTALLED_FILES}" in -'') ;; -*) - case "${AUTO_RUN}" in - '') - ( - echo '' - echo '*** You chose the automatic install option for files that did not' - echo ' exist on your system. The following were installed for you:' - echo "${AUTO_INSTALLED_FILES}" - ) | ${PAGER} - ;; - *) - echo '' - echo '*** You chose the automatic install option for files that did not' - echo ' exist on your system. The following were installed for you:' - echo "${AUTO_INSTALLED_FILES}" - ;; - esac - ;; -esac - -case "${AUTO_UPGRADED_FILES}" in -'') ;; -*) - case "${AUTO_RUN}" in - '') - ( - echo '' - echo '*** You chose the automatic upgrade option for files that you did' - echo ' not alter on your system. The following were upgraded for you:' - echo "${AUTO_UPGRADED_FILES}" - ) | ${PAGER} - ;; - *) - echo '' - echo '*** You chose the automatic upgrade option for files that you did' - echo ' not alter on your system. The following were upgraded for you:' - echo "${AUTO_UPGRADED_FILES}" - ;; - esac - ;; -esac - -run_it_now () { - [ -n "$AUTO_RUN" ] && return - - local answer - - echo '' - while : ; do - if [ "$RUN_UPDATES" = always ]; then - answer=y - elif [ "$RUN_UPDATES" = never ]; then - answer=n - else - echo -n ' Would you like to run it now? y or n [n] ' - read answer - fi - - case "$answer" in - y) - echo " Running ${1}" - echo '' - eval "${1}" - return - ;; - ''|n) - if [ ! "$RUN_UPDATES" = never ]; then - echo '' - echo " *** Cancelled" - echo '' - fi - echo " Make sure to run ${1} yourself" - return - ;; - *) - echo '' - echo " *** Sorry, I do not understand your answer (${answer})" - echo '' - esac - done -} - -case "${NEED_NEWALIASES}" in -'') ;; -*) - echo '' - if [ -n "${DESTDIR}" ]; then - echo "*** You installed a new aliases file into ${DESTDIR}/etc/mail, but" - echo " the newaliases command is limited to the directories configured" - echo " in sendmail.cf. Make sure to create your aliases database by" - echo " hand when your sendmail configuration is done." - else - echo "*** You installed a new aliases file, so make sure that you run" - echo " '/usr/bin/newaliases' to rebuild your aliases database" - run_it_now '/usr/bin/newaliases' - fi - ;; -esac - -case "${NEED_CAP_MKDB}" in -'') ;; -*) - echo '' - echo "*** You installed a login.conf file, so make sure that you run" - echo " '/usr/bin/cap_mkdb ${DESTDIR}/etc/login.conf'" - echo " to rebuild your login.conf database" - run_it_now "/usr/bin/cap_mkdb ${DESTDIR}/etc/login.conf" - ;; -esac - -case "${NEED_SERVICES_MKDB}" in -'') ;; -*) - echo '' - echo "*** You installed a services file, so make sure that you run" - echo " '/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services'" - echo " to rebuild your services database" - run_it_now "/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services" - ;; -esac - -case "${NEED_PWD_MKDB}" in -'') ;; -*) - echo '' - echo "*** You installed a new master.passwd file, so make sure that you run" - if [ -n "${DESTDIR}" ]; then - echo " '/usr/sbin/pwd_mkdb -d ${DESTDIR}/etc -p ${DESTDIR}/etc/master.passwd'" - echo " to rebuild your password files" - run_it_now "/usr/sbin/pwd_mkdb -d ${DESTDIR}/etc -p ${DESTDIR}/etc/master.passwd" - else - echo " '/usr/sbin/pwd_mkdb -p /etc/master.passwd'" - echo " to rebuild your password files" - run_it_now '/usr/sbin/pwd_mkdb -p /etc/master.passwd' - fi - ;; -esac - -case "${NEED_CERTCTL}" in -'') ;; -*) - echo '' - echo "*** You installed files in /etc/ssl/certs, so make sure that you run" - if [ -n "${DESTDIR}" ]; then - echo " 'env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash'" - echo " to rebuild your certificate authority database" - run_it_now "env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash" - else - echo " '/usr/sbin/certctl rehash'" - echo " to rebuild your certificate authority database" - run_it_now "/usr/sbin/certctl rehash" - fi - ;; -esac - -if [ -e "${DESTDIR}/etc/localtime" -a ! -L "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC - echo '' - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" - if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then - echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - tzsetup $tzs_args -r - else - echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." - echo ' You should run tzsetup' - run_it_now "tzsetup $tzs_args" - fi -fi - -echo '' - -if [ -r "${MM_EXIT_SCRIPT}" ]; then - . "${MM_EXIT_SCRIPT}" -fi - -case "${COMP_CONFS}" in -'') ;; -*) - . ${DESTDIR}/etc/defaults/rc.conf - - (echo '' - echo "*** Comparing conf files: ${rc_conf_files}" - - for CONF_FILE in ${rc_conf_files}; do - if [ -r "${DESTDIR}${CONF_FILE}" ]; then - echo '' - echo "*** From ${DESTDIR}${CONF_FILE}" - echo "*** From ${DESTDIR}/etc/defaults/rc.conf" - - for RC_CONF_VAR in `grep -i ^[a-z] ${DESTDIR}${CONF_FILE} | - cut -d '=' -f 1`; do - echo '' - grep -w ^${RC_CONF_VAR} ${DESTDIR}${CONF_FILE} - grep -w ^${RC_CONF_VAR} ${DESTDIR}/etc/defaults/rc.conf || - echo ' * No default variable with this name' - done - fi - done) | ${PAGER} - echo '' - ;; -esac - -if [ -n "${PRESERVE_FILES}" ]; then - find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null - rmdir $PRESERVE_FILES_DIR 2>/dev/null -fi - -exit 0 - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Copyright (c) 1998-2012 Douglas Barton -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. From afd67a1677999b0f9d82d29bfd7c767f665e76e8 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 15 Jul 2024 21:44:11 -0400 Subject: [PATCH 093/151] etcupdate(8): improve phrasing Reported by: igor(1) --- usr.sbin/etcupdate/etcupdate.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index 22d3d91bb6eb..bf7ddb792907 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -485,7 +485,7 @@ as additional parameters to when building a .Dq current tree. -This can be used for to set the +This can be used to set the .Dv TARGET or .Dv TARGET_ARCH From f2ebbe46f6c04a4ad37bb6ec44d22a2a063a4430 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 16 Jul 2024 16:27:54 -0700 Subject: [PATCH 094/151] Linux 6.9 compat: META (#16358) Update the META file to reflect compatibility with the 6.9 kernel. Signed-off-by: Tony Hutter Reviewed-by: Brian Behlendorf --- META | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META b/META index 19a796050f5b..7aac80c541ba 100644 --- a/META +++ b/META @@ -6,5 +6,5 @@ Release: 1 Release-Tags: relext License: CDDL Author: OpenZFS -Linux-Maximum: 6.8 +Linux-Maximum: 6.9 Linux-Minimum: 3.10 From 41902c8e6da1c4dc5c4c12ce041acb4aba188e6f Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 16 Jul 2024 18:27:29 -0600 Subject: [PATCH 095/151] Use kmap_local_page instead of kmap_atomic (#16329) Changed zfs_k(un)map_atomic to zfs_k(un)map_local Signed-off-by: Jason Lee Reviewed-by: Alexander Motin Reviewed-by: Brian Atkinson --- config/kernel-kmap-local-page.m4 | 23 +++++++++++++++++++++ config/kernel.m4 | 2 ++ include/os/linux/kernel/linux/kmap_compat.h | 10 +++++++-- module/os/linux/zfs/abd_os.c | 8 +++---- module/os/linux/zfs/zfs_uio.c | 8 +++---- 5 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 config/kernel-kmap-local-page.m4 diff --git a/config/kernel-kmap-local-page.m4 b/config/kernel-kmap-local-page.m4 new file mode 100644 index 000000000000..1990914d493d --- /dev/null +++ b/config/kernel-kmap-local-page.m4 @@ -0,0 +1,23 @@ +dnl # +dnl # 5.11 API change +dnl # kmap_atomic() was deprecated in favor of kmap_local_page() +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE], [ + ZFS_LINUX_TEST_SRC([kmap_local_page], [ + #include + ],[ + struct page page; + kmap_local_page(&page); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_KMAP_LOCAL_PAGE], [ + AC_MSG_CHECKING([whether kmap_local_page exists]) + ZFS_LINUX_TEST_RESULT([kmap_local_page], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMAP_LOCAL_PAGE, 1, + [kernel has kmap_local_page]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index b51477b6a951..f282ccd8b9d7 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -125,6 +125,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_SRC_VFS_FILE_OPERATIONS_EXTEND ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS + ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT @@ -276,6 +277,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_VFS_FILE_OPERATIONS_EXTEND ZFS_AC_KERNEL_KMAP_ATOMIC_ARGS + ZFS_AC_KERNEL_KMAP_LOCAL_PAGE ZFS_AC_KERNEL_FOLLOW_DOWN_ONE ZFS_AC_KERNEL_MAKE_REQUEST_FN ZFS_AC_KERNEL_GENERIC_IO_ACCT diff --git a/include/os/linux/kernel/linux/kmap_compat.h b/include/os/linux/kernel/linux/kmap_compat.h index 7f9c00af802b..fb59c5f0267c 100644 --- a/include/os/linux/kernel/linux/kmap_compat.h +++ b/include/os/linux/kernel/linux/kmap_compat.h @@ -29,9 +29,15 @@ #include #include +#ifdef HAVE_KMAP_LOCAL_PAGE +/* 5.11 API change */ +#define zfs_kmap_local(page) kmap_local_page(page) +#define zfs_kunmap_local(addr) kunmap_local(addr) +#else /* 2.6.37 API change */ -#define zfs_kmap_atomic(page) kmap_atomic(page) -#define zfs_kunmap_atomic(addr) kunmap_atomic(addr) +#define zfs_kmap_local(page) kmap_atomic(page) +#define zfs_kunmap_local(addr) kunmap_atomic(addr) +#endif /* 5.0 API change - no more 'type' argument for access_ok() */ #ifdef HAVE_ACCESS_OK_TYPE diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c index cee7410c8833..4bf9eaf771b5 100644 --- a/module/os/linux/zfs/abd_os.c +++ b/module/os/linux/zfs/abd_os.c @@ -526,8 +526,8 @@ abd_alloc_zero_scatter(void) #define PAGE_SHIFT (highbit64(PAGESIZE)-1) #endif -#define zfs_kmap_atomic(chunk) ((void *)chunk) -#define zfs_kunmap_atomic(addr) do { (void)(addr); } while (0) +#define zfs_kmap_local(chunk) ((void *)chunk) +#define zfs_kunmap_local(addr) do { (void)(addr); } while (0) #define local_irq_save(flags) do { (void)(flags); } while (0) #define local_irq_restore(flags) do { (void)(flags); } while (0) #define nth_page(pg, i) \ @@ -980,7 +980,7 @@ abd_iter_map(struct abd_iter *aiter) aiter->iter_mapsize = MIN(aiter->iter_sg->length - offset, aiter->iter_abd->abd_size - aiter->iter_pos); - paddr = zfs_kmap_atomic(sg_page(aiter->iter_sg)); + paddr = zfs_kmap_local(sg_page(aiter->iter_sg)); } aiter->iter_mapaddr = (char *)paddr + offset; @@ -999,7 +999,7 @@ abd_iter_unmap(struct abd_iter *aiter) if (!abd_is_linear(aiter->iter_abd)) { /* LINTED E_FUNC_SET_NOT_USED */ - zfs_kunmap_atomic(aiter->iter_mapaddr - aiter->iter_offset); + zfs_kunmap_local(aiter->iter_mapaddr - aiter->iter_offset); } ASSERT3P(aiter->iter_mapaddr, !=, NULL); diff --git a/module/os/linux/zfs/zfs_uio.c b/module/os/linux/zfs/zfs_uio.c index c2ed67c438c6..a99a1ba88256 100644 --- a/module/os/linux/zfs/zfs_uio.c +++ b/module/os/linux/zfs/zfs_uio.c @@ -136,7 +136,7 @@ zfs_uiomove_bvec_impl(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) void *paddr; cnt = MIN(bv->bv_len - skip, n); - paddr = zfs_kmap_atomic(bv->bv_page); + paddr = zfs_kmap_local(bv->bv_page); if (rw == UIO_READ) { /* Copy from buffer 'p' to the bvec data */ memcpy(paddr + bv->bv_offset + skip, p, cnt); @@ -144,7 +144,7 @@ zfs_uiomove_bvec_impl(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) /* Copy from bvec data to buffer 'p' */ memcpy(p, paddr + bv->bv_offset + skip, cnt); } - zfs_kunmap_atomic(paddr); + zfs_kunmap_local(paddr); skip += cnt; if (skip == bv->bv_len) { @@ -168,7 +168,7 @@ zfs_copy_bvec(void *p, size_t skip, size_t cnt, zfs_uio_rw_t rw, { void *paddr; - paddr = zfs_kmap_atomic(bv->bv_page); + paddr = zfs_kmap_local(bv->bv_page); if (rw == UIO_READ) { /* Copy from buffer 'p' to the bvec data */ memcpy(paddr + bv->bv_offset + skip, p, cnt); @@ -176,7 +176,7 @@ zfs_copy_bvec(void *p, size_t skip, size_t cnt, zfs_uio_rw_t rw, /* Copy from bvec data to buffer 'p' */ memcpy(p, paddr + bv->bv_offset + skip, cnt); } - zfs_kunmap_atomic(paddr); + zfs_kunmap_local(paddr); } /* From d909f06b907d53ac4cbf9444ae75ca278900b0f3 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Tue, 16 Jul 2024 18:58:59 +0200 Subject: [PATCH 096/151] pf: convert DIOCADDADDR to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 52 +++++++++++++++++ lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl.c | 2 +- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf_ioctl.c | 117 ++++++++++++++++++++------------------ sys/netpfil/pf/pf_nl.c | 48 ++++++++++++++++ sys/netpfil/pf/pf_nl.h | 20 +++++++ 7 files changed, 185 insertions(+), 56 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index b9fba232b8ca..398595c4715f 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1105,6 +1105,19 @@ snl_add_msg_attr_addr_wrap(struct snl_writer *nw, uint32_t type, const struct pf snl_end_attr_nested(nw, off); } +static void +snl_add_msg_attr_pool_addr(struct snl_writer *nw, uint32_t type, const struct pf_pooladdr *pa) +{ + int off; + + off = snl_add_msg_attr_nested(nw, type); + + snl_add_msg_attr_string(nw, PF_PA_IFNAME, pa->ifname); + snl_add_msg_attr_addr_wrap(nw, PF_PA_ADDR, &pa->addr); + + snl_end_attr_nested(nw, off); +} + static void snl_add_msg_attr_rule_addr(struct snl_writer *nw, uint32_t type, const struct pf_rule_addr *addr) { @@ -2737,3 +2750,42 @@ pfctl_begin_addrs(struct pfctl_handle *h, uint32_t *ticket) return (e.error); } +int +pfctl_add_addr(struct pfctl_handle *h, const struct pfioc_pooladdr *pa) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_ADD_ADDR); + + snl_add_msg_attr_u32(&nw, PF_AA_ACTION, pa->action); + snl_add_msg_attr_u32(&nw, PF_AA_TICKET, pa->ticket); + snl_add_msg_attr_u32(&nw, PF_AA_NR, pa->nr); + snl_add_msg_attr_u32(&nw, PF_AA_R_NUM, pa->r_num); + snl_add_msg_attr_u8(&nw, PF_AA_R_ACTION, pa->r_action); + snl_add_msg_attr_u8(&nw, PF_AA_R_LAST, pa->r_last); + snl_add_msg_attr_u8(&nw, PF_AA_AF, pa->af); + snl_add_msg_attr_string(&nw, PF_AA_ANCHOR, pa->anchor); + snl_add_msg_attr_pool_addr(&nw, PF_AA_ADDR, &pa->addr); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (! snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + } + + return (e.error); +} diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index eebc97c52565..dd09b061efea 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -498,5 +498,6 @@ int pfctl_get_timeout(struct pfctl_handle *h, uint32_t timeout, uint32_t *second int pfctl_set_limit(struct pfctl_handle *h, const int index, const uint limit); int pfctl_get_limit(struct pfctl_handle *h, const int index, uint *limit); int pfctl_begin_addrs(struct pfctl_handle *h, uint32_t *ticket); +int pfctl_add_addr(struct pfctl_handle *h, const struct pfioc_pooladdr *pa); #endif diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 450c64785b9c..a49e82809f9e 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1727,7 +1727,7 @@ pfctl_add_pool(struct pfctl *pf, struct pfctl_pool *p, sa_family_t af) TAILQ_FOREACH(pa, &p->list, entries) { memcpy(&pf->paddr.addr, pa, sizeof(struct pf_pooladdr)); if ((pf->opts & PF_OPT_NOACTION) == 0) { - if (ioctl(pf->dev, DIOCADDADDR, &pf->paddr)) + if (pfctl_add_addr(pf->h, &pf->paddr) != 0) err(1, "DIOCADDADDR"); } } diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 0b90600a69ae..aa6dd52a7e69 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2525,6 +2525,7 @@ int pf_ioctl_set_timeout(int, int, int *); int pf_ioctl_get_limit(int, unsigned int *); int pf_ioctl_set_limit(int, unsigned int, unsigned int *); int pf_ioctl_begin_addrs(uint32_t *); +int pf_ioctl_add_addr(struct pfioc_pooladdr *); void pf_krule_free(struct pf_krule *); void pf_krule_clear_counters(struct pf_krule *); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 2cb6923e1e69..2df6bcd30533 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2528,6 +2528,67 @@ pf_ioctl_begin_addrs(uint32_t *ticket) return (0); } +int +pf_ioctl_add_addr(struct pfioc_pooladdr *pp) +{ + struct pf_kpooladdr *pa = NULL; + struct pfi_kkif *kif = NULL; + int error; + +#ifndef INET + if (pp->af == AF_INET) + return (EAFNOSUPPORT); +#endif /* INET */ +#ifndef INET6 + if (pp->af == AF_INET6) + return (EAFNOSUPPORT); +#endif /* INET6 */ + + if (pp->addr.addr.type != PF_ADDR_ADDRMASK && + pp->addr.addr.type != PF_ADDR_DYNIFTL && + pp->addr.addr.type != PF_ADDR_TABLE) + return (EINVAL); + + if (pp->addr.addr.p.dyn != NULL) + return (EINVAL); + + pa = malloc(sizeof(*pa), M_PFRULE, M_WAITOK); + error = pf_pooladdr_to_kpooladdr(&pp->addr, pa); + if (error != 0) + goto out; + if (pa->ifname[0]) + kif = pf_kkif_create(M_WAITOK); + PF_RULES_WLOCK(); + if (pp->ticket != V_ticket_pabuf) { + PF_RULES_WUNLOCK(); + if (pa->ifname[0]) + pf_kkif_free(kif); + error = EBUSY; + goto out; + } + if (pa->ifname[0]) { + pa->kif = pfi_kkif_attach(kif, pa->ifname); + kif = NULL; + pfi_kkif_ref(pa->kif); + } else + pa->kif = NULL; + if (pa->addr.type == PF_ADDR_DYNIFTL && ((error = + pfi_dynaddr_setup(&pa->addr, pp->af)) != 0)) { + if (pa->ifname[0]) + pfi_kkif_unref(pa->kif); + PF_RULES_WUNLOCK(); + goto out; + } + TAILQ_INSERT_TAIL(&V_pf_pabuf, pa, entries); + PF_RULES_WUNLOCK(); + + return (0); + +out: + free(pa, M_PFRULE); + return (error); +} + static int pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { @@ -4199,62 +4260,8 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCADDADDR: { struct pfioc_pooladdr *pp = (struct pfioc_pooladdr *)addr; - struct pf_kpooladdr *pa; - struct pfi_kkif *kif = NULL; -#ifndef INET - if (pp->af == AF_INET) { - error = EAFNOSUPPORT; - break; - } -#endif /* INET */ -#ifndef INET6 - if (pp->af == AF_INET6) { - error = EAFNOSUPPORT; - break; - } -#endif /* INET6 */ - if (pp->addr.addr.type != PF_ADDR_ADDRMASK && - pp->addr.addr.type != PF_ADDR_DYNIFTL && - pp->addr.addr.type != PF_ADDR_TABLE) { - error = EINVAL; - break; - } - if (pp->addr.addr.p.dyn != NULL) { - error = EINVAL; - break; - } - pa = malloc(sizeof(*pa), M_PFRULE, M_WAITOK); - error = pf_pooladdr_to_kpooladdr(&pp->addr, pa); - if (error != 0) - break; - if (pa->ifname[0]) - kif = pf_kkif_create(M_WAITOK); - PF_RULES_WLOCK(); - if (pp->ticket != V_ticket_pabuf) { - PF_RULES_WUNLOCK(); - if (pa->ifname[0]) - pf_kkif_free(kif); - free(pa, M_PFRULE); - error = EBUSY; - break; - } - if (pa->ifname[0]) { - pa->kif = pfi_kkif_attach(kif, pa->ifname); - kif = NULL; - pfi_kkif_ref(pa->kif); - } else - pa->kif = NULL; - if (pa->addr.type == PF_ADDR_DYNIFTL && ((error = - pfi_dynaddr_setup(&pa->addr, pp->af)) != 0)) { - if (pa->ifname[0]) - pfi_kkif_unref(pa->kif); - PF_RULES_WUNLOCK(); - free(pa, M_PFRULE); - break; - } - TAILQ_INSERT_TAIL(&V_pf_pabuf, pa, entries); - PF_RULES_WUNLOCK(); + error = pf_ioctl_add_addr(pp); break; } diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 401baddde948..e855815dd73b 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1509,6 +1509,45 @@ pf_handle_begin_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) return (0); } +#define _OUT(_field) offsetof(struct pf_pooladdr, _field) +static const struct nlattr_parser nla_p_pool_addr[] = { + { .type = PF_PA_ADDR, .off = _OUT(addr), .arg = &addr_wrap_parser, .cb = nlattr_get_nested }, + { .type = PF_PA_IFNAME, .off = _OUT(ifname), .arg = (void *)IFNAMSIZ, .cb = nlattr_get_chara }, +}; +NL_DECLARE_ATTR_PARSER(pool_addr_parser, nla_p_pool_addr); +#undef _OUT + +#define _OUT(_field) offsetof(struct pfioc_pooladdr, _field) +static const struct nlattr_parser nla_p_add_addr[] = { + { .type = PF_AA_ACTION, .off = _OUT(action), .cb = nlattr_get_uint32 }, + { .type = PF_AA_TICKET, .off = _OUT(ticket), .cb = nlattr_get_uint32 }, + { .type = PF_AA_NR, .off = _OUT(nr), .cb = nlattr_get_uint32 }, + { .type = PF_AA_R_NUM, .off = _OUT(r_num), .cb = nlattr_get_uint32 }, + { .type = PF_AA_R_ACTION, .off = _OUT(r_action), .cb = nlattr_get_uint8 }, + { .type = PF_AA_R_LAST, .off = _OUT(r_last), .cb = nlattr_get_uint8 }, + { .type = PF_AA_AF, .off = _OUT(af), .cb = nlattr_get_uint8 }, + { .type = PF_AA_ANCHOR, .off = _OUT(anchor), .arg = (void *)MAXPATHLEN, .cb = nlattr_get_chara }, + { .type = PF_AA_ADDR, .off = _OUT(addr), .arg = &pool_addr_parser, .cb = nlattr_get_nested }, +}; +static const struct nlfield_parser nlf_p_add_addr[] = {}; +#undef _OUT +NL_DECLARE_PARSER(add_addr_parser, struct genlmsghdr, nlf_p_add_addr, nla_p_add_addr); + +static int +pf_handle_add_addr(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct pfioc_pooladdr attrs = { 0 }; + int error; + + error = nl_parse_nlmsg(hdr, &add_addr_parser, npt, &attrs); + if (error != 0) + return (error); + + error = pf_ioctl_add_addr(&attrs); + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -1519,6 +1558,8 @@ static const struct nlhdr_parser *all_parsers[] = { &set_debug_parser, &set_timeout_parser, &set_limit_parser, + &pool_addr_parser, + &add_addr_parser, }; static int family_id; @@ -1657,6 +1698,13 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_ADD_ADDR, + .cmd_name = "ADD_ADDR", + .cmd_cb = pf_handle_add_addr, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index d50b5a1e9d43..2459fdc15a63 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -55,6 +55,7 @@ enum { PFNL_CMD_SET_LIMIT = 17, PFNL_CMD_GET_LIMIT = 18, PFNL_CMD_BEGIN_ADDRS = 19, + PFNL_CMD_ADD_ADDR = 20, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -356,6 +357,25 @@ enum pf_begin_addrs_types_t { PF_BA_TICKET = 1, /* u32 */ }; +enum pf_pool_addr_types_t { + PF_PA_UNSPEC, + PF_PA_ADDR = 1, /* nested, pf_addr_wrap */ + PF_PA_IFNAME = 2, /* string */ +}; + +enum pf_add_addr_types_t { + PF_AA_UNSPEC, + PF_AA_ACTION = 1, /* u32 */ + PF_AA_TICKET = 2, /* u32 */ + PF_AA_NR = 3, /* u32 */ + PF_AA_R_NUM = 4, /* u32 */ + PF_AA_R_ACTION = 5, /* u8 */ + PF_AA_R_LAST = 6, /* u8 */ + PF_AA_AF = 7, /* u8 */ + PF_AA_ANCHOR = 8, /* string */ + PF_AA_ADDR = 9, /* nested, pf_pooladdr */ +}; + #ifdef _KERNEL void pf_nl_register(void); From e21e8c918086ad130a3caa5116efc64e86f4574f Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Wed, 17 Jul 2024 13:11:25 +0100 Subject: [PATCH 097/151] tools/build: Unbreak cross build by providing stub ssp/ssp.h We build arc4random.c on non-FreeBSD, which now wants the header for __ssp_real. Fixes: d0b7445904f5 ("include: ssp: fortify ") --- .../cross-build/include/common/ssp/ssp.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tools/build/cross-build/include/common/ssp/ssp.h diff --git a/tools/build/cross-build/include/common/ssp/ssp.h b/tools/build/cross-build/include/common/ssp/ssp.h new file mode 100644 index 000000000000..2d8b43235baf --- /dev/null +++ b/tools/build/cross-build/include/common/ssp/ssp.h @@ -0,0 +1,34 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Jessica Clarke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _SSP_SSP_H_ +#define _SSP_SSP_H_ + +#define __ssp_real_(fun) fun +#define __ssp_real(fun) __ssp_real_(fun) + +#endif From ac0c8c1186f7a45f106b16ef57e303476ce6741a Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Wed, 17 Jul 2024 13:55:49 +0100 Subject: [PATCH 098/151] dts: Fix arm/qcom-ipq4018-rt-ac58u.dts for recent device-tree versions The included file has recently moved to a subdirectory. This fixes building arm.armv7 ASUS_AC1300 (marked NO_UNIVERSE). Fixes: f126890ac538 ("Import device-tree files from Linux 6.5") --- sys/dts/arm/qcom-ipq4018-rt-ac58u.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts b/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts index 7db535b881dc..baaa4c2e9d5f 100644 --- a/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts +++ b/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "qcom-ipq4019.dtsi" +#include "qcom/qcom-ipq4019.dtsi" #include "qcom-ipq4019-ethernet.dtsi" #include From c24e5fcca9c2f2cacaf3d7883f0ecb4d5a4747cc Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Wed, 17 Jul 2024 13:59:13 +0100 Subject: [PATCH 099/151] mvs: Fix to use rman_get_rid rather than non-existent rid argument This got missed as it's not built in a normal tinderbox build. This fixes building arm.armv7 ARMADAXP (marked NO_UNIVERSE). Fixes: 9dbf5b0e6876 ("new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE") --- sys/dev/mvs/mvs_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c index 00a868140a0e..b48321b04955 100644 --- a/sys/dev/mvs/mvs_soc.c +++ b/sys/dev/mvs/mvs_soc.c @@ -372,7 +372,7 @@ mvs_release_resource(device_t dev, device_t child, struct resource *r) rman_release_resource(r); return (0); case SYS_RES_IRQ: - if (rid != ATA_IRQ_RID) + if (rman_get_rid(r) != ATA_IRQ_RID) return ENOENT; return (0); } From 271f146955641857c93705b5b1916b8004e5623c Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Wed, 17 Jul 2024 15:52:13 +0200 Subject: [PATCH 100/151] pf: vnet-ify pf_hashsize, pf_hashmask, pf_srchashsize and V_pf_srchashmask These variables are tunables, so in principle they never change at runtime. That would mean they don't need to be tracked per-vnet. However, they both can be decreased (back to their default values) if the memory allocations for their respective tables fail, and these allocations are per-vnet. That is, it's possible for a few vnets to be started and have the tuned size for the hash and srchash tables only to have later vnets fail the initial allocation and fall back to smaller allocations. That would confuse the previously created vnets (because their actual table size and size/mask variables would no longer match). Avoid this by turning these into per-vnet variables. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 8 +++-- sys/netpfil/pf/if_pfsync.c | 12 ++++--- sys/netpfil/pf/pf.c | 74 +++++++++++++++++++------------------- sys/netpfil/pf/pf_ioctl.c | 22 ++++++------ sys/netpfil/pf/pf_nl.c | 4 +-- 5 files changed, 64 insertions(+), 56 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index aa6dd52a7e69..b38a1bebcc1f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2125,8 +2125,10 @@ struct pf_idhash { }; extern u_long pf_ioctl_maxcount; -extern u_long pf_hashmask; -extern u_long pf_srchashmask; +VNET_DECLARE(u_long, pf_hashmask); +#define V_pf_hashmask VNET(pf_hashmask) +VNET_DECLARE(u_long, pf_srchashmask); +#define V_pf_srchashmask VNET(pf_srchashmask) #define PF_HASHSIZ (131072) #define PF_SRCHASHSIZ (PF_HASHSIZ/4) VNET_DECLARE(struct pf_keyhash *, pf_keyhash); @@ -2136,7 +2138,7 @@ VNET_DECLARE(struct pf_idhash *, pf_idhash); VNET_DECLARE(struct pf_srchash *, pf_srchash); #define V_pf_srchash VNET(pf_srchash) -#define PF_IDHASH(s) (be64toh((s)->id) % (pf_hashmask + 1)) +#define PF_IDHASH(s) (be64toh((s)->id) % (V_pf_hashmask + 1)) VNET_DECLARE(void *, pf_swi_cookie); #define V_pf_swi_cookie VNET(pf_swi_cookie) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 67011d16c788..82a42c874a8f 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -979,7 +979,7 @@ pfsync_in_clr(struct mbuf *m, int offset, int count, int flags, int action) pfi_kkif_find(clr[i].ifname) == NULL) continue; - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; relock: @@ -2080,7 +2080,11 @@ pfsync_defer_tmo(void *arg) struct pfsync_softc *sc = pd->pd_sc; struct mbuf *m = pd->pd_m; struct pf_kstate *st = pd->pd_st; - struct pfsync_bucket *b = pfsync_get_bucket(sc, st); + struct pfsync_bucket *b; + + CURVNET_SET(sc->sc_ifp->if_vnet); + + b = pfsync_get_bucket(sc, st); PFSYNC_BUCKET_LOCK_ASSERT(b); @@ -2093,11 +2097,11 @@ pfsync_defer_tmo(void *arg) if (sc->sc_sync_if == NULL) { pf_release_state(st); m_freem(m); + CURVNET_RESTORE(); return; } NET_EPOCH_ENTER(et); - CURVNET_SET(sc->sc_sync_if->if_vnet); pfsync_tx(sc, m); @@ -2483,7 +2487,7 @@ pfsync_bulk_update(void *arg) else i = sc->sc_bulk_hashid; - for (; i <= pf_hashmask; i++) { + for (; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; if (s != NULL) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 764d2fa54179..dfa87b515cd1 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -486,16 +486,18 @@ VNET_DEFINE(struct pf_srchash *, pf_srchash); SYSCTL_NODE(_net, OID_AUTO, pf, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "pf(4)"); -u_long pf_hashmask; -u_long pf_srchashmask; -static u_long pf_hashsize; -static u_long pf_srchashsize; +VNET_DEFINE(u_long, pf_hashmask); +VNET_DEFINE(u_long, pf_srchashmask); +VNET_DEFINE_STATIC(u_long, pf_hashsize); +#define V_pf_hashsize VNET(pf_hashsize) +VNET_DEFINE_STATIC(u_long, pf_srchashsize); +#define V_pf_srchashsize VNET(pf_srchashsize) u_long pf_ioctl_maxcount = 65535; -SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_RDTUN, - &pf_hashsize, 0, "Size of pf(4) states hashtable"); -SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, - &pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); +SYSCTL_ULONG(_net_pf, OID_AUTO, states_hashsize, CTLFLAG_VNET | CTLFLAG_RDTUN, + &VNET_NAME(pf_hashsize), 0, "Size of pf(4) states hashtable"); +SYSCTL_ULONG(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_VNET | CTLFLAG_RDTUN, + &VNET_NAME(pf_srchashsize), 0, "Size of pf(4) source nodes hashtable"); SYSCTL_ULONG(_net_pf, OID_AUTO, request_maxcount, CTLFLAG_RWTUN, &pf_ioctl_maxcount, 0, "Maximum number of tables, addresses, ... in a single ioctl() call"); @@ -662,7 +664,7 @@ pf_hashkey(const struct pf_state_key *sk) sizeof(struct pf_state_key_cmp)/sizeof(uint32_t), V_pf_hashseed); - return (h & pf_hashmask); + return (h & V_pf_hashmask); } static __inline uint32_t @@ -683,7 +685,7 @@ pf_hashsrc(struct pf_addr *addr, sa_family_t af) panic("%s: unknown address family %u", __func__, af); } - return (h & pf_srchashmask); + return (h & V_pf_srchashmask); } #ifdef ALTQ @@ -885,7 +887,7 @@ pf_overload_task(void *v, int pending) return; } - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_state_key *sk; struct pf_kstate *s; @@ -1075,10 +1077,10 @@ pf_initialize(void) struct pf_srchash *sh; u_int i; - if (pf_hashsize == 0 || !powerof2(pf_hashsize)) - pf_hashsize = PF_HASHSIZ; - if (pf_srchashsize == 0 || !powerof2(pf_srchashsize)) - pf_srchashsize = PF_SRCHASHSIZ; + if (V_pf_hashsize == 0 || !powerof2(V_pf_hashsize)) + V_pf_hashsize = PF_HASHSIZ; + if (V_pf_srchashsize == 0 || !powerof2(V_pf_srchashsize)) + V_pf_srchashsize = PF_SRCHASHSIZ; V_pf_hashseed = arc4random(); @@ -1093,26 +1095,26 @@ pf_initialize(void) sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - V_pf_keyhash = mallocarray(pf_hashsize, sizeof(struct pf_keyhash), + V_pf_keyhash = mallocarray(V_pf_hashsize, sizeof(struct pf_keyhash), M_PFHASH, M_NOWAIT | M_ZERO); - V_pf_idhash = mallocarray(pf_hashsize, sizeof(struct pf_idhash), + V_pf_idhash = mallocarray(V_pf_hashsize, sizeof(struct pf_idhash), M_PFHASH, M_NOWAIT | M_ZERO); if (V_pf_keyhash == NULL || V_pf_idhash == NULL) { printf("pf: Unable to allocate memory for " - "state_hashsize %lu.\n", pf_hashsize); + "state_hashsize %lu.\n", V_pf_hashsize); free(V_pf_keyhash, M_PFHASH); free(V_pf_idhash, M_PFHASH); - pf_hashsize = PF_HASHSIZ; - V_pf_keyhash = mallocarray(pf_hashsize, + V_pf_hashsize = PF_HASHSIZ; + V_pf_keyhash = mallocarray(V_pf_hashsize, sizeof(struct pf_keyhash), M_PFHASH, M_WAITOK | M_ZERO); - V_pf_idhash = mallocarray(pf_hashsize, + V_pf_idhash = mallocarray(V_pf_hashsize, sizeof(struct pf_idhash), M_PFHASH, M_WAITOK | M_ZERO); } - pf_hashmask = pf_hashsize - 1; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= pf_hashmask; + V_pf_hashmask = V_pf_hashsize - 1; + for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= V_pf_hashmask; i++, kh++, ih++) { mtx_init(&kh->lock, "pf_keyhash", NULL, MTX_DEF | MTX_DUPOK); mtx_init(&ih->lock, "pf_idhash", NULL, MTX_DEF); @@ -1126,19 +1128,19 @@ pf_initialize(void) uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT); uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached"); - V_pf_srchash = mallocarray(pf_srchashsize, + V_pf_srchash = mallocarray(V_pf_srchashsize, sizeof(struct pf_srchash), M_PFHASH, M_NOWAIT | M_ZERO); if (V_pf_srchash == NULL) { printf("pf: Unable to allocate memory for " - "source_hashsize %lu.\n", pf_srchashsize); + "source_hashsize %lu.\n", V_pf_srchashsize); - pf_srchashsize = PF_SRCHASHSIZ; - V_pf_srchash = mallocarray(pf_srchashsize, + V_pf_srchashsize = PF_SRCHASHSIZ; + V_pf_srchash = mallocarray(V_pf_srchashsize, sizeof(struct pf_srchash), M_PFHASH, M_WAITOK | M_ZERO); } - pf_srchashmask = pf_srchashsize - 1; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) + V_pf_srchashmask = V_pf_srchashsize - 1; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) mtx_init(&sh->lock, "pf_srchash", NULL, MTX_DEF); /* ALTQ */ @@ -1177,7 +1179,7 @@ pf_cleanup(void) struct pf_send_entry *pfse, *next; u_int i; - for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= pf_hashmask; + for (i = 0, kh = V_pf_keyhash, ih = V_pf_idhash; i <= V_pf_hashmask; i++, kh++, ih++) { KASSERT(LIST_EMPTY(&kh->keys), ("%s: key hash not empty", __func__)); @@ -1189,7 +1191,7 @@ pf_cleanup(void) free(V_pf_keyhash, M_PFHASH); free(V_pf_idhash, M_PFHASH); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { KASSERT(LIST_EMPTY(&sh->nodes), ("%s: source node hash not empty", __func__)); mtx_destroy(&sh->lock); @@ -1589,7 +1591,7 @@ pf_find_state_byid(uint64_t id, uint32_t creatorid) pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_SEARCH], 1); - ih = &V_pf_idhash[(be64toh(id) % (pf_hashmask + 1))]; + ih = &V_pf_idhash[(be64toh(id) % (V_pf_hashmask + 1))]; PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) @@ -1981,7 +1983,7 @@ pf_purge_thread(void *unused __unused) * table every run. */ V_pf_purge_idx = - pf_purge_expired_states(V_pf_purge_idx, pf_hashmask / + pf_purge_expired_states(V_pf_purge_idx, V_pf_hashmask / (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); /* @@ -2026,7 +2028,7 @@ pf_unload_vnet_purge(void) /* * Now purge everything. */ - pf_purge_expired_states(0, pf_hashmask); + pf_purge_expired_states(0, V_pf_hashmask); pf_purge_fragments(UINT_MAX); pf_purge_expired_src_nodes(); @@ -2086,7 +2088,7 @@ pf_purge_expired_src_nodes(void) int i; LIST_INIT(&freelist); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next) if (cur->states == 0 && cur->expire <= time_uptime) { @@ -2261,7 +2263,7 @@ pf_purge_expired_states(u_int i, int maxcheck) SDT_PROBE2(pf, purge, state, rowcount, i, count); /* Return when we hit end of hash. */ - if (++i > pf_hashmask) { + if (++i > V_pf_hashmask) { V_pf_status.states = uma_zone_get_cur(V_pf_state_z); return (0); } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 2df6bcd30533..f5a216666076 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3778,7 +3778,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td sizeof(struct pfsync_state_1301), M_TEMP, M_WAITOK | M_ZERO); nr = 0; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; DIOCGETSTATES_retry: @@ -3857,7 +3857,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td sizeof(struct pf_state_export), M_TEMP, M_WAITOK | M_ZERO); nr = 0; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; DIOCGETSTATESV2_retry: @@ -5363,7 +5363,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td struct pf_src_node *p, *pstore; uint32_t i, nr = 0; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) @@ -5382,7 +5382,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td nr = 0; p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK | M_ZERO); - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { @@ -5854,7 +5854,7 @@ pf_clear_all_states(void) u_int i; NET_EPOCH_ENTER(et); - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; relock: PF_HASHROW_LOCK(ih); @@ -5891,7 +5891,7 @@ pf_clear_srcnodes(struct pf_ksrc_node *n) struct pf_kstate *s; int i; - for (i = 0; i <= pf_hashmask; i++) { + for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; PF_HASHROW_LOCK(ih); @@ -5907,7 +5907,7 @@ pf_clear_srcnodes(struct pf_ksrc_node *n) if (n == NULL) { struct pf_srchash *sh; - for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) { PF_HASHROW_LOCK(sh); LIST_FOREACH(n, &sh->nodes, entry) { @@ -5929,7 +5929,7 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) struct pf_ksrc_node_list kill; LIST_INIT(&kill); - for (int i = 0; i <= pf_srchashmask; i++) { + for (int i = 0; i <= V_pf_srchashmask; i++) { struct pf_srchash *sh = &V_pf_srchash[i]; struct pf_ksrc_node *sn, *tmp; @@ -5950,7 +5950,7 @@ pf_kill_srcnodes(struct pfioc_src_node_kill *psnk) PF_HASHROW_UNLOCK(sh); } - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; @@ -6013,7 +6013,7 @@ pf_clear_states(const struct pf_kstate_kill *kill) NET_EPOCH_ASSERT(); - for (unsigned int i = 0; i <= pf_hashmask; i++) { + for (unsigned int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; relock_DIOCCLRSTATES: @@ -6088,7 +6088,7 @@ pf_killstates(struct pf_kstate_kill *kill, unsigned int *killed) return; } - for (unsigned int i = 0; i <= pf_hashmask; i++) + for (unsigned int i = 0; i <= V_pf_hashmask; i++) *killed += pf_killstates_row(kill, &V_pf_idhash[i]); } diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index e855815dd73b..6c98a50d8e06 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -231,7 +231,7 @@ handle_dumpstates(struct nlpcb *nlp, struct nl_parsed_state *attrs, hdr->nlmsg_flags |= NLM_F_MULTI; - for (int i = 0; i <= pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; @@ -346,7 +346,7 @@ pf_handle_getcreators(struct nlmsghdr *hdr, struct nl_pstate *npt) bzero(creators, sizeof(creators)); - for (int i = 0; i < pf_hashmask; i++) { + for (int i = 0; i < V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; From fe0c82a603ce069786ee81604315f499fd965546 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Wed, 17 Jul 2024 15:56:49 +0200 Subject: [PATCH 101/151] pf tests: fix sctp:timeout test The test body somehow wound up in the cleanup function. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/sctp.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index c3e1301238b0..d07d1122048b 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -666,11 +666,6 @@ timeout_head() timeout_body() { sctp_init -} - -timeout_cleanup() -{ - pft_cleanup vnet_mkjail timeout @@ -687,6 +682,11 @@ timeout_cleanup() jexec timeout pfctl -st } +timeout_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic_v4" From 393b7ad6952217a7c0823f705f5b4a41d6b4f3f5 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 9 May 2024 20:22:21 +1000 Subject: [PATCH 102/151] zts: test single-disk pool resumes properly after disk pull A single disk pool should suspend when its disk fails and hold the IO. When the disk is returned, the pool should return and the IO be reissued, leaving everything in good shape. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris Reviewed-by: Jorgen Lundman Reviewed-by: Tony Hutter Reviewed-by: Don Brady --- tests/runfiles/linux.run | 2 +- tests/test-runner/bin/zts-report.py.in | 1 + tests/zfs-tests/tests/Makefile.am | 1 + .../fault/suspend_resume_single.ksh | 102 ++++++++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100755 tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 92ce09ec6fcb..bd6cc56f3589 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -121,7 +121,7 @@ tests = ['auto_offline_001_pos', 'auto_online_001_pos', 'auto_online_002_pos', 'auto_replace_001_pos', 'auto_replace_002_pos', 'auto_spare_001_pos', 'auto_spare_002_pos', 'auto_spare_multiple', 'auto_spare_ashift', 'auto_spare_shared', 'decrypt_fault', 'decompress_fault', - 'scrub_after_resilver', 'zpool_status_-s'] + 'scrub_after_resilver', 'suspend_resume_single', 'zpool_status_-s'] tags = ['functional', 'fault'] [tests/functional/features/large_dnode:Linux] diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in index 5ca130931364..de06c7c6e2c1 100755 --- a/tests/test-runner/bin/zts-report.py.in +++ b/tests/test-runner/bin/zts-report.py.in @@ -379,6 +379,7 @@ if os.environ.get('CI') == 'true': 'fault/auto_replace_002_pos': ['SKIP', ci_reason], 'fault/auto_spare_ashift': ['SKIP', ci_reason], 'fault/auto_spare_shared': ['SKIP', ci_reason], + 'fault/suspend_resume_single': ['SKIP', ci_reason], 'procfs/pool_state': ['SKIP', ci_reason], }) diff --git a/tests/zfs-tests/tests/Makefile.am b/tests/zfs-tests/tests/Makefile.am index 44eedcf6fae5..00f306122daa 100644 --- a/tests/zfs-tests/tests/Makefile.am +++ b/tests/zfs-tests/tests/Makefile.am @@ -1483,6 +1483,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ functional/fault/decompress_fault.ksh \ functional/fault/decrypt_fault.ksh \ functional/fault/scrub_after_resilver.ksh \ + functional/fault/suspend_resume_single.ksh \ functional/fault/setup.ksh \ functional/fault/zpool_status_-s.ksh \ functional/features/async_destroy/async_destroy_001_pos.ksh \ diff --git a/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh b/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh new file mode 100755 index 000000000000..041dadb1eadb --- /dev/null +++ b/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh @@ -0,0 +1,102 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2024, Klara Inc. +# + +. $STF_SUITE/include/libtest.shlib + +set -x + +DATAFILE="$TMPDIR/datafile" + +function cleanup +{ + destroy_pool $TESTPOOL + unload_scsi_debug + rm -f $DATA_FILE +} + +log_onexit cleanup + +log_assert "ensure single-disk pool resumes properly after suspend and clear" + +# create a file, and take a checksum, so we can compare later +log_must dd if=/dev/random of=$DATAFILE bs=128K count=1 +typeset sum1=$(cat $DATAFILE | md5sum) + +# make a debug device that we can "unplug" +load_scsi_debug 100 1 1 1 '512b' +sd=$(get_debug_device) + +# create a single-device pool +log_must zpool create $TESTPOOL $sd +log_must zpool sync + +# "pull" the disk +log_must eval "echo offline > /sys/block/$sd/device/state" + +# copy data onto the pool. it'll appear to succeed, but only be in memory +log_must cp $DATAFILE /$TESTPOOL/file + +# wait until sync starts, and the pool suspends +log_note "waiting for pool to suspend" +typeset -i tries=10 +until [[ $(cat /proc/spl/kstat/zfs/$TESTPOOL/state) == "SUSPENDED" ]] ; do + if ((tries-- == 0)); then + log_fail "pool didn't suspend" + fi + sleep 1 +done + +# return the disk +log_must eval "echo running > /sys/block/$sd/device/state" + +# clear the error states, which should reopen the vdev, get the pool back +# online, and replay the failed IO +log_must zpool clear $TESTPOOL + +# wait a while for everything to sync out. if something is going to go wrong, +# this is where it will happen +log_note "giving pool time to settle and complete txg" +sleep 7 + +# if the pool suspended, then everything is bad +if [[ $(cat /proc/spl/kstat/zfs/$TESTPOOL/state) == "SUSPENDED" ]] ; then + log_fail "pool suspended" +fi + +# export the pool, to make sure it exports clean, and also to clear the file +# out of the cache +log_must zpool export $TESTPOOL + +# import the pool +log_must zpool import $TESTPOOL + +# sum the file we wrote earlier +typeset sum2=$(cat /$TESTPOOL/file | md5sum) + +# make sure the checksums match +log_must test "$sum1" = "$sum2" + +log_pass "single-disk pool resumes properly after disk suspend and clear" From 5de3ac223623d5348e491cc89c70a803ddcd7184 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 11 Jun 2024 20:49:10 +1000 Subject: [PATCH 103/151] vdev_open: clear async fault flag after reopen After c3f2f1aa2, vdev_fault_wanted is set on a vdev after a probe fails. An end-of-txg async task is charged with actually faulting the vdev. In a single-disk pool, the probe failure will degrade the last disk, and then suspend the pool. However, vdev_fault_wanted is not cleared. After the pool returns, the transaction finishes and the async task runs and faults the vdev, which suspends the pool again. The fix is simple: when reopening a vdev, clear the async fault flag. If the vdev is still failed, the startup probe will quickly notice and degrade/suspend it again. If not, all is well! Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Co-authored-by: Don Brady Signed-off-by: Rob Norris Reviewed-by: Jorgen Lundman Reviewed-by: Tony Hutter Reviewed-by: Don Brady --- module/zfs/vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index c74f72159dc9..11cc39ba3527 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -2021,6 +2021,7 @@ vdev_open(vdev_t *vd) vd->vdev_stat.vs_aux = VDEV_AUX_NONE; vd->vdev_cant_read = B_FALSE; vd->vdev_cant_write = B_FALSE; + vd->vdev_fault_wanted = B_FALSE; vd->vdev_min_asize = vdev_get_min_asize(vd); /* From b3bbc6cc79a3b76d342b2a8fd68e5266eb50ff11 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Wed, 17 Jul 2024 10:41:37 -0700 Subject: [PATCH 104/151] cxgbe(4): Tidy up t4_l2t.h Align the comment for if_t with the rest and remove the declaration of t4_l2t_set_switching, which was removed in 061bbaf7e7fe. No functional change. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_l2t.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h index be6337a60eab..36a41e459a5d 100644 --- a/sys/dev/cxgbe/t4_l2t.h +++ b/sys/dev/cxgbe/t4_l2t.h @@ -64,7 +64,7 @@ struct l2t_entry { uint32_t addr[4]; /* next hop IP or IPv6 address */ uint32_t iqid; /* iqid for reply to write_l2e */ struct sge_wrq *wrq; /* queue to use for write_l2e */ - if_t ifp; /* outgoing interface */ + if_t ifp; /* outgoing interface */ uint16_t smt_idx; /* SMT index */ uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */ struct l2t_entry *first; /* start of hash chain */ @@ -94,8 +94,6 @@ struct l2t_entry *t4_l2t_alloc_switching(struct adapter *, uint16_t, uint8_t, uint8_t *); struct l2t_entry *t4_l2t_alloc_tls(struct adapter *, struct sge_txq *, void *, int *, uint16_t, uint8_t, uint8_t *); -int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, - uint8_t, uint8_t *); int t4_write_l2e(struct l2t_entry *, int); int do_l2t_write_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); From dc91e74524826b461d23f3399a0974ca33f84005 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 18 Jul 2024 05:02:28 +1000 Subject: [PATCH 105/151] zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly (#16334) These are used for DDT and BRT stores. There's limited information available to produce meaningful output, but at least we can put something on screen rather than crashing. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Rob Norris Reviewed-by: Alexander Motin Reviewed-by: Tony Hutter --- cmd/zdb/zdb.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 0d2f0b1da5ff..f55c7f7b8176 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -1126,16 +1127,33 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) for (zap_cursor_init(&zc, os, object); zap_cursor_retrieve(&zc, &attr) == 0; zap_cursor_advance(&zc)) { - (void) printf("\t\t%s = ", attr.za_name); + boolean_t key64 = + !!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY); + + if (key64) + (void) printf("\t\t0x%010lx = ", + *(uint64_t *)attr.za_name); + else + (void) printf("\t\t%s = ", attr.za_name); + if (attr.za_num_integers == 0) { (void) printf("\n"); continue; } prop = umem_zalloc(attr.za_num_integers * attr.za_integer_length, UMEM_NOFAIL); - (void) zap_lookup(os, object, attr.za_name, - attr.za_integer_length, attr.za_num_integers, prop); - if (attr.za_integer_length == 1) { + + if (key64) + (void) zap_lookup_uint64(os, object, + (const uint64_t *)attr.za_name, 1, + attr.za_integer_length, attr.za_num_integers, + prop); + else + (void) zap_lookup(os, object, attr.za_name, + attr.za_integer_length, attr.za_num_integers, + prop); + + if (attr.za_integer_length == 1 && !key64) { if (strcmp(attr.za_name, DSL_CRYPTO_KEY_MASTER_KEY) == 0 || strcmp(attr.za_name, @@ -1154,6 +1172,10 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) } else { for (i = 0; i < attr.za_num_integers; i++) { switch (attr.za_integer_length) { + case 1: + (void) printf("%u ", + ((uint8_t *)prop)[i]); + break; case 2: (void) printf("%u ", ((uint16_t *)prop)[i]); From ab6d9bd89a87ed65c83db241fb476e81d88e166f Mon Sep 17 00:00:00 2001 From: youzhongyang Date: Wed, 17 Jul 2024 16:54:11 -0400 Subject: [PATCH 106/151] Make sure avl_tree.avl_pad is not in kernel module (#16280) The commit b192a2c (Remove avl_size field from struct avl_tree) uses a def _KERNEL to decide to include avl_pad or not, but this _KERNEL is defined in sys/sysmacros.h. If avl.h and sysmacros.h are not included in the right order, it can cause a headache when working on a zfs related kernel module. Add sysmacros.h in avl_impl.h to fix. sysmacros.h is also removed from spa.h as it's reduntant. Signed-off-by: Youzhong Yang Co-authored-by: Youzhong Yang Reviewed-by: Rob Norris Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- include/sys/avl_impl.h | 1 + include/sys/spa.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/avl_impl.h b/include/sys/avl_impl.h index 85277b42b471..b2b4eb4bce22 100644 --- a/include/sys/avl_impl.h +++ b/include/sys/avl_impl.h @@ -34,6 +34,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/sys/spa.h b/include/sys/spa.h index 3073c4d1b937..f50cb5e04ee0 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -35,11 +35,10 @@ #ifndef _SYS_SPA_H #define _SYS_SPA_H -#include #include +#include #include #include -#include #include #include #include From a4469a0d19b64bf518c12e8c24c81ec513a45e7d Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 17 Jul 2024 19:07:07 +0000 Subject: [PATCH 107/151] pipe: convert pipelock flag argument to bool No functional changes, preparatory cleanup. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/sys_pipe.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 1d48728139c2..70b2a03e0140 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -225,7 +225,7 @@ static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); static int pipe_create(struct pipe *pipe, bool backing); static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); -static __inline int pipelock(struct pipe *cpipe, int catch); +static __inline int pipelock(struct pipe *cpipe, bool catch); static __inline void pipeunlock(struct pipe *cpipe); static void pipe_timestamp(struct timespec *tsp); #ifndef PIPE_NODIRECT @@ -633,7 +633,7 @@ pipespace(struct pipe *cpipe, int size) * lock a pipe for I/O, blocking other access */ static __inline int -pipelock(struct pipe *cpipe, int catch) +pipelock(struct pipe *cpipe, bool catch) { int error, prio; @@ -738,7 +738,7 @@ pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, PIPE_LOCK(rpipe); ++rpipe->pipe_busy; - error = pipelock(rpipe, 1); + error = pipelock(rpipe, true); if (error) goto unlocked_error; @@ -854,7 +854,7 @@ pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, if ((error = msleep(rpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "piperd", 0)) == 0) - error = pipelock(rpipe, 1); + error = pipelock(rpipe, true); } if (error) goto unlocked_error; @@ -1034,7 +1034,7 @@ pipe_direct_write(struct pipe *wpipe, struct uio *uio) pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdww", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) goto error1; goto retry; @@ -1049,7 +1049,7 @@ pipe_direct_write(struct pipe *wpipe, struct uio *uio) pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwc", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) goto error1; goto retry; @@ -1071,7 +1071,7 @@ pipe_direct_write(struct pipe *wpipe, struct uio *uio) pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwt", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; } @@ -1107,7 +1107,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, rpipe = fp->f_data; wpipe = PIPE_PEER(rpipe); PIPE_LOCK(rpipe); - error = pipelock(wpipe, 1); + error = pipelock(wpipe, true); if (error) { PIPE_UNLOCK(rpipe); return (error); @@ -1206,7 +1206,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "pipbww", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; continue; @@ -1311,7 +1311,7 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *active_cred, pipeunlock(wpipe); error = msleep(wpipe, PIPE_MTX(rpipe), PRIBIO | PCATCH, "pipewr", 0); - pipelock(wpipe, 0); + pipelock(wpipe, false); if (error != 0) break; continue; @@ -1671,7 +1671,7 @@ pipeclose(struct pipe *cpipe) KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); PIPE_LOCK(cpipe); - pipelock(cpipe, 0); + pipelock(cpipe, false); #ifdef MAC pp = cpipe->pipe_pair; #endif @@ -1686,7 +1686,7 @@ pipeclose(struct pipe *cpipe) cpipe->pipe_state |= PIPE_WANT; pipeunlock(cpipe); msleep(cpipe, PIPE_MTX(cpipe), PRIBIO, "pipecl", 0); - pipelock(cpipe, 0); + pipelock(cpipe, false); } pipeselwakeup(cpipe); From 1147a279785329a2eaeb01c0610c35fe835a62a6 Mon Sep 17 00:00:00 2001 From: glibg10b <56197853+glibg10b@users.noreply.github.com> Date: Thu, 18 Jul 2024 02:18:12 +0200 Subject: [PATCH 108/151] Fix printf typo for `zfs receive -cv` (#16295) Current output: > receiving correctivefull stream of a into b New output: > receiving corrective full stream of a into b Signed-off-by: glibg10b <56197853+glibg10b@users.noreply.github.com> Reviewed-by: Rob Norris Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- lib/libzfs/libzfs_sendrecv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 0370112c022a..ee01ee9b218a 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -4952,7 +4952,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap, if (flags->verbose) { (void) printf("%s %s%s stream of %s into %s\n", flags->dryrun ? "would receive" : "receiving", - flags->heal ? " corrective" : "", + flags->heal ? "corrective " : "", drrb->drr_fromguid ? "incremental" : "full", drrb->drr_toname, destsnap); (void) fflush(stdout); From 257e70f1d5ee61037c8c59b116538d3b6b1427a2 Mon Sep 17 00:00:00 2001 From: Igor Ostapenko Date: Tue, 16 Jul 2024 21:41:12 +0300 Subject: [PATCH 109/151] kyua: Add FreeBSD Jail execution environment support A new Kyua concept is added -- "execution environment". A test can be configured to be run within a specific environment. The test case lifecycle is extended respectively: - execenv init (creates a jail or does nothing for default execenv="host") - test exec - cleanup exec (optional) - execenv cleanup (removes a jail or does nothing for default execenv="host") The following new functionality is provided, from bottom to top: 1 ATF based tests - The new "execenv" metadata property can be set to explicitly ask for an execution environment: "host" or "jail". If it's not defined, as all existing tests do, then it implicitly means "host". - The new "execenv.jail.params" metadata property can be optionally defined to ask Kyua to use specific jail(8) parameters during creation of a temporary jail. An example is "vnet allow.raw_sockets". Kyua implicitly adds "children.max" to "execenv_jail_params" parameters with the maximum possible value. A test case can override it. 2 Kyuafile - The same new metadata properties can be defined on Kyuafile level: "execenv" and "execenv_jail_params". - Note that historically ATF uses dotted style of metadata naming, while Kyua uses underscore style. Hence "execenv.jail.params" vs. "execenv_jail_params". 3 kyua.conf, kyua CLI - The new "execenvs" engine configuration variable can be set to a list of execution environments to run only tests designed for. Tests of not listed environments are skipped. - By default, this variable lists all execution environments supported by a Kyua binary, e.g. execenvs="host jail". - This variable can be changed via "kyua.conf" or via kyua CLI's "-v" parameter. For example, "kyua -v execenvs=host test" will run only host-based tests and skip jail-based ones. - Current value of this variable can be examined with "kyua config". [markj] This feature has not landed upstream yet. See the discussion in https://github.com/freebsd/kyua/pull/224 . Having the ability to automatically jail tests allows many network tests to run in parallel, giving a drastic speedup. So, let's import the feature and start using it in main. Signed-off-by: Igor Ostapenko Reviewed by: markj, kp Tested by: markj, kp MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D45865 --- contrib/kyua/AUTHORS | 1 + contrib/kyua/cli/cmd_config_test.cpp | 12 +- contrib/kyua/doc/kyua.conf.5.in | 13 +- contrib/kyua/doc/kyuafile.5.in | 103 +++++- contrib/kyua/drivers/report_junit_test.cpp | 8 + contrib/kyua/engine/atf.cpp | 11 +- contrib/kyua/engine/atf_list.cpp | 4 + contrib/kyua/engine/config.cpp | 18 ++ contrib/kyua/engine/execenv/execenv.cpp | 74 +++++ contrib/kyua/engine/execenv/execenv.hpp | 149 +++++++++ contrib/kyua/engine/execenv/execenv_host.cpp | 52 +++ contrib/kyua/engine/execenv/execenv_host.hpp | 63 ++++ contrib/kyua/engine/plain.cpp | 7 +- contrib/kyua/engine/requirements.cpp | 33 ++ contrib/kyua/engine/scheduler.cpp | 274 +++++++++++++++- contrib/kyua/engine/scheduler.hpp | 1 + contrib/kyua/engine/tap.cpp | 7 +- contrib/kyua/examples/kyua.conf | 3 + contrib/kyua/integration/cmd_config_test.sh | 2 + .../kyua/integration/cmd_report_junit_test.sh | 8 + contrib/kyua/integration/cmd_report_test.sh | 2 + contrib/kyua/main.cpp | 3 + contrib/kyua/model/metadata.cpp | 76 +++++ contrib/kyua/model/metadata.hpp | 5 + contrib/kyua/model/metadata_test.cpp | 8 +- contrib/kyua/model/test_case_test.cpp | 3 +- contrib/kyua/model/test_program_test.cpp | 13 +- contrib/kyua/os/freebsd/execenv_jail.cpp | 78 +++++ contrib/kyua/os/freebsd/execenv_jail.hpp | 65 ++++ .../kyua/os/freebsd/execenv_jail_manager.cpp | 63 ++++ .../kyua/os/freebsd/execenv_jail_manager.hpp | 54 ++++ contrib/kyua/os/freebsd/execenv_jail_stub.cpp | 75 +++++ contrib/kyua/os/freebsd/main.cpp | 54 ++++ contrib/kyua/os/freebsd/main.hpp | 41 +++ contrib/kyua/os/freebsd/utils/jail.cpp | 306 ++++++++++++++++++ contrib/kyua/os/freebsd/utils/jail.hpp | 64 ++++ contrib/kyua/utils/config/nodes.ipp | 9 +- contrib/kyua/utils/process/executor.cpp | 42 +++ contrib/kyua/utils/process/executor.hpp | 1 + usr.bin/kyua/Makefile | 15 +- 40 files changed, 1792 insertions(+), 28 deletions(-) create mode 100644 contrib/kyua/engine/execenv/execenv.cpp create mode 100644 contrib/kyua/engine/execenv/execenv.hpp create mode 100644 contrib/kyua/engine/execenv/execenv_host.cpp create mode 100644 contrib/kyua/engine/execenv/execenv_host.hpp create mode 100644 contrib/kyua/os/freebsd/execenv_jail.cpp create mode 100644 contrib/kyua/os/freebsd/execenv_jail.hpp create mode 100644 contrib/kyua/os/freebsd/execenv_jail_manager.cpp create mode 100644 contrib/kyua/os/freebsd/execenv_jail_manager.hpp create mode 100644 contrib/kyua/os/freebsd/execenv_jail_stub.cpp create mode 100644 contrib/kyua/os/freebsd/main.cpp create mode 100644 contrib/kyua/os/freebsd/main.hpp create mode 100644 contrib/kyua/os/freebsd/utils/jail.cpp create mode 100644 contrib/kyua/os/freebsd/utils/jail.hpp diff --git a/contrib/kyua/AUTHORS b/contrib/kyua/AUTHORS index c7bd72ce776b..4cf65083015a 100644 --- a/contrib/kyua/AUTHORS +++ b/contrib/kyua/AUTHORS @@ -10,3 +10,4 @@ * The FreeBSD Foundation * Google Inc. +* Igor Ostapenko diff --git a/contrib/kyua/cli/cmd_config_test.cpp b/contrib/kyua/cli/cmd_config_test.cpp index f084f99bb90a..a5f6930ba027 100644 --- a/contrib/kyua/cli/cmd_config_test.cpp +++ b/contrib/kyua/cli/cmd_config_test.cpp @@ -61,6 +61,7 @@ fake_config(void) { config::tree user_config = engine::default_config(); user_config.set_string("architecture", "the-architecture"); + user_config.set_string("execenvs", "the-env"); user_config.set_string("parallelism", "128"); user_config.set_string("platform", "the-platform"); //user_config.set_string("unprivileged_user", ""); @@ -83,12 +84,13 @@ ATF_TEST_CASE_BODY(all) cmdline::ui_mock ui; ATF_REQUIRE_EQ(EXIT_SUCCESS, cmd.main(&ui, args, fake_config())); - ATF_REQUIRE_EQ(5, ui.out_log().size()); + ATF_REQUIRE_EQ(6, ui.out_log().size()); ATF_REQUIRE_EQ("architecture = the-architecture", ui.out_log()[0]); - ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[1]); - ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[2]); - ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[3]); - ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[4]); + ATF_REQUIRE_EQ("execenvs = the-env", ui.out_log()[1]); + ATF_REQUIRE_EQ("parallelism = 128", ui.out_log()[2]); + ATF_REQUIRE_EQ("platform = the-platform", ui.out_log()[3]); + ATF_REQUIRE_EQ("test_suites.foo.bar = first", ui.out_log()[4]); + ATF_REQUIRE_EQ("test_suites.foo.baz = second", ui.out_log()[5]); ATF_REQUIRE(ui.err_log().empty()); } diff --git a/contrib/kyua/doc/kyua.conf.5.in b/contrib/kyua/doc/kyua.conf.5.in index 05a9499b48c4..7188bb8888c3 100644 --- a/contrib/kyua/doc/kyua.conf.5.in +++ b/contrib/kyua/doc/kyua.conf.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd February 20, 2015 +.Dd March 22, 2024 .Dt KYUA.CONF 5 .Os .Sh NAME @@ -36,6 +36,7 @@ .Pp Variables: .Va architecture , +.Va execenvs , .Va platform , .Va test_suites , .Va unprivileged_user . @@ -72,6 +73,14 @@ The following variables are internally recognized by .Bl -tag -width XX -offset indent .It Va architecture Name of the system architecture (aka processor type). +.It Va execenvs +Whitespace-separated list of execution environment names. +.Pp +Only tests which require one of the given execution environments will be run. +.Pp +See +.Xr kyuafile 5 +for the list of possible execution environments. .It Va parallelism Maximum number of test cases to execute concurrently. .It Va platform diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index 06cb2dbc42a8..a667f5dc2816 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -1,4 +1,4 @@ -.\" Copyright 2012 The Kyua Authors. +.\" Copyright 2012-2024 The Kyua Authors. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd July 3, 2015 +.Dd March 23, 2024 .Dt KYUAFILE 5 .Os .Sh NAME @@ -173,6 +173,75 @@ Refer to the section below for clarification. .It Va description Textual description of the test. +.It Va execenv +The name of the execution environment to be used for running the test. +If empty or not defined, the +.Sq host +execution environment is meant. +The possible values are: +.Bl -tag -width xUnnnnnnn +.It host +The default environment which runs the test as a usual child process. +.It jail +The +.Fx +.Xr jail 8 +environment. +It creates a temporary jail to run the test and its optional cleanup logic +within. +.Pp +This feature requires +.Xr kyua 1 +to be running with superuser privileges. +.Pp +The difference between +.Va security.jail.children.max +and +.Va security.jail.children.cur +sysctl of the jail +.Xr kyua 1 +is running within must have a value high enough for the jail based tests +planned to be run. +For instance, the value 1 should be enough for a sequential run of simple +tests. +Otherwise, such aspects as parallel test execution and sub-jails spawned +by specific test cases should be considered. +.Pp +The formula of a temporary jail name is +.Sq kyua ++ +.Va test program path ++ +.Sq _ ++ +.Va test case name . +All non-alphanumeric characters are replaced with +.Sq _ . +.Sq kyua_usr_tests_sys_netpfil_pf_pass_block_v4 +is an example for /usr/tests/sys/netpfil/pf/pass_block:v4 test case. +.El +.It Va execenv_jail_params +Additional test-specific whitespace-separated parameters of +.Fx +.Xr jail 8 +to create a temporary jail within which the test is run. +It makes sense only if execenv is set to +.Sq jail . +.sp +.Xr kyua 1 +implicitly passes +.Sq children.max +parameter to +.Xr jail 8 +for a temporary jail with the maximum possible value according to +the jail +.Xr kyua 1 +itself is running within. +It allows tests to easily spawn their own sub-jails without additional +configuration. +It can be overridden via +.Va execenv_jail_params +if needed. .It Va is_exclusive If true, indicates that this test program cannot be executed along any other programs at the same time. @@ -360,6 +429,36 @@ test_suite('FreeBSD') plain_test_program{name='the_test', ['custom.FreeBSD-Bug-Id']='category/12345'} .Ed +.Ss FreeBSD jail execution environment +The following example configures the test to be run within a temporary jail +with +.Xr vnet 9 +support and the permission to create raw sockets: +.Bd -literal -offset indent +syntax(2) + +test_suite('FreeBSD') + +atf_test_program{name='network_test', + execenv='jail', + execenv_jail_params='vnet allow.raw_sockets', + required_user='root'} +.Ed +.Pp +A test case itself may have no requirements in superuser privileges, +but required_user='root' metadata property reminds that the jail execution +environment requires +.Xr kyua 1 +being running with root privileges, and the test is skipped otherwise with +the respective message. The combination of +.Va execenv +set to +.Sq jail +and +.Va required_user +set to +.Sq unprivileged +does not work respectively. .Ss Connecting disjoint test suites Now suppose you had various test suites on your file system and you would like to connect them together so that they could be executed and treated as diff --git a/contrib/kyua/drivers/report_junit_test.cpp b/contrib/kyua/drivers/report_junit_test.cpp index 462dca72f9be..0f009c6befd3 100644 --- a/contrib/kyua/drivers/report_junit_test.cpp +++ b/contrib/kyua/drivers/report_junit_test.cpp @@ -63,6 +63,8 @@ static const char* const default_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description is empty\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -80,6 +82,8 @@ static const char* const overriden_metadata = "allowed_architectures is empty\n" "allowed_platforms is empty\n" "description = Textual description\n" + "execenv is empty\n" + "execenv_jail_params is empty\n" "has_cleanup = false\n" "is_exclusive = false\n" "required_configs is empty\n" @@ -199,6 +203,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) .add_allowed_architecture("arch1") .add_allowed_platform("platform1") .set_description("This is a test") + .set_execenv("jail") + .set_execenv_jail_params("vnet") .set_has_cleanup(true) .set_is_exclusive(true) .add_required_config("config1") @@ -215,6 +221,8 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) + "allowed_architectures = arch1\n" + "allowed_platforms = platform1\n" + "description = This is a test\n" + + "execenv = jail\n" + + "execenv_jail_params = vnet\n" + "has_cleanup = true\n" + "is_exclusive = true\n" + "required_configs = config1\n" diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index eb63be20b0e7..f6746dd2f29f 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -39,6 +39,7 @@ extern "C" { #include "engine/atf_list.hpp" #include "engine/atf_result.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -54,6 +55,7 @@ extern "C" { #include "utils/stream.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -190,7 +192,10 @@ engine::atf_interface::exec_test(const model::test_program& test_program, args.push_back(F("-r%s") % (control_directory / result_name)); args.push_back(test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } @@ -219,7 +224,9 @@ engine::atf_interface::exec_cleanup( } args.push_back(F("%s:cleanup") % test_case_name); - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->exec(args); } diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp index a16b889c74f0..c9c2fed70175 100644 --- a/contrib/kyua/engine/atf_list.cpp +++ b/contrib/kyua/engine/atf_list.cpp @@ -121,6 +121,10 @@ engine::parse_atf_metadata(const model::properties_map& props) mdbuilder.set_string("has_cleanup", value); } else if (name == "require.arch") { mdbuilder.set_string("allowed_architectures", value); + } else if (name == "execenv") { + mdbuilder.set_string("execenv", value); + } else if (name == "execenv.jail.params") { + mdbuilder.set_string("execenv_jail_params", value); } else if (name == "require.config") { mdbuilder.set_string("required_configs", value); } else if (name == "require.files") { diff --git a/contrib/kyua/engine/config.cpp b/contrib/kyua/engine/config.cpp index 3f162a94fbb5..a7c418e3164c 100644 --- a/contrib/kyua/engine/config.cpp +++ b/contrib/kyua/engine/config.cpp @@ -35,6 +35,7 @@ #include #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "utils/config/exceptions.hpp" #include "utils/config/parser.hpp" #include "utils/config/tree.ipp" @@ -43,6 +44,7 @@ #include "utils/text/operations.ipp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace passwd = utils::passwd; namespace text = utils::text; @@ -59,6 +61,7 @@ static void init_tree(config::tree& tree) { tree.define< config::string_node >("architecture"); + tree.define< config::strings_set_node >("execenvs"); tree.define< config::positive_int_node >("parallelism"); tree.define< config::string_node >("platform"); tree.define< engine::user_node >("unprivileged_user"); @@ -74,6 +77,14 @@ static void set_defaults(config::tree& tree) { tree.set< config::string_node >("architecture", KYUA_ARCHITECTURE); + + std::set< std::string > supported; + for (auto em : execenv::execenvs()) + if (em->is_supported()) + supported.insert(em->name()); + supported.insert(execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + // TODO(jmmv): Automatically derive this from the number of CPUs in the // machine and forcibly set to a value greater than 1. Still testing // the new parallel implementation as of 2015-02-27 though. @@ -229,6 +240,13 @@ engine::empty_config(void) { config::tree tree(false); init_tree(tree); + + // Tests of Kyua itself tend to use an empty config, i.e. default + // execution environment is used. Let's allow it. + std::set< std::string > supported; + supported.insert(engine::execenv::default_execenv_name); + tree.set< config::strings_set_node >("execenvs", supported); + return tree; } diff --git a/contrib/kyua/engine/execenv/execenv.cpp b/contrib/kyua/engine/execenv/execenv.cpp new file mode 100644 index 000000000000..b043bcda52cb --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.cpp @@ -0,0 +1,74 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/execenv/execenv.hpp" + +#include "engine/execenv/execenv_host.hpp" + +namespace execenv = engine::execenv; + +using utils::none; + + +const char* execenv::default_execenv_name = "host"; + + +/// List of registered execution environments, except default host one. +/// +/// Use register_execenv() to add an entry to this global list. +static std::vector< std::shared_ptr< execenv::manager > > + execenv_managers; + + +void +execenv::register_execenv(const std::shared_ptr< execenv::manager > manager) +{ + execenv_managers.push_back(manager); +} + + +const std::vector< std::shared_ptr< execenv::manager> > +execenv::execenvs() +{ + return execenv_managers; +} + + +std::unique_ptr< execenv::interface > +execenv::get(const model::test_program& test_program, + const std::string& test_case_name) +{ + for (auto m : execenv_managers) { + auto e = m->probe(test_program, test_case_name); + if (e != nullptr) + return e; + } + + return std::unique_ptr< execenv::interface >( + new execenv::execenv_host(test_program, test_case_name)); +} diff --git a/contrib/kyua/engine/execenv/execenv.hpp b/contrib/kyua/engine/execenv/execenv.hpp new file mode 100644 index 000000000000..e667ff205d85 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv.hpp @@ -0,0 +1,149 @@ +// Copyright 2023 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/execenv/execenv.hpp +/// Execution environment subsystem interface. + +#if !defined(ENGINE_EXECENV_EXECENV_HPP) +#define ENGINE_EXECENV_EXECENV_HPP + +#include "model/test_program.hpp" +#include "utils/optional.ipp" +#include "utils/process/operations_fwd.hpp" + +using utils::process::args_vector; +using utils::optional; + +namespace engine { +namespace execenv { + + +extern const char* default_execenv_name; + + +/// Abstract interface of an execution environment. +class interface { +protected: + const model::test_program& _test_program; + const std::string& _test_case_name; + +public: + /// Constructor. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + interface(const model::test_program& test_program, + const std::string& test_case_name) : + _test_program(test_program), + _test_case_name(test_case_name) + {} + + /// Destructor. + virtual ~interface() {} + + /// Initializes execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test(), so we can fail a test fast if its + /// execution environment setup fails, and test execution could use the + /// configured proc environment, if expected. + virtual void init() const = 0; + + /// Cleanups or removes execution environment. + /// + /// It's expected to be called inside a fork for execenv cleanup. + virtual void cleanup() const = 0; + + /// Executes a test within the execution environment. + /// + /// It's expected to be called inside a fork which runs + /// scheduler::interface::exec_test() or exec_cleanup(). + /// + /// \param args The arguments to pass to the binary. + virtual void exec(const args_vector& args) const UTILS_NORETURN = 0; +}; + + +/// Abstract interface of an execution environment manager. +class manager { +public: + /// Destructor. + virtual ~manager() {} + + /// Returns name of an execution environment. + virtual const std::string& name() const = 0; + + /// Returns whether this execution environment is actually supported. + /// + /// It can be compile time and/or runtime check. + virtual bool is_supported() const = 0; + + /// Returns execution environment for a test. + /// + /// It checks if the given test is designed for this execution environment. + /// + /// \param program The test program. + /// \param test_case_name Name of the test case. + /// + /// \return An execenv object if the test conforms, or none. + virtual std::unique_ptr< interface > probe( + const model::test_program& test_program, + const std::string& test_case_name) const = 0; + + // TODO: execenv related extra metadata could be provided by a manager + // not to know how exactly and where it should be added to the kyua +}; + + +/// Registers an execution environment. +/// +/// \param manager Execution environment manager. +void register_execenv(const std::shared_ptr< manager > manager); + + +/// Returns list of registered execenv managers, except default host one. +/// +/// \return A vector of pointers to execenv managers. +const std::vector< std::shared_ptr< manager> > execenvs(); + + +/// Returns execution environment for a test case. +/// +/// \param program The test program. +/// \param test_case_name Name of the test case. +/// +/// \return An execution environment of a test. +std::unique_ptr< execenv::interface > get( + const model::test_program& test_program, + const std::string& test_case_name); + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HPP) diff --git a/contrib/kyua/engine/execenv/execenv_host.cpp b/contrib/kyua/engine/execenv/execenv_host.cpp new file mode 100644 index 000000000000..4e37fca3e7d3 --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.cpp @@ -0,0 +1,52 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "engine/execenv/execenv_host.hpp" + +#include "utils/fs/path.hpp" +#include "utils/process/operations.hpp" + +void +execenv::execenv_host::init() const +{ + // nothing to do +} + + +void +execenv::execenv_host::cleanup() const +{ + // nothing to do +} + + +void +execenv::execenv_host::exec(const args_vector& args) const +{ + utils::process::exec(_test_program.absolute_path(), args); +} diff --git a/contrib/kyua/engine/execenv/execenv_host.hpp b/contrib/kyua/engine/execenv/execenv_host.hpp new file mode 100644 index 000000000000..2742366cfd6f --- /dev/null +++ b/contrib/kyua/engine/execenv/execenv_host.hpp @@ -0,0 +1,63 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file engine/execenv/execenv_host.hpp +/// Default execution environment. + +#if !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) +#define ENGINE_EXECENV_EXECENV_HOST_HPP + +#include "engine/execenv/execenv.hpp" + +#include "utils/process/operations_fwd.hpp" + +namespace execenv = engine::execenv; + +using utils::process::args_vector; + +namespace engine { +namespace execenv { + + +class execenv_host : public execenv::interface { +public: + execenv_host(const model::test_program& test_program, + const std::string& test_case_name) : + execenv::interface(test_program, test_case_name) + {} + + void init() const; + void cleanup() const; + void exec(const args_vector& args) const UTILS_NORETURN; +}; + + +} // namespace execenv +} // namespace engine + +#endif // !defined(ENGINE_EXECENV_EXECENV_HOST_HPP) diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 8346e50bbecf..9a2c63f8b663 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -34,6 +34,7 @@ extern "C" { #include +#include "engine/execenv/execenv.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" #include "model/test_result.hpp" @@ -47,6 +48,7 @@ extern "C" { #include "utils/sanity.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -104,7 +106,10 @@ engine::plain_interface::exec_test( } process::args_vector args; - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp index a7b0a90d97db..a6a4cae7511c 100644 --- a/contrib/kyua/engine/requirements.cpp +++ b/contrib/kyua/engine/requirements.cpp @@ -28,6 +28,7 @@ #include "engine/requirements.hpp" +#include "engine/execenv/execenv.hpp" #include "model/metadata.hpp" #include "model/types.hpp" #include "utils/config/nodes.ipp" @@ -100,6 +101,34 @@ check_allowed_architectures(const model::strings_set& allowed_architectures, } +/// Checks if test's execenv matches the user configuration. +/// +/// \param execenv Execution environment name a test is designed for. +/// \param user_config Runtime user configuration. +/// +/// \return Empty if the execenv is in the list or an error message otherwise. +static std::string +check_execenv(const std::string& execenv, const config::tree& user_config) +{ + std::string name = execenv; + if (name.empty()) + name = engine::execenv::default_execenv_name; // if test claims nothing + + std::set< std::string > execenvs; + try { + execenvs = user_config.lookup< config::strings_set_node >("execenvs"); + } catch (const config::unknown_key_error&) { + // okay, user config does not define it, empty set then + } + + if (execenvs.find(name) == execenvs.end()) + return F("'%s' execenv is not supported or not allowed by " + "the runtime user configuration") % name; + + return ""; +} + + /// Checks if the allowed platforms match the current architecture. /// /// \param allowed_platforms Set of allowed platforms. @@ -263,6 +292,10 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg, if (!reason.empty()) return reason; + reason = check_execenv(md.execenv(), cfg); + if (!reason.empty()) + return reason; + reason = check_allowed_platforms(md.allowed_platforms(), cfg); if (!reason.empty()) return reason; diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp index e7b51d23acca..e75091a40e38 100644 --- a/contrib/kyua/engine/scheduler.cpp +++ b/contrib/kyua/engine/scheduler.cpp @@ -40,6 +40,7 @@ extern "C" { #include "engine/config.hpp" #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "engine/requirements.hpp" #include "model/context.hpp" #include "model/metadata.hpp" @@ -68,6 +69,7 @@ extern "C" { namespace config = utils::config; namespace datetime = utils::datetime; +namespace execenv = engine::execenv; namespace executor = utils::process::executor; namespace fs = utils::fs; namespace logging = utils::logging; @@ -87,6 +89,10 @@ using utils::optional; datetime::delta scheduler::cleanup_timeout(60, 0); +/// Timeout for the test case execenv cleanup operation. +datetime::delta scheduler::execenv_cleanup_timeout(60, 0); + + /// Timeout for the test case listing operation. /// /// TODO(jmmv): This is here only for testing purposes. Maybe we should expose @@ -206,6 +212,18 @@ struct test_exec_data : public exec_data { /// denote that no further attempts shall be made at cleaning this up. bool needs_cleanup; + /// Whether this test case still needs to have its execenv cleanup executed. + /// + /// This is set externally when the cleanup routine is actually invoked to + /// denote that no further attempts shall be made at cleaning this up. + bool needs_execenv_cleanup; + + /// Original PID of the test case subprocess. + /// + /// This is used for the cleanup upon termination by a signal, to reap the + /// leftovers and form missing exit_handle. + pid_t pid; + /// The exit_handle for this test once it has completed. /// /// This is set externally when the test case has finished, as we need this @@ -222,12 +240,14 @@ struct test_exec_data : public exec_data { test_exec_data(const model::test_program_ptr test_program_, const std::string& test_case_name_, const std::shared_ptr< scheduler::interface > interface_, - const config::tree& user_config_) : + const config::tree& user_config_, + const pid_t pid_) : exec_data(test_program_, test_case_name_), - interface(interface_), user_config(user_config_) + interface(interface_), user_config(user_config_), pid(pid_) { const model::test_case& test_case = test_program->find(test_case_name); needs_cleanup = test_case.get_metadata().has_cleanup(); + needs_execenv_cleanup = test_case.get_metadata().has_execenv(); } }; @@ -266,6 +286,40 @@ struct cleanup_exec_data : public exec_data { }; +/// Maintenance data held while a test execenv cleanup is being executed. +/// +/// Instances of this object are related to a previous test_exec_data, as +/// cleanup routines can only exist once the test has been run. +struct execenv_exec_data : public exec_data { + /// The exit handle of the test. This is necessary so that we can return + /// the correct exit_handle to the user of the scheduler. + executor::exit_handle body_exit_handle; + + /// The final result of the test's body. This is necessary to compute the + /// right return value for a test with a cleanup routine: the body result is + /// respected if it is a "bad" result; else the result of the cleanup + /// routine is used if it has failed. + model::test_result body_result; + + /// Constructor. + /// + /// \param test_program_ Test program data for this test case. + /// \param test_case_name_ Name of the test case. + /// \param body_exit_handle_ If not none, exit handle of the body + /// corresponding to the cleanup routine represented by this exec_data. + /// \param body_result_ If not none, result of the body corresponding to the + /// cleanup routine represented by this exec_data. + execenv_exec_data(const model::test_program_ptr test_program_, + const std::string& test_case_name_, + const executor::exit_handle& body_exit_handle_, + const model::test_result& body_result_) : + exec_data(test_program_, test_case_name_), + body_exit_handle(body_exit_handle_), body_result(body_result_) + { + } +}; + + /// Shared pointer to exec_data. /// /// We require this because we want exec_data to not be copyable, and thus we @@ -492,6 +546,40 @@ class run_test_cleanup { }; +/// Functor to execute a test execenv cleanup in a child process. +class run_execenv_cleanup { + /// Test program to execute. + const model::test_program _test_program; + + /// Name of the test case to execute. + const std::string& _test_case_name; + +public: + /// Constructor. + /// + /// \param test_program Test program to execute. + /// \param test_case_name Name of the test case to execute. + run_execenv_cleanup( + const model::test_program_ptr test_program, + const std::string& test_case_name) : + _test_program(force_absolute_paths(*test_program)), + _test_case_name(test_case_name) + { + } + + /// Body of the subprocess. + /// + /// \param control_directory The testcase directory where cleanup will be + /// run from. + void + operator()(const fs::path& /* control_directory */) + { + auto e = execenv::get(_test_program, _test_case_name); + e->cleanup(); + } +}; + + /// Obtains the right scheduler interface for a given test program. /// /// \param name The name of the interface of the test program. @@ -835,6 +923,22 @@ struct engine::scheduler::scheduler_handle::impl : utils::noncopyable { % test_data->test_case_name); } } + + const test_exec_data_vector td = tests_needing_execenv_cleanup(); + + for (test_exec_data_vector::const_iterator iter = td.begin(); + iter != td.end(); ++iter) { + const test_exec_data* test_data = *iter; + + try { + sync_execenv_cleanup(test_data); + } catch (const std::runtime_error& e) { + LW(F("Failed to run execenv cleanup routine for %s:%s on abrupt " + "termination") + % test_data->test_program->relative_path() + % test_data->test_case_name); + } + } } /// Finds any pending exec_datas that correspond to tests needing cleanup. @@ -856,6 +960,8 @@ struct engine::scheduler::scheduler_handle::impl : utils::noncopyable { if (test_data->needs_cleanup) { tests_data.push_back(test_data); test_data->needs_cleanup = false; + if (!test_data->exit_handle) + test_data->exit_handle = generic.reap(test_data->pid); } } catch (const std::bad_cast& e) { // Do nothing for cleanup_exec_data objects. @@ -865,6 +971,37 @@ struct engine::scheduler::scheduler_handle::impl : utils::noncopyable { return tests_data; } + /// Finds any pending exec_datas that correspond to tests needing execenv + /// cleanup. + /// + /// \return The collection of test_exec_data objects that have their + /// specific execenv property set. + test_exec_data_vector + tests_needing_execenv_cleanup(void) + { + test_exec_data_vector tests_data; + + for (exec_data_map::const_iterator iter = all_exec_data.begin(); + iter != all_exec_data.end(); ++iter) { + const exec_data_ptr data = (*iter).second; + + try { + test_exec_data* test_data = &dynamic_cast< test_exec_data& >( + *data.get()); + if (test_data->needs_execenv_cleanup) { + tests_data.push_back(test_data); + test_data->needs_execenv_cleanup = false; + if (!test_data->exit_handle) + test_data->exit_handle = generic.reap(test_data->pid); + } + } catch (const std::bad_cast& e) { + // Do nothing for other objects. + } + } + + return tests_data; + } + /// Cleans up a single test case synchronously. /// /// \param test_data The data of the previously executed test case to be @@ -926,6 +1063,61 @@ struct engine::scheduler::scheduler_handle::impl : utils::noncopyable { return handle; } + + /// Cleans up a single test case execenv synchronously. + /// + /// \param test_data The data of the previously executed test case to be + /// cleaned up. + void + sync_execenv_cleanup(const test_exec_data* test_data) + { + // The message in this result should never be seen by the user, but use + // something reasonable just in case it leaks and we need to pinpoint + // the call site. + model::test_result result(model::test_result_broken, + "Test case died abruptly"); + + const executor::exec_handle cleanup_handle = spawn_execenv_cleanup( + test_data->test_program, test_data->test_case_name, + test_data->exit_handle.get(), result); + generic.wait(cleanup_handle); + } + + /// Forks and executes a test case execenv cleanup asynchronously. + /// + /// \param test_program The container test program. + /// \param test_case_name The name of the test case to run. + /// \param body_handle The exit handle of the test case's corresponding + /// body. The cleanup will be executed in the same context. + /// \param body_result The result of the test case's corresponding body. + /// + /// \return A handle for the background operation. Used to match the result + /// of the execution returned by wait_any() with this invocation. + executor::exec_handle + spawn_execenv_cleanup(const model::test_program_ptr test_program, + const std::string& test_case_name, + const executor::exit_handle& body_handle, + const model::test_result& body_result) + { + generic.check_interrupt(); + + LI(F("Spawning %s:%s (execenv cleanup)") + % test_program->absolute_path() % test_case_name); + + const executor::exec_handle handle = generic.spawn_followup( + run_execenv_cleanup(test_program, test_case_name), + body_handle, execenv_cleanup_timeout); + + const exec_data_ptr data(new execenv_exec_data( + test_program, test_case_name, body_handle, body_result)); + LD(F("Inserting %s into all_exec_data (execenv cleanup)") % handle.pid()); + INV_MSG(all_exec_data.find(handle.pid()) == all_exec_data.end(), + F("PID %s already in all_exec_data; not properly cleaned " + "up or reused too fast") % handle.pid());; + all_exec_data.insert(exec_data_map::value_type(handle.pid(), data)); + + return handle; + } }; @@ -1115,7 +1307,7 @@ scheduler::scheduler_handle::spawn_test( unprivileged_user); const exec_data_ptr data(new test_exec_data( - test_program, test_case_name, interface, user_config)); + test_program, test_case_name, interface, user_config, handle.pid())); LD(F("Inserting %s into all_exec_data") % handle.pid()); INV_MSG( _pimpl->all_exec_data.find(handle.pid()) == _pimpl->all_exec_data.end(), @@ -1150,6 +1342,8 @@ scheduler::scheduler_handle::wait_any(void) _pimpl->generic, handle); optional< model::test_result > result; + + // test itself try { test_exec_data* test_data = &dynamic_cast< test_exec_data& >( *data.get()); @@ -1185,6 +1379,7 @@ scheduler::scheduler_handle::wait_any(void) // if the test's body reports a skip (because actions could have // already been taken). test_data->needs_cleanup = false; + test_data->needs_execenv_cleanup = false; } } if (!result) { @@ -1209,7 +1404,6 @@ scheduler::scheduler_handle::wait_any(void) _pimpl->spawn_cleanup(test_data->test_program, test_data->test_case_name, test_data->user_config, handle, result.get()); - test_data->needs_cleanup = false; // TODO(jmmv): Chaining this call is ugly. We'd be better off by // looping over terminated processes until we got a result suitable @@ -1218,7 +1412,21 @@ scheduler::scheduler_handle::wait_any(void) // of test cases do not have cleanup routines. return wait_any(); } + + if (test_data->needs_execenv_cleanup) { + INV(test_case.get_metadata().has_execenv()); + _pimpl->spawn_execenv_cleanup(test_data->test_program, + test_data->test_case_name, + handle, result.get()); + test_data->needs_execenv_cleanup = false; + return wait_any(); + } } catch (const std::bad_cast& e) { + // ok, let's check for another type + } + + // test cleanup + try { const cleanup_exec_data* cleanup_data = &dynamic_cast< const cleanup_exec_data& >(*data.get()); LD(F("Got %s from all_exec_data (cleanup)") % handle.original_pid()); @@ -1257,7 +1465,65 @@ scheduler::scheduler_handle::wait_any(void) _pimpl->all_exec_data.erase(handle.original_pid()); handle = cleanup_data->body_exit_handle; + + const exec_data_map::iterator it = _pimpl->all_exec_data.find( + handle.original_pid()); + if (it != _pimpl->all_exec_data.end()) { + exec_data_ptr d = (*it).second; + test_exec_data* test_data = &dynamic_cast< test_exec_data& >( + *d.get()); + const model::test_case& test_case = + cleanup_data->test_program->find(cleanup_data->test_case_name); + test_data->needs_cleanup = false; + + if (test_data->needs_execenv_cleanup) { + INV(test_case.get_metadata().has_execenv()); + _pimpl->spawn_execenv_cleanup(cleanup_data->test_program, + cleanup_data->test_case_name, + handle, result.get()); + test_data->needs_execenv_cleanup = false; + return wait_any(); + } + } + } catch (const std::bad_cast& e) { + // ok, let's check for another type } + + // execenv cleanup + try { + const execenv_exec_data* execenv_data = + &dynamic_cast< const execenv_exec_data& >(*data.get()); + LD(F("Got %s from all_exec_data (execenv cleanup)") % handle.original_pid()); + + const model::test_result& body_result = execenv_data->body_result; + if (body_result.good()) { + if (!handle.status()) { + result = model::test_result(model::test_result_broken, + "Test case execenv cleanup timed out"); + } else { + if (!handle.status().get().exited() || + handle.status().get().exitstatus() != EXIT_SUCCESS) { + result = model::test_result( + model::test_result_broken, + "Test case execenv cleanup did not terminate successfully"); // ? + } else { + result = body_result; + } + } + } else { + result = body_result; + } + + LD(F("Removing %s from all_exec_data (execenv cleanup) in favor of %s") + % handle.original_pid() + % execenv_data->body_exit_handle.original_pid()); + _pimpl->all_exec_data.erase(handle.original_pid()); + + handle = execenv_data->body_exit_handle; + } catch (const std::bad_cast& e) { + // ok, it was one of the types above + } + INV(result); std::shared_ptr< result_handle::bimpl > result_handle_bimpl( diff --git a/contrib/kyua/engine/scheduler.hpp b/contrib/kyua/engine/scheduler.hpp index 24ff0b5a26fc..ee01c83b4991 100644 --- a/contrib/kyua/engine/scheduler.hpp +++ b/contrib/kyua/engine/scheduler.hpp @@ -262,6 +262,7 @@ class scheduler_handle { extern utils::datetime::delta cleanup_timeout; +extern utils::datetime::delta execenv_cleanup_timeout; extern utils::datetime::delta list_timeout; diff --git a/contrib/kyua/engine/tap.cpp b/contrib/kyua/engine/tap.cpp index 85e23857f5b7..ed35ba40433f 100644 --- a/contrib/kyua/engine/tap.cpp +++ b/contrib/kyua/engine/tap.cpp @@ -35,6 +35,7 @@ extern "C" { #include #include "engine/exceptions.hpp" +#include "engine/execenv/execenv.hpp" #include "engine/tap_parser.hpp" #include "model/test_case.hpp" #include "model/test_program.hpp" @@ -48,6 +49,7 @@ extern "C" { #include "utils/sanity.hpp" namespace config = utils::config; +namespace execenv = engine::execenv; namespace fs = utils::fs; namespace process = utils::process; @@ -151,7 +153,10 @@ engine::tap_interface::exec_test( } process::args_vector args; - process::exec(test_program.absolute_path(), args); + + auto e = execenv::get(test_program, test_case_name); + e->init(); + e->exec(args); } diff --git a/contrib/kyua/examples/kyua.conf b/contrib/kyua/examples/kyua.conf index 83418a320dc4..d7e2ef60e50a 100644 --- a/contrib/kyua/examples/kyua.conf +++ b/contrib/kyua/examples/kyua.conf @@ -43,6 +43,9 @@ syntax(2) -- Name of the system architecture (aka processor type). architecture = "x86_64" +-- List of execution environments. +execenvs = "host jail" + -- Maximum number of jobs (such as test case runs) to execute concurrently. parallelism = 16 diff --git a/contrib/kyua/integration/cmd_config_test.sh b/contrib/kyua/integration/cmd_config_test.sh index ed457e5c4b37..02e7654571e7 100644 --- a/contrib/kyua/integration/cmd_config_test.sh +++ b/contrib/kyua/integration/cmd_config_test.sh @@ -42,6 +42,7 @@ all_body() { cat >"${HOME}/.kyua/kyua.conf" <expout < +#include "engine/execenv/execenv.hpp" #include "model/exceptions.hpp" #include "model/types.hpp" #include "utils/config/exceptions.hpp" @@ -247,6 +248,8 @@ init_tree(config::tree& tree) tree.define< config::strings_set_node >("allowed_platforms"); tree.define_dynamic("custom"); tree.define< config::string_node >("description"); + tree.define< config::string_node >("execenv"); + tree.define< config::string_node >("execenv_jail_params"); tree.define< config::bool_node >("has_cleanup"); tree.define< config::bool_node >("is_exclusive"); tree.define< config::strings_set_node >("required_configs"); @@ -270,6 +273,8 @@ set_defaults(config::tree& tree) tree.set< config::strings_set_node >("allowed_platforms", model::strings_set()); tree.set< config::string_node >("description", ""); + tree.set< config::string_node >("execenv", ""); + tree.set< config::string_node >("execenv_jail_params", ""); tree.set< config::bool_node >("has_cleanup", false); tree.set< config::bool_node >("is_exclusive", false); tree.set< config::strings_set_node >("required_configs", @@ -464,6 +469,36 @@ model::metadata::description(void) const } +/// Returns execution environment name. +/// +/// \return Name of configured execution environment. +const std::string& +model::metadata::execenv(void) const +{ + if (_pimpl->props.is_set("execenv")) { + return _pimpl->props.lookup< config::string_node >("execenv"); + } else { + return get_defaults().lookup< config::string_node >("execenv"); + } +} + + +/// Returns execenv jail(8) parameters string to run a test with. +/// +/// \return String of jail parameters. +const std::string& +model::metadata::execenv_jail_params(void) const +{ + if (_pimpl->props.is_set("execenv_jail_params")) { + return _pimpl->props.lookup< config::string_node >( + "execenv_jail_params"); + } else { + return get_defaults().lookup< config::string_node >( + "execenv_jail_params"); + } +} + + /// Returns whether the test has a cleanup part or not. /// /// \return True if there is a cleanup part; false otherwise. @@ -478,6 +513,17 @@ model::metadata::has_cleanup(void) const } +/// Returns whether the test has a specific execenv apart from default one. +/// +/// \return True if there is a non-host execenv configured; false otherwise. +bool +model::metadata::has_execenv(void) const +{ + const std::string& name = execenv(); + return !name.empty() && name != engine::execenv::default_execenv_name; +} + + /// Returns whether the test is exclusive or not. /// /// \return True if the test has to be run on its own, not concurrently with any @@ -890,6 +936,36 @@ model::metadata_builder::set_description(const std::string& description) } +/// Sets execution environment name. +/// +/// \param name Execution environment name. +/// +/// \return A reference to this builder. +/// +/// \throw model::error If the value is invalid. +model::metadata_builder& +model::metadata_builder::set_execenv(const std::string& name) +{ + set< config::string_node >(_pimpl->props, "execenv", name); + return *this; +} + + +/// Sets execenv jail(8) parameters string to run the test with. +/// +/// \param params String of jail parameters. +/// +/// \return A reference to this builder. +/// +/// \throw model::error If the value is invalid. +model::metadata_builder& +model::metadata_builder::set_execenv_jail_params(const std::string& params) +{ + set< config::string_node >(_pimpl->props, "execenv_jail_params", params); + return *this; +} + + /// Sets whether the test has a cleanup part or not. /// /// \param cleanup True if the test has a cleanup part; false otherwise. diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp index c7dd4519f122..83bc5348774a 100644 --- a/contrib/kyua/model/metadata.hpp +++ b/contrib/kyua/model/metadata.hpp @@ -67,7 +67,10 @@ class metadata { const strings_set& allowed_platforms(void) const; model::properties_map custom(void) const; const std::string& description(void) const; + const std::string& execenv(void) const; + const std::string& execenv_jail_params(void) const; bool has_cleanup(void) const; + bool has_execenv(void) const; bool is_exclusive(void) const; const strings_set& required_configs(void) const; const utils::units::bytes& required_disk_space(void) const; @@ -110,6 +113,8 @@ class metadata_builder : utils::noncopyable { metadata_builder& set_allowed_platforms(const strings_set&); metadata_builder& set_custom(const model::properties_map&); metadata_builder& set_description(const std::string&); + metadata_builder& set_execenv(const std::string&); + metadata_builder& set_execenv_jail_params(const std::string&); metadata_builder& set_has_cleanup(const bool); metadata_builder& set_is_exclusive(const bool); metadata_builder& set_required_configs(const strings_set&); diff --git a/contrib/kyua/model/metadata_test.cpp b/contrib/kyua/model/metadata_test.cpp index 7b22653ec1a2..b4c3dff5b029 100644 --- a/contrib/kyua/model/metadata_test.cpp +++ b/contrib/kyua/model/metadata_test.cpp @@ -315,6 +315,8 @@ ATF_TEST_CASE_BODY(to_properties) props["allowed_platforms"] = ""; props["custom.foo"] = "bar"; props["description"] = ""; + props["execenv"] = ""; + props["execenv_jail_params"] = ""; props["has_cleanup"] = "false"; props["is_exclusive"] = "false"; props["required_configs"] = ""; @@ -406,7 +408,8 @@ ATF_TEST_CASE_BODY(output__defaults) std::ostringstream str; str << model::metadata_builder().build(); ATF_REQUIRE_EQ("metadata{allowed_architectures='', allowed_platforms='', " - "description='', has_cleanup='false', is_exclusive='false', " + "description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='false', " "required_configs='', " "required_disk_space='0', required_files='', " "required_memory='0', " @@ -428,7 +431,8 @@ ATF_TEST_CASE_BODY(output__some_values) .build(); ATF_REQUIRE_EQ( "metadata{allowed_architectures='abc', allowed_platforms='', " - "description='', has_cleanup='false', is_exclusive='true', " + "description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='true', " "required_configs='', " "required_disk_space='0', required_files='bar foo', " "required_memory='1.00K', " diff --git a/contrib/kyua/model/test_case_test.cpp b/contrib/kyua/model/test_case_test.cpp index 1a55de0fab42..1e2597d1501e 100644 --- a/contrib/kyua/model/test_case_test.cpp +++ b/contrib/kyua/model/test_case_test.cpp @@ -200,7 +200,8 @@ ATF_TEST_CASE_BODY(test_case__output) ATF_REQUIRE_EQ( "test_case{name='the-name', " "metadata=metadata{allowed_architectures='', allowed_platforms='foo', " - "custom.bar='baz', description='', has_cleanup='false', " + "custom.bar='baz', description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', " "is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " "required_memory='0', " diff --git a/contrib/kyua/model/test_program_test.cpp b/contrib/kyua/model/test_program_test.cpp index f9a8f7e59da3..ddfbc430387c 100644 --- a/contrib/kyua/model/test_program_test.cpp +++ b/contrib/kyua/model/test_program_test.cpp @@ -544,7 +544,8 @@ check_output__no_test_cases(void) "test_program{interface='plain', binary='binary/path', " "root='/the/root', test_suite='suite-name', " "metadata=metadata{allowed_architectures='a', allowed_platforms='', " - "description='', has_cleanup='false', is_exclusive='false', " + "description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " "required_memory='0', " "required_programs='', required_user='', timeout='300'}, " @@ -593,21 +594,23 @@ check_output__some_test_cases(void) "test_program{interface='plain', binary='binary/path', " "root='/the/root', test_suite='suite-name', " "metadata=metadata{allowed_architectures='a', allowed_platforms='', " - "description='', has_cleanup='false', is_exclusive='false', " + "description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " "required_memory='0', " "required_programs='', required_user='', timeout='300'}, " "test_cases=map(" "another-name=test_case{name='another-name', " "metadata=metadata{allowed_architectures='a', allowed_platforms='', " - "description='', has_cleanup='false', is_exclusive='false', " + "description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " "required_memory='0', " "required_programs='', required_user='', timeout='300'}}, " "the-name=test_case{name='the-name', " "metadata=metadata{allowed_architectures='a', allowed_platforms='foo', " - "custom.bar='baz', description='', has_cleanup='false', " - "is_exclusive='false', " + "custom.bar='baz', description='', execenv='', execenv_jail_params='', " + "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " "required_memory='0', " "required_programs='', required_user='', timeout='300'}})}", diff --git a/contrib/kyua/os/freebsd/execenv_jail.cpp b/contrib/kyua/os/freebsd/execenv_jail.cpp new file mode 100644 index 000000000000..04f44a412760 --- /dev/null +++ b/contrib/kyua/os/freebsd/execenv_jail.cpp @@ -0,0 +1,78 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/execenv_jail.hpp" + +#include "model/metadata.hpp" +#include "model/test_case.hpp" +#include "os/freebsd/utils/jail.hpp" +#include "utils/fs/path.hpp" + + +namespace freebsd { + + +bool execenv_jail_supported = true; + + +static utils::jail jail = utils::jail(); + + +void +execenv_jail::init() const +{ + auto test_case = _test_program.find(_test_case_name); + + jail.create( + jail.make_name(_test_program.absolute_path(), _test_case_name), + test_case.get_metadata().execenv_jail_params() + ); +} + + +void +execenv_jail::cleanup() const +{ + jail.remove( + jail.make_name(_test_program.absolute_path(), _test_case_name) + ); +} + + +void +execenv_jail::exec(const args_vector& args) const +{ + jail.exec( + jail.make_name(_test_program.absolute_path(), _test_case_name), + _test_program.absolute_path(), + args + ); +} + + +} // namespace freebsd diff --git a/contrib/kyua/os/freebsd/execenv_jail.hpp b/contrib/kyua/os/freebsd/execenv_jail.hpp new file mode 100644 index 000000000000..e6d2c2e42497 --- /dev/null +++ b/contrib/kyua/os/freebsd/execenv_jail.hpp @@ -0,0 +1,65 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/execenv_jail.hpp +/// FreeBSD jail execution environment. + +#if !defined(FREEBSD_EXECENV_JAIL_HPP) +#define FREEBSD_EXECENV_JAIL_HPP + +#include "engine/execenv/execenv.hpp" + +#include "utils/process/operations_fwd.hpp" + +namespace execenv = engine::execenv; + +using utils::process::args_vector; + + +namespace freebsd { + + +extern bool execenv_jail_supported; + + +class execenv_jail : public execenv::interface { +public: + execenv_jail(const model::test_program& test_program, + const std::string& test_case_name) : + execenv::interface(test_program, test_case_name) + {} + + void init() const; + void cleanup() const; + void exec(const args_vector& args) const UTILS_NORETURN; +}; + + +} // namespace freebsd + +#endif // !defined(FREEBSD_EXECENV_JAIL_HPP) diff --git a/contrib/kyua/os/freebsd/execenv_jail_manager.cpp b/contrib/kyua/os/freebsd/execenv_jail_manager.cpp new file mode 100644 index 000000000000..18673f6b0faa --- /dev/null +++ b/contrib/kyua/os/freebsd/execenv_jail_manager.cpp @@ -0,0 +1,63 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/execenv_jail_manager.hpp" + +#include "model/metadata.hpp" +#include "model/test_case.hpp" +#include "os/freebsd/execenv_jail.hpp" + +static const std::string execenv_name = "jail"; + +const std::string& +freebsd::execenv_jail_manager::name() const +{ + return execenv_name; +} + + +bool +freebsd::execenv_jail_manager::is_supported() const +{ + return freebsd::execenv_jail_supported; +} + + +std::unique_ptr< execenv::interface > +freebsd::execenv_jail_manager::probe( + const model::test_program& test_program, + const std::string& test_case_name) const +{ + auto test_case = test_program.find(test_case_name); + if (test_case.get_metadata().execenv() != execenv_name) + return nullptr; + + return std::unique_ptr< execenv::interface >( + new freebsd::execenv_jail(test_program, test_case_name) + ); +} diff --git a/contrib/kyua/os/freebsd/execenv_jail_manager.hpp b/contrib/kyua/os/freebsd/execenv_jail_manager.hpp new file mode 100644 index 000000000000..eee9da9ed7d0 --- /dev/null +++ b/contrib/kyua/os/freebsd/execenv_jail_manager.hpp @@ -0,0 +1,54 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/execenv_jail_manager.hpp +/// FreeBSD jail execution environment manager. + +#if !defined(FREEBSD_EXECENV_JAIL_MANAGER_HPP) +#define FREEBSD_EXECENV_JAIL_MANAGER_HPP + +#include "engine/execenv/execenv.hpp" + +namespace execenv = engine::execenv; + +namespace freebsd { + + +class execenv_jail_manager : public execenv::manager { +public: + const std::string& name() const; + bool is_supported() const; + std::unique_ptr< execenv::interface > probe( + const model::test_program& test_program, + const std::string& test_case_name) const; +}; + + +} // namespace freebsd + +#endif // !defined(FREEBSD_EXECENV_JAIL_MANAGER_HPP) diff --git a/contrib/kyua/os/freebsd/execenv_jail_stub.cpp b/contrib/kyua/os/freebsd/execenv_jail_stub.cpp new file mode 100644 index 000000000000..9425618e2b5a --- /dev/null +++ b/contrib/kyua/os/freebsd/execenv_jail_stub.cpp @@ -0,0 +1,75 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/execenv_jail.hpp" + +#include + +#include "utils/process/operations_fwd.hpp" + +using utils::process::args_vector; + + +static inline void requires_freebsd(void) UTILS_NORETURN; + +static inline void +requires_freebsd(void) +{ + std::cerr << "execenv=\"jail\" requires FreeBSD with jail feature.\n"; + std::exit(EXIT_FAILURE); +} + + +namespace freebsd { + + +bool execenv_jail_supported = false; + + +void +execenv_jail::init() const +{ + requires_freebsd(); +} + + +void +execenv_jail::cleanup() const +{ + requires_freebsd(); +} + + +void +execenv_jail::exec(const args_vector&) const +{ + requires_freebsd(); +} + + +} // namespace freebsd diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp new file mode 100644 index 000000000000..13e5dcf0e023 --- /dev/null +++ b/contrib/kyua/os/freebsd/main.cpp @@ -0,0 +1,54 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/main.hpp" + +#include "engine/execenv/execenv.hpp" +#include "os/freebsd/execenv_jail_manager.hpp" + +namespace execenv = engine::execenv; + +/// FreeBSD related features initialization. +/// +/// \param argc The number of arguments passed on the command line. +/// \param argv NULL-terminated array containing the command line arguments. +/// +/// \return 0 on success, some other integer on error. +/// +/// \throw std::exception This throws any uncaught exception. Such exceptions +/// are bugs, but we let them propagate so that the runtime will abort and +/// dump core. +int +freebsd::main(const int, const char* const* const) +{ + execenv::register_execenv( + std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager()) + ); + + return 0; +} diff --git a/contrib/kyua/os/freebsd/main.hpp b/contrib/kyua/os/freebsd/main.hpp new file mode 100644 index 000000000000..0581483e37e0 --- /dev/null +++ b/contrib/kyua/os/freebsd/main.hpp @@ -0,0 +1,41 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/main.hpp +/// FreeBSD related features initialization. + +#if !defined(FREEBSD_MAIN_HPP) +#define FREEBSD_MAIN_HPP + +namespace freebsd { + +int main(const int argc, const char* const* const argv); + +} // namespace freebsd + +#endif // !defined(FREEBSD_MAIN_HPP) diff --git a/contrib/kyua/os/freebsd/utils/jail.cpp b/contrib/kyua/os/freebsd/utils/jail.cpp new file mode 100644 index 000000000000..b39761f28e51 --- /dev/null +++ b/contrib/kyua/os/freebsd/utils/jail.cpp @@ -0,0 +1,306 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "os/freebsd/utils/jail.hpp" + +extern "C" { +#include +#include +#include + +// FreeBSD sysctl facility +#include + +// FreeBSD Jail syscalls +#include +#include + +// FreeBSD Jail library +#include +} + +#include +#include +#include + +#include "model/metadata.hpp" +#include "model/test_case.hpp" +#include "model/test_program.hpp" +#include "utils/fs/path.hpp" +#include "utils/process/child.ipp" +#include "utils/format/macros.hpp" +#include "utils/process/operations.hpp" +#include "utils/process/status.hpp" + +namespace process = utils::process; +namespace fs = utils::fs; + +using utils::process::args_vector; +using utils::process::child; + + +static const size_t jail_name_max_len = MAXHOSTNAMELEN - 1; +static const char* jail_name_prefix = "kyua"; + + +/// Functor to run a program. +class run { + /// Program binary absolute path. + const utils::fs::path& _program; + + /// Program arguments. + const args_vector& _args; + +public: + /// Constructor. + /// + /// \param program Program binary absolute path. + /// \param args Program arguments. + run( + const utils::fs::path& program, + const args_vector& args) : + _program(program), + _args(args) + { + } + + /// Body of the subprocess. + void + operator()(void) + { + process::exec(_program, _args); + } +}; + + +namespace freebsd { +namespace utils { + + +std::vector< std::string > +jail::parse_params_string(const std::string& str) +{ + std::vector< std::string > params; + std::string p; + char quote = 0; + + std::istringstream iss(str); + while (iss >> p) { + if (p.front() == '"' || p.front() == '\'') { + quote = p.front(); + p.erase(p.begin()); + if (p.find(quote) == std::string::npos) { + std::string rest; + std::getline(iss, rest, quote); + p += rest; + iss.ignore(); + } + if (p.back() == quote) + p.erase(p.end() - 1); + } + params.push_back(p); + } + + return params; +} + + +/// Constructs a jail name based on program and test case. +/// +/// The formula is "kyua" + + "_" + . +/// All non-alphanumeric chars are replaced with "_". +/// +/// If a resulting string exceeds maximum allowed length of a jail name, +/// then it's shortened from the left side keeping the "kyua" prefix. +/// +/// \param program The test program. +/// \param test_case_name Name of the test case. +/// +/// \return A jail name string. +std::string +jail::make_name(const fs::path& program, + const std::string& test_case_name) +{ + std::string name = std::regex_replace( + program.str() + "_" + test_case_name, + std::regex(R"([^A-Za-z0-9_])"), + "_"); + + const std::string::size_type limit = + jail_name_max_len - strlen(jail_name_prefix); + if (name.length() > limit) + name.erase(0, name.length() - limit); + + return jail_name_prefix + name; +} + + +/// Create a jail with a given name and params string. +/// +/// A new jail will always be 'persist', thus the caller is expected to remove +/// the jail eventually via remove(). +/// +/// It's expected to be run in a subprocess. +/// +/// \param jail_name Name of a new jail. +/// \param jail_params String of jail parameters. +void +jail::create(const std::string& jail_name, + const std::string& jail_params) +{ + args_vector av; + + // creation flag + av.push_back("-qc"); + + // jail name + av.push_back("name=" + jail_name); + + // determine maximum allowed children.max + const char* const oid = "security.jail.children.max"; + int max; + size_t len = sizeof(max); + if (::sysctlbyname(oid, &max, &len, NULL, 0) != 0) { + std::cerr << "sysctlbyname(" << oid << ") errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + if (len < sizeof(max)) { + std::cerr << "sysctlbyname(" << oid << ") provides less " + "data (" << len << ") than expected (" << sizeof(max) << ").\n"; + std::exit(EXIT_FAILURE); + } + if (max < 0) { + std::cerr << "sysctlbyname(" << oid << ") yields " + "abnormal " << max << ".\n"; + std::exit(EXIT_FAILURE); + } + if (max > 0) + max--; // a child jail must have less than parent's children.max + av.push_back("children.max=" + std::to_string(max)); + + // test defined jail params + const std::vector< std::string > params = parse_params_string(jail_params); + for (const std::string& p : params) + av.push_back(p); + + // it must be persist + av.push_back("persist"); + + // invoke jail + std::auto_ptr< process::child > child = child::fork_capture( + run(fs::path("/usr/sbin/jail"), av)); + process::status status = child->wait(); + + // expect success + if (status.exited() && status.exitstatus() == EXIT_SUCCESS) + return; + + // otherwise, let us know what jail thinks and fail fast + std::cerr << child->output().rdbuf(); + std::exit(EXIT_FAILURE); +} + + +/// Executes an external binary in a jail and replaces the current process. +/// +/// \param jail_name Name of the jail to run within. +/// \param program The test program binary absolute path. +/// \param args The arguments to pass to the binary, without the program name. +void +jail::exec(const std::string& jail_name, + const fs::path& program, + const args_vector& args) throw() +{ + // get work dir prepared by kyua + char cwd[PATH_MAX]; + if (::getcwd(cwd, sizeof(cwd)) == NULL) { + std::cerr << "jail::exec: getcwd() errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + + // get jail id by its name + int jid = ::jail_getid(jail_name.c_str()); + if (jid == -1) { + std::cerr << "jail::exec: jail_getid() errors: " + << strerror(errno) << ": " << jail_errmsg << ".\n"; + std::exit(EXIT_FAILURE); + } + + // attach to the jail + if (::jail_attach(jid) == -1) { + std::cerr << "jail::exec: jail_attach() errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + + // set back the expected work dir + if (::chdir(cwd) == -1) { + std::cerr << "jail::exec: chdir() errors: " + << strerror(errno) << ".\n"; + std::exit(EXIT_FAILURE); + } + + process::exec(program, args); +} + + +/// Removes a jail with a given name. +/// +/// It's expected to be run in a subprocess. +/// +/// \param jail_name Name of a jail to remove. +void +jail::remove(const std::string& jail_name) +{ + args_vector av; + + // removal flag + av.push_back("-r"); + + // jail name + av.push_back(jail_name); + + // invoke jail + std::auto_ptr< process::child > child = child::fork_capture( + run(fs::path("/usr/sbin/jail"), av)); + process::status status = child->wait(); + + // expect success + if (status.exited() && status.exitstatus() == EXIT_SUCCESS) + std::exit(EXIT_SUCCESS); + + // otherwise, let us know what jail thinks and fail fast + std::cerr << child->output().rdbuf(); + std::exit(EXIT_FAILURE); +} + + +} // namespace utils +} // namespace freebsd diff --git a/contrib/kyua/os/freebsd/utils/jail.hpp b/contrib/kyua/os/freebsd/utils/jail.hpp new file mode 100644 index 000000000000..5b972155cd25 --- /dev/null +++ b/contrib/kyua/os/freebsd/utils/jail.hpp @@ -0,0 +1,64 @@ +// Copyright 2024 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/// \file os/freebsd/utils/jail.hpp +/// FreeBSD jail utilities. + +#if !defined(FREEBSD_UTILS_JAIL_HPP) +#define FREEBSD_UTILS_JAIL_HPP + +#include "utils/defs.hpp" +#include "utils/fs/path_fwd.hpp" +#include "utils/process/operations_fwd.hpp" + +namespace fs = utils::fs; + +using utils::process::args_vector; + +namespace freebsd { +namespace utils { + + +class jail { +public: + std::vector< std::string > parse_params_string(const std::string& str); + std::string make_name(const fs::path& program, + const std::string& test_case_name); + void create(const std::string& jail_name, + const std::string& jail_params); + void exec(const std::string& jail_name, + const fs::path& program, + const args_vector& args) throw() UTILS_NORETURN; + void remove(const std::string& jail_name); +}; + + +} // namespace utils +} // namespace freebsd + +#endif // !defined(FREEBSD_UTILS_JAIL_HPP) diff --git a/contrib/kyua/utils/config/nodes.ipp b/contrib/kyua/utils/config/nodes.ipp index 9e0a1228cccd..0ec3832cc690 100644 --- a/contrib/kyua/utils/config/nodes.ipp +++ b/contrib/kyua/utils/config/nodes.ipp @@ -382,9 +382,14 @@ config::base_set_node< ValueType >::push_lua(lutok::state& /* state */) const template< typename ValueType > void config::base_set_node< ValueType >::set_lua( - lutok::state& /* state */, - const int /* value_index */) + lutok::state& state, + const int value_index) { + if (state.is_string(value_index)) { + set_string(state.to_string(value_index)); + return; + } + UNREACHABLE; } diff --git a/contrib/kyua/utils/process/executor.cpp b/contrib/kyua/utils/process/executor.cpp index a00632614737..b73a86b9c1b9 100644 --- a/contrib/kyua/utils/process/executor.cpp +++ b/contrib/kyua/utils/process/executor.cpp @@ -689,6 +689,34 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable { data._pimpl->state_owners, all_exec_handles))); } + + executor::exit_handle + reap(const pid_t original_pid) + { + const exec_handles_map::iterator iter = all_exec_handles.find( + original_pid); + exec_handle& data = (*iter).second; + data._pimpl->timer.unprogram(); + + if (!fs::exists(data.stdout_file())) { + std::ofstream new_stdout(data.stdout_file().c_str()); + } + if (!fs::exists(data.stderr_file())) { + std::ofstream new_stderr(data.stderr_file().c_str()); + } + + return exit_handle(std::shared_ptr< exit_handle::impl >( + new exit_handle::impl( + data.pid(), + none, + data._pimpl->unprivileged_user, + data._pimpl->start_time, datetime::timestamp::now(), + data.control_directory(), + data.stdout_file(), + data.stderr_file(), + data._pimpl->state_owners, + all_exec_handles))); + } }; @@ -879,6 +907,20 @@ executor::executor_handle::wait_any(void) } +/// Forms exit_handle for the given PID subprocess. +/// +/// Can be used in the cases when we want to do cleanup(s) of a killed test +/// subprocess, but we do not have exit handle as we usually do after normal +/// wait mechanism. +/// +/// \return A pointer to an object describing the subprocess. +executor::exit_handle +executor::executor_handle::reap(const int pid) +{ + return _pimpl->reap(pid); +} + + /// Checks if an interrupt has fired. /// /// Calls to this function should be sprinkled in strategic places through the diff --git a/contrib/kyua/utils/process/executor.hpp b/contrib/kyua/utils/process/executor.hpp index 858ad9c815aa..01a17ff8c681 100644 --- a/contrib/kyua/utils/process/executor.hpp +++ b/contrib/kyua/utils/process/executor.hpp @@ -215,6 +215,7 @@ class executor_handle { exit_handle wait(const exec_handle); exit_handle wait_any(void); + exit_handle reap(const pid_t); void check_interrupt(void) const; }; diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 5160d1ed6328..f9ac12bb0f9d 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -127,7 +127,12 @@ SRCS+= engine/atf.cpp \ engine/scanner.cpp \ engine/tap.cpp \ engine/tap_parser.cpp \ - engine/scheduler.cpp + engine/scheduler.cpp \ + engine/execenv/execenv.cpp \ + engine/execenv/execenv_host.cpp + +SRCS+= os/freebsd/execenv_jail_manager.cpp \ + os/freebsd/main.cpp SRCS+= store/dbtypes.cpp \ store/exceptions.cpp \ @@ -160,6 +165,14 @@ SRCS+= cli/cmd_about.cpp \ cli/config.cpp \ cli/main.cpp +.if ${MK_JAIL} == "no" +SRCS+= os/freebsd/execenv_jail_stub.cpp +.else +SRCS+= os/freebsd/execenv_jail.cpp \ + os/freebsd/utils/jail.cpp +LIBADD+= jail +.endif + FILESGROUPS= DOCS MISC STORE .if ${MK_EXAMPLES} != "no" From 2aeb3e204af3ce61fefa727035e68e80498218c1 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 18 Jul 2024 09:57:38 -0400 Subject: [PATCH 110/151] zdb: Chase a missing library dependency Fixes: 75e1fea68aaa ("zfs: merge openzfs/zfs@1147a2797") --- cddl/usr.sbin/zdb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index 22ab4421b30a..31013a1d8100 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -22,7 +22,7 @@ CFLAGS+= \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID -LIBADD= nvpair umem uutil zdb zfs spl avl zutil zpool crypto +LIBADD= nvpair umem uutil zdb zfs_core zfs spl avl zutil zpool crypto CFLAGS.gcc+= -fms-extensions # Since there are many asserts in this program, it makes no sense to compile From f029f6277996760be4be42148295231af425cc2d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 18 Jul 2024 10:52:52 -0400 Subject: [PATCH 111/151] zdb: Fix printf formatting of a uint64_t This fixes the build on 32-bit platforms. Fixes: dc91e7452482 ("zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly (#16334)") --- sys/contrib/openzfs/cmd/zdb/zdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/cmd/zdb/zdb.c b/sys/contrib/openzfs/cmd/zdb/zdb.c index f55c7f7b8176..6063dc3b7cd3 100644 --- a/sys/contrib/openzfs/cmd/zdb/zdb.c +++ b/sys/contrib/openzfs/cmd/zdb/zdb.c @@ -1131,8 +1131,8 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) !!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY); if (key64) - (void) printf("\t\t0x%010lx = ", - *(uint64_t *)attr.za_name); + (void) printf("\t\t0x%010llx = ", + (u_longlong_t)*(uint64_t *)attr.za_name); else (void) printf("\t\t%s = ", attr.za_name); From 03248b3f5079c490d949f4e8725a37624d707e14 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 18 Jul 2024 13:28:57 -0400 Subject: [PATCH 112/151] NOTES: Correct swapped descriptions of virtio_scmi and virtio_scsi Sponsored by: Chelsio Communications --- sys/conf/NOTES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index ecfa7aa5b33a..685125b782ca 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2433,8 +2433,8 @@ device virtio_blk # VirtIO Block device device virtio_console # VirtIO Console device device virtio_gpu # VirtIO GPU device device virtio_random # VirtIO Entropy device -device virtio_scmi # VirtIO SCSI device -device virtio_scsi # VirtIO SCMI device +device virtio_scmi # VirtIO SCMI device +device virtio_scsi # VirtIO SCSI device ##################################################################### # HID support From 8415a654d02e1c4268885e667c539873db570576 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Thu, 18 Jul 2024 18:55:12 +0100 Subject: [PATCH 113/151] Retire non-NEW_PCIB code and remove config option All architectures enable NEW_PCIB in DEFAULTS (arm being the most recent to do so in 121be555997b (arm: Set NEW_PCIB in DEFAULTS rather than a subset of kernel configs")), so it's time we removed the legacy code that no longer sees much testing and has a significant maintenance burden. Reviewed by: jhb, andrew, emaste Differential Revision: https://reviews.freebsd.org/D32954 --- sys/amd64/conf/DEFAULTS | 2 - sys/amd64/include/resource.h | 2 - sys/arm/conf/DEFAULTS | 1 - sys/arm/include/resource.h | 2 - sys/arm64/cavium/thunder_pcie_pem.c | 18 +- sys/arm64/conf/DEFAULTS | 1 - sys/arm64/include/resource.h | 2 - sys/conf/config.mk | 6 +- sys/conf/options | 1 - sys/dev/acpica/acpi_pcib_acpi.c | 31 +-- sys/dev/hyperv/pcib/vmbus_pcib.c | 3 - sys/dev/hyperv/vmbus/vmbus.c | 11 +- sys/dev/hyperv/vmbus/vmbus_var.h | 2 - sys/dev/ofw/ofw_pcib.c | 20 +- sys/dev/pccbb/pccbb_pci.c | 14 +- sys/dev/pci/pci.c | 12 +- sys/dev/pci/pci_host_generic.c | 26 +- sys/dev/pci/pci_pci.c | 374 +--------------------------- sys/dev/pci/pci_subr.c | 3 - sys/dev/pci/pcib_private.h | 19 +- sys/i386/conf/DEFAULTS | 2 - sys/i386/include/resource.h | 2 - sys/modules/cardbus/Makefile | 4 - sys/modules/cbb/Makefile | 4 - sys/powerpc/conf/DEFAULTS | 2 - sys/riscv/conf/DEFAULTS | 1 - sys/riscv/include/resource.h | 2 - sys/x86/include/mptable.h | 4 - sys/x86/pci/pci_bus.c | 6 +- sys/x86/pci/qpi.c | 4 +- sys/x86/x86/mptable.c | 12 - sys/x86/x86/mptable_pci.c | 11 +- 32 files changed, 64 insertions(+), 540 deletions(-) diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS index 5167cf4d98d0..eb8ee6b76a69 100644 --- a/sys/amd64/conf/DEFAULTS +++ b/sys/amd64/conf/DEFAULTS @@ -25,6 +25,4 @@ options GEOM_PART_GPT # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB - options NETLINK # netlink(4) support diff --git a/sys/amd64/include/resource.h b/sys/amd64/include/resource.h index 368a13b88d3a..9477572176e0 100644 --- a/sys/amd64/include/resource.h +++ b/sys/amd64/include/resource.h @@ -39,8 +39,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/arm/conf/DEFAULTS b/sys/arm/conf/DEFAULTS index 85d090dfa782..1acfe6349b4b 100644 --- a/sys/arm/conf/DEFAULTS +++ b/sys/arm/conf/DEFAULTS @@ -7,5 +7,4 @@ device mem # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB options INTRNG # All arm systems use INTRNG these days diff --git a/sys/arm/include/resource.h b/sys/arm/include/resource.h index d6b544d662d4..f7c2633c5f0d 100644 --- a/sys/arm/include/resource.h +++ b/sys/arm/include/resource.h @@ -40,8 +40,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index a27ed810c618..c334342afe4a 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -254,13 +254,13 @@ thunder_pem_write_ivar(device_t dev, device_t child, int index, static int thunder_pem_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->id, child, r)); #endif @@ -276,13 +276,13 @@ static int thunder_pem_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->id, child, r)); #endif @@ -350,13 +350,13 @@ static int thunder_pem_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->id, child, res, start, end)); #endif @@ -671,7 +671,7 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent_dev; switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); @@ -718,12 +718,12 @@ static int thunder_pem_release_resource(device_t dev, device_t child, struct resource *res) { device_t parent_dev; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->id, child, res)); #endif diff --git a/sys/arm64/conf/DEFAULTS b/sys/arm64/conf/DEFAULTS index 5d267af4b7d7..fb8b74783867 100644 --- a/sys/arm64/conf/DEFAULTS +++ b/sys/arm64/conf/DEFAULTS @@ -15,7 +15,6 @@ options GEOM_PART_GPT # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB options INTRNG options NETLINK # netlink(4) support diff --git a/sys/arm64/include/resource.h b/sys/arm64/include/resource.h index d4cffb1ae854..336fc11a435a 100644 --- a/sys/arm64/include/resource.h +++ b/sys/arm64/include/resource.h @@ -44,9 +44,7 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/conf/config.mk b/sys/conf/config.mk index 729111b4ef3a..9ef3e7936a48 100644 --- a/sys/conf/config.mk +++ b/sys/conf/config.mk @@ -59,9 +59,9 @@ opt_sctp.h: opt_wlan.h: echo "#define IEEE80211_DEBUG 1" > ${.TARGET} echo "#define IEEE80211_SUPPORT_MESH 1" >> ${.TARGET} -KERN_OPTS.i386=NEW_PCIB DEV_PCI -KERN_OPTS.amd64=NEW_PCIB DEV_PCI -KERN_OPTS.powerpc=NEW_PCIB DEV_PCI +KERN_OPTS.i386=DEV_PCI +KERN_OPTS.amd64=DEV_PCI +KERN_OPTS.powerpc=DEV_PCI KERN_OPTS=MROUTING IEEE80211_DEBUG \ IEEE80211_SUPPORT_MESH DEV_BPF \ ${KERN_OPTS.${MACHINE}} ${KERN_OPTS_EXTRA} diff --git a/sys/conf/options b/sys/conf/options index 928927fe99df..8464fd919ff0 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -186,7 +186,6 @@ MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h -NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 4c3d62a66d58..18fece293183 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -67,9 +67,7 @@ struct acpi_hpcib_softc { int ap_addr; /* device/func of PCI-Host bridge */ ACPI_BUFFER ap_prt; /* interrupt routing table */ -#ifdef NEW_PCIB struct pcib_host_resources ap_host_res; -#endif }; static int acpi_pcib_acpi_probe(device_t bus); @@ -95,7 +93,6 @@ static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); -#ifdef NEW_PCIB static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); @@ -107,7 +104,6 @@ static int acpi_pcib_acpi_activate_resource(device_t dev, static int acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, struct resource *r); #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); @@ -124,12 +120,8 @@ static device_method_t acpi_pcib_acpi_methods[] = { DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, acpi_pcib_acpi_adjust_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), @@ -183,7 +175,6 @@ acpi_pcib_acpi_probe(device_t dev) return (0); } -#ifdef NEW_PCIB static ACPI_STATUS acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) { @@ -290,9 +281,8 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) } return (AE_OK); } -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static bool get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, rman_res_t *endp) @@ -371,7 +361,7 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct resource *bus_res; rman_res_t end, start; int rid; @@ -421,7 +411,6 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_addr = -1; } -#ifdef NEW_PCIB /* * Determine which address ranges this bridge decodes and setup * resource managers for those ranges. @@ -435,7 +424,6 @@ acpi_pcib_acpi_attach(device_t dev) device_printf(sc->ap_dev, "failed to parse resources: %s\n", AcpiFormatException(status)); } -#endif /* * Get our base bus number by evaluating _BBN. @@ -491,7 +479,7 @@ acpi_pcib_acpi_attach(device_t dev) } } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * If nothing else worked, hope that ACPI at least lays out the * Host-PCI bridges in order and that as a result the next free @@ -578,7 +566,7 @@ acpi_pcib_acpi_attach(device_t dev) errout: device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pcib_host_res_free(dev, &sc->ap_host_res); #endif return (error); @@ -704,16 +692,13 @@ struct resource * acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#ifdef NEW_PCIB struct acpi_hpcib_softc *sc; struct resource *res; -#endif #if defined(__i386__) || defined(__amd64__) start = hostb_alloc_start(type, start, end, count); #endif -#ifdef NEW_PCIB sc = device_get_softc(dev); #ifdef PCI_RES_BUS if (type == PCI_RES_BUS) @@ -734,13 +719,8 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, res = bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags); return (res); -#else - return (bus_generic_alloc_resource(dev, child, type, rid, start, end, - count, flags)); -#endif } -#ifdef NEW_PCIB int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) @@ -793,7 +773,6 @@ acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, return (bus_generic_deactivate_resource(dev, child, r)); } #endif -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index f6237535cce3..9aec2fac698a 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -25,7 +25,6 @@ */ #include -#ifdef NEW_PCIB #include "opt_acpi.h" #include @@ -2042,5 +2041,3 @@ DEFINE_CLASS_0(pcib, vmbus_pcib_driver, vmbus_pcib_methods, DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, 0, 0); MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1); - -#endif /* NEW_PCIB */ diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index dee738f6e373..4157a4c41cea 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -1069,15 +1069,12 @@ vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent = device_get_parent(dev); struct resource *res; -#ifdef NEW_PCIB if (type == SYS_RES_MEMORY) { struct vmbus_softc *sc = device_get_softc(dev); res = pcib_host_res_alloc(&sc->vmbus_mmio_res, child, type, rid, start, end, count, flags); - } else -#endif - { + } else { res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, end, count, flags); } @@ -1158,7 +1155,6 @@ vmbus_get_eventtq_method(device_t bus, device_t dev __unused, int cpu) return (VMBUS_PCPU_GET(sc, event_tq, cpu)); } -#ifdef NEW_PCIB #define VTPM_BASE_ADDR 0xfed40000 #define FOUR_GB (1ULL << 32) @@ -1375,7 +1371,6 @@ vmbus_free_mmio_res(device_t dev) if (hv_fb_res) hv_fb_res = NULL; } -#endif /* NEW_PCIB */ static void vmbus_identify(driver_t *driver, device_t parent) @@ -1460,10 +1455,8 @@ vmbus_doattach(struct vmbus_softc *sc) if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); -#ifdef NEW_PCIB vmbus_get_mmio_res(sc->vmbus_dev); vmbus_fb_mmio_res(sc->vmbus_dev); -#endif sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; @@ -1681,9 +1674,7 @@ vmbus_detach(device_t dev) mtx_destroy(&sc->vmbus_prichan_lock); mtx_destroy(&sc->vmbus_chan_lock); -#ifdef NEW_PCIB vmbus_free_mmio_res(dev); -#endif #if defined(__aarch64__) bus_release_resource(device_get_parent(dev), SYS_RES_IRQ, sc->vector, diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index 4e0a769402d5..cadcaa45aae5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -127,10 +127,8 @@ struct vmbus_softc { struct intr_config_hook vmbus_intrhook; -#ifdef NEW_PCIB /* The list of usable MMIO ranges for PCIe pass-through */ struct pcib_host_resources vmbus_mmio_res; -#endif #if defined(__aarch64__) struct resource *ires; diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index ebc09fccd93e..3f55e45f5b92 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -421,13 +421,13 @@ static struct resource * ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, start, end, count, flags)); @@ -445,13 +445,13 @@ ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, static int ofw_pcib_release_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->sc_pci_domain, child, res)); #endif @@ -505,13 +505,13 @@ ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, static int ofw_pcib_activate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->sc_pci_domain, child, res)); #endif @@ -621,13 +621,13 @@ ofw_pcib_bus_get_bus_tag(device_t bus, device_t child) static int ofw_pcib_deactivate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->sc_pci_domain, child, res)); @@ -644,13 +644,13 @@ static int ofw_pcib_adjust_resource(device_t bus, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 3b66b3df3852..eca370d17ca5 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -276,7 +276,7 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ uint32_t pribus; #endif @@ -293,7 +293,7 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->domain = pci_get_domain(brdev); sc->pribus = pcib_get_bus(parent); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); #else @@ -351,7 +351,7 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can @@ -429,13 +429,13 @@ cbb_pci_attach(device_t brdev) static int cbb_pci_detach(device_t brdev) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct cbb_softc *sc = device_get_softc(brdev); #endif int error; error = cbb_detach(brdev); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (error == 0) pcib_free_secbus(brdev, &sc->bus); #endif @@ -787,7 +787,7 @@ cbb_pci_filt(void *arg) return retval; } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -931,7 +931,7 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), DEVMETHOD(bus_release_resource, cbb_pci_release_resource), diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 171c6b710a32..efe017f9a3ba 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -405,7 +405,7 @@ static int pci_clear_bars; SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static int pci_clear_buses; SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, "Ignore firmware-assigned bus numbers."); @@ -3706,7 +3706,7 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static void pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource_list *rl) @@ -4118,7 +4118,7 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) uhci_early_takeover(dev); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) /* * Reserve resources for secondary bus ranges behind bridge * devices. @@ -5551,7 +5551,7 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_alloc_secbus(dev, child, rid, start, end, count, flags)); @@ -5576,7 +5576,6 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, break; case SYS_RES_IOPORT: case SYS_RES_MEMORY: -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. * For those allocations just pass the request up the @@ -5595,7 +5594,6 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, type, rid, start, end, count, flags)); } } -#endif /* Reserve resources for this BAR if needed. */ rle = resource_list_find(rl, type, *rid); if (rle == NULL) { @@ -5668,7 +5666,6 @@ pci_release_resource(device_t dev, device_t child, struct resource *r) } #endif -#ifdef NEW_PCIB /* * PCI-PCI bridge I/O window resources are not BARs. For * those allocations just pass the request up the tree. @@ -5683,7 +5680,6 @@ pci_release_resource(device_t dev, device_t child, struct resource *r) return (bus_generic_release_resource(dev, child, r)); } } -#endif rl = &dinfo->resources; return (resource_list_release(rl, dev, child, r)); diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index c3dba9d72484..c3f4f03b76ad 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -416,13 +416,13 @@ int pci_host_generic_core_release_resource(device_t dev, device_t child, struct resource *res) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->ecam, child, res)); #endif @@ -506,17 +506,17 @@ struct resource * pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; #endif struct resource *res; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) sc = device_get_softc(dev); #endif switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: res = pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags); @@ -543,13 +543,13 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, static int generic_pcie_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ecam, child, r)); #endif @@ -565,13 +565,13 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(r)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ecam, child, r)); #endif @@ -587,13 +587,13 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); #endif switch (rman_get_type(res)) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ecam, child, res, start, end)); @@ -619,7 +619,7 @@ generic_pcie_map_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); #endif @@ -658,7 +658,7 @@ generic_pcie_unmap_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); #endif diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 40b22c9802c4..7977b9148c9b 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -58,19 +58,16 @@ #include "pcib_if.h" static int pcib_probe(device_t dev); -static int pcib_suspend(device_t dev); static int pcib_resume(device_t dev); static bus_child_present_t pcib_child_present; static bus_alloc_resource_t pcib_alloc_resource; -#ifdef NEW_PCIB static bus_adjust_resource_t pcib_adjust_resource; static bus_release_resource_t pcib_release_resource; static bus_activate_resource_t pcib_activate_resource; static bus_deactivate_resource_t pcib_deactivate_resource; static bus_map_resource_t pcib_map_resource; static bus_unmap_resource_t pcib_unmap_resource; -#endif static int pcib_reset_child(device_t dev, device_t child, int flags); static int pcib_power_for_sleep(device_t pcib, device_t dev, @@ -101,7 +98,7 @@ static device_method_t pcib_methods[] = { DEVMETHOD(device_attach, pcib_attach), DEVMETHOD(device_detach, pcib_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, pcib_suspend), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, pcib_resume), /* Bus interface */ @@ -109,19 +106,12 @@ static device_method_t pcib_methods[] = { DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), DEVMETHOD(bus_release_resource, pcib_release_resource), DEVMETHOD(bus_activate_resource, pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, pcib_deactivate_resource), DEVMETHOD(bus_map_resource, pcib_map_resource), DEVMETHOD(bus_unmap_resource, pcib_unmap_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_reset_child, pcib_reset_child), @@ -150,11 +140,8 @@ static device_method_t pcib_methods[] = { DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); EARLY_DRIVER_MODULE(pcib, pci, pcib_driver, NULL, NULL, BUS_PASS_BUS); -#if defined(NEW_PCIB) || defined(PCI_HP) SYSCTL_DECL(_hw_pci); -#endif -#ifdef NEW_PCIB static int pci_clear_pcib; SYSCTL_INT(_hw_pci, OID_AUTO, clear_pcib, CTLFLAG_RDTUN, &pci_clear_pcib, 0, "Clear firmware-assigned resources for PCI-PCI bridge I/O windows."); @@ -808,140 +795,6 @@ pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, } #endif -#else - -/* - * Is the prefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_prefetch_open(struct pcib_softc *sc) -{ - return (sc->pmembase > 0 && sc->pmembase < sc->pmemlimit); -} - -/* - * Is the nonprefetch window open (eg, can we allocate memory in it?) - */ -static int -pcib_is_nonprefetch_open(struct pcib_softc *sc) -{ - return (sc->membase > 0 && sc->membase < sc->memlimit); -} - -/* - * Is the io window open (eg, can we allocate ports in it?) - */ -static int -pcib_is_io_open(struct pcib_softc *sc) -{ - return (sc->iobase > 0 && sc->iobase < sc->iolimit); -} - -/* - * Get current I/O decode. - */ -static void -pcib_get_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iolow; - - dev = sc->dev; - - iolow = pci_read_config(dev, PCIR_IOBASEL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iobase = PCI_PPBIOBASE( - pci_read_config(dev, PCIR_IOBASEH_1, 2), iolow); - else - sc->iobase = PCI_PPBIOBASE(0, iolow); - - iolow = pci_read_config(dev, PCIR_IOLIMITL_1, 1); - if ((iolow & PCIM_BRIO_MASK) == PCIM_BRIO_32) - sc->iolimit = PCI_PPBIOLIMIT( - pci_read_config(dev, PCIR_IOLIMITH_1, 2), iolow); - else - sc->iolimit = PCI_PPBIOLIMIT(0, iolow); -} - -/* - * Get current memory decode. - */ -static void -pcib_get_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemlow; - - dev = sc->dev; - - sc->membase = PCI_PPBMEMBASE(0, - pci_read_config(dev, PCIR_MEMBASE_1, 2)); - sc->memlimit = PCI_PPBMEMLIMIT(0, - pci_read_config(dev, PCIR_MEMLIMIT_1, 2)); - - pmemlow = pci_read_config(dev, PCIR_PMBASEL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmembase = PCI_PPBMEMBASE( - pci_read_config(dev, PCIR_PMBASEH_1, 4), pmemlow); - else - sc->pmembase = PCI_PPBMEMBASE(0, pmemlow); - - pmemlow = pci_read_config(dev, PCIR_PMLIMITL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) - sc->pmemlimit = PCI_PPBMEMLIMIT( - pci_read_config(dev, PCIR_PMLIMITH_1, 4), pmemlow); - else - sc->pmemlimit = PCI_PPBMEMLIMIT(0, pmemlow); -} - -/* - * Restore previous I/O decode. - */ -static void -pcib_set_io_decode(struct pcib_softc *sc) -{ - device_t dev; - uint32_t iohi; - - dev = sc->dev; - - iohi = sc->iobase >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOBASEH_1, iohi, 2); - pci_write_config(dev, PCIR_IOBASEL_1, sc->iobase >> 8, 1); - - iohi = sc->iolimit >> 16; - if (iohi > 0) - pci_write_config(dev, PCIR_IOLIMITH_1, iohi, 2); - pci_write_config(dev, PCIR_IOLIMITL_1, sc->iolimit >> 8, 1); -} - -/* - * Restore previous memory decode. - */ -static void -pcib_set_mem_decode(struct pcib_softc *sc) -{ - device_t dev; - pci_addr_t pmemhi; - - dev = sc->dev; - - pci_write_config(dev, PCIR_MEMBASE_1, sc->membase >> 16, 2); - pci_write_config(dev, PCIR_MEMLIMIT_1, sc->memlimit >> 16, 2); - - pmemhi = sc->pmembase >> 32; - if (pmemhi > 0) - pci_write_config(dev, PCIR_PMBASEH_1, pmemhi, 4); - pci_write_config(dev, PCIR_PMBASEL_1, sc->pmembase >> 16, 2); - - pmemhi = sc->pmemlimit >> 32; - if (pmemhi > 0) - pci_write_config(dev, PCIR_PMLIMITH_1, pmemhi, 4); - pci_write_config(dev, PCIR_PMLIMITL_1, sc->pmemlimit >> 16, 2); -} -#endif - #ifdef PCI_HP /* * PCI-express HotPlug support. @@ -1509,45 +1362,13 @@ pcib_detach_hotplug(struct pcib_softc *sc) } #endif -/* - * Get current bridge configuration. - */ -static void -pcib_cfg_save(struct pcib_softc *sc) -{ -#ifndef NEW_PCIB - device_t dev; - uint16_t command; - - dev = sc->dev; - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if (command & PCIM_CMD_PORTEN) - pcib_get_io_decode(sc); - if (command & PCIM_CMD_MEMEN) - pcib_get_mem_decode(sc); -#endif -} - /* * Restore previous bridge configuration. */ static void pcib_cfg_restore(struct pcib_softc *sc) { -#ifndef NEW_PCIB - uint16_t command; -#endif - -#ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); -#else - command = pci_read_config(sc->dev, PCIR_COMMAND, 2); - if (command & PCIM_CMD_PORTEN) - pcib_set_io_decode(sc); - if (command & PCIM_CMD_MEMEN) - pcib_set_mem_decode(sc); -#endif } /* @@ -1579,12 +1400,11 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); #endif sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - pcib_cfg_save(sc); /* * The primary bus register should always be the bus of the @@ -1611,7 +1431,7 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; @@ -1638,7 +1458,7 @@ pcib_attach_common(device_t dev) sc->flags |= PCIB_SUBTRACTIVE; break; -#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) +#if !defined(PCI_RES_BUS) /* Compaq R3000 BIOS sets wrong subordinate bus number. */ case 0x00dd10de: { @@ -1688,12 +1508,10 @@ pcib_attach_common(device_t dev) #ifdef PCI_HP pcib_probe_hotplug(sc); #endif -#ifdef NEW_PCIB #ifdef PCI_RES_BUS pcib_setup_secbus(dev, &sc->bus, 1); #endif pcib_probe_windows(sc); -#endif #ifdef PCI_HP if (sc->flags & PCIB_HOTPLUG) pcib_setup_hotplug(sc); @@ -1702,7 +1520,6 @@ pcib_attach_common(device_t dev) device_printf(dev, " domain %d\n", sc->domain); device_printf(dev, " secondary bus %d\n", sc->bus.sec); device_printf(dev, " subordinate bus %d\n", sc->bus.sub); -#ifdef NEW_PCIB if (pcib_is_window_open(&sc->io)) device_printf(dev, " I/O decode 0x%jx-0x%jx\n", (uintmax_t)sc->io.base, (uintmax_t)sc->io.limit); @@ -1712,17 +1529,6 @@ pcib_attach_common(device_t dev) if (pcib_is_window_open(&sc->pmem)) device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", (uintmax_t)sc->pmem.base, (uintmax_t)sc->pmem.limit); -#else - if (pcib_is_io_open(sc)) - device_printf(dev, " I/O decode 0x%x-0x%x\n", - sc->iobase, sc->iolimit); - if (pcib_is_nonprefetch_open(sc)) - device_printf(dev, " memory decode 0x%jx-0x%jx\n", - (uintmax_t)sc->membase, (uintmax_t)sc->memlimit); - if (pcib_is_prefetch_open(sc)) - device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", - (uintmax_t)sc->pmembase, (uintmax_t)sc->pmemlimit); -#endif if (sc->bridgectl & (PCIB_BCR_ISA_ENABLE | PCIB_BCR_VGA_ENABLE) || sc->flags & PCIB_SUBTRACTIVE) { device_printf(dev, " special decode "); @@ -1793,14 +1599,10 @@ pcib_attach(device_t dev) int pcib_detach(device_t dev) { -#if defined(PCI_HP) || defined(NEW_PCIB) struct pcib_softc *sc; -#endif int error; -#if defined(PCI_HP) || defined(NEW_PCIB) sc = device_get_softc(dev); -#endif error = bus_generic_detach(dev); if (error) return (error); @@ -1814,23 +1616,13 @@ pcib_detach(device_t dev) error = device_delete_children(dev); if (error) return (error); -#ifdef NEW_PCIB pcib_free_windows(sc); #ifdef PCI_RES_BUS pcib_free_secbus(dev, &sc->bus); -#endif #endif return (0); } -int -pcib_suspend(device_t dev) -{ - - pcib_cfg_save(device_get_softc(dev)); - return (bus_generic_suspend(dev)); -} - int pcib_resume(device_t dev) { @@ -1905,7 +1697,6 @@ pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value) return(ENOENT); } -#ifdef NEW_PCIB /* * Attempt to allocate a resource from the existing resources assigned * to a window. @@ -2569,163 +2360,6 @@ pcib_unmap_resource(device_t dev, device_t child, struct resource *r, return (ENOENT); return (bus_unmap_resource(dev, pres, map)); } -#else -/* - * We have to trap resource allocation requests and ensure that the bridge - * is set up to, or capable of handling them. - */ -static struct resource * -pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ - struct pcib_softc *sc = device_get_softc(dev); - const char *name, *suffix; - int ok; - - /* - * Fail the allocation for this range if it's not supported. - */ - name = device_get_nameunit(child); - if (name == NULL) { - name = ""; - suffix = ""; - } else - suffix = " "; - switch (type) { - case SYS_RES_IOPORT: - ok = 0; - if (!pcib_is_io_open(sc)) - break; - ok = (start >= sc->iobase && end <= sc->iolimit); - - /* - * Make sure we allow access to VGA I/O addresses when the - * bridge has the "VGA Enable" bit set. - */ - if (!ok && pci_is_vga_ioport_range(start, end)) - ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0; - - if ((sc->flags & PCIB_SUBTRACTIVE) == 0) { - if (!ok) { - if (start < sc->iobase) - start = sc->iobase; - if (end > sc->iolimit) - end = sc->iolimit; - if (start < end) - ok = 1; - } - } else { - ok = 1; -#if 0 - /* - * If we overlap with the subtractive range, then - * pick the upper range to use. - */ - if (start < sc->iolimit && end > sc->iobase) - start = sc->iolimit + 1; -#endif - } - if (end < start) { - device_printf(dev, "ioport: end (%jx) < start (%jx)\n", - end, start); - start = 0; - end = 0; - ok = 0; - } - if (!ok) { - device_printf(dev, "%s%srequested unsupported I/O " - "range 0x%jx-0x%jx (decoding 0x%x-0x%x)\n", - name, suffix, start, end, sc->iobase, sc->iolimit); - return (NULL); - } - if (bootverbose) - device_printf(dev, - "%s%srequested I/O range 0x%jx-0x%jx: in range\n", - name, suffix, start, end); - break; - - case SYS_RES_MEMORY: - ok = 0; - if (pcib_is_nonprefetch_open(sc)) - ok = ok || (start >= sc->membase && end <= sc->memlimit); - if (pcib_is_prefetch_open(sc)) - ok = ok || (start >= sc->pmembase && end <= sc->pmemlimit); - - /* - * Make sure we allow access to VGA memory addresses when the - * bridge has the "VGA Enable" bit set. - */ - if (!ok && pci_is_vga_memory_range(start, end)) - ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0; - - if ((sc->flags & PCIB_SUBTRACTIVE) == 0) { - if (!ok) { - ok = 1; - if (flags & RF_PREFETCHABLE) { - if (pcib_is_prefetch_open(sc)) { - if (start < sc->pmembase) - start = sc->pmembase; - if (end > sc->pmemlimit) - end = sc->pmemlimit; - } else { - ok = 0; - } - } else { /* non-prefetchable */ - if (pcib_is_nonprefetch_open(sc)) { - if (start < sc->membase) - start = sc->membase; - if (end > sc->memlimit) - end = sc->memlimit; - } else { - ok = 0; - } - } - } - } else if (!ok) { - ok = 1; /* subtractive bridge: always ok */ -#if 0 - if (pcib_is_nonprefetch_open(sc)) { - if (start < sc->memlimit && end > sc->membase) - start = sc->memlimit + 1; - } - if (pcib_is_prefetch_open(sc)) { - if (start < sc->pmemlimit && end > sc->pmembase) - start = sc->pmemlimit + 1; - } -#endif - } - if (end < start) { - device_printf(dev, "memory: end (%jx) < start (%jx)\n", - end, start); - start = 0; - end = 0; - ok = 0; - } - if (!ok && bootverbose) - device_printf(dev, - "%s%srequested unsupported memory range %#jx-%#jx " - "(decoding %#jx-%#jx, %#jx-%#jx)\n", - name, suffix, start, end, - (uintmax_t)sc->membase, (uintmax_t)sc->memlimit, - (uintmax_t)sc->pmembase, (uintmax_t)sc->pmemlimit); - if (!ok) - return (NULL); - if (bootverbose) - device_printf(dev,"%s%srequested memory range " - "0x%jx-0x%jx: good\n", - name, suffix, start, end); - break; - - default: - break; - } - /* - * Bridge is OK decoding this resource, so pass it up. - */ - return (bus_generic_alloc_resource(dev, child, type, rid, start, end, - count, flags)); -} -#endif /* * If ARI is enabled on this downstream port, translate the function number diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index f916e7a8da87..7665e1845868 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -131,7 +131,6 @@ host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, return 1; } -#ifdef NEW_PCIB /* * Return a pointer to a pretty name for a PCI device. If the device * has a driver attached, the device's name is used, otherwise a name @@ -413,5 +412,3 @@ pci_domain_deactivate_bus(int domain, device_t dev, struct resource *r) return (rman_deactivate_resource(r)); } #endif /* PCI_RES_BUS */ - -#endif /* NEW_PCIB */ diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index 65b3ed31cf94..1f13fc6e67f7 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -35,7 +35,6 @@ #include -#ifdef NEW_PCIB /* * Data structure and routines that Host to PCI bridge drivers can use * to restrict allocations for child devices to ranges decoded by the @@ -58,7 +57,6 @@ struct resource *pcib_host_res_alloc(struct pcib_host_resources *hr, int pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, struct resource *r, rman_res_t start, rman_res_t end); -#endif /* * Export portions of generic PCI:PCI bridge support so that it can be @@ -66,7 +64,6 @@ int pcib_host_res_adjust(struct pcib_host_resources *hr, */ DECLARE_CLASS(pcib_driver); -#ifdef NEW_PCIB #define WIN_IO 0x1 #define WIN_MEM 0x2 #define WIN_PMEM 0x4 @@ -83,12 +80,11 @@ struct pcib_window { int step; /* log_2 of window granularity */ const char *name; }; -#endif struct pcib_secbus { u_int sec; u_int sub; -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) device_t dev; struct rman rman; struct resource *res; @@ -116,18 +112,9 @@ struct pcib_softc u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ -#ifdef NEW_PCIB struct pcib_window io; /* I/O port window */ struct pcib_window mem; /* memory window */ struct pcib_window pmem; /* prefetchable memory window */ -#else - pci_addr_t pmembase; /* base address of prefetchable memory */ - pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ - pci_addr_t membase; /* base address of memory window */ - pci_addr_t memlimit; /* topmost address of memory window */ - uint32_t iobase; /* base address of port window */ - uint32_t iolimit; /* topmost address of port window */ -#endif uint16_t bridgectl; /* bridge control register */ uint16_t pcie_link_sta; uint16_t pcie_slot_sta; @@ -153,7 +140,7 @@ typedef uint32_t pci_read_config_fn(int d, int b, int s, int f, int reg, int host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, uint8_t *busnum); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int pci_domain_adjust_bus(int domain, device_t dev, @@ -175,9 +162,7 @@ int pcib_attach(device_t dev); int pcib_attach_child(device_t dev); void pcib_attach_common(device_t dev); void pcib_bridge_init(device_t dev); -#ifdef NEW_PCIB const char *pcib_child_name(device_t child); -#endif int pcib_detach(device_t dev); int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); diff --git a/sys/i386/conf/DEFAULTS b/sys/i386/conf/DEFAULTS index 28254ecb131d..805662935d28 100644 --- a/sys/i386/conf/DEFAULTS +++ b/sys/i386/conf/DEFAULTS @@ -29,6 +29,4 @@ options CC_CUBIC # include CUBIC congestion control # enable support for native hardware device atpic -options NEW_PCIB - options NETLINK # netlink(4) support diff --git a/sys/i386/include/resource.h b/sys/i386/include/resource.h index 368a13b88d3a..9477572176e0 100644 --- a/sys/i386/include/resource.h +++ b/sys/i386/include/resource.h @@ -39,8 +39,6 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ -#ifdef NEW_PCIB #define PCI_RES_BUS 5 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/modules/cardbus/Makefile b/sys/modules/cardbus/Makefile index d7111b2451a1..873a2f0cb89c 100644 --- a/sys/modules/cardbus/Makefile +++ b/sys/modules/cardbus/Makefile @@ -4,8 +4,4 @@ KMOD= cardbus SRCS= cardbus.c cardbus_cis.c cardbus_device.c \ device_if.h bus_if.h card_if.h power_if.h pci_if.h pcib_if.h -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DNEW_PCIB -.endif - .include diff --git a/sys/modules/cbb/Makefile b/sys/modules/cbb/Makefile index a715d428cbde..22954fc1a221 100644 --- a/sys/modules/cbb/Makefile +++ b/sys/modules/cbb/Makefile @@ -4,8 +4,4 @@ KMOD= cbb SRCS= pccbb.c pccbb_pci.c \ device_if.h bus_if.h power_if.h card_if.h pci_if.h pcib_if.h -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -CFLAGS += -DNEW_PCIB -.endif - .include diff --git a/sys/powerpc/conf/DEFAULTS b/sys/powerpc/conf/DEFAULTS index 166aeeac054d..da3a8834eff6 100644 --- a/sys/powerpc/conf/DEFAULTS +++ b/sys/powerpc/conf/DEFAULTS @@ -14,6 +14,4 @@ options GEOM_PART_MBR # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB - options NETLINK # netlink(4) support diff --git a/sys/riscv/conf/DEFAULTS b/sys/riscv/conf/DEFAULTS index f4aea50b49ef..f8fa437b6278 100644 --- a/sys/riscv/conf/DEFAULTS +++ b/sys/riscv/conf/DEFAULTS @@ -15,7 +15,6 @@ options GEOM_PART_GPT # Default congestion control algorithm options CC_CUBIC # include CUBIC congestion control -options NEW_PCIB options INTRNG options NETLINK # netlink(4) support diff --git a/sys/riscv/include/resource.h b/sys/riscv/include/resource.h index babbaea409b8..a7df939d765b 100644 --- a/sys/riscv/include/resource.h +++ b/sys/riscv/include/resource.h @@ -40,8 +40,6 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ -#ifdef NEW_PCIB #define PCI_RES_BUS 6 /* PCI bus numbers */ -#endif #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/x86/include/mptable.h b/sys/x86/include/mptable.h index 854c25d29621..4c9647e3141f 100644 --- a/sys/x86/include/mptable.h +++ b/sys/x86/include/mptable.h @@ -188,16 +188,12 @@ typedef struct CBASMENTRY { #ifdef _KERNEL struct mptable_hostb_softc { -#ifdef NEW_PCIB struct pcib_host_resources sc_host_res; int sc_decodes_vga_io; int sc_decodes_isa_io; -#endif }; -#ifdef NEW_PCIB void mptable_pci_host_res_init(device_t pcib); -#endif int mptable_pci_probe_table(int bus); int mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin); #endif diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index 4ac3e904f26a..fd914e3426f5 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -595,7 +595,7 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(0, child, rid, start, end, count, flags)); @@ -605,7 +605,7 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, count, flags)); } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) int legacy_pcib_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) @@ -656,7 +656,7 @@ static device_method_t legacy_pcib_methods[] = { DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c index 38eed7f67f80..524de7a525f0 100644 --- a/sys/x86/pci/qpi.c +++ b/sys/x86/pci/qpi.c @@ -246,7 +246,7 @@ qpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) } } -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) static struct resource * qpi_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -280,7 +280,7 @@ static device_method_t qpi_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, qpi_pcib_read_ivar), -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource), DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), diff --git a/sys/x86/x86/mptable.c b/sys/x86/x86/mptable.c index e5e5a24c457b..03b4d4362baa 100644 --- a/sys/x86/x86/mptable.c +++ b/sys/x86/x86/mptable.c @@ -36,18 +36,14 @@ #include #include #include -#ifdef NEW_PCIB #include -#endif #include #include #include #include -#ifdef NEW_PCIB #include -#endif #include #include #include @@ -56,9 +52,7 @@ #include #include #include -#ifdef NEW_PCIB #include -#endif #include /* string defined by the Intel MP Spec as identifying the MP table */ @@ -199,10 +193,8 @@ static void mptable_setup_cpus_handler(u_char *entry, void *arg __unused); static void mptable_register(void *dummy); static int mptable_setup_local(void); static int mptable_setup_io(void); -#ifdef NEW_PCIB static void mptable_walk_extended_table( mptable_extended_entry_handler *handler, void *arg); -#endif static void mptable_walk_table(mptable_entry_handler *handler, void *arg); static int search_for_sig(u_int32_t target, int count); @@ -504,7 +496,6 @@ mptable_walk_table(mptable_entry_handler *handler, void *arg) } } -#ifdef NEW_PCIB /* * Call the handler routine for each entry in the MP config extended * table. @@ -523,7 +514,6 @@ mptable_walk_extended_table(mptable_extended_entry_handler *handler, void *arg) entry = (ext_entry_ptr)((char *)entry + entry->length); } } -#endif static void mptable_probe_cpus_handler(u_char *entry, void *arg) @@ -1178,7 +1168,6 @@ mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin) return (args.vector); } -#ifdef NEW_PCIB struct host_res_args { struct mptable_hostb_softc *sc; device_t dev; @@ -1306,4 +1295,3 @@ mptable_pci_host_res_init(device_t pcib) panic("failed to init hostb resources"); mptable_walk_extended_table(mptable_host_res_handler, &args); } -#endif diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c index de659ca75163..43b12e2baf9c 100644 --- a/sys/x86/x86/mptable_pci.c +++ b/sys/x86/x86/mptable_pci.c @@ -64,14 +64,11 @@ static int mptable_hostb_attach(device_t dev) { -#ifdef NEW_PCIB mptable_pci_host_res_init(dev); -#endif device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } -#ifdef NEW_PCIB static int mptable_is_isa_range(rman_res_t start, rman_res_t end) { @@ -151,7 +148,6 @@ mptable_hostb_adjust_resource(device_t dev, device_t child, sc = device_get_softc(dev); return (pcib_host_res_adjust(&sc->sc_host_res, child, r, start, end)); } -#endif static device_method_t mptable_hostb_methods[] = { /* Device interface */ @@ -164,14 +160,9 @@ static device_method_t mptable_hostb_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), -#ifdef NEW_PCIB DEVMETHOD(bus_alloc_resource, mptable_hostb_alloc_resource), DEVMETHOD(bus_adjust_resource, mptable_hostb_adjust_resource), -#else - DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), -#endif -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), From e1d442a6db14adcfc11fc204225037da4332dd21 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Thu, 18 Jul 2024 18:55:33 +0100 Subject: [PATCH 114/151] Retire unused non-PCI_RES_BUS code All architectures define PCI_RES_BUS unconditionally now that only NEW_PCIB is supported, so we no longer need the legacy code. Reviewed by: jhb, andrew Differential Revision: https://reviews.freebsd.org/D32955 --- sys/arm/mv/mv_pci.c | 18 --------- sys/arm64/cavium/thunder_pcie_pem.c | 18 --------- sys/dev/acpica/acpi_pcib_acpi.c | 35 ----------------- sys/dev/cardbus/cardbus.c | 10 ----- sys/dev/cardbus/cardbusvar.h | 2 - sys/dev/ofw/ofw_pcib.c | 20 ---------- sys/dev/pccbb/pccbb_pci.c | 46 ---------------------- sys/dev/pci/pci.c | 18 --------- sys/dev/pci/pci_host_generic.c | 26 ------------ sys/dev/pci/pci_pci.c | 61 +---------------------------- sys/dev/pci/pci_private.h | 2 - sys/dev/pci/pci_subr.c | 2 - sys/dev/pci/pcib_private.h | 4 -- sys/x86/pci/pci_bus.c | 11 ------ sys/x86/pci/qpi.c | 9 ----- sys/x86/x86/mptable_pci.c | 10 ----- 16 files changed, 1 insertion(+), 291 deletions(-) diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c index eb1af5a4e237..87c6fbae3ca4 100644 --- a/sys/arm/mv/mv_pci.c +++ b/sys/arm/mv/mv_pci.c @@ -913,11 +913,9 @@ mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, count, flags)); -#endif default: return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, rid, start, end, count, flags)); @@ -941,20 +939,16 @@ static int mv_pcib_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_adjust_resource(dev, child, r, start, end)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, end)); -#endif default: return (bus_generic_adjust_resource(dev, child, r, start, end)); } @@ -963,18 +957,14 @@ mv_pcib_adjust_resource(device_t dev, device_t child, static int mv_pcib_release_resource(device_t dev, device_t child, struct resource *res) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_release_resource(dev, child, res)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_release_bus(sc->ap_segment, child, res)); -#endif default: return (bus_generic_release_resource(dev, child, res)); } @@ -983,18 +973,14 @@ mv_pcib_release_resource(device_t dev, device_t child, struct resource *res) static int mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_activate_resource(dev, child, r)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ap_segment, child, r)); -#endif default: return (bus_generic_activate_resource(dev, child, r)); } @@ -1003,18 +989,14 @@ mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) static int mv_pcib_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_deactivate_resource(dev, child, r)); -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ap_segment, child, r)); -#endif default: return (bus_generic_deactivate_resource(dev, child, r)); } diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index c334342afe4a..89393d9701d0 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -254,16 +254,12 @@ thunder_pem_write_ivar(device_t dev, device_t child, int index, static int thunder_pem_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->id, child, r)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_activate_resource(dev, child, r)); @@ -276,16 +272,12 @@ static int thunder_pem_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->id, child, r)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_deactivate_resource(dev, child, r)); @@ -350,16 +342,12 @@ static int thunder_pem_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->id, child, res, start, end)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_adjust_resource(dev, child, res, start, @@ -671,11 +659,9 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, device_t parent_dev; switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; @@ -718,15 +704,11 @@ static int thunder_pem_release_resource(device_t dev, device_t child, struct resource *res) { device_t parent_dev; -#if defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->id, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_release_resource(dev, child, res)); diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 18fece293183..ff211102cc3c 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -96,14 +96,12 @@ static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); -#ifdef PCI_RES_BUS static int acpi_pcib_acpi_release_resource(device_t dev, device_t child, struct resource *r); static int acpi_pcib_acpi_activate_resource(device_t dev, device_t child, struct resource *r); static int acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, struct resource *r); -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); @@ -121,15 +119,9 @@ static device_method_t acpi_pcib_acpi_methods[] = { DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), DEVMETHOD(bus_adjust_resource, acpi_pcib_acpi_adjust_resource), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), -#else - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, acpi_pcib_get_cpus), @@ -243,11 +235,9 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) case ACPI_IO_RANGE: type = SYS_RES_IOPORT; break; -#ifdef PCI_RES_BUS case ACPI_BUS_NUMBER_RANGE: type = PCI_RES_BUS; break; -#endif default: return (AE_OK); } @@ -282,7 +272,6 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context) return (AE_OK); } -#if defined(PCI_RES_BUS) static bool get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, rman_res_t *endp) @@ -296,7 +285,6 @@ get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, *endp = rle->end; return (true); } -#endif static int acpi_pcib_osc(struct acpi_hpcib_softc *sc, uint32_t osc_ctl) @@ -361,11 +349,9 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; -#if defined(PCI_RES_BUS) struct resource *bus_res; rman_res_t end, start; int rid; -#endif int error, domain; uint8_t busno; @@ -479,7 +465,6 @@ acpi_pcib_acpi_attach(device_t dev) } } -#if defined(PCI_RES_BUS) /* * If nothing else worked, hope that ACPI at least lays out the * Host-PCI bridges in order and that as a result the next free @@ -524,18 +509,6 @@ acpi_pcib_acpi_attach(device_t dev) } } } -#else - /* - * If nothing else worked, hope that ACPI at least lays out the - * host-PCI bridges in order and that as a result our unit number - * is actually our bus number. There are several reasons this - * might not be true. - */ - if (busok == 0) { - sc->ap_bus = device_get_unit(dev); - device_printf(dev, "trying bus number %d\n", sc->ap_bus); - } -#endif /* If this is bus 0 on segment 0, note that it has been seen already. */ if (sc->ap_segment == 0 && sc->ap_bus == 0) @@ -566,9 +539,7 @@ acpi_pcib_acpi_attach(device_t dev) errout: device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(PCI_RES_BUS) pcib_host_res_free(dev, &sc->ap_host_res); -#endif return (error); } @@ -700,11 +671,9 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, #endif sc = device_get_softc(dev); -#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, count, flags)); -#endif res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end, count, flags); @@ -728,15 +697,12 @@ acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, struct acpi_hpcib_softc *sc; sc = device_get_softc(dev); -#ifdef PCI_RES_BUS if (rman_get_type(r) == PCI_RES_BUS) return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, end)); -#endif return (pcib_host_res_adjust(&sc->ap_host_res, child, r, start, end)); } -#ifdef PCI_RES_BUS int acpi_pcib_acpi_release_resource(device_t dev, device_t child, struct resource *r) @@ -772,7 +738,6 @@ acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, return (pci_domain_deactivate_bus(sc->ap_segment, child, r)); return (bus_generic_deactivate_resource(dev, child, r)); } -#endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature) diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index ffa90ebb6224..ff6a0992c6b9 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -93,13 +93,10 @@ static int cardbus_attach(device_t cbdev) { struct cardbus_softc *sc; -#ifdef PCI_RES_BUS int rid; -#endif sc = device_get_softc(cbdev); sc->sc_dev = cbdev; -#ifdef PCI_RES_BUS rid = 0; sc->sc_bus = bus_alloc_resource(cbdev, PCI_RES_BUS, &rid, pcib_get_bus(cbdev), pcib_get_bus(cbdev), 1, 0); @@ -107,25 +104,18 @@ cardbus_attach(device_t cbdev) device_printf(cbdev, "failed to allocate bus number\n"); return (ENXIO); } -#else - device_printf(cbdev, "Your bus numbers may be AFU\n"); -#endif return (0); } static int cardbus_detach(device_t cbdev) { -#ifdef PCI_RES_BUS struct cardbus_softc *sc; -#endif cardbus_detach_card(cbdev); -#ifdef PCI_RES_BUS sc = device_get_softc(cbdev); device_printf(cbdev, "Freeing up the allocatd bus\n"); (void)bus_release_resource(cbdev, PCI_RES_BUS, 0, sc->sc_bus); -#endif return (0); } diff --git a/sys/dev/cardbus/cardbusvar.h b/sys/dev/cardbus/cardbusvar.h index 5ebedf2e2621..12ad42ee94f7 100644 --- a/sys/dev/cardbus/cardbusvar.h +++ b/sys/dev/cardbus/cardbusvar.h @@ -68,9 +68,7 @@ struct cardbus_devinfo struct cardbus_softc { device_t sc_dev; -#ifdef PCI_RES_BUS struct resource *sc_bus; -#endif }; /* diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 3f55e45f5b92..3dd90ab5002c 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -421,17 +421,13 @@ static struct resource * ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, start, end, count, flags)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_alloc_resource(bus, child, type, rid, @@ -445,16 +441,12 @@ ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, static int ofw_pcib_release_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_release_resource(bus, child, res)); @@ -505,16 +497,12 @@ ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, static int ofw_pcib_activate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_activate_resource(bus, child, res)); @@ -621,17 +609,13 @@ ofw_pcib_bus_get_bus_tag(device_t bus, device_t child) static int ofw_pcib_deactivate_resource(device_t bus, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->sc_pci_domain, child, res)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_deactivate_resource(bus, child, res)); @@ -644,17 +628,13 @@ static int ofw_pcib_adjust_resource(device_t bus, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); -#endif case SYS_RES_MEMORY: case SYS_RES_IOPORT: return (bus_generic_rman_adjust_resource(bus, child, res, diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index eca370d17ca5..263ef0fd8aa8 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -276,10 +276,6 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { -#if !defined(PCI_RES_BUS) - static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ - uint32_t pribus; -#endif struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; @@ -293,13 +289,8 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->domain = pci_get_domain(brdev); sc->pribus = pcib_get_bus(parent); -#if defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); -#else - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); -#endif SLIST_INIT(&sc->rl); rid = CBBR_SOCKBASE; @@ -351,32 +342,6 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif -#if !defined(PCI_RES_BUS) - /* - * This is a gross hack. We should be scanning the entire pci - * tree, assigning bus numbers in a way such that we (1) can - * reserve 1 extra bus just in case and (2) all sub buses - * are in an appropriate range. - */ - DEVPRINTF((brdev, "Secondary bus is %d\n", sc->bus.sec)); - pribus = pci_read_config(brdev, PCIR_PRIBUS_2, 1); - if (sc->bus.sec == 0 || sc->pribus != pribus) { - if (curr_bus_number <= sc->pribus) - curr_bus_number = sc->pribus + 1; - if (pribus != sc->pribus) { - DEVPRINTF((brdev, "Setting primary bus to %d\n", - sc->pribus)); - pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); - } - sc->bus.sec = curr_bus_number++; - sc->bus.sub = curr_bus_number++; - DEVPRINTF((brdev, "Secondary bus set to %d subbus %d\n", - sc->bus.sec, sc->bus.sub)); - pci_write_config(brdev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(brdev, PCIR_SUBBUS_2, sc->bus.sub, 1); - } -#endif - /* Map and establish the interrupt. */ rid = 0; sc->irq_res = bus_alloc_resource_any(brdev, SYS_RES_IRQ, &rid, @@ -429,16 +394,12 @@ cbb_pci_attach(device_t brdev) static int cbb_pci_detach(device_t brdev) { -#if defined(PCI_RES_BUS) struct cbb_softc *sc = device_get_softc(brdev); -#endif int error; error = cbb_detach(brdev); -#if defined(PCI_RES_BUS) if (error == 0) pcib_free_secbus(brdev, &sc->bus); -#endif return (error); } @@ -787,7 +748,6 @@ cbb_pci_filt(void *arg) return retval; } -#if defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -836,7 +796,6 @@ cbb_pci_release_resource(device_t bus, device_t child, struct resource *r) } return (cbb_release_resource(bus, child, r)); } -#endif /************************************************************************/ /* PCI compat methods */ @@ -931,14 +890,9 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), DEVMETHOD(bus_release_resource, cbb_pci_release_resource), -#else - DEVMETHOD(bus_alloc_resource, cbb_alloc_resource), - DEVMETHOD(bus_release_resource, cbb_release_resource), -#endif DEVMETHOD(bus_activate_resource, cbb_activate_resource), DEVMETHOD(bus_deactivate_resource, cbb_deactivate_resource), DEVMETHOD(bus_driver_added, cbb_driver_added), diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index efe017f9a3ba..bda6919e9552 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -405,11 +405,9 @@ static int pci_clear_bars; SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); -#if defined(PCI_RES_BUS) static int pci_clear_buses; SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, "Ignore firmware-assigned bus numbers."); -#endif static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, @@ -3706,7 +3704,6 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } -#if defined(PCI_RES_BUS) static void pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource_list *rl) @@ -3862,7 +3859,6 @@ pci_alloc_secbus(device_t dev, device_t child, int *rid, rman_res_t start, return (resource_list_alloc(rl, dev, child, PCI_RES_BUS, rid, start, end, count, flags)); } -#endif static int pci_ea_bei_to_rid(device_t dev, int bei) @@ -4118,13 +4114,11 @@ pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) uhci_early_takeover(dev); } -#if defined(PCI_RES_BUS) /* * Reserve resources for secondary bus ranges behind bridge * devices. */ pci_reserve_secbus(bus, dev, cfg, rl); -#endif } static struct pci_devinfo * @@ -4470,14 +4464,11 @@ pci_attach_common(device_t dev) { struct pci_softc *sc; int busno, domain; -#ifdef PCI_RES_BUS int rid; -#endif sc = device_get_softc(dev); domain = pcib_get_domain(dev); busno = pcib_get_bus(dev); -#ifdef PCI_RES_BUS rid = 0; sc->sc_bus = bus_alloc_resource(dev, PCI_RES_BUS, &rid, busno, busno, 1, 0); @@ -4485,7 +4476,6 @@ pci_attach_common(device_t dev) device_printf(dev, "failed to allocate bus number\n"); return (ENXIO); } -#endif if (bootverbose) device_printf(dev, "domain=%d, physical bus=%d\n", domain, busno); @@ -4517,20 +4507,16 @@ pci_attach(device_t dev) int pci_detach(device_t dev) { -#ifdef PCI_RES_BUS struct pci_softc *sc; -#endif int error; error = bus_generic_detach(dev); if (error) return (error); -#ifdef PCI_RES_BUS sc = device_get_softc(dev); error = bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus); if (error) return (error); -#endif return (device_delete_children(dev)); } @@ -5111,10 +5097,8 @@ pci_child_detached(device_t dev, device_t child) pci_printf(&dinfo->cfg, "Device leaked memory resources\n"); if (resource_list_release_active(rl, dev, child, SYS_RES_IOPORT) != 0) pci_printf(&dinfo->cfg, "Device leaked I/O resources\n"); -#ifdef PCI_RES_BUS if (resource_list_release_active(rl, dev, child, PCI_RES_BUS) != 0) pci_printf(&dinfo->cfg, "Device leaked PCI bus numbers\n"); -#endif pci_cfg_save(child, dinfo, 1); } @@ -5551,11 +5535,9 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_alloc_secbus(dev, child, rid, start, end, count, flags)); -#endif case SYS_RES_IRQ: /* * Can't alloc legacy interrupt once MSI messages have diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index c3f4f03b76ad..b47a90348388 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -416,16 +416,12 @@ int pci_host_generic_core_release_resource(device_t dev, device_t child, struct resource *res) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_release_bus(sc->ecam, child, res)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_release_resource(dev, child, res)); @@ -506,22 +502,16 @@ struct resource * pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; -#endif struct resource *res; -#if defined(PCI_RES_BUS) sc = device_get_softc(dev); -#endif switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: res = pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags); break; -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: res = bus_generic_rman_alloc_resource(dev, child, type, rid, @@ -543,16 +533,12 @@ pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, static int generic_pcie_activate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_activate_bus(sc->ecam, child, r)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_activate_resource(dev, child, r)); @@ -565,16 +551,12 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, struct resource *r) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(r)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_deactivate_bus(sc->ecam, child, r)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_deactivate_resource(dev, child, r)); @@ -587,17 +569,13 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, struct resource *res, rman_res_t start, rman_res_t end) { -#if defined(PCI_RES_BUS) struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); -#endif switch (rman_get_type(res)) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->ecam, child, res, start, end)); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: return (bus_generic_rman_adjust_resource(dev, child, res, @@ -619,10 +597,8 @@ generic_pcie_map_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; @@ -658,10 +634,8 @@ generic_pcie_unmap_resource(device_t dev, device_t child, struct resource *r, type = rman_get_type(r); switch (type) { -#if defined(PCI_RES_BUS) case PCI_RES_BUS: return (EINVAL); -#endif case SYS_RES_IOPORT: case SYS_RES_MEMORY: break; diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 7977b9148c9b..0d74cfcf907e 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -178,10 +178,8 @@ static int pcib_is_resource_managed(struct pcib_softc *sc, struct resource *r) { -#ifdef PCI_RES_BUS if (rman_get_type(r) == PCI_RES_BUS) return (rman_is_region_manager(r, &sc->bus.rman)); -#endif return (pcib_get_resource_window(sc, r) != NULL); } @@ -605,7 +603,6 @@ pcib_free_windows(struct pcib_softc *sc) pcib_release_window(sc, &sc->io, SYS_RES_IOPORT); } -#ifdef PCI_RES_BUS /* * Allocate a suitable secondary bus for this bridge if needed and * initialize the resource manager for the secondary bus range. Note @@ -793,7 +790,6 @@ pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, flags)); return (NULL); } -#endif #ifdef PCI_HP /* @@ -1400,10 +1396,6 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); -#if !defined(PCI_RES_BUS) - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); -#endif sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); /* @@ -1431,20 +1423,6 @@ pcib_attach_common(device_t dev) * Quirk handling. */ switch (pci_get_devid(dev)) { -#if !defined(PCI_RES_BUS) - case 0x12258086: /* Intel 82454KX/GX (Orion) */ - { - uint8_t supbus; - - supbus = pci_read_config(dev, 0x41, 1); - if (supbus != 0xff) { - sc->bus.sec = supbus + 1; - sc->bus.sub = supbus + 1; - } - break; - } -#endif - /* * The i82380FB mobile docking controller is a PCI-PCI bridge, * and it is a subtractive bridge. However, the ProgIf is wrong @@ -1457,34 +1435,6 @@ pcib_attach_common(device_t dev) case 0x060513d7: /* Toshiba ???? */ sc->flags |= PCIB_SUBTRACTIVE; break; - -#if !defined(PCI_RES_BUS) - /* Compaq R3000 BIOS sets wrong subordinate bus number. */ - case 0x00dd10de: - { - char *cp; - - if ((cp = kern_getenv("smbios.planar.maker")) == NULL) - break; - if (strncmp(cp, "Compal", 6) != 0) { - freeenv(cp); - break; - } - freeenv(cp); - if ((cp = kern_getenv("smbios.planar.product")) == NULL) - break; - if (strncmp(cp, "08A0", 4) != 0) { - freeenv(cp); - break; - } - freeenv(cp); - if (sc->bus.sub < 0xa) { - pci_write_config(dev, PCIR_SUBBUS_1, 0xa, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - } - break; - } -#endif } if (pci_msi_device_blacklisted(dev)) @@ -1508,9 +1458,7 @@ pcib_attach_common(device_t dev) #ifdef PCI_HP pcib_probe_hotplug(sc); #endif -#ifdef PCI_RES_BUS pcib_setup_secbus(dev, &sc->bus, 1); -#endif pcib_probe_windows(sc); #ifdef PCI_HP if (sc->flags & PCIB_HOTPLUG) @@ -1617,9 +1565,7 @@ pcib_detach(device_t dev) if (error) return (error); pcib_free_windows(sc); -#ifdef PCI_RES_BUS pcib_free_secbus(dev, &sc->bus); -#endif return (0); } @@ -2097,11 +2043,9 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, } switch (type) { -#ifdef PCI_RES_BUS case PCI_RES_BUS: return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, count, flags)); -#endif case SYS_RES_IOPORT: if (pcib_is_isa_range(sc, start, end, count)) return (NULL); @@ -2181,7 +2125,6 @@ pcib_adjust_resource(device_t bus, device_t child, struct resource *r, if (!pcib_is_resource_managed(sc, r)) return (bus_generic_adjust_resource(bus, child, r, start, end)); -#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) { /* * If our bus range isn't big enough to grow the sub-allocation @@ -2195,9 +2138,7 @@ pcib_adjust_resource(device_t bus, device_t child, struct resource *r, if (error != 0) return (error); } - } else -#endif - { + } else { /* * Resource is managed and not a secondary bus number, must * be from one of our windows. diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h index 6dc7e3c505d1..3a114734c06f 100644 --- a/sys/dev/pci/pci_private.h +++ b/sys/dev/pci/pci_private.h @@ -40,9 +40,7 @@ DECLARE_CLASS(pci_driver); struct pci_softc { bus_dma_tag_t sc_dma_tag; -#ifdef PCI_RES_BUS struct resource *sc_bus; -#endif }; extern int pci_do_power_resume; diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 7665e1845868..09633e56a24a 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -283,7 +283,6 @@ pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, return (ERANGE); } -#ifdef PCI_RES_BUS struct pci_domain { int pd_domain; struct rman pd_bus_rman; @@ -411,4 +410,3 @@ pci_domain_deactivate_bus(int domain, device_t dev, struct resource *r) #endif return (rman_deactivate_resource(r)); } -#endif /* PCI_RES_BUS */ diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index 1f13fc6e67f7..4c1f6e038ae1 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -84,13 +84,11 @@ struct pcib_window { struct pcib_secbus { u_int sec; u_int sub; -#if defined(PCI_RES_BUS) device_t dev; struct rman rman; struct resource *res; const char *name; int sub_reg; -#endif }; /* @@ -140,7 +138,6 @@ typedef uint32_t pci_read_config_fn(int d, int b, int s, int f, int reg, int host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, uint8_t *busnum); -#if defined(PCI_RES_BUS) struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int pci_domain_adjust_bus(int domain, device_t dev, @@ -157,7 +154,6 @@ struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, void pcib_free_secbus(device_t dev, struct pcib_secbus *bus); void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count); -#endif int pcib_attach(device_t dev); int pcib_attach_child(device_t dev); void pcib_attach_common(device_t dev); diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index fd914e3426f5..f0d916af930f 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -595,17 +595,14 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(PCI_RES_BUS) if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(0, child, rid, start, end, count, flags)); -#endif start = hostb_alloc_start(type, start, end, count); return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } -#if defined(PCI_RES_BUS) int legacy_pcib_adjust_resource(device_t dev, device_t child, struct resource *r, rman_res_t start, rman_res_t end) @@ -641,7 +638,6 @@ legacy_pcib_deactivate_resource(device_t dev, device_t child, return (pci_domain_deactivate_bus(0, child, r)); return (bus_generic_deactivate_resource(dev, child, r)); } -#endif static device_method_t legacy_pcib_methods[] = { /* Device interface */ @@ -656,17 +652,10 @@ static device_method_t legacy_pcib_methods[] = { DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), -#else - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c index 524de7a525f0..4970605ff973 100644 --- a/sys/x86/pci/qpi.c +++ b/sys/x86/pci/qpi.c @@ -246,7 +246,6 @@ qpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) } } -#if defined(PCI_RES_BUS) static struct resource * qpi_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -258,7 +257,6 @@ qpi_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } -#endif static int qpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, @@ -280,18 +278,11 @@ static device_method_t qpi_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, qpi_pcib_read_ivar), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource), DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), -#else - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c index 43b12e2baf9c..14423f00189b 100644 --- a/sys/x86/x86/mptable_pci.c +++ b/sys/x86/x86/mptable_pci.c @@ -100,11 +100,9 @@ mptable_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid, { struct mptable_hostb_softc *sc; -#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) return (pci_domain_alloc_bus(0, child, rid, start, end, count, flags)); -#endif sc = device_get_softc(dev); if (type == SYS_RES_IOPORT && start + count - 1 == end) { if (mptable_is_isa_range(start, end)) { @@ -141,10 +139,8 @@ mptable_hostb_adjust_resource(device_t dev, device_t child, { struct mptable_hostb_softc *sc; -#ifdef PCI_RES_BUS if (rman_get_type(r) == PCI_RES_BUS) return (pci_domain_adjust_bus(0, child, r, start, end)); -#endif sc = device_get_softc(dev); return (pcib_host_res_adjust(&sc->sc_host_res, child, r, start, end)); } @@ -162,15 +158,9 @@ static device_method_t mptable_hostb_methods[] = { DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, mptable_hostb_alloc_resource), DEVMETHOD(bus_adjust_resource, mptable_hostb_adjust_resource), -#if defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), -#else - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), -#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), From f38669ef6d6aab32e9e17e9631345b188f00b583 Mon Sep 17 00:00:00 2001 From: Alexander Ziaee Date: Sun, 14 Jul 2024 04:47:37 -0400 Subject: [PATCH 115/151] tarfs.4: update title after move to section four Reviewed by: imp Fixes: 1687d7 (move filesystems to s4) Pull Request: https://github.com/freebsd/freebsd-src/pull/1325 --- share/man/man4/tarfs.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/tarfs.4 b/share/man/man4/tarfs.4 index 56c56ac43287..50cd287b3302 100644 --- a/share/man/man4/tarfs.4 +++ b/share/man/man4/tarfs.4 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .Dd February 14, 2023 -.Dt TARFS 5 +.Dt TARFS 4 .Os .Sh NAME .Nm tarfs From ee912ee57a213b25fc9e559054e5869b4a6b2f61 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 18 Jul 2024 14:54:43 -0400 Subject: [PATCH 116/151] nvmecontrol: Treat requested KeepAlive timeout as seconds The internal KATO is stored in milliseconds, so convert the command line argument (given in seconds) to milliseconds before passing to nvmf_connect(). Sponsored by: Chelsio Communications --- sbin/nvmecontrol/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/connect.c b/sbin/nvmecontrol/connect.c index 14bd0cce1f8f..ef614eca2e2a 100644 --- a/sbin/nvmecontrol/connect.c +++ b/sbin/nvmecontrol/connect.c @@ -82,7 +82,7 @@ connect_nvm_controller(enum nvmf_trtype trtype, int adrfam, const char *address, io = calloc(opt.num_io_queues, sizeof(*io)); error = connect_nvm_queues(&aparams, trtype, adrfam, address, port, - cntlid, subnqn, opt.hostnqn, opt.kato, &admin, io, + cntlid, subnqn, opt.hostnqn, opt.kato * 1000, &admin, io, opt.num_io_queues, opt.queue_size, &cdata); if (error != 0) { free(io); From a527b9cb721a597a0bc5313ac55290cc6a91deac Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Thu, 18 Jul 2024 13:56:31 -0500 Subject: [PATCH 117/151] axgbe: use standard rounddown_pow_of_two Drop an implementation of __rounddown_pow_of_two, which triggers Coverity warnings, and use the libkern implementation of rounddown_pow_of_two instead. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46022 --- sys/dev/axgbe/xgbe-sysctl.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/sys/dev/axgbe/xgbe-sysctl.c b/sys/dev/axgbe/xgbe-sysctl.c index 16523381e1a3..df81b1d7f0ae 100644 --- a/sys/dev/axgbe/xgbe-sysctl.c +++ b/sys/dev/axgbe/xgbe-sysctl.c @@ -244,22 +244,6 @@ exit_bad_op(void) return(-EINVAL); } -static inline unsigned -fls_long(unsigned long l) -{ - - if (sizeof(l) == 4) - return (fls(l)); - return (fls64(l)); -} - -static inline __attribute__((const)) -unsigned long __rounddown_pow_of_two(unsigned long n) -{ - - return (1UL << (fls_long(n) - 1)); -} - static inline int get_ubuf(struct sysctl_req *req, char *ubuf) { @@ -1049,12 +1033,12 @@ sysctl_ringparam_handler(SYSCTL_HANDLER_ARGS) return (-EINVAL); } - rx = __rounddown_pow_of_two(sys_op->rx_pending); + rx = rounddown_pow_of_two(sys_op->rx_pending); if (rx != sys_op->rx_pending) axgbe_printf(1, "rx ring param rounded to power of 2: %u\n", rx); - tx = __rounddown_pow_of_two(sys_op->tx_pending); + tx = rounddown_pow_of_two(sys_op->tx_pending); if (tx != sys_op->tx_pending) axgbe_printf(1, "tx ring param rounded to power of 2: %u\n", tx); From e82cee21ba3b4410771b7a9e94e9fac013f24ee4 Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Thu, 18 Jul 2024 17:21:45 -0500 Subject: [PATCH 118/151] axgbe: drop unused function A recent change dropped the only use of fls64() in axgbe, so drop its definition. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46030 --- sys/dev/axgbe/xgbe_osdep.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/axgbe/xgbe_osdep.h b/sys/dev/axgbe/xgbe_osdep.h index cea8b4797bf9..1f0359657dcd 100644 --- a/sys/dev/axgbe/xgbe_osdep.h +++ b/sys/dev/axgbe/xgbe_osdep.h @@ -232,13 +232,6 @@ __ffsl(long mask) return (ffsl(mask) - 1); } -static inline int -fls64(uint64_t mask) -{ - - return (flsll(mask)); -} - static inline int get_bitmask_order(unsigned int count) { From f7331f4ec87eef7ff9e2aa0109fcee06d71edff2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 18 Jul 2024 23:21:15 -0600 Subject: [PATCH 119/151] cdefs.9: Fix clang version, and gcc version There's no clang 19 that we support, so remove that from the list. Also, jhb will soon commit gcc 14 support, so add it while I'm here so I don't forget later. Submited by: jhb Sponsored by: Netflix --- share/man/man9/cdefs.9 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index a065e0bd7d1d..71b3e7fd4f81 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 8, 2024 +.Dd July 18, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -40,10 +40,13 @@ They are not intended as a general portability layer. Due to testing constraints, tcc and pcc may not always work. .It Compilers supported for building Fx itself: .Bl -column -offset 0n indent-two -.It Sy Compiler Ta Sy Versions -.It gcc Ta 12, 13 -.It clang Ta 16, 17, 19 +.It Sy Compiler Ta Sy Major Versions Supported +.It gcc Ta 12, 13, 14 +.It clang Ta 16, 17, 18 .El +.Pp +Please note: Not every single minor versions of these compilers +will work or are supported. .Sh Macros and Magic for Programming Environment .Nm defines (or refrains from defining) a number of macros to increase portability From fb05f761ac0b28b03eb057e36fe118f007d43d73 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 19 Jul 2024 08:08:14 +0200 Subject: [PATCH 120/151] siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks --- sys/netinet/siftr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index bf0cdc2ac4cc..ea1fbc8ff394 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -273,6 +273,7 @@ static struct mtx siftr_pkt_queue_mtx; static struct mtx siftr_pkt_mgr_mtx; static struct thread *siftr_pkt_manager_thr = NULL; static char direction[2] = {'i','o'}; +static eventhandler_tag siftr_shutdown_tag; /* Required function prototypes. */ static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS); @@ -1310,6 +1311,7 @@ static int deinit_siftr(void) { /* Cleanup. */ + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, siftr_shutdown_tag); siftr_manage_ops(SIFTR_DISABLE); hashdestroy(counter_hash, M_SIFTR, siftr_hashmask); mtx_destroy(&siftr_pkt_queue_mtx); @@ -1324,8 +1326,8 @@ deinit_siftr(void) static int init_siftr(void) { - EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL, - SHUTDOWN_PRI_FIRST); + siftr_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_pre_sync, + siftr_shutdown_handler, NULL, SHUTDOWN_PRI_FIRST); /* Initialise our flow counter hash table. */ counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR, From 94e62a5f91dba60e42c701998a970b5cf7e9d036 Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Fri, 19 Jul 2024 09:55:39 +0200 Subject: [PATCH 121/151] stress2: Exclude one more test --- tools/test/stress2/misc/all.exclude | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index f8936d9efee8..91fb68afabfc 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -57,6 +57,7 @@ suj12.sh Waiting for fix 20230319 suj19.sh https://people.freebsd.org/~pho/stress/log/log0378.txt 20221113 suj27.sh https://people.freebsd.org/~pho/stress/log/log0387.txt 20221113 suj36.sh https://people.freebsd.org/~pho/stress/log/log0392.txt 20221114 +swap3.sh https://people.freebsd.org/~pho/stress/log/log0543.txt 20240719 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff3.sh Excessive OOM killing 20220403 swapoff5.sh log0005.txt, known issue 20210111 From bbc326241d91ab2cee2ec2c5c0aa8a906480132f Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Tue, 16 Jul 2024 22:23:33 -0700 Subject: [PATCH 122/151] cxgbe/t4_tom: Detach the toep from the tcpcb when entering TIME_WAIT. The kernel used to call tod_pcb_detach when entering TIME_WAIT but that seems to have changed, likely with the TIME_WAIT overhaul in the kernel some time ago. Catch up by having the driver perform the detach. The hardware does not handle TIME_WAIT so it's important to detach and let the kernel arm the 2MSL timer to deal with it. Reported by: Sony Arpita Das @ Chelsio Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45990 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 2 ++ sys/dev/cxgbe/tom/t4_tom.c | 2 +- sys/dev/cxgbe/tom/t4_tom.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 842e72bf8b2b..cb229d327386 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1393,6 +1393,7 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) case TCPS_FIN_WAIT_2: restore_so_proto(so, inp->inp_vflag & INP_IPV6); + t4_pcb_detach(NULL, tp); tcp_twstart(tp); INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ NET_EPOCH_EXIT(et); @@ -1454,6 +1455,7 @@ do_close_con_rpl(struct sge_iq *iq, const struct rss_header *rss, switch (tp->t_state) { case TCPS_CLOSING: /* see TCPS_FIN_WAIT_2 in do_peer_close too */ restore_so_proto(so, inp->inp_vflag & INP_IPV6); + t4_pcb_detach(NULL, tp); tcp_twstart(tp); release: INP_UNLOCK_ASSERT(inp); /* safe, we have a ref on the inp */ diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 3fe34c7c01a3..10ee78681365 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -359,7 +359,7 @@ release_offload_resources(struct toepcb *toep) * Also gets called when an offloaded active open fails and the TOM wants the * kernel to take the TCP PCB back. */ -static void +void t4_pcb_detach(struct toedev *tod __unused, struct tcpcb *tp) { #if defined(KTR) || defined(INVARIANTS) diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index 805d8bc0d644..fb74642d61f7 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -468,6 +468,7 @@ __be32 calc_options2(struct vi_info *, struct conn_params *); uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); int negative_advice(int); int add_tid_to_history(struct adapter *, u_int); +void t4_pcb_detach(struct toedev *, struct tcpcb *); /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); From 27479403a764cf3b97194887a1f819c1e35357aa Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Mon, 15 Jul 2024 17:39:40 -0700 Subject: [PATCH 123/151] cxgbe/t4_tom: Free up hardware resources when the final CPL is received. Final CPL means the tid is done in the hardware and other resources associated with it can be freed right away. There is no need to wait for the kernel to detach the toepcb. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45991 --- sys/dev/cxgbe/tom/t4_tom.c | 58 +++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 10ee78681365..645822b6f781 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -97,6 +97,7 @@ static struct uld_info tom_uld_info = { }; static void release_offload_resources(struct toepcb *); +static void done_with_toepcb(struct toepcb *); static int alloc_tid_tabs(struct tid_info *); static void free_tid_tabs(struct tid_info *); static void free_tom_data(struct adapter *, struct tom_data *); @@ -311,12 +312,42 @@ release_offload_resources(struct toepcb *toep) KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: %p has CPL pending.", __func__, toep)); - KASSERT(!(toep->flags & TPF_ATTACHED), - ("%s: %p is still attached.", __func__, toep)); CTR5(KTR_CXGBE, "%s: toep %p (tid %d, l2te %p, ce %p)", __func__, toep, tid, toep->l2te, toep->ce); + if (toep->l2te) { + t4_l2t_release(toep->l2te); + toep->l2te = NULL; + } + if (tid >= 0) { + remove_tid(sc, tid, toep->ce ? 2 : 1); + release_tid(sc, tid, toep->ctrlq); + toep->tid = -1; + } + if (toep->ce) { + t4_release_clip_entry(sc, toep->ce); + toep->ce = NULL; + } + if (toep->params.tc_idx != -1) + t4_release_cl_rl(sc, toep->vi->pi->port_id, toep->params.tc_idx); +} + +/* + * Both the driver and kernel are done with the toepcb. + */ +static void +done_with_toepcb(struct toepcb *toep) +{ + struct tom_data *td = toep->td; + + KASSERT(!(toep->flags & TPF_CPL_PENDING), + ("%s: %p has CPL pending.", __func__, toep)); + KASSERT(!(toep->flags & TPF_ATTACHED), + ("%s: %p is still attached.", __func__, toep)); + + CTR(KTR_CXGBE, "%s: toep %p (0x%x)", __func__, toep, toep->flags); + /* * These queues should have been emptied at approximately the same time * that a normal connection's socket's so_snd would have been purged or @@ -329,20 +360,9 @@ release_offload_resources(struct toepcb *toep) ddp_assert_empty(toep); #endif MPASS(TAILQ_EMPTY(&toep->aiotx_jobq)); - - if (toep->l2te) - t4_l2t_release(toep->l2te); - - if (tid >= 0) { - remove_tid(sc, tid, toep->ce ? 2 : 1); - release_tid(sc, tid, toep->ctrlq); - } - - if (toep->ce) - t4_release_clip_entry(sc, toep->ce); - - if (toep->params.tc_idx != -1) - t4_release_cl_rl(sc, toep->vi->pi->port_id, toep->params.tc_idx); + MPASS(toep->tid == -1); + MPASS(toep->l2te == NULL); + MPASS(toep->ce == NULL); mtx_lock(&td->toep_list_lock); TAILQ_REMOVE(&td->toep_list, toep, link); @@ -392,7 +412,7 @@ t4_pcb_detach(struct toedev *tod __unused, struct tcpcb *tp) toep->flags &= ~TPF_ATTACHED; if (!(toep->flags & TPF_CPL_PENDING)) - release_offload_resources(toep); + done_with_toepcb(toep); } /* @@ -988,9 +1008,9 @@ final_cpl_received(struct toepcb *toep) toep->flags &= ~(TPF_CPL_PENDING | TPF_WAITING_FOR_FINAL); mbufq_drain(&toep->ulp_pduq); mbufq_drain(&toep->ulp_pdu_reclaimq); - + release_offload_resources(toep); if (!(toep->flags & TPF_ATTACHED)) - release_offload_resources(toep); + done_with_toepcb(toep); if (!in_pcbrele_wlocked(inp)) INP_WUNLOCK(inp); From cfcfd3c7bf5b60da42b13ac5d8085c762613c302 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Thu, 18 Jul 2024 13:16:30 -0700 Subject: [PATCH 124/151] cxgbe(4): Make no assumptions about the start and size of the L2T table. Do not assume that the table starts at index 0 and is typically 4K in size. The only thing the driver needs to verify is that its use of F_SYNC_WR doesn't collide with the L2T hwidx range. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46028 --- sys/dev/cxgbe/t4_l2t.c | 17 +++++++++++------ sys/dev/cxgbe/t4_l2t.h | 2 -- sys/dev/cxgbe/t4_main.c | 6 +++--- sys/dev/cxgbe/tom/t4_tom_l2t.c | 21 +++++++++++++-------- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/t4_l2t.c b/sys/dev/cxgbe/t4_l2t.c index 005dce826ccb..90f184f5e666 100644 --- a/sys/dev/cxgbe/t4_l2t.c +++ b/sys/dev/cxgbe/t4_l2t.c @@ -369,14 +369,19 @@ int do_l2t_write_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { + struct adapter *sc = iq->adapter; const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(rpl); - unsigned int idx = tid % L2T_SIZE; + const u_int hwidx = GET_TID(rpl) & ~(F_SYNC_WR | V_TID_QID(M_TID_QID)); + const bool sync = GET_TID(rpl) & F_SYNC_WR; - if (__predict_false(rpl->status != CPL_ERR_NONE)) { - log(LOG_ERR, - "Unexpected L2T_WRITE_RPL (%u) for entry at hw_idx %u\n", - rpl->status, idx); + MPASS(iq->abs_id == G_TID_QID(GET_TID(rpl))); + + if (__predict_false(hwidx < sc->vres.l2t.start) || + __predict_false(hwidx >= sc->vres.l2t.start + sc->vres.l2t.size) || + __predict_false(rpl->status != CPL_ERR_NONE)) { + CH_ERR(sc, "%s: hwidx %u, rpl %u, sync %u; L2T st %u, sz %u\n", + __func__, hwidx, rpl->status, sync, sc->vres.l2t.start, + sc->vres.l2t.size); return (EINVAL); } diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h index 36a41e459a5d..991b4476eb61 100644 --- a/sys/dev/cxgbe/t4_l2t.h +++ b/sys/dev/cxgbe/t4_l2t.h @@ -35,8 +35,6 @@ #define V_SYNC_WR(x) ((x) << S_SYNC_WR) #define F_SYNC_WR V_SYNC_WR(1) -enum { L2T_SIZE = 4096 }; /* # of L2T entries */ - enum { L2T_STATE_VALID, /* entry is up to date */ L2T_STATE_STALE, /* entry may be used but needs revalidation */ diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 99400dc9aadb..11dd9e1d24a3 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5262,9 +5262,9 @@ get_params__post_init(struct adapter *sc) } sc->vres.l2t.start = val[4]; sc->vres.l2t.size = val[5] - val[4] + 1; - KASSERT(sc->vres.l2t.size <= L2T_SIZE, - ("%s: L2 table size (%u) larger than expected (%u)", - __func__, sc->vres.l2t.size, L2T_SIZE)); + /* val[5] is the last hwidx and it must not collide with F_SYNC_WR */ + if (sc->vres.l2t.size > 0) + MPASS(fls(val[5]) <= S_SYNC_WR); sc->params.core_vdd = val[6]; param[0] = FW_PARAM_PFVF(IQFLINT_END); diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c index c397196d9cca..ee442f023970 100644 --- a/sys/dev/cxgbe/tom/t4_tom_l2t.c +++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c @@ -318,18 +318,23 @@ do_l2t_write_rpl2(struct sge_iq *iq, const struct rss_header *rss, { struct adapter *sc = iq->adapter; const struct cpl_l2t_write_rpl *rpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(rpl); - unsigned int idx = tid % L2T_SIZE; + const u_int hwidx = GET_TID(rpl) & ~(F_SYNC_WR | V_TID_QID(M_TID_QID)); + const bool sync = GET_TID(rpl) & F_SYNC_WR; - if (__predict_false(rpl->status != CPL_ERR_NONE)) { - log(LOG_ERR, - "Unexpected L2T_WRITE_RPL (%u) for entry at hw_idx %u\n", - rpl->status, idx); + MPASS(iq->abs_id == G_TID_QID(GET_TID(rpl))); + + if (__predict_false(hwidx < sc->vres.l2t.start) || + __predict_false(hwidx >= sc->vres.l2t.start + sc->vres.l2t.size) || + __predict_false(rpl->status != CPL_ERR_NONE)) { + CH_ERR(sc, "%s: hwidx %u, rpl %u, sync %u; L2T st %u, sz %u\n", + __func__, hwidx, rpl->status, sync, sc->vres.l2t.start, + sc->vres.l2t.size); return (EINVAL); } - if (tid & F_SYNC_WR) { - struct l2t_entry *e = &sc->l2t->l2tab[idx - sc->vres.l2t.start]; + if (sync) { + const u_int idx = hwidx - sc->vres.l2t.start; + struct l2t_entry *e = &sc->l2t->l2tab[idx]; mtx_lock(&e->lock); if (e->state != L2T_STATE_SWITCHING) { From cf5e6370f15cffabbbf508083ba7d48ec8abfa79 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Sat, 6 Jul 2024 13:43:17 -0700 Subject: [PATCH 125/151] cxgbe(4): Changes to ULD list management. * Convert t4_uld_list to an array. There will be at most 3 items in the list and it's simpler to track them in an array with a fixed slot for each ULD. * There is no need to refcount ULDs so stop doing that. * Add uld_ prefix to all members of uld_info. * Rename async_event to uld_stop to match its actual purpose. Call it for all ULDs and not just ULD_IWARP. Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46029 --- sys/dev/cxgbe/cxgbei/cxgbei.c | 9 +- sys/dev/cxgbe/iw_cxgbe/device.c | 19 ++-- sys/dev/cxgbe/offload.h | 13 +-- sys/dev/cxgbe/t4_main.c | 177 +++++++++++++------------------- sys/dev/cxgbe/tom/t4_tom.c | 9 +- 5 files changed, 97 insertions(+), 130 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 193d58f9eda4..04454a98e247 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -901,9 +901,8 @@ cxgbei_deactivate_all(struct adapter *sc, void *arg __unused) } static struct uld_info cxgbei_uld_info = { - .uld_id = ULD_ISCSI, - .activate = cxgbei_activate, - .deactivate = cxgbei_deactivate, + .uld_activate = cxgbei_activate, + .uld_deactivate = cxgbei_deactivate, }; static int @@ -916,7 +915,7 @@ cxgbei_mod_load(void) t4_register_cpl_handler(CPL_RX_ISCSI_DDP, do_rx_iscsi_ddp); t4_register_cpl_handler(CPL_RX_ISCSI_CMP, do_rx_iscsi_cmp); - rc = t4_register_uld(&cxgbei_uld_info); + rc = t4_register_uld(&cxgbei_uld_info, ULD_ISCSI); if (rc != 0) return (rc); @@ -931,7 +930,7 @@ cxgbei_mod_unload(void) t4_iterate(cxgbei_deactivate_all, NULL); - if (t4_unregister_uld(&cxgbei_uld_info) == EBUSY) + if (t4_unregister_uld(&cxgbei_uld_info, ULD_ISCSI) == EBUSY) return (EBUSY); t4_register_cpl_handler(CPL_ISCSI_HDR, NULL); diff --git a/sys/dev/cxgbe/iw_cxgbe/device.c b/sys/dev/cxgbe/iw_cxgbe/device.c index fa886766e383..28d6d0f2d00c 100644 --- a/sys/dev/cxgbe/iw_cxgbe/device.c +++ b/sys/dev/cxgbe/iw_cxgbe/device.c @@ -259,13 +259,12 @@ static int c4iw_mod_load(void); static int c4iw_mod_unload(void); static int c4iw_activate(struct adapter *); static int c4iw_deactivate(struct adapter *); -static void c4iw_async_event(struct adapter *); +static int c4iw_stop(struct adapter *); static struct uld_info c4iw_uld_info = { - .uld_id = ULD_IWARP, - .activate = c4iw_activate, - .deactivate = c4iw_deactivate, - .async_event = c4iw_async_event, + .uld_activate = c4iw_activate, + .uld_deactivate = c4iw_deactivate, + .uld_stop = c4iw_stop, }; static int @@ -326,8 +325,8 @@ c4iw_deactivate(struct adapter *sc) return (0); } -static void -c4iw_async_event(struct adapter *sc) +static int +c4iw_stop(struct adapter *sc) { struct c4iw_dev *iwsc = sc->iwarp_softc; @@ -341,6 +340,8 @@ c4iw_async_event(struct adapter *sc) event.device = &iwsc->ibdev; ib_dispatch_event(&event); } + + return (0); } static void @@ -379,7 +380,7 @@ c4iw_mod_load(void) if (rc != 0) return (rc); - rc = t4_register_uld(&c4iw_uld_info); + rc = t4_register_uld(&c4iw_uld_info, ULD_IWARP); if (rc != 0) { c4iw_cm_term(); return (rc); @@ -398,7 +399,7 @@ c4iw_mod_unload(void) c4iw_cm_term(); - if (t4_unregister_uld(&c4iw_uld_info) == EBUSY) + if (t4_unregister_uld(&c4iw_uld_info, ULD_IWARP) == EBUSY) return (EBUSY); return (0); diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h index a8b243b764c8..a55d6f45cabf 100644 --- a/sys/dev/cxgbe/offload.h +++ b/sys/dev/cxgbe/offload.h @@ -209,12 +209,9 @@ enum { struct adapter; struct port_info; struct uld_info { - SLIST_ENTRY(uld_info) link; - int refcount; - int uld_id; - int (*activate)(struct adapter *); - int (*deactivate)(struct adapter *); - void (*async_event)(struct adapter *); + int (*uld_activate)(struct adapter *); + int (*uld_deactivate)(struct adapter *); + int (*uld_stop)(struct adapter *); }; struct tom_tunables { @@ -242,8 +239,8 @@ struct tls_tunables { }; #ifdef TCP_OFFLOAD -int t4_register_uld(struct uld_info *); -int t4_unregister_uld(struct uld_info *); +int t4_register_uld(struct uld_info *, int); +int t4_unregister_uld(struct uld_info *, int); int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); int uld_active(struct adapter *, int); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 11dd9e1d24a3..9ff56b93a0e6 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -263,7 +263,7 @@ static struct sx t4_list_lock; SLIST_HEAD(, adapter) t4_list; #ifdef TCP_OFFLOAD static struct sx t4_uld_list_lock; -SLIST_HEAD(, uld_info) t4_uld_list; +struct uld_info *t4_uld_list[ULD_MAX + 1]; #endif /* @@ -864,7 +864,7 @@ static int release_clip_addr(struct adapter *, struct t4_clip_addr *); #ifdef TCP_OFFLOAD static int toe_capability(struct vi_info *, bool); static int t4_deactivate_all_uld(struct adapter *); -static void t4_async_event(struct adapter *); +static void stop_all_uld(struct adapter *); #endif #ifdef KERN_TLS static int ktls_capability(struct adapter *, bool); @@ -3616,7 +3616,7 @@ fatal_error_task(void *arg, int pending) int rc; #ifdef TCP_OFFLOAD - t4_async_event(sc); + stop_all_uld(sc); #endif if (atomic_testandclear_int(&sc->error_flags, ilog2(ADAP_CIM_ERR))) { dump_cim_regs(sc); @@ -12400,82 +12400,61 @@ toe_capability(struct vi_info *vi, bool enable) * Add an upper layer driver to the global list. */ int -t4_register_uld(struct uld_info *ui) +t4_register_uld(struct uld_info *ui, int id) { - int rc = 0; - struct uld_info *u; + int rc; + if (id < 0 || id > ULD_MAX) + return (EINVAL); sx_xlock(&t4_uld_list_lock); - SLIST_FOREACH(u, &t4_uld_list, link) { - if (u->uld_id == ui->uld_id) { - rc = EEXIST; - goto done; - } + if (t4_uld_list[id] != NULL) + rc = EEXIST; + else { + t4_uld_list[id] = ui; + rc = 0; } - - SLIST_INSERT_HEAD(&t4_uld_list, ui, link); - ui->refcount = 0; -done: sx_xunlock(&t4_uld_list_lock); return (rc); } int -t4_unregister_uld(struct uld_info *ui) +t4_unregister_uld(struct uld_info *ui, int id) { - int rc = EINVAL; - struct uld_info *u; + if (id < 0 || id > ULD_MAX) + return (EINVAL); sx_xlock(&t4_uld_list_lock); - - SLIST_FOREACH(u, &t4_uld_list, link) { - if (u == ui) { - if (ui->refcount > 0) { - rc = EBUSY; - goto done; - } - - SLIST_REMOVE(&t4_uld_list, ui, uld_info, link); - rc = 0; - goto done; - } - } -done: + MPASS(t4_uld_list[id] == ui); + t4_uld_list[id] = NULL; sx_xunlock(&t4_uld_list_lock); - return (rc); + return (0); } int t4_activate_uld(struct adapter *sc, int id) { int rc; - struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); if (id < 0 || id > ULD_MAX) return (EINVAL); - rc = EAGAIN; /* kldoad the module with this ULD and try again. */ - - sx_slock(&t4_uld_list_lock); - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == id) { - if (!(sc->flags & FULL_INIT_DONE)) { - rc = adapter_init(sc); - if (rc != 0) - break; - } - - rc = ui->activate(sc); - if (rc == 0) { - setbit(&sc->active_ulds, id); - ui->refcount++; - } - break; - } + /* Adapter needs to be initialized before any ULD can be activated. */ + if (!(sc->flags & FULL_INIT_DONE)) { + rc = adapter_init(sc); + if (rc != 0) + return (rc); } + sx_slock(&t4_uld_list_lock); + if (t4_uld_list[id] == NULL) + rc = EAGAIN; /* load the KLD with this ULD and try again. */ + else { + rc = t4_uld_list[id]->uld_activate(sc); + if (rc == 0) + setbit(&sc->active_ulds, id); + } sx_sunlock(&t4_uld_list_lock); return (rc); @@ -12485,27 +12464,20 @@ int t4_deactivate_uld(struct adapter *sc, int id) { int rc; - struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); if (id < 0 || id > ULD_MAX) return (EINVAL); - rc = ENXIO; sx_slock(&t4_uld_list_lock); - - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == id) { - rc = ui->deactivate(sc); - if (rc == 0) { - clrbit(&sc->active_ulds, id); - ui->refcount--; - } - break; - } + if (t4_uld_list[id] == NULL) + rc = ENXIO; + else { + rc = t4_uld_list[id]->uld_deactivate(sc); + if (rc == 0) + clrbit(&sc->active_ulds, id); } - sx_sunlock(&t4_uld_list_lock); return (rc); @@ -12514,25 +12486,20 @@ t4_deactivate_uld(struct adapter *sc, int id) static int t4_deactivate_all_uld(struct adapter *sc) { - int rc; - struct uld_info *ui; + int i, rc; rc = begin_synchronized_op(sc, NULL, SLEEP_OK, "t4detuld"); if (rc != 0) return (ENXIO); - sx_slock(&t4_uld_list_lock); - - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (isset(&sc->active_ulds, ui->uld_id)) { - rc = ui->deactivate(sc); - if (rc != 0) - break; - clrbit(&sc->active_ulds, ui->uld_id); - ui->refcount--; - } + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] == NULL || !uld_active(sc, i)) + continue; + rc = t4_uld_list[i]->uld_deactivate(sc); + if (rc != 0) + break; + clrbit(&sc->active_ulds, i); } - sx_sunlock(&t4_uld_list_lock); end_synchronized_op(sc, 0); @@ -12540,30 +12507,30 @@ t4_deactivate_all_uld(struct adapter *sc) } static void -t4_async_event(struct adapter *sc) +stop_all_uld(struct adapter *sc) { - struct uld_info *ui; + int i; - if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4async") != 0) + if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4uldst") != 0) return; sx_slock(&t4_uld_list_lock); - SLIST_FOREACH(ui, &t4_uld_list, link) { - if (ui->uld_id == ULD_IWARP) { - ui->async_event(sc); - break; - } + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] == NULL || !uld_active(sc, i) || + t4_uld_list[i]->uld_stop == NULL) + continue; + (void) t4_uld_list[i]->uld_stop(sc); } sx_sunlock(&t4_uld_list_lock); end_synchronized_op(sc, 0); } int -uld_active(struct adapter *sc, int uld_id) +uld_active(struct adapter *sc, int id) { - MPASS(uld_id >= 0 && uld_id <= ULD_MAX); + MPASS(id >= 0 && id <= ULD_MAX); - return (isset(&sc->active_ulds, uld_id)); + return (isset(&sc->active_ulds, id)); } #endif @@ -13111,7 +13078,6 @@ mod_event(module_t mod, int cmd, void *arg) callout_init(&fatal_callout, 1); #ifdef TCP_OFFLOAD sx_init(&t4_uld_list_lock, "T4/T5 ULDs"); - SLIST_INIT(&t4_uld_list); #endif #ifdef INET6 t4_clip_modload(); @@ -13140,9 +13106,20 @@ mod_event(module_t mod, int cmd, void *arg) case MOD_UNLOAD: sx_xlock(&mlu); if (--loaded == 0) { +#ifdef TCP_OFFLOAD + int i; +#endif int tries; taskqueue_free(reset_tq); + + tries = 0; + while (tries++ < 5 && t4_sge_extfree_refs() != 0) { + uprintf("%ju clusters with custom free routine " + "still is use.\n", t4_sge_extfree_refs()); + pause("t4unload", 2 * hz); + } + sx_slock(&t4_list_lock); if (!SLIST_EMPTY(&t4_list)) { rc = EBUSY; @@ -13151,20 +13128,14 @@ mod_event(module_t mod, int cmd, void *arg) } #ifdef TCP_OFFLOAD sx_slock(&t4_uld_list_lock); - if (!SLIST_EMPTY(&t4_uld_list)) { - rc = EBUSY; - sx_sunlock(&t4_uld_list_lock); - sx_sunlock(&t4_list_lock); - goto done_unload; - } -#endif - tries = 0; - while (tries++ < 5 && t4_sge_extfree_refs() != 0) { - uprintf("%ju clusters with custom free routine " - "still is use.\n", t4_sge_extfree_refs()); - pause("t4unload", 2 * hz); + for (i = 0; i <= ULD_MAX; i++) { + if (t4_uld_list[i] != NULL) { + rc = EBUSY; + sx_sunlock(&t4_uld_list_lock); + sx_sunlock(&t4_list_lock); + goto done_unload; + } } -#ifdef TCP_OFFLOAD sx_sunlock(&t4_uld_list_lock); #endif sx_sunlock(&t4_list_lock); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 645822b6f781..f9d8dcd706b7 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -91,9 +91,8 @@ static int t4_tom_activate(struct adapter *); static int t4_tom_deactivate(struct adapter *); static struct uld_info tom_uld_info = { - .uld_id = ULD_TOM, - .activate = t4_tom_activate, - .deactivate = t4_tom_deactivate, + .uld_activate = t4_tom_activate, + .uld_deactivate = t4_tom_deactivate, }; static void release_offload_resources(struct toepcb *); @@ -2013,7 +2012,7 @@ t4_tom_mod_load(void) toe6_protosw.pr_ctloutput = t4_ctloutput_tom; toe6_protosw.pr_aio_queue = t4_aio_queue_tom; - return (t4_register_uld(&tom_uld_info)); + return (t4_register_uld(&tom_uld_info, ULD_TOM)); } static void @@ -2034,7 +2033,7 @@ t4_tom_mod_unload(void) { t4_iterate(tom_uninit, NULL); - if (t4_unregister_uld(&tom_uld_info) == EBUSY) + if (t4_unregister_uld(&tom_uld_info, ULD_TOM) == EBUSY) return (EBUSY); t4_tls_mod_unload(); From 680f40f38343de118d5b973129683804e496faaf Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:01:07 -0400 Subject: [PATCH 126/151] stdatomic: Only use clang atomics if __clang__ is defined GCC 14 defines __has_extension(c_atomic) but does not support __c11_atomic_*, so require __clang__ for the CLANG_ATOMICS case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46001 --- sys/sys/stdatomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index e05606b1ead8..099097ea84a4 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -33,7 +33,8 @@ #include #include -#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \ + defined(__clang__) #define __CLANG_ATOMICS #elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS From 5275d1ddb42dc70fb87925e59445059068c08271 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:01:40 -0400 Subject: [PATCH 127/151] libcasper: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46005 --- lib/libcasper/services/cap_dns/cap_dns.c | 4 ++-- lib/libcasper/services/cap_net/cap_net.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 8548715a6978..32cbf973ad45 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -85,7 +85,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -99,7 +99,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c index a8f039f81843..40d18319ae28 100644 --- a/lib/libcasper/services/cap_net/cap_net.c +++ b/lib/libcasper/services/cap_net/cap_net.c @@ -105,7 +105,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_length = (int)nvlist_get_number(nvl, "length"); nitems = (unsigned int)nvlist_get_number(nvl, "naliases"); - hp->h_aliases = calloc(sizeof(hp->h_aliases[0]), nitems + 1); + hp->h_aliases = calloc(nitems + 1, sizeof(hp->h_aliases[0])); if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { @@ -119,7 +119,7 @@ hostent_unpack(const nvlist_t *nvl, struct hostent *hp) hp->h_aliases[ii] = NULL; nitems = (unsigned int)nvlist_get_number(nvl, "naddrs"); - hp->h_addr_list = calloc(sizeof(hp->h_addr_list[0]), nitems + 1); + hp->h_addr_list = calloc(nitems + 1, sizeof(hp->h_addr_list[0])); if (hp->h_addr_list == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { From bf3b889a5be141f3abadcfc5a1d1cbdc50273d72 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:02:05 -0400 Subject: [PATCH 128/151] libgeom: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46006 --- lib/libgeom/geom_xml2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 49cbb0385770..2d2c43e29e77 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p) free(mt); return (error); } - gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident)); free(mt); if (gmp->lg_ident == NULL) return (ENOMEM); From b73445a32f8a3648372c0042ef633fe61b38d135 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:02:45 -0400 Subject: [PATCH 129/151] elftoolchain: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46007 --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); } From 8aadd10a65b11f18950118a10569233e1420ab45 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:03:19 -0400 Subject: [PATCH 130/151] lib80211: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46008 --- lib/lib80211/lib80211_regdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index 189d4661c78b..db353a69f4d9 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -441,7 +441,7 @@ lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) XML_ParserFree(mt->parser); /* setup the identifer table */ - rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + rdp->ident = calloc(mt->nident + 1, sizeof(struct ident)); if (rdp->ident == NULL) return ENOMEM; free(mt); From e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:04:27 -0400 Subject: [PATCH 131/151] md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 70fc7cb7eef1..10ffae53c775 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -592,7 +592,7 @@ main(int argc, char *argv[]) while (argc--) gnu_check(*argv++); argc = 0; - argv = calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++; From 6991cb36f52a35043132f349a60748eeb382ff32 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:04:50 -0400 Subject: [PATCH 132/151] recoverdisk: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46010 --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 43b62fc142f3..91f42c904c52 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(sizeof *pp, 1L); + pp = calloc(1, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt; From a971c60456223b22c0b3c557d712b36660dbcff9 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:05:12 -0400 Subject: [PATCH 133/151] ministat: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46011 --- usr.bin/ministat/ministat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 6508ce3f2533..6967841a339f 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -152,7 +152,7 @@ NewSet(void) ds = calloc(1, sizeof *ds); assert(ds != NULL); ds->lpoints = 100000; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); ds->syy = NAN; return(ds); @@ -166,7 +166,7 @@ AddPoint(struct dataset *ds, double a) if (ds->n >= ds->lpoints) { dp = ds->points; ds->lpoints *= 4; - ds->points = calloc(sizeof *ds->points, ds->lpoints); + ds->points = calloc(ds->lpoints, sizeof(*ds->points)); assert(ds->points != NULL); memcpy(ds->points, dp, sizeof *dp * ds->n); free(dp); @@ -355,7 +355,7 @@ PlotSet(struct dataset *ds, int val) bar = 0; if (pl->bar == NULL) { - pl->bar = calloc(sizeof(char *), pl->num_datasets); + pl->bar = calloc(pl->num_datasets, sizeof(char *)); assert(pl->bar != NULL); } From 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:07:00 -0400 Subject: [PATCH 134/151] bsdinstall: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46012 --- usr.sbin/bsdinstall/distfetch/distfetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index c431e187799d..ddb8a8361d6b 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -130,8 +130,8 @@ fetch_files(int nfiles, char **urls) struct bsddialog_conf mgconf; /* Make the transfer list for mixedgauge */ - minilabel = calloc(sizeof(char *), nfiles); - miniperc = calloc(sizeof(int), nfiles); + minilabel = calloc(nfiles, sizeof(char *)); + miniperc = calloc(nfiles, sizeof(int)); if (minilabel == NULL || miniperc == NULL) errx(EXIT_FAILURE, "Error: distfetch minibars out of memory!"); From 2ba12978f67432a3f88b17704391d28e1fc0e788 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:07:22 -0400 Subject: [PATCH 135/151] ctld: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46013 --- usr.sbin/ctld/isns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/isns.c b/usr.sbin/ctld/isns.c index 71150a8ae06f..0b836324ff47 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -48,14 +48,14 @@ isns_req_alloc(void) { struct isns_req *req; - req = calloc(sizeof(struct isns_req), 1); + req = calloc(1, sizeof(struct isns_req)); if (req == NULL) { log_err(1, "calloc"); return (NULL); } req->ir_buflen = sizeof(struct isns_hdr); req->ir_usedlen = 0; - req->ir_buf = calloc(req->ir_buflen, 1); + req->ir_buf = calloc(1, req->ir_buflen); if (req->ir_buf == NULL) { free(req); log_err(1, "calloc"); From 9494dfe1b3faf5c48abaa9be4ec87e4669963942 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 13:08:14 -0400 Subject: [PATCH 136/151] fwcontrol: Allocate full fw_asyreq structures passed to the kernel The FW_ASYREQ ioctl accepts a struct fw_asyreq object as its argument, meaning that the kernel always copies in the full structure in sys_ioctl before passing the request down to the driver. However, fwcontrol was allocating smaller objects that contained only the request header and a variable-sized payload. This means that the kernel copy in sys_ioctl was reading off the end of this buffer. On current architectures this happened to be ok, but it is UB. Instead, allocate a full structure. Reported by: GCC 14 -Walloc-size Reviewed by: rlibby, brooks Differential Revision: https://reviews.freebsd.org/D46014 --- usr.sbin/fwcontrol/fwcontrol.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c index 94478259606d..ce908341a42a 100644 --- a/usr.sbin/fwcontrol/fwcontrol.c +++ b/usr.sbin/fwcontrol/fwcontrol.c @@ -207,7 +207,7 @@ read_write_quad(int fd, struct fw_eui64 eui, u_int32_t addr_lo, int readmode, u_ struct fw_asyreq *asyreq; u_int32_t *qld, res; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; @@ -262,7 +262,7 @@ send_phy_config(int fd, int root_node, int gap_count) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -289,7 +289,7 @@ link_on(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 12; @@ -308,7 +308,7 @@ reset_start(int fd, int node) { struct fw_asyreq *asyreq; - asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16); + asyreq = malloc(sizeof(*asyreq)); if (asyreq == NULL) err(EX_SOFTWARE, "%s:asyreq malloc", __func__); asyreq->req.len = 16; From 66f360515d2829d261c0ad7bd516e9dd18c2dd83 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Fri, 19 Jul 2024 11:04:43 -0700 Subject: [PATCH 137/151] rc.conf: Leap-seconds sources: Add IANA back 11da791920ba switched Leap-seconds source from IANA to IERS, as IERS is the canonoical source. The problem ist that IERS is not accessible from IPv6 only networks. To work around this we must add IANA back in order to provide IPv6-only users a source for leap-seconds fetch. PR: 279413 Fixes: 11da791920ba MFC after: 3 days --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 1ee1573bbdba..583d4fd2970e 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -420,7 +420,7 @@ ntp_src_leapfile="/etc/ntp/leap-seconds" # Initial source for ntpd leapfile ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" # Canonical place to get the leap seconds from -ntp_leapfile_sources="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list" +ntp_leapfile_sources="https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list https://data.iana.org/time-zones/tzdb/leap-seconds.list" # Source from which to fetch leapfile ntp_leapfile_fetch_opts="-mq" # Options to use for ntp leapfile fetch, # e.g. --no-verify-peer From e0649a35a670c4b625d1de289b3886d9b3c9654f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 19 Jul 2024 17:06:47 -0400 Subject: [PATCH 138/151] libnvmf: Zero controller data template for I/O controllers This prevents stack garbage from leaking into the cdata used for the userspace I/O controller in nvmfd(8). Sponsored by: Chelsio Communications --- lib/libnvmf/nvmf_controller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnvmf/nvmf_controller.c b/lib/libnvmf/nvmf_controller.c index 554e5e769ded..0e0126040ee4 100644 --- a/lib/libnvmf/nvmf_controller.c +++ b/lib/libnvmf/nvmf_controller.c @@ -425,6 +425,7 @@ nvmf_init_io_controller_data(struct nvmf_qpair *qp, const char *serial, uname(&utsname); + memset(cdata, 0, sizeof(*cdata)); _nvmf_init_io_controller_data(qp->nq_cntlid, na->na_params.max_io_qsize, serial, utsname.sysname, utsname.release, subnqn, nn, ioccsz, sizeof(struct nvme_completion), cdata); From 47fb5d2b13c5ca8e1a3b05ed223d62ea4b43b3e8 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Sat, 20 Jul 2024 00:24:35 +0100 Subject: [PATCH 139/151] kyua: fix gcc builds For some reason execenv::exec() isn't successfully marked noreturn (rlibby reports that virtual functions can't be noreturn), but calling methods are so gcc rightly complains. Work around this by adding explicit __builtin_unreachable() calls. Reviewed by: imp, markj Fixes: 257e70f1d5ee kyua: Add FreeBSD Jail execution environment support Differential Revision: https://reviews.freebsd.org/D46041 --- contrib/kyua/engine/atf.cpp | 2 ++ contrib/kyua/engine/plain.cpp | 1 + contrib/kyua/engine/tap.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/contrib/kyua/engine/atf.cpp b/contrib/kyua/engine/atf.cpp index f6746dd2f29f..47f3bd2a1903 100644 --- a/contrib/kyua/engine/atf.cpp +++ b/contrib/kyua/engine/atf.cpp @@ -196,6 +196,7 @@ engine::atf_interface::exec_test(const model::test_program& test_program, auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } @@ -227,6 +228,7 @@ engine::atf_interface::exec_cleanup( auto e = execenv::get(test_program, test_case_name); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/plain.cpp b/contrib/kyua/engine/plain.cpp index 9a2c63f8b663..0aba9b3fb6fa 100644 --- a/contrib/kyua/engine/plain.cpp +++ b/contrib/kyua/engine/plain.cpp @@ -110,6 +110,7 @@ engine::plain_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } diff --git a/contrib/kyua/engine/tap.cpp b/contrib/kyua/engine/tap.cpp index ed35ba40433f..716212d18d02 100644 --- a/contrib/kyua/engine/tap.cpp +++ b/contrib/kyua/engine/tap.cpp @@ -157,6 +157,7 @@ engine::tap_interface::exec_test( auto e = execenv::get(test_program, test_case_name); e->init(); e->exec(args); + __builtin_unreachable(); } From e82644e59ece5cdc67250262508e81fa22deea90 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:52:40 -0600 Subject: [PATCH 140/151] cam/iosched: Add a counter of I/Os that take too long Add kern.cam.DEV.UNIT.iosched.too_long (to count I/Os taking too long) and kern.cam.DEV.UNIT.bad_latency (to set this threshold, defaults to 500ms). Each class of I/O (read, write, trim) has its own counters and thresholds. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46033 --- sys/cam/cam_iosched.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 471e6c355d69..022eb23cb621 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -271,6 +271,9 @@ struct iop_stats { sbintime_t emvar; sbintime_t sd; /* Last computed sd */ + uint64_t too_long; /* Number of I/Os greater than bad lat threshold */ + sbintime_t bad_latency; /* Latency threshold */ + uint32_t state_flags; #define IOP_RATE_LIMITED 1u @@ -856,6 +859,7 @@ cam_iosched_iop_stats_init(struct cam_iosched_softc *isc, struct iop_stats *ios) ios->total = 0; ios->ema = 0; ios->emvar = 0; + ios->bad_latency = SBT_1S / 2; /* Default to 500ms */ ios->softc = isc; cam_iosched_limiter_init(ios); } @@ -1046,6 +1050,15 @@ cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stat OID_AUTO, "errs", CTLFLAG_RD, &ios->errs, 0, "# of transactions completed with an error"); + SYSCTL_ADD_U64(ctx, n, + OID_AUTO, "too_long", CTLFLAG_RD, + &ios->too_long, 0, + "# of transactions completed took too long"); + SYSCTL_ADD_PROC(ctx, n, + OID_AUTO, "bad_latency", + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + &ios->bad_latency, 0, cam_iosched_sbintime_sysctl, "A", + "Threshold for counting transactions that took too long (in us)"); SYSCTL_ADD_PROC(ctx, n, OID_AUTO, "limiter", @@ -1916,6 +1929,14 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) sbintime_t y, deltasq, delta; int i; + /* + * Simple threshold: count the number of events that excede the + * configured threshold. + */ + if (sim_latency > iop->bad_latency) { + iop->too_long++; + } + /* * Keep counts for latency. We do it by power of two buckets. * This helps us spot outlier behavior obscured by averages. From 148c173485eea8309e3c95db741686b3c71e83de Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:52:50 -0600 Subject: [PATCH 141/151] cam/iosched: Pass the transaction down we're collecting stats for Pass the struct bio * down to the stats collection routines. This allows us to collect better stats and report more details. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46034 --- sys/cam/cam_iosched.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 022eb23cb621..330d5ea22b61 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -758,7 +758,7 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp) #ifdef CAM_IOSCHED_DYNAMIC static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size); + sbintime_t sim_latency, const struct bio *bp); #endif static inline bool @@ -1801,8 +1801,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, sim_latency = cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data); - cam_iosched_io_metric_update(isc, sim_latency, - bp->bio_cmd, bp->bio_bcount); + cam_iosched_io_metric_update(isc, sim_latency, bp); + /* * Debugging code: allow callbacks to the periph driver when latency max * is exceeded. This can be useful for triggering external debugging actions. @@ -1924,7 +1924,8 @@ static sbintime_t latencies[LAT_BUCKETS - 1] = { }; static void -cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) +cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, + const struct bio *bp __unused) { sbintime_t y, deltasq, delta; int i; @@ -2014,18 +2015,17 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency) static void cam_iosched_io_metric_update(struct cam_iosched_softc *isc, - sbintime_t sim_latency, int cmd, size_t size) + sbintime_t sim_latency, const struct bio *bp) { - /* xxx Do we need to scale based on the size of the I/O ? */ - switch (cmd) { + switch (bp->bio_cmd) { case BIO_READ: - cam_iosched_update(&isc->read_stats, sim_latency); + cam_iosched_update(&isc->read_stats, sim_latency, bp); break; case BIO_WRITE: - cam_iosched_update(&isc->write_stats, sim_latency); + cam_iosched_update(&isc->write_stats, sim_latency, bp); break; case BIO_DELETE: - cam_iosched_update(&isc->trim_stats, sim_latency); + cam_iosched_update(&isc->trim_stats, sim_latency, bp); break; default: break; From 6f1dd6071a9171b8d1472ba36f6045a7a10b622a Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:53:01 -0600 Subject: [PATCH 142/151] cam/iosched: Pass in the disk when initializing The disk is nice to have at times, especially when you need the sector size. At present, the only plans for this are related to logging. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46035 --- sys/cam/ata/ata_da.c | 19 ++++++++++--------- sys/cam/cam_iosched.c | 5 ++++- sys/cam/cam_iosched.h | 3 ++- sys/cam/nvme/nvme_da.c | 17 +++++++++-------- sys/cam/scsi/scsi_da.c | 16 ++++++++-------- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 6e008cfc8d22..2c1183b74c1d 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1834,13 +1834,6 @@ adaregister(struct cam_periph *periph, void *arg) announce_buf = softc->announce_temp; bzero(announce_buf, ADA_ANNOUNCETMP_SZ); - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("adaregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - periph->softc = softc; xpt_path_inq(&softc->cpi, periph->path); @@ -1901,8 +1894,6 @@ adaregister(struct cam_periph *periph, void *arg) } else { softc->flags |= ADA_FLAG_ROTATING; } - cam_iosched_set_sort_queue(softc->cam_iosched, - (softc->flags & ADA_FLAG_ROTATING) ? -1 : 0); softc->disk = disk_alloc(); adasetgeom(softc, cgd); softc->disk->d_devstat = devstat_new_entry(periph->periph_name, @@ -1921,6 +1912,16 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_name = "ada"; softc->disk->d_drv1 = periph; softc->disk->d_unit = periph->unit_number; + + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + printf("adaregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } + cam_iosched_set_sort_queue(softc->cam_iosched, + (softc->flags & ADA_FLAG_ROTATING) ? -1 : 0); + cam_periph_lock(periph); dp = &softc->params; diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 330d5ea22b61..cfefc8098d18 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -314,6 +314,7 @@ struct control_loop { struct cam_iosched_softc { struct bio_queue_head bio_queue; struct bio_queue_head trim_queue; + const struct disk *disk; /* scheduler flags < 16, user flags >= 16 */ uint32_t flags; int sort_io_queue; @@ -1153,12 +1154,14 @@ cam_iosched_cl_sysctl_fini(struct control_loop *clp) * sizeof struct cam_iosched_softc. */ int -cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph) +cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph, + const struct disk *dp) { *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); if (*iscp == NULL) return ENOMEM; + (*iscp)->disk = dp; #ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); diff --git a/sys/cam/cam_iosched.h b/sys/cam/cam_iosched.h index c8e4341f5095..e1019c531579 100644 --- a/sys/cam/cam_iosched.h +++ b/sys/cam/cam_iosched.h @@ -80,7 +80,8 @@ cam_iosched_sbintime_t(uintptr_t delta) typedef void (*cam_iosched_latfcn_t)(void *, sbintime_t, struct bio *); -int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph); +int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph, + const struct disk *dp); void cam_iosched_fini(struct cam_iosched_softc *); void cam_iosched_sysctl_init(struct cam_iosched_softc *, struct sysctl_ctx_list *, struct sysctl_oid *); struct bio *cam_iosched_next_trim(struct cam_iosched_softc *isc); diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 41c552e2780a..1a93ea71ba77 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -862,13 +862,6 @@ ndaregister(struct cam_periph *periph, void *arg) return(CAM_REQ_CMP_ERR); } - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("ndaregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - /* ident_data parsing */ periph->softc = softc; @@ -891,7 +884,6 @@ ndaregister(struct cam_periph *periph, void *arg) quirks = softc->quirks; TUNABLE_INT_FETCH(announce_buf, &quirks); softc->quirks = quirks; - cam_iosched_set_sort_queue(softc->cam_iosched, 0); softc->disk = disk = disk_alloc(); disk->d_rotation_rate = DISK_RR_NON_ROTATING; disk->d_open = ndaopen; @@ -953,6 +945,15 @@ ndaregister(struct cam_periph *periph, void *arg) DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_DISK); + + if (cam_iosched_init(&softc->cam_iosched, periph, disk) != 0) { + printf("ndaregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } + cam_iosched_set_sort_queue(softc->cam_iosched, 0); + /* * Add alias for older nvd drives to ease transition. */ diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 59745231bca5..4ecf8c35aca2 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2804,13 +2804,6 @@ daregister(struct cam_periph *periph, void *arg) return(CAM_REQ_CMP_ERR); } - if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { - printf("daregister: Unable to probe new device. " - "Unable to allocate iosched memory\n"); - free(softc, M_DEVBUF); - return(CAM_REQ_CMP_ERR); - } - LIST_INIT(&softc->pending_ccbs); softc->state = DA_STATE_PROBE_WP; bioq_init(&softc->delete_run_queue); @@ -2979,7 +2972,13 @@ daregister(struct cam_periph *periph, void *arg) softc->disk->d_hba_subdevice = cpi.hba_subdevice; snprintf(softc->disk->d_attachment, sizeof(softc->disk->d_attachment), "%s%d", cpi.dev_name, cpi.unit_number); - cam_periph_lock(periph); + + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + printf("daregister: Unable to probe new device. " + "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); + return(CAM_REQ_CMP_ERR); + } /* * Add async callbacks for events of interest. @@ -2988,6 +2987,7 @@ daregister(struct cam_periph *periph, void *arg) * fine without them and the only alternative * would be to not attach the device on failure. */ + cam_periph_lock(periph); xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION | AC_INQ_CHANGED, daasync, periph, periph->path); From dd6123ebf02b86cee90b75e54fc755f6c20caebf Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:53:08 -0600 Subject: [PATCH 143/151] cam/iosched: Log outlier latency events Log outlier latency events to devd. In addition to counting, this will allow analysis of whether the problem is confined to a specific block range, or if it's a more general problem. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46036 --- sys/cam/cam_iosched.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index cfefc8098d18..28b5375ae246 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -1813,7 +1813,6 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, if (isc->latfcn && isc->max_lat != 0 && sim_latency > isc->max_lat) isc->latfcn(isc->latarg, sim_latency, bp); } - #endif return retval; } @@ -1926,9 +1925,35 @@ static sbintime_t latencies[LAT_BUCKETS - 1] = { BUCKET_BASE << 18 /* 5,242,880us */ }; +#define CAM_IOSCHED_DEVD_MSG_SIZE 256 + +static void +cam_iosched_devctl_outlier(struct iop_stats *iop, sbintime_t sim_latency, + const struct bio *bp) +{ + daddr_t lba = bp->bio_pblkno; + daddr_t cnt = bp->bio_bcount / iop->softc->disk->d_sectorsize; + char *sbmsg; + struct sbuf sb; + + sbmsg = malloc(CAM_IOSCHED_DEVD_MSG_SIZE, M_CAMSCHED, M_NOWAIT); + if (sbmsg == NULL) + return; + sbuf_new(&sb, sbmsg, CAM_IOSCHED_DEVD_MSG_SIZE, SBUF_FIXEDLEN); + + sbuf_printf(&sb, "device=%s%d lba=%jd blocks=%jd latency=%jd", + iop->softc->periph->periph_name, + iop->softc->periph->unit_number, + lba, cnt, sbttons(sim_latency)); + if (sbuf_finish(&sb) == 0) + devctl_notify("CAM", "iosched", "latency", sbuf_data(&sb)); + sbuf_delete(&sb); + free(sbmsg, M_CAMSCHED); +} + static void cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, - const struct bio *bp __unused) + const struct bio *bp) { sbintime_t y, deltasq, delta; int i; @@ -1938,6 +1963,7 @@ cam_iosched_update(struct iop_stats *iop, sbintime_t sim_latency, * configured threshold. */ if (sim_latency > iop->bad_latency) { + cam_iosched_devctl_outlier(iop, sim_latency, bp); iop->too_long++; } From 9cbf3d618273e09cdc7e18e878b33b9305836ad8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:53:17 -0600 Subject: [PATCH 144/151] cam/iosched: Make each periph driver provide schedule fnp When we init the iosched instance, require clients to provide a schedule function. We have almost, but not quite everything to know when it is safe to schedule new I/O. The periph drivers, however, have all the information, so make them do it when the I/O Scheduler needs to maybe schedule I/O for rate limiting, etc. and use it to do that. Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D46038 --- sys/cam/ata/ata_da.c | 3 ++- sys/cam/cam_iosched.c | 6 ++++-- sys/cam/cam_iosched.h | 3 ++- sys/cam/nvme/nvme_da.c | 3 ++- sys/cam/scsi/scsi_da.c | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 2c1183b74c1d..ae7cf14c8f8e 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -1913,7 +1913,8 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_drv1 = periph; softc->disk->d_unit = periph->unit_number; - if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk, + adaschedule) != 0) { printf("adaregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 28b5375ae246..5f171e402ed2 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -315,6 +315,7 @@ struct cam_iosched_softc { struct bio_queue_head bio_queue; struct bio_queue_head trim_queue; const struct disk *disk; + cam_iosched_schedule_t schedfnc; /* scheduler flags < 16, user flags >= 16 */ uint32_t flags; int sort_io_queue; @@ -619,7 +620,7 @@ cam_iosched_ticker(void *arg) cam_iosched_limiter_tick(&isc->write_stats); cam_iosched_limiter_tick(&isc->trim_stats); - cam_iosched_schedule(isc, isc->periph); + isc->schedfnc(isc->periph); /* * isc->load is an EMA of the pending I/Os at each tick. The number of @@ -1155,13 +1156,14 @@ cam_iosched_cl_sysctl_fini(struct control_loop *clp) */ int cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph, - const struct disk *dp) + const struct disk *dp, cam_iosched_schedule_t schedfnc) { *iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO); if (*iscp == NULL) return ENOMEM; (*iscp)->disk = dp; + (*iscp)->schedfnc = schedfnc; #ifdef CAM_IOSCHED_DYNAMIC if (iosched_debug) printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp); diff --git a/sys/cam/cam_iosched.h b/sys/cam/cam_iosched.h index e1019c531579..54f9a7c02a25 100644 --- a/sys/cam/cam_iosched.h +++ b/sys/cam/cam_iosched.h @@ -79,9 +79,10 @@ cam_iosched_sbintime_t(uintptr_t delta) } typedef void (*cam_iosched_latfcn_t)(void *, sbintime_t, struct bio *); +typedef void (*cam_iosched_schedule_t)(struct cam_periph *periph); int cam_iosched_init(struct cam_iosched_softc **, struct cam_periph *periph, - const struct disk *dp); + const struct disk *dp, cam_iosched_schedule_t schedfnp); void cam_iosched_fini(struct cam_iosched_softc *); void cam_iosched_sysctl_init(struct cam_iosched_softc *, struct sysctl_ctx_list *, struct sysctl_oid *); struct bio *cam_iosched_next_trim(struct cam_iosched_softc *isc); diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 1a93ea71ba77..1c0d5e8381d8 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -946,7 +946,8 @@ ndaregister(struct cam_periph *periph, void *arg) DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_DISK); - if (cam_iosched_init(&softc->cam_iosched, periph, disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, disk, + ndaschedule) != 0) { printf("ndaregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 4ecf8c35aca2..1a6df6171b66 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2973,7 +2973,8 @@ daregister(struct cam_periph *periph, void *arg) snprintf(softc->disk->d_attachment, sizeof(softc->disk->d_attachment), "%s%d", cpi.dev_name, cpi.unit_number); - if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk) != 0) { + if (cam_iosched_init(&softc->cam_iosched, periph, softc->disk, + daschedule) != 0) { printf("daregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); free(softc, M_DEVBUF); From 9229b3105d88d44012f2c7f85344da42e857ba91 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:55:52 -0600 Subject: [PATCH 145/151] nvme: Fail passthrough commands right away in failed state. When the drive is failed, we can't send passthrough commands to the card, so fail them right away. Rearrange the comments to reflect the current failure paths in the driver. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46048 --- sys/dev/nvme/nvme_qpair.c | 58 ++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 5be6c151bbea..9b3fe58c312c 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1267,41 +1267,31 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) tr = TAILQ_FIRST(&qpair->free_tr); req->qpair = qpair; - if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { - /* - * No tracker is available, or the qpair is disabled due to an - * in-progress controller-level reset. If we lose the race with - * recovery_state, then we may add an extra request to the queue - * which will be resubmitted later. We only set recovery_state - * to NONE with qpair->lock also held, so if we observe that the - * state is not NONE, we know it can't transition to NONE below - * when we've submitted the request to hardware. - * - * Also, as part of the failure process, we set recovery_state - * to RECOVERY_WAITING, so we check here to see if we've failed - * the controller. We set it before we call the qpair_fail - * functions, which take out the lock lock before messing with - * queued_req. Since we hold that lock, we know it's safe to - * either fail directly, or queue the failure should is_failed - * be stale. If we lose the race reading is_failed, then - * nvme_qpair_fail will fail the queued request. - */ + /* + * The controller has failed, so fail the request. Note, that this races + * the recovery / timeout code. Since we hold the qpair lock, we know + * it's safe to fail directly. is_failed is set when we fail the controller. + * It is only ever reset in the ioctl reset controller path, which is safe + * to race (for failed controllers, we make no guarantees about bringing + * it out of failed state relative to other commands). + */ + if (qpair->ctrlr->is_failed) { + nvme_qpair_manual_complete_request(qpair, req, + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); + return; + } - if (qpair->ctrlr->is_failed) { - /* - * The controller has failed, so fail the request. - */ - nvme_qpair_manual_complete_request(qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); - } else { - /* - * Put the request on the qpair's request queue to be - * processed when a tracker frees up via a command - * completion or when the controller reset is - * completed. - */ - STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); - } + /* + * No tracker is available, or the qpair is disabled due to an + * in-progress controller-level reset. If we lose the race with + * recovery_state, then we may add an extra request to the queue which + * will be resubmitted later. We only set recovery_state to NONE with + * qpair->lock also held, so if we observe that the state is not NONE, + * we know it won't transition back to NONE without retrying queued + * request. + */ + if (tr == NULL || qpair->recovery_state != RECOVERY_NONE) { + STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); return; } From 123e29068ecf6d7c235061480967aadc153f68d4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 20:56:04 -0600 Subject: [PATCH 146/151] nvme: widen nvme_qpair_manual_complete_request for better errors Make nvme_qpair_manual_complete_request take dnr as well as a print_on_error action. Make the status word computation common between it and nvme_qpair_manual_complete_tracker. And print the error when we are cancelling the I/O on failure, but not when we're filtering the I/O after we've failed. Make it private again to nvme_qpair.c. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46049 --- sys/dev/nvme/nvme_private.h | 3 --- sys/dev/nvme/nvme_qpair.c | 37 +++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 8415819ca20b..ff08f6581db5 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -417,9 +417,6 @@ void nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); void nvme_qpair_reset(struct nvme_qpair *qpair); void nvme_qpair_fail(struct nvme_qpair *qpair); -void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, - struct nvme_request *req, - uint32_t sct, uint32_t sc); void nvme_admin_qpair_enable(struct nvme_qpair *qpair); void nvme_admin_qpair_disable(struct nvme_qpair *qpair); diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9b3fe58c312c..755be993cee0 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -482,6 +482,20 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr, mtx_unlock(&qpair->lock); } +static uint32_t +nvme_qpair_make_status(uint32_t sct, uint32_t sc, uint32_t dnr) +{ + uint32_t status = 0; + + status |= NVMEF(NVME_STATUS_SCT, sct); + status |= NVMEF(NVME_STATUS_SC, sc); + status |= NVMEF(NVME_STATUS_DNR, dnr); + /* M=0 : this is artificial so no data in error log page */ + /* CRD=0 : this is artificial and no delayed retry support anyway */ + /* P=0 : phase not checked */ + return (status); +} + static void nvme_qpair_manual_complete_tracker( struct nvme_tracker *tr, uint32_t sct, uint32_t sc, uint32_t dnr, @@ -496,30 +510,24 @@ nvme_qpair_manual_complete_tracker( cpl.sqid = qpair->id; cpl.cid = tr->cid; - cpl.status |= NVMEF(NVME_STATUS_SCT, sct); - cpl.status |= NVMEF(NVME_STATUS_SC, sc); - cpl.status |= NVMEF(NVME_STATUS_DNR, dnr); - /* M=0 : this is artificial so no data in error log page */ - /* CRD=0 : this is artificial and no delayed retry support anyway */ - /* P=0 : phase not checked */ + cpl.status = nvme_qpair_make_status(sct, sc, dnr); nvme_qpair_complete_tracker(tr, &cpl, print_on_error); } -void +static void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, - struct nvme_request *req, uint32_t sct, uint32_t sc) + struct nvme_request *req, uint32_t sct, uint32_t sc, uint32_t dnr, + error_print_t print_on_error) { struct nvme_completion cpl; bool error; memset(&cpl, 0, sizeof(cpl)); cpl.sqid = qpair->id; - cpl.status |= NVMEF(NVME_STATUS_SCT, sct); - cpl.status |= NVMEF(NVME_STATUS_SC, sc); - + cpl.status = nvme_qpair_make_status(sct, sc, dnr); error = nvme_completion_is_error(&cpl); - if (error) { + if (error && print_on_error == ERROR_PRINT_ALL) { nvme_qpair_print_command(qpair, &req->cmd); nvme_qpair_print_completion(qpair, &cpl); } @@ -1277,7 +1285,8 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) */ if (qpair->ctrlr->is_failed) { nvme_qpair_manual_complete_request(qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 1, + ERROR_PRINT_NONE); return; } @@ -1512,7 +1521,7 @@ nvme_qpair_fail(struct nvme_qpair *qpair) STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, - NVME_SC_ABORTED_BY_REQUEST); + NVME_SC_ABORTED_BY_REQUEST, 1, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } From 403cc016c07aada3ee0a578e484297df452b8bb3 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 19 Jul 2024 22:16:59 -0600 Subject: [PATCH 147/151] cam/iosched: Fix build I was testing this in several trees, and this chunk was in the tree I tested. I didn't detect the mismerge before the commit... Fixes: 6f1dd6071a91 Sponsored by: Netflix --- sys/cam/cam_iosched.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 5f171e402ed2..4f4a2b2cde55 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -48,6 +48,8 @@ #include +#include + static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler", "CAM I/O Scheduler buffers"); From d3e930fd0a37d58f2385db2283b97ad3baa55bdb Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 11 Nov 2024 15:28:38 -0500 Subject: [PATCH 148/151] libc: Disable Fortify source tests for purecap ABIs These ABIs do not include the *_chk symbols in libc. --- lib/libc/tests/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile index 21875f6d69f5..de94b41dbd75 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -13,7 +13,9 @@ TESTS_SUBDIRS+= nss TESTS_SUBDIRS+= regex TESTS_SUBDIRS+= resolv TESTS_SUBDIRS+= rpc +.if ${MK_SSP} != "no" && !${MACHINE_ABI:Mpurecap} TESTS_SUBDIRS+= secure +.endif TESTS_SUBDIRS+= setjmp TESTS_SUBDIRS+= stdio TESTS_SUBDIRS+= stdlib From a855ab26050237c3e6d3d17aa7083d25e72deb08 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 11 Nov 2024 16:21:37 -0500 Subject: [PATCH 149/151] : Don't include in the kernel --- sys/sys/libkern.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 64744f57b5c3..ce3f90b9d06f 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -337,7 +337,7 @@ signed_extend32(uint32_t bitmap, int lsb, int width) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME -#if __has_include() +#if !defined(_KERNEL) && __has_include() #include /* __ssp_real */ #else #define __ssp_real(fun) fun From 0ac83d8d8db615e3e6572bc7913ff61a2571f827 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 29 Jul 2024 16:38:49 -0400 Subject: [PATCH 150/151] openssl: Add include for getrandom() GCC 14 (but not earlier versions) warns about a missing prototype for getrandom(). Include explicitly to bring in the prototype rather than depending on a nested include. While here, stop defining sysctl_random() since it is no longer used. Reviewed by: brooks Fixes: 838b6caababb openssl: use getrandom(2) instead of probing for getentropy(2) Differential Revision: https://reviews.freebsd.org/D45995 (cherry picked from commit 0244e0a177a68fc8ff7e8a58fa7a9553956232ec) --- .../providers/implementations/rands/seeding/rand_unix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c index eadacedbe40c..f8e73a02daf4 100644 --- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c +++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c @@ -28,7 +28,7 @@ # include # endif #endif -#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(OPENSSL_SYS_UEFI) +#if defined(__NetBSD__) # include # include # include @@ -36,7 +36,8 @@ #if defined(__OpenBSD__) # include #endif -#if defined(__DragonFly__) +#if (defined(__DragonFly__) || defined(__FreeBSD__)) \ + && !defined(OPENSSL_SYS_UEFI) # include # include #endif @@ -212,7 +213,7 @@ void ossl_rand_pool_keep_random_devices_open(int keep) # error "librandom not (yet) supported" # endif -# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND) +# if defined(__NetBSD__) && defined(KERN_ARND) /* * sysctl_random(): Use sysctl() to read a random number from the kernel * Returns the number of bytes returned in buf on success, -1 on failure. From 1870a0d97d63cbf4e530c90c744e21bfe4c7cfe4 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 12 Nov 2024 10:35:40 -0500 Subject: [PATCH 151/151] git subrepo pull --force sys/contrib/subrepo-openzfs subrepo: subdir: "sys/contrib/subrepo-openzfs" merged: "5dc4c8bd546a" upstream: origin: "https://github.com/CTSRD-CHERI/zfs.git" branch: "cheri-hybrid" commit: "5dc4c8bd546a" git-subrepo: version: "0.4.6" origin: "???" commit: "???" --- sys/contrib/subrepo-openzfs/.gitrepo | 4 +- sys/contrib/subrepo-openzfs/META | 2 +- sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c | 96 +- .../config/kernel-blk-queue.m4 | 4 +- .../subrepo-openzfs/config/kernel-blkdev.m4 | 26 + .../config/kernel-kmap-local-page.m4 | 23 + sys/contrib/subrepo-openzfs/config/kernel.m4 | 2 + .../subrepo-openzfs/config/zfs-build.m4 | 10 +- .../contrib/bash_completion.d/zfs.in | 2 +- .../subrepo-openzfs/include/libzfs_core.h | 1 + .../include/os/freebsd/spl/sys/sdt.h | 2 +- .../os/linux/kernel/linux/kmap_compat.h | 10 +- .../include/os/linux/spl/sys/kmem_cache.h | 19 +- .../include/os/linux/zfs/sys/trace_dbuf.h | 2 +- .../subrepo-openzfs/include/sys/avl_impl.h | 1 + .../include/sys/crypto/common.h | 27 - .../subrepo-openzfs/include/sys/crypto/icp.h | 3 - .../subrepo-openzfs/include/sys/sha2.h | 27 +- .../subrepo-openzfs/include/sys/skein.h | 9 - sys/contrib/subrepo-openzfs/include/sys/spa.h | 3 +- .../subrepo-openzfs/lib/libicp/Makefile.am | 4 - .../lib/libzfs/libzfs_sendrecv.c | 2 +- .../lib/libzfs_core/libzfs_core.abi | 6 + .../lib/libzfs_core/libzfs_core.c | 6 + sys/contrib/subrepo-openzfs/man/man4/zfs.4 | 4 +- .../subrepo-openzfs/man/man7/dracut.zfs.7 | 2 +- .../subrepo-openzfs/man/man7/zfsprops.7 | 2 +- sys/contrib/subrepo-openzfs/man/man8/zdb.8 | 3 +- sys/contrib/subrepo-openzfs/module/Kbuild.in | 5 +- .../module/icp/algs/aes/aes_modes.c | 37 +- .../module/icp/algs/modes/cbc.c | 264 ------ .../module/icp/algs/modes/ctr.c | 227 ----- .../module/icp/algs/modes/ecb.c | 127 --- .../module/icp/algs/modes/gcm.c | 79 +- .../module/icp/algs/modes/modes.c | 20 +- .../module/icp/algs/sha2/sha2_generic.c | 75 +- .../module/icp/core/kcf_mech_tabs.c | 8 +- .../module/icp/illumos-crypto.c | 7 - .../module/icp/include/aes/aes_impl.h | 5 - .../module/icp/include/modes/modes.h | 142 +-- .../module/icp/include/sys/crypto/impl.h | 44 +- .../module/icp/include/sys/crypto/spi.h | 40 - .../module/icp/include/sys/stack.h | 36 - .../module/icp/include/sys/trap.h | 36 - .../subrepo-openzfs/module/icp/io/aes.c | 854 +----------------- .../subrepo-openzfs/module/icp/io/sha2_mod.c | 444 +-------- .../subrepo-openzfs/module/icp/io/skein_mod.c | 656 -------------- .../module/os/freebsd/spl/spl_uio.c | 12 +- .../module/os/freebsd/zfs/arc_os.c | 18 +- .../module/os/freebsd/zfs/kmod_core.c | 21 +- .../module/os/freebsd/zfs/zvol_os.c | 2 + .../module/os/linux/spl/spl-kmem-cache.c | 12 +- .../module/os/linux/zfs/abd_os.c | 8 +- .../module/os/linux/zfs/vdev_disk.c | 14 +- .../module/os/linux/zfs/zfs_uio.c | 8 +- .../module/os/linux/zfs/zvol_os.c | 289 ++++-- .../subrepo-openzfs/module/zfs/dsl_dataset.c | 7 +- sys/contrib/subrepo-openzfs/module/zfs/vdev.c | 1 + .../subrepo-openzfs/scripts/dkms.mkconf | 1 + .../subrepo-openzfs/tests/runfiles/linux.run | 2 +- .../tests/test-runner/bin/zts-report.py.in | 1 + .../tests/zfs-tests/cmd/checksum/sha2_test.c | 70 +- .../tests/zfs-tests/include/libtest.shlib | 30 +- .../tests/zfs-tests/tests/Makefile.am | 1 + .../fault/suspend_resume_single.ksh | 102 +++ .../redacted_send/redacted_deleted.ksh | 2 +- .../redacted_send/redacted_mounts.ksh | 6 +- 67 files changed, 696 insertions(+), 3319 deletions(-) create mode 100644 sys/contrib/subrepo-openzfs/config/kernel-kmap-local-page.m4 delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/algs/modes/cbc.c delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/algs/modes/ctr.c delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/algs/modes/ecb.c delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/include/sys/stack.h delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/include/sys/trap.h delete mode 100644 sys/contrib/subrepo-openzfs/module/icp/io/skein_mod.c create mode 100755 sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh diff --git a/sys/contrib/subrepo-openzfs/.gitrepo b/sys/contrib/subrepo-openzfs/.gitrepo index 42831fa17b41..c97366fce699 100644 --- a/sys/contrib/subrepo-openzfs/.gitrepo +++ b/sys/contrib/subrepo-openzfs/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/CTSRD-CHERI/zfs.git branch = cheri-hybrid - commit = be89202d7d5ac5bb899cea5209719085e1e4103b - parent = 1ed4dd13721c19f3fdfa32456074bdee40ca8417 + commit = 5dc4c8bd546afd79d88af74a2c369ace8d75f76f + parent = f9a9fc7f3e6166efff6beac001c2b37a4620df52 method = merge cmdver = 0.4.6 diff --git a/sys/contrib/subrepo-openzfs/META b/sys/contrib/subrepo-openzfs/META index 19a796050f5b..7aac80c541ba 100644 --- a/sys/contrib/subrepo-openzfs/META +++ b/sys/contrib/subrepo-openzfs/META @@ -6,5 +6,5 @@ Release: 1 Release-Tags: relext License: CDDL Author: OpenZFS -Linux-Maximum: 6.8 +Linux-Maximum: 6.9 Linux-Minimum: 3.10 diff --git a/sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c b/sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c index 704fcf4422d4..f55c7f7b8176 100644 --- a/sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c +++ b/sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,7 @@ #include #include +#include #include @@ -1125,16 +1127,33 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) for (zap_cursor_init(&zc, os, object); zap_cursor_retrieve(&zc, &attr) == 0; zap_cursor_advance(&zc)) { - (void) printf("\t\t%s = ", attr.za_name); + boolean_t key64 = + !!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY); + + if (key64) + (void) printf("\t\t0x%010lx = ", + *(uint64_t *)attr.za_name); + else + (void) printf("\t\t%s = ", attr.za_name); + if (attr.za_num_integers == 0) { (void) printf("\n"); continue; } prop = umem_zalloc(attr.za_num_integers * attr.za_integer_length, UMEM_NOFAIL); - (void) zap_lookup(os, object, attr.za_name, - attr.za_integer_length, attr.za_num_integers, prop); - if (attr.za_integer_length == 1) { + + if (key64) + (void) zap_lookup_uint64(os, object, + (const uint64_t *)attr.za_name, 1, + attr.za_integer_length, attr.za_num_integers, + prop); + else + (void) zap_lookup(os, object, attr.za_name, + attr.za_integer_length, attr.za_num_integers, + prop); + + if (attr.za_integer_length == 1 && !key64) { if (strcmp(attr.za_name, DSL_CRYPTO_KEY_MASTER_KEY) == 0 || strcmp(attr.za_name, @@ -1153,6 +1172,10 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) } else { for (i = 0; i < attr.za_num_integers; i++) { switch (attr.za_integer_length) { + case 1: + (void) printf("%u ", + ((uint8_t *)prop)[i]); + break; case 2: (void) printf("%u ", ((uint16_t *)prop)[i]); @@ -8924,6 +8947,9 @@ main(int argc, char **argv) boolean_t target_is_spa = B_TRUE, dataset_lookup = B_FALSE; nvlist_t *cfg = NULL; struct sigaction action; + boolean_t force_import = B_FALSE; + boolean_t config_path_console = B_FALSE; + char pbuf[MAXPATHLEN]; dprintf_setup(&argc, argv); @@ -9094,6 +9120,7 @@ main(int argc, char **argv) } break; case 'U': + config_path_console = B_TRUE; spa_config_path = optarg; if (spa_config_path[0] != '/') { (void) fprintf(stderr, @@ -9153,9 +9180,6 @@ main(int argc, char **argv) */ spa_mode_readable_spacemaps = B_TRUE; - kernel_init(SPA_MODE_READ); - kernel_init_done = B_TRUE; - if (dump_all) verbose = MAX(verbose, 1); @@ -9174,6 +9198,53 @@ main(int argc, char **argv) if (argc < 2 && dump_opt['R']) usage(); + target = argv[0]; + + /* + * Automate cachefile + */ + if (!spa_config_path_env && !config_path_console && target && + libzfs_core_init() == 0) { + char *pname = strdup(target); + const char *value; + nvlist_t *pnvl = NULL; + nvlist_t *vnvl = NULL; + + if (strpbrk(pname, "/@") != NULL) + *strpbrk(pname, "/@") = '\0'; + + if (pname && lzc_get_props(pname, &pnvl) == 0) { + if (nvlist_lookup_nvlist(pnvl, "cachefile", + &vnvl) == 0) { + value = fnvlist_lookup_string(vnvl, + ZPROP_VALUE); + } else { + value = "-"; + } + strlcpy(pbuf, value, sizeof (pbuf)); + if (pbuf[0] != '\0') { + if (pbuf[0] == '/') { + if (access(pbuf, F_OK) == 0) + spa_config_path = pbuf; + else + force_import = B_TRUE; + } else if ((strcmp(pbuf, "-") == 0 && + access(ZPOOL_CACHE, F_OK) != 0) || + strcmp(pbuf, "none") == 0) { + force_import = B_TRUE; + } + } + nvlist_free(vnvl); + } + + free(pname); + nvlist_free(pnvl); + libzfs_core_fini(); + } + + kernel_init(SPA_MODE_READ); + kernel_init_done = B_TRUE; + if (dump_opt['E']) { if (argc != 1) usage(); @@ -9210,7 +9281,6 @@ main(int argc, char **argv) fatal("internal error: %s", strerror(ENOMEM)); error = 0; - target = argv[0]; if (strpbrk(target, "/@") != NULL) { size_t targetlen; @@ -9256,9 +9326,17 @@ main(int argc, char **argv) target_pool = target; } - if (dump_opt['e']) { + if (dump_opt['e'] || force_import) { importargs_t args = { 0 }; + /* + * If path is not provided, search in /dev + */ + if (searchdirs == NULL) { + searchdirs = umem_alloc(sizeof (char *), UMEM_NOFAIL); + searchdirs[nsearch++] = (char *)ZFS_DEVDIR; + } + args.paths = nsearch; args.path = searchdirs; args.can_be_active = B_TRUE; diff --git a/sys/contrib/subrepo-openzfs/config/kernel-blk-queue.m4 b/sys/contrib/subrepo-openzfs/config/kernel-blk-queue.m4 index 15dbe1c7dff0..2f0b386e6637 100644 --- a/sys/contrib/subrepo-openzfs/config/kernel-blk-queue.m4 +++ b/sys/contrib/subrepo-openzfs/config/kernel-blk-queue.m4 @@ -332,7 +332,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS], [ ZFS_LINUX_TEST_RESULT([blk_queue_max_hw_sectors], [ AC_MSG_RESULT(yes) ],[ - ZFS_LINUX_TEST_ERROR([blk_queue_max_hw_sectors]) + AC_MSG_RESULT(no) ]) ]) @@ -355,7 +355,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS], [ ZFS_LINUX_TEST_RESULT([blk_queue_max_segments], [ AC_MSG_RESULT(yes) ], [ - ZFS_LINUX_TEST_ERROR([blk_queue_max_segments]) + AC_MSG_RESULT(no) ]) ]) diff --git a/sys/contrib/subrepo-openzfs/config/kernel-blkdev.m4 b/sys/contrib/subrepo-openzfs/config/kernel-blkdev.m4 index b6ce1e1cf083..4f60f96acb56 100644 --- a/sys/contrib/subrepo-openzfs/config/kernel-blkdev.m4 +++ b/sys/contrib/subrepo-openzfs/config/kernel-blkdev.m4 @@ -534,6 +534,30 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE], [ ]) ]) +dnl # +dnl # 5.16 API change +dnl # Added bdev_nr_bytes() helper. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES], [ + ZFS_LINUX_TEST_SRC([bdev_nr_bytes], [ + #include + ],[ + struct block_device *bdev = NULL; + loff_t nr_bytes __attribute__ ((unused)) = 0; + nr_bytes = bdev_nr_bytes(bdev); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES], [ + AC_MSG_CHECKING([whether bdev_nr_bytes() is available]) + ZFS_LINUX_TEST_RESULT([bdev_nr_bytes], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BDEV_NR_BYTES, 1, [bdev_nr_bytes() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + dnl # dnl # 5.20 API change, dnl # Removed bdevname(), snprintf(.., %pg) should be used. @@ -747,6 +771,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [ ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE + ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_DISCARD ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ @@ -767,6 +792,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [ ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE + ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES ZFS_AC_KERNEL_BLKDEV_BDEVNAME ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS ZFS_AC_KERNEL_BLKDEV_ISSUE_DISCARD diff --git a/sys/contrib/subrepo-openzfs/config/kernel-kmap-local-page.m4 b/sys/contrib/subrepo-openzfs/config/kernel-kmap-local-page.m4 new file mode 100644 index 000000000000..1990914d493d --- /dev/null +++ b/sys/contrib/subrepo-openzfs/config/kernel-kmap-local-page.m4 @@ -0,0 +1,23 @@ +dnl # +dnl # 5.11 API change +dnl # kmap_atomic() was deprecated in favor of kmap_local_page() +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE], [ + ZFS_LINUX_TEST_SRC([kmap_local_page], [ + #include + ],[ + struct page page; + kmap_local_page(&page); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_KMAP_LOCAL_PAGE], [ + AC_MSG_CHECKING([whether kmap_local_page exists]) + ZFS_LINUX_TEST_RESULT([kmap_local_page], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KMAP_LOCAL_PAGE, 1, + [kernel has kmap_local_page]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/sys/contrib/subrepo-openzfs/config/kernel.m4 b/sys/contrib/subrepo-openzfs/config/kernel.m4 index b51477b6a951..f282ccd8b9d7 100644 --- a/sys/contrib/subrepo-openzfs/config/kernel.m4 +++ b/sys/contrib/subrepo-openzfs/config/kernel.m4 @@ -125,6 +125,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_SRC_VFS_FILE_OPERATIONS_EXTEND ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS + ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT @@ -276,6 +277,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_VFS_FILE_OPERATIONS_EXTEND ZFS_AC_KERNEL_KMAP_ATOMIC_ARGS + ZFS_AC_KERNEL_KMAP_LOCAL_PAGE ZFS_AC_KERNEL_FOLLOW_DOWN_ONE ZFS_AC_KERNEL_MAKE_REQUEST_FN ZFS_AC_KERNEL_GENERIC_IO_ACCT diff --git a/sys/contrib/subrepo-openzfs/config/zfs-build.m4 b/sys/contrib/subrepo-openzfs/config/zfs-build.m4 index 368684e1c512..255813f46d19 100644 --- a/sys/contrib/subrepo-openzfs/config/zfs-build.m4 +++ b/sys/contrib/subrepo-openzfs/config/zfs-build.m4 @@ -516,6 +516,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ VENDOR=alpine ; elif test -f /etc/arch-release ; then VENDOR=arch ; + elif test -f /etc/artix-release ; then + VENDOR=artix ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; elif test -f /bin/freebsd-version ; then @@ -551,7 +553,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default package type]) case "$VENDOR" in - alpine|arch|gentoo|lunar|slackware) + alpine|arch|artix|gentoo|lunar|slackware) DEFAULT_PACKAGE=tgz ;; debian|ubuntu) DEFAULT_PACKAGE=deb ;; @@ -576,6 +578,8 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ case "$VENDOR" in alpine|gentoo) DEFAULT_INIT_SHELL=/sbin/openrc-run IS_SYSV_RC=false ;; + artix) DEFAULT_INIT_SHELL=/usr/bin/openrc-run + IS_SYSV_RC=false ;; *) DEFAULT_INIT_SHELL=/bin/sh IS_SYSV_RC=true ;; esac @@ -594,7 +598,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default init config directory]) case "$VENDOR" in - alpine|gentoo) + alpine|artix|gentoo) initconfdir=/etc/conf.d ;; fedora|openeuler|redhat|sles|toss) @@ -623,7 +627,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default bash completion directory]) case "$VENDOR" in - alpine|debian|gentoo|ubuntu) + alpine|artix|debian|gentoo|ubuntu) bashcompletiondir=/usr/share/bash-completion/completions ;; freebsd) diff --git a/sys/contrib/subrepo-openzfs/contrib/bash_completion.d/zfs.in b/sys/contrib/subrepo-openzfs/contrib/bash_completion.d/zfs.in index c5cfd8e8efb2..dbeb10d8994b 100644 --- a/sys/contrib/subrepo-openzfs/contrib/bash_completion.d/zfs.in +++ b/sys/contrib/subrepo-openzfs/contrib/bash_completion.d/zfs.in @@ -155,7 +155,7 @@ __zfs_list_volumes() __zfs_argument_chosen() { local word property - for word in $(seq $((COMP_CWORD-1)) -1 2) + for word in $(seq $((COMP_CWORD-1)) -1 2 2>/dev/null) do local prev="${COMP_WORDS[$word]}" if [[ ${COMP_WORDS[$word-1]} != -[tos] ]] diff --git a/sys/contrib/subrepo-openzfs/include/libzfs_core.h b/sys/contrib/subrepo-openzfs/include/libzfs_core.h index 867c18b9c226..b2fd97372cd4 100644 --- a/sys/contrib/subrepo-openzfs/include/libzfs_core.h +++ b/sys/contrib/subrepo-openzfs/include/libzfs_core.h @@ -77,6 +77,7 @@ _LIBZFS_CORE_H int lzc_snaprange_space(const char *, const char *, uint64_t *); _LIBZFS_CORE_H int lzc_hold(nvlist_t *, int, nvlist_t **); _LIBZFS_CORE_H int lzc_release(nvlist_t *, nvlist_t **); _LIBZFS_CORE_H int lzc_get_holds(const char *, nvlist_t **); +_LIBZFS_CORE_H int lzc_get_props(const char *, nvlist_t **); enum lzc_send_flags { LZC_SEND_FLAG_EMBED_DATA = 1 << 0, diff --git a/sys/contrib/subrepo-openzfs/include/os/freebsd/spl/sys/sdt.h b/sys/contrib/subrepo-openzfs/include/os/freebsd/spl/sys/sdt.h index 74e03fd5b956..e2c4830cb964 100644 --- a/sys/contrib/subrepo-openzfs/include/os/freebsd/spl/sys/sdt.h +++ b/sys/contrib/subrepo-openzfs/include/os/freebsd/spl/sys/sdt.h @@ -34,7 +34,7 @@ /* BEGIN CSTYLED */ SDT_PROBE_DECLARE(sdt, , , set__error); -#define SET_ERROR(err) ({ \ +#define SET_ERROR(err) ({ \ SDT_PROBE1(sdt, , , set__error, (uintptr_t)err); \ err; \ }) diff --git a/sys/contrib/subrepo-openzfs/include/os/linux/kernel/linux/kmap_compat.h b/sys/contrib/subrepo-openzfs/include/os/linux/kernel/linux/kmap_compat.h index 7f9c00af802b..fb59c5f0267c 100644 --- a/sys/contrib/subrepo-openzfs/include/os/linux/kernel/linux/kmap_compat.h +++ b/sys/contrib/subrepo-openzfs/include/os/linux/kernel/linux/kmap_compat.h @@ -29,9 +29,15 @@ #include #include +#ifdef HAVE_KMAP_LOCAL_PAGE +/* 5.11 API change */ +#define zfs_kmap_local(page) kmap_local_page(page) +#define zfs_kunmap_local(addr) kunmap_local(addr) +#else /* 2.6.37 API change */ -#define zfs_kmap_atomic(page) kmap_atomic(page) -#define zfs_kunmap_atomic(addr) kunmap_atomic(addr) +#define zfs_kmap_local(page) kmap_atomic(page) +#define zfs_kunmap_local(addr) kunmap_atomic(addr) +#endif /* 5.0 API change - no more 'type' argument for access_ok() */ #ifdef HAVE_ACCESS_OK_TYPE diff --git a/sys/contrib/subrepo-openzfs/include/os/linux/spl/sys/kmem_cache.h b/sys/contrib/subrepo-openzfs/include/os/linux/spl/sys/kmem_cache.h index b159bb52d111..905ff57a1434 100644 --- a/sys/contrib/subrepo-openzfs/include/os/linux/spl/sys/kmem_cache.h +++ b/sys/contrib/subrepo-openzfs/include/os/linux/spl/sys/kmem_cache.h @@ -192,22 +192,25 @@ extern void spl_kmem_reap(void); extern uint64_t spl_kmem_cache_inuse(kmem_cache_t *cache); extern uint64_t spl_kmem_cache_entry_size(kmem_cache_t *cache); +#ifndef SPL_KMEM_CACHE_IMPLEMENTING +/* + * Macros for the kmem_cache_* API expected by ZFS and SPL clients. We don't + * define them inside spl-kmem-cache.c, as that uses the kernel's incompatible + * kmem_cache_* facilities to implement ours. + */ + +/* Avoid conflicts with kernel names that might be implemented as macros. */ +#undef kmem_cache_alloc + #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \ spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) #define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move) #define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc) -/* - * This is necessary to be compatible with other kernel modules - * or in-tree filesystem that may define kmem_cache_alloc, - * like bcachefs does it now. - */ -#ifdef kmem_cache_alloc -#undef kmem_cache_alloc -#endif #define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags) #define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj) #define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc) #define kmem_reap() spl_kmem_reap() +#endif /* * The following functions are only available for internal use. diff --git a/sys/contrib/subrepo-openzfs/include/os/linux/zfs/sys/trace_dbuf.h b/sys/contrib/subrepo-openzfs/include/os/linux/zfs/sys/trace_dbuf.h index 0f6a98b47d60..0e9cbdd725b4 100644 --- a/sys/contrib/subrepo-openzfs/include/os/linux/zfs/sys/trace_dbuf.h +++ b/sys/contrib/subrepo-openzfs/include/os/linux/zfs/sys/trace_dbuf.h @@ -80,7 +80,7 @@ snprintf(__get_str(msg), TRACE_DBUF_MSG_MAX, \ DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS); \ } else { \ - __assign_str(os_spa, "NULL") \ + __assign_str(os_spa, "NULL"); \ __entry->ds_object = 0; \ __entry->db_object = 0; \ __entry->db_level = 0; \ diff --git a/sys/contrib/subrepo-openzfs/include/sys/avl_impl.h b/sys/contrib/subrepo-openzfs/include/sys/avl_impl.h index 7fb5f441eb2e..35f8f8ae5500 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/avl_impl.h +++ b/sys/contrib/subrepo-openzfs/include/sys/avl_impl.h @@ -34,6 +34,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { diff --git a/sys/contrib/subrepo-openzfs/include/sys/crypto/common.h b/sys/contrib/subrepo-openzfs/include/sys/crypto/common.h index 261e88eceeea..c9ef3b367e08 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/crypto/common.h +++ b/sys/contrib/subrepo-openzfs/include/sys/crypto/common.h @@ -51,12 +51,6 @@ typedef struct crypto_mechanism { size_t cm_param_len; /* mech. parameter len */ } crypto_mechanism_t; -/* CK_AES_CTR_PARAMS provides parameters to the CKM_AES_CTR mechanism */ -typedef struct CK_AES_CTR_PARAMS { - ulong_t ulCounterBits; - uint8_t cb[16]; -} CK_AES_CTR_PARAMS; - /* CK_AES_CCM_PARAMS provides parameters to the CKM_AES_CCM mechanism */ typedef struct CK_AES_CCM_PARAMS { ulong_t ulMACSize; @@ -77,13 +71,6 @@ typedef struct CK_AES_GCM_PARAMS { ulong_t ulTagBits; } CK_AES_GCM_PARAMS; -/* CK_AES_GMAC_PARAMS provides parameters to the CKM_AES_GMAC mechanism */ -typedef struct CK_AES_GMAC_PARAMS { - uchar_t *pIv; - uchar_t *pAAD; - ulong_t ulAADLen; -} CK_AES_GMAC_PARAMS; - /* * The measurement unit bit flag for a mechanism's minimum or maximum key size. * The unit are mechanism dependent. It can be in bits or in bytes. @@ -92,23 +79,9 @@ typedef uint32_t crypto_keysize_unit_t; /* Mechanisms supported out-of-the-box */ -#define SUN_CKM_SHA256 "CKM_SHA256" -#define SUN_CKM_SHA256_HMAC "CKM_SHA256_HMAC" -#define SUN_CKM_SHA256_HMAC_GENERAL "CKM_SHA256_HMAC_GENERAL" -#define SUN_CKM_SHA384 "CKM_SHA384" -#define SUN_CKM_SHA384_HMAC "CKM_SHA384_HMAC" -#define SUN_CKM_SHA384_HMAC_GENERAL "CKM_SHA384_HMAC_GENERAL" -#define SUN_CKM_SHA512 "CKM_SHA512" #define SUN_CKM_SHA512_HMAC "CKM_SHA512_HMAC" -#define SUN_CKM_SHA512_HMAC_GENERAL "CKM_SHA512_HMAC_GENERAL" -#define SUN_CKM_SHA512_224 "CKM_SHA512_224" -#define SUN_CKM_SHA512_256 "CKM_SHA512_256" -#define SUN_CKM_AES_CBC "CKM_AES_CBC" -#define SUN_CKM_AES_ECB "CKM_AES_ECB" -#define SUN_CKM_AES_CTR "CKM_AES_CTR" #define SUN_CKM_AES_CCM "CKM_AES_CCM" #define SUN_CKM_AES_GCM "CKM_AES_GCM" -#define SUN_CKM_AES_GMAC "CKM_AES_GMAC" /* Data arguments of cryptographic operations */ diff --git a/sys/contrib/subrepo-openzfs/include/sys/crypto/icp.h b/sys/contrib/subrepo-openzfs/include/sys/crypto/icp.h index 8c3f19886fd8..efe283fa928a 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/crypto/icp.h +++ b/sys/contrib/subrepo-openzfs/include/sys/crypto/icp.h @@ -32,9 +32,6 @@ int aes_mod_fini(void); int sha2_mod_init(void); int sha2_mod_fini(void); -int skein_mod_init(void); -int skein_mod_fini(void); - int icp_init(void); void icp_fini(void); diff --git a/sys/contrib/subrepo-openzfs/include/sys/sha2.h b/sys/contrib/subrepo-openzfs/include/sys/sha2.h index 81dfbbb8cea9..b344eb9d5ff2 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/sha2.h +++ b/sys/contrib/subrepo-openzfs/include/sys/sha2.h @@ -86,30 +86,13 @@ typedef struct { /* SHA2 algorithm types */ typedef enum sha2_mech_type { - SHA256_MECH_INFO_TYPE, /* SUN_CKM_SHA256 */ - SHA256_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC */ - SHA256_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA256_HMAC_GENERAL */ - SHA384_MECH_INFO_TYPE, /* SUN_CKM_SHA384 */ - SHA384_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC */ - SHA384_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA384_HMAC_GENERAL */ - SHA512_MECH_INFO_TYPE, /* SUN_CKM_SHA512 */ SHA512_HMAC_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC */ - SHA512_HMAC_GEN_MECH_INFO_TYPE, /* SUN_CKM_SHA512_HMAC_GENERAL */ - SHA512_224_MECH_INFO_TYPE, /* SUN_CKM_SHA512_224 */ - SHA512_256_MECH_INFO_TYPE /* SUN_CKM_SHA512_256 */ -} sha2_mech_type_t; -#define SHA256 0 -#define SHA256_HMAC 1 -#define SHA256_HMAC_GEN 2 -#define SHA384 3 -#define SHA384_HMAC 4 -#define SHA384_HMAC_GEN 5 -#define SHA512 6 -#define SHA512_HMAC 7 -#define SHA512_HMAC_GEN 8 -#define SHA512_224 9 -#define SHA512_256 10 + /* Not true KCF mech types; used by direct callers to SHA2Init */ + SHA256, + SHA512, + SHA512_256, +} sha2_mech_type_t; /* SHA2 Init function */ extern void SHA2Init(int algotype, SHA2_CTX *ctx); diff --git a/sys/contrib/subrepo-openzfs/include/sys/skein.h b/sys/contrib/subrepo-openzfs/include/sys/skein.h index 2f649d6b269a..3359d48af795 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/skein.h +++ b/sys/contrib/subrepo-openzfs/include/sys/skein.h @@ -152,25 +152,16 @@ typedef struct skein_param { /* Module definitions */ #ifdef SKEIN_MODULE_IMPL -#define CKM_SKEIN_256 "CKM_SKEIN_256" -#define CKM_SKEIN_512 "CKM_SKEIN_512" -#define CKM_SKEIN1024 "CKM_SKEIN1024" #define CKM_SKEIN_256_MAC "CKM_SKEIN_256_MAC" #define CKM_SKEIN_512_MAC "CKM_SKEIN_512_MAC" #define CKM_SKEIN1024_MAC "CKM_SKEIN1024_MAC" typedef enum skein_mech_type { - SKEIN_256_MECH_INFO_TYPE, - SKEIN_512_MECH_INFO_TYPE, - SKEIN1024_MECH_INFO_TYPE, SKEIN_256_MAC_MECH_INFO_TYPE, SKEIN_512_MAC_MECH_INFO_TYPE, SKEIN1024_MAC_MECH_INFO_TYPE } skein_mech_type_t; -#define VALID_SKEIN_DIGEST_MECH(__mech) \ - ((int)(__mech) >= SKEIN_256_MECH_INFO_TYPE && \ - (__mech) <= SKEIN1024_MECH_INFO_TYPE) #define VALID_SKEIN_MAC_MECH(__mech) \ ((int)(__mech) >= SKEIN_256_MAC_MECH_INFO_TYPE && \ (__mech) <= SKEIN1024_MAC_MECH_INFO_TYPE) diff --git a/sys/contrib/subrepo-openzfs/include/sys/spa.h b/sys/contrib/subrepo-openzfs/include/sys/spa.h index 44597088cf52..e8b4745b91f5 100644 --- a/sys/contrib/subrepo-openzfs/include/sys/spa.h +++ b/sys/contrib/subrepo-openzfs/include/sys/spa.h @@ -35,11 +35,10 @@ #ifndef _SYS_SPA_H #define _SYS_SPA_H -#include #include +#include #include #include -#include #include #include #include diff --git a/sys/contrib/subrepo-openzfs/lib/libicp/Makefile.am b/sys/contrib/subrepo-openzfs/lib/libicp/Makefile.am index 4ba55b2158bc..ce24d13a760f 100644 --- a/sys/contrib/subrepo-openzfs/lib/libicp/Makefile.am +++ b/sys/contrib/subrepo-openzfs/lib/libicp/Makefile.am @@ -18,13 +18,10 @@ nodist_libicp_la_SOURCES = \ module/icp/algs/blake3/blake3_impl.c \ module/icp/algs/edonr/edonr.c \ module/icp/algs/modes/modes.c \ - module/icp/algs/modes/cbc.c \ module/icp/algs/modes/gcm_generic.c \ module/icp/algs/modes/gcm_pclmulqdq.c \ module/icp/algs/modes/gcm.c \ - module/icp/algs/modes/ctr.c \ module/icp/algs/modes/ccm.c \ - module/icp/algs/modes/ecb.c \ module/icp/algs/sha2/sha2_generic.c \ module/icp/algs/sha2/sha256_impl.c \ module/icp/algs/sha2/sha512_impl.c \ @@ -34,7 +31,6 @@ nodist_libicp_la_SOURCES = \ module/icp/illumos-crypto.c \ module/icp/io/aes.c \ module/icp/io/sha2_mod.c \ - module/icp/io/skein_mod.c \ module/icp/core/kcf_sched.c \ module/icp/core/kcf_prov_lib.c \ module/icp/core/kcf_callprov.c \ diff --git a/sys/contrib/subrepo-openzfs/lib/libzfs/libzfs_sendrecv.c b/sys/contrib/subrepo-openzfs/lib/libzfs/libzfs_sendrecv.c index 0370112c022a..ee01ee9b218a 100644 --- a/sys/contrib/subrepo-openzfs/lib/libzfs/libzfs_sendrecv.c +++ b/sys/contrib/subrepo-openzfs/lib/libzfs/libzfs_sendrecv.c @@ -4952,7 +4952,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap, if (flags->verbose) { (void) printf("%s %s%s stream of %s into %s\n", flags->dryrun ? "would receive" : "receiving", - flags->heal ? " corrective" : "", + flags->heal ? "corrective " : "", drrb->drr_fromguid ? "incremental" : "full", drrb->drr_toname, destsnap); (void) fflush(stdout); diff --git a/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.abi b/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.abi index cf9d6bddc9fc..c20698580ee7 100644 --- a/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.abi +++ b/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.abi @@ -168,6 +168,7 @@ + @@ -2694,6 +2695,11 @@ + + + + + diff --git a/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.c b/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.c index dddc3912dc9a..ad8fe45b9ce5 100644 --- a/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.c +++ b/sys/contrib/subrepo-openzfs/lib/libzfs_core/libzfs_core.c @@ -595,6 +595,12 @@ lzc_get_holds(const char *snapname, nvlist_t **holdsp) return (lzc_ioctl(ZFS_IOC_GET_HOLDS, snapname, NULL, holdsp)); } +int +lzc_get_props(const char *poolname, nvlist_t **props) +{ + return (lzc_ioctl(ZFS_IOC_POOL_GET_PROPS, poolname, NULL, props)); +} + static unsigned int max_pipe_buffer(int infd) { diff --git a/sys/contrib/subrepo-openzfs/man/man4/zfs.4 b/sys/contrib/subrepo-openzfs/man/man4/zfs.4 index f1d14b4d01a4..3f7485fa78ca 100644 --- a/sys/contrib/subrepo-openzfs/man/man4/zfs.4 +++ b/sys/contrib/subrepo-openzfs/man/man4/zfs.4 @@ -16,7 +16,7 @@ .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] .\" -.Dd February 14, 2024 +.Dd June 27, 2024 .Dt ZFS 4 .Os . @@ -2113,7 +2113,7 @@ The default of .Sy 32 was determined to be a reasonable compromise. . -.It Sy zfs_txg_history Ns = Ns Sy 0 Pq uint +.It Sy zfs_txg_history Ns = Ns Sy 100 Pq uint Historical statistics for this many latest TXGs will be available in .Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /TXGs . . diff --git a/sys/contrib/subrepo-openzfs/man/man7/dracut.zfs.7 b/sys/contrib/subrepo-openzfs/man/man7/dracut.zfs.7 index c1475c695e83..b67e1cecb240 100644 --- a/sys/contrib/subrepo-openzfs/man/man7/dracut.zfs.7 +++ b/sys/contrib/subrepo-openzfs/man/man7/dracut.zfs.7 @@ -154,7 +154,7 @@ defaults to the current kernel release. . .It Sy bootfs.rollback Ns Op Sy = Ns Ar snapshot-name Execute -.Nm zfs Cm snapshot Fl Rf Ar boot-dataset Ns Sy @ Ns Ar snapshot-name +.Nm zfs Cm rollback Fl Rf Ar boot-dataset Ns Sy @ Ns Ar snapshot-name before pivoting to the real root. .Ar snapshot-name defaults to the current kernel release. diff --git a/sys/contrib/subrepo-openzfs/man/man7/zfsprops.7 b/sys/contrib/subrepo-openzfs/man/man7/zfsprops.7 index 9ff0236f4d74..429369bd2e9e 100644 --- a/sys/contrib/subrepo-openzfs/man/man7/zfsprops.7 +++ b/sys/contrib/subrepo-openzfs/man/man7/zfsprops.7 @@ -1639,7 +1639,7 @@ then only metadata are prefetched. The default value is .Sy all . .Pp -Please note that the module parameter zfs_disable_prefetch=1 can +Please note that the module parameter zfs_prefetch_disable=1 can be used to totally disable speculative prefetch, bypassing anything this property does. .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off diff --git a/sys/contrib/subrepo-openzfs/man/man8/zdb.8 b/sys/contrib/subrepo-openzfs/man/man8/zdb.8 index d7f66d917ac7..08f5a3f70040 100644 --- a/sys/contrib/subrepo-openzfs/man/man8/zdb.8 +++ b/sys/contrib/subrepo-openzfs/man/man8/zdb.8 @@ -314,7 +314,6 @@ fragmentation, and free space histogram, as well as overall pool fragmentation and histogram. .It Fl MM "Special" vdevs are added to -M's normal output. -.It Fl O , -object-lookups Ns = Ns Ar dataset path Also display information about the maximum contiguous free space and the percentage of free space in each space map. .It Fl MMM @@ -327,7 +326,7 @@ but force zdb to interpret the in .Op Ar poolname Ns Op / Ns Ar dataset Ns | Ns Ar objset-ID as a numeric objset ID. -.It Fl O Ar dataset path +.It Fl O , -object-lookups Ns = Ns Ar dataset path Look up the specified .Ar path inside of the diff --git a/sys/contrib/subrepo-openzfs/module/Kbuild.in b/sys/contrib/subrepo-openzfs/module/Kbuild.in index 7e08374fa2b9..4707452711f7 100644 --- a/sys/contrib/subrepo-openzfs/module/Kbuild.in +++ b/sys/contrib/subrepo-openzfs/module/Kbuild.in @@ -101,10 +101,7 @@ ICP_OBJS := \ algs/blake3/blake3_generic.o \ algs/blake3/blake3_impl.o \ algs/edonr/edonr.o \ - algs/modes/cbc.o \ algs/modes/ccm.o \ - algs/modes/ctr.o \ - algs/modes/ecb.o \ algs/modes/gcm.o \ algs/modes/gcm_generic.o \ algs/modes/modes.o \ @@ -125,7 +122,6 @@ ICP_OBJS := \ illumos-crypto.o \ io/aes.o \ io/sha2_mod.o \ - io/skein_mod.o \ spi/kcf_spi.o ICP_OBJS_X86_64 := \ @@ -494,6 +490,7 @@ zfs-$(CONFIG_PPC64) += $(addprefix zfs/,$(ZFS_OBJS_PPC_PPC64)) UBSAN_SANITIZE_zap_leaf.o := n UBSAN_SANITIZE_zap_micro.o := n UBSAN_SANITIZE_sa.o := n +UBSAN_SANITIZE_zfs/zap_micro.o := n # Suppress incorrect warnings from versions of objtool which are not # aware of x86 EVEX prefix instructions used for AVX512. diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/aes/aes_modes.c b/sys/contrib/subrepo-openzfs/module/icp/algs/aes/aes_modes.c index 6a25496d050e..631e92f3542e 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/aes/aes_modes.c +++ b/sys/contrib/subrepo-openzfs/module/icp/algs/aes/aes_modes.c @@ -75,25 +75,17 @@ aes_encrypt_contiguous_blocks(void *ctx, char *data, size_t length, aes_ctx_t *aes_ctx = ctx; int rv; - if (aes_ctx->ac_flags & CTR_MODE) { - rv = ctr_mode_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CCM_MODE) { + if (aes_ctx->ac_flags & CCM_MODE) { rv = ccm_mode_encrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { rv = gcm_mode_encrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CBC_MODE) { - rv = cbc_encrypt_contiguous_blocks(ctx, - data, length, out, AES_BLOCK_LEN, aes_encrypt_block, - aes_copy_block, aes_xor_block); - } else { - rv = ecb_cipher_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block); } + else + __builtin_unreachable(); return (rv); } @@ -108,28 +100,15 @@ aes_decrypt_contiguous_blocks(void *ctx, char *data, size_t length, aes_ctx_t *aes_ctx = ctx; int rv; - if (aes_ctx->ac_flags & CTR_MODE) { - rv = ctr_mode_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (rv == CRYPTO_DATA_LEN_RANGE) - rv = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } else if (aes_ctx->ac_flags & CCM_MODE) { + if (aes_ctx->ac_flags & CCM_MODE) { rv = ccm_mode_decrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx->ac_flags & GCM_MODE) { rv = gcm_mode_decrypt_contiguous_blocks(ctx, data, length, out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); - } else if (aes_ctx->ac_flags & CBC_MODE) { - rv = cbc_decrypt_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_decrypt_block, aes_copy_block, - aes_xor_block); - } else { - rv = ecb_cipher_contiguous_blocks(ctx, data, length, out, - AES_BLOCK_LEN, aes_decrypt_block); - if (rv == CRYPTO_DATA_LEN_RANGE) - rv = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } + } else + __builtin_unreachable(); return (rv); } diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/cbc.c b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/cbc.c deleted file mode 100644 index d0219fb24c49..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/cbc.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include - -/* - * Algorithm independent CBC functions. - */ -int -cbc_encrypt_contiguous_blocks(cbc_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*encrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->cbc_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->cbc_remainder + ctx->cbc_remainder_len, - datap, - length); - ctx->cbc_remainder_len += length; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = (uint8_t *)ctx->cbc_iv; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->cbc_remainder_len > 0) { - need = block_size - ctx->cbc_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->cbc_remainder) - [ctx->cbc_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->cbc_remainder; - } else { - blockp = datap; - } - - /* - * XOR the previous cipher block or IV with the - * current clear block. - */ - xor_block(blockp, lastp); - encrypt(ctx->cbc_keysched, lastp, lastp); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - if (out_data_1_len == block_size) { - copy_block(lastp, out_data_1); - } else { - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, - lastp + out_data_1_len, - block_size - out_data_1_len); - } - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->cbc_remainder_len != 0) { - datap += need; - ctx->cbc_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->cbc_remainder, datap, remainder); - ctx->cbc_remainder_len = remainder; - ctx->cbc_copy_to = datap; - goto out; - } - ctx->cbc_copy_to = NULL; - - } while (remainder > 0); - -out: - /* - * Save the last encrypted block in the context. - */ - if (ctx->cbc_lastp != NULL) { - copy_block((uint8_t *)ctx->cbc_lastp, (uint8_t *)ctx->cbc_iv); - ctx->cbc_lastp = (uint8_t *)ctx->cbc_iv; - } - - return (CRYPTO_SUCCESS); -} - -#define OTHER(a, ctx) \ - (((a) == (ctx)->cbc_lastblock) ? (ctx)->cbc_iv : (ctx)->cbc_lastblock) - -int -cbc_decrypt_contiguous_blocks(cbc_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*decrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->cbc_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->cbc_remainder + ctx->cbc_remainder_len, - datap, - length); - ctx->cbc_remainder_len += length; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = ctx->cbc_lastp; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->cbc_remainder_len > 0) { - need = block_size - ctx->cbc_remainder_len; - - if (need > remainder) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->cbc_remainder) - [ctx->cbc_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->cbc_remainder; - } else { - blockp = datap; - } - - /* LINTED: pointer alignment */ - copy_block(blockp, (uint8_t *)OTHER((uint64_t *)lastp, ctx)); - - decrypt(ctx->cbc_keysched, blockp, - (uint8_t *)ctx->cbc_remainder); - blockp = (uint8_t *)ctx->cbc_remainder; - - /* - * XOR the previous cipher block or IV with the - * currently decrypted block. - */ - xor_block(lastp, blockp); - - /* LINTED: pointer alignment */ - lastp = (uint8_t *)OTHER((uint64_t *)lastp, ctx); - - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - memcpy(out_data_1, blockp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, blockp + out_data_1_len, - block_size - out_data_1_len); - } - - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->cbc_remainder_len != 0) { - datap += need; - ctx->cbc_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->cbc_remainder, datap, remainder); - ctx->cbc_remainder_len = remainder; - ctx->cbc_lastp = lastp; - ctx->cbc_copy_to = datap; - return (CRYPTO_SUCCESS); - } - ctx->cbc_copy_to = NULL; - - } while (remainder > 0); - - ctx->cbc_lastp = lastp; - return (CRYPTO_SUCCESS); -} - -int -cbc_init_ctx(cbc_ctx_t *cbc_ctx, char *param, size_t param_len, - size_t block_size, void (*copy_block)(uint8_t *, uint64_t *)) -{ - /* Copy IV into context. */ - ASSERT3P(param, !=, NULL); - ASSERT3U(param_len, ==, block_size); - - copy_block((uchar_t *)param, cbc_ctx->cbc_iv); - - return (CRYPTO_SUCCESS); -} - -void * -cbc_alloc_ctx(int kmflag) -{ - cbc_ctx_t *cbc_ctx; - - if ((cbc_ctx = kmem_zalloc(sizeof (cbc_ctx_t), kmflag)) == NULL) - return (NULL); - - cbc_ctx->cbc_flags = CBC_MODE; - return (cbc_ctx); -} diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ctr.c b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ctr.c deleted file mode 100644 index db6b1c71d5cd..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ctr.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include -#include - -/* - * Encrypt and decrypt multiple blocks of data in counter mode. - */ -int -ctr_mode_contiguous_blocks(ctr_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*cipher)(const void *ks, const uint8_t *pt, uint8_t *ct), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - uint64_t lower_counter, upper_counter; - - if (length + ctx->ctr_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->ctr_remainder + ctx->ctr_remainder_len, - datap, - length); - ctx->ctr_remainder_len += length; - ctx->ctr_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->ctr_remainder_len > 0) { - need = block_size - ctx->ctr_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->ctr_remainder) - [ctx->ctr_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->ctr_remainder; - } else { - blockp = datap; - } - - /* ctr_cb is the counter block */ - cipher(ctx->ctr_keysched, (uint8_t *)ctx->ctr_cb, - (uint8_t *)ctx->ctr_tmp); - - lastp = (uint8_t *)ctx->ctr_tmp; - - /* - * Increment Counter. - */ - lower_counter = ntohll(ctx->ctr_cb[1] & ctx->ctr_lower_mask); - lower_counter = htonll(lower_counter + 1); - lower_counter &= ctx->ctr_lower_mask; - ctx->ctr_cb[1] = (ctx->ctr_cb[1] & ~(ctx->ctr_lower_mask)) | - lower_counter; - - /* wrap around */ - if (lower_counter == 0) { - upper_counter = - ntohll(ctx->ctr_cb[0] & ctx->ctr_upper_mask); - upper_counter = htonll(upper_counter + 1); - upper_counter &= ctx->ctr_upper_mask; - ctx->ctr_cb[0] = - (ctx->ctr_cb[0] & ~(ctx->ctr_upper_mask)) | - upper_counter; - } - - /* - * XOR encrypted counter block with the current clear block. - */ - xor_block(blockp, lastp); - - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, lastp + out_data_1_len, - block_size - out_data_1_len); - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->ctr_remainder_len != 0) { - datap += need; - ctx->ctr_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->ctr_remainder, datap, remainder); - ctx->ctr_remainder_len = remainder; - ctx->ctr_copy_to = datap; - goto out; - } - ctx->ctr_copy_to = NULL; - - } while (remainder > 0); - -out: - return (CRYPTO_SUCCESS); -} - -int -ctr_mode_final(ctr_ctx_t *ctx, crypto_data_t *out, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)) -{ - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - uint8_t *p; - int i; - - if (out->cd_length < ctx->ctr_remainder_len) - return (CRYPTO_DATA_LEN_RANGE); - - encrypt_block(ctx->ctr_keysched, (uint8_t *)ctx->ctr_cb, - (uint8_t *)ctx->ctr_tmp); - - lastp = (uint8_t *)ctx->ctr_tmp; - p = (uint8_t *)ctx->ctr_remainder; - for (i = 0; i < ctx->ctr_remainder_len; i++) { - p[i] ^= lastp[i]; - } - - crypto_init_ptrs(out, &iov_or_mp, &offset); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, ctx->ctr_remainder_len); - - memcpy(out_data_1, p, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, - (uint8_t *)p + out_data_1_len, - ctx->ctr_remainder_len - out_data_1_len); - } - out->cd_offset += ctx->ctr_remainder_len; - ctx->ctr_remainder_len = 0; - return (CRYPTO_SUCCESS); -} - -int -ctr_init_ctx(ctr_ctx_t *ctr_ctx, ulong_t count, uint8_t *cb, - void (*copy_block)(uint8_t *, uint8_t *)) -{ - uint64_t upper_mask = 0; - uint64_t lower_mask = 0; - - if (count == 0 || count > 128) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - /* upper 64 bits of the mask */ - if (count >= 64) { - count -= 64; - upper_mask = (count == 64) ? UINT64_MAX : (1ULL << count) - 1; - lower_mask = UINT64_MAX; - } else { - /* now the lower 63 bits */ - lower_mask = (1ULL << count) - 1; - } - ctr_ctx->ctr_lower_mask = htonll(lower_mask); - ctr_ctx->ctr_upper_mask = htonll(upper_mask); - - copy_block(cb, (uchar_t *)ctr_ctx->ctr_cb); - ctr_ctx->ctr_lastp = (uint8_t *)&ctr_ctx->ctr_cb[0]; - ctr_ctx->ctr_flags |= CTR_MODE; - return (CRYPTO_SUCCESS); -} - -void * -ctr_alloc_ctx(int kmflag) -{ - ctr_ctx_t *ctr_ctx; - - if ((ctr_ctx = kmem_zalloc(sizeof (ctr_ctx_t), kmflag)) == NULL) - return (NULL); - - ctr_ctx->ctr_flags = CTR_MODE; - return (ctr_ctx); -} diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ecb.c b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ecb.c deleted file mode 100644 index e2d8e71c161c..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/ecb.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include - -/* - * Algorithm independent ECB functions. - */ -int -ecb_cipher_contiguous_blocks(ecb_ctx_t *ctx, char *data, size_t length, - crypto_data_t *out, size_t block_size, - int (*cipher)(const void *ks, const uint8_t *pt, uint8_t *ct)) -{ - size_t remainder = length; - size_t need = 0; - uint8_t *datap = (uint8_t *)data; - uint8_t *blockp; - uint8_t *lastp; - void *iov_or_mp; - offset_t offset; - uint8_t *out_data_1; - uint8_t *out_data_2; - size_t out_data_1_len; - - if (length + ctx->ecb_remainder_len < block_size) { - /* accumulate bytes here and return */ - memcpy((uint8_t *)ctx->ecb_remainder + ctx->ecb_remainder_len, - datap, - length); - ctx->ecb_remainder_len += length; - ctx->ecb_copy_to = datap; - return (CRYPTO_SUCCESS); - } - - lastp = (uint8_t *)ctx->ecb_iv; - crypto_init_ptrs(out, &iov_or_mp, &offset); - - do { - /* Unprocessed data from last call. */ - if (ctx->ecb_remainder_len > 0) { - need = block_size - ctx->ecb_remainder_len; - - if (need > remainder) - return (CRYPTO_DATA_LEN_RANGE); - - memcpy(&((uint8_t *)ctx->ecb_remainder) - [ctx->ecb_remainder_len], datap, need); - - blockp = (uint8_t *)ctx->ecb_remainder; - } else { - blockp = datap; - } - - cipher(ctx->ecb_keysched, blockp, lastp); - crypto_get_ptrs(out, &iov_or_mp, &offset, &out_data_1, - &out_data_1_len, &out_data_2, block_size); - - /* copy block to where it belongs */ - memcpy(out_data_1, lastp, out_data_1_len); - if (out_data_2 != NULL) { - memcpy(out_data_2, lastp + out_data_1_len, - block_size - out_data_1_len); - } - /* update offset */ - out->cd_offset += block_size; - - /* Update pointer to next block of data to be processed. */ - if (ctx->ecb_remainder_len != 0) { - datap += need; - ctx->ecb_remainder_len = 0; - } else { - datap += block_size; - } - - remainder = (size_t)&data[length] - (size_t)datap; - - /* Incomplete last block. */ - if (remainder > 0 && remainder < block_size) { - memcpy(ctx->ecb_remainder, datap, remainder); - ctx->ecb_remainder_len = remainder; - ctx->ecb_copy_to = datap; - goto out; - } - ctx->ecb_copy_to = NULL; - - } while (remainder > 0); - -out: - return (CRYPTO_SUCCESS); -} - -void * -ecb_alloc_ctx(int kmflag) -{ - ecb_ctx_t *ecb_ctx; - - if ((ecb_ctx = kmem_zalloc(sizeof (ecb_ctx_t), kmflag)) == NULL) - return (NULL); - - ecb_ctx->ecb_flags = ECB_MODE; - return (ecb_ctx); -} diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/gcm.c b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/gcm.c index dd8db6f97460..21f4301d584d 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/gcm.c +++ b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/gcm.c @@ -50,11 +50,6 @@ static uint32_t icp_gcm_impl = IMPL_FASTEST; static uint32_t user_sel_impl = IMPL_FASTEST; -static inline int gcm_init_ctx_impl(boolean_t, gcm_ctx_t *, char *, size_t, - int (*)(const void *, const uint8_t *, uint8_t *), - void (*)(uint8_t *, uint8_t *), - void (*)(uint8_t *, uint8_t *)); - #ifdef CAN_USE_GCM_ASM /* Does the architecture we run on support the MOVBE instruction? */ boolean_t gcm_avx_can_use_movbe = B_FALSE; @@ -590,40 +585,11 @@ gcm_init(gcm_ctx_t *ctx, const uint8_t *iv, size_t iv_len, return (CRYPTO_SUCCESS); } -/* - * The following function is called at encrypt or decrypt init time - * for AES GCM mode. - */ -int -gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - return (gcm_init_ctx_impl(B_FALSE, gcm_ctx, param, block_size, - encrypt_block, copy_block, xor_block)); -} - -/* - * The following function is called at encrypt or decrypt init time - * for AES GMAC mode. - */ -int -gmac_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)) -{ - return (gcm_init_ctx_impl(B_TRUE, gcm_ctx, param, block_size, - encrypt_block, copy_block, xor_block)); -} - /* * Init the GCM context struct. Handle the cycle and avx implementations here. - * Initialization of a GMAC context differs slightly from a GCM context. */ -static inline int -gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, +int +gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)) @@ -635,22 +601,16 @@ gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, if (param != NULL) { gcm_param = (CK_AES_GCM_PARAMS *)(void *)param; - if (gmac_mode == B_FALSE) { - /* GCM mode. */ - if ((rv = gcm_validate_args(gcm_param)) != 0) { - return (rv); - } - gcm_ctx->gcm_flags |= GCM_MODE; - - size_t tbits = gcm_param->ulTagBits; - tag_len = CRYPTO_BITS2BYTES(tbits); - iv_len = gcm_param->ulIvLen; - } else { - /* GMAC mode. */ - gcm_ctx->gcm_flags |= GMAC_MODE; - tag_len = CRYPTO_BITS2BYTES(AES_GMAC_TAG_BITS); - iv_len = AES_GMAC_IV_LEN; + /* GCM mode. */ + if ((rv = gcm_validate_args(gcm_param)) != 0) { + return (rv); } + gcm_ctx->gcm_flags |= GCM_MODE; + + size_t tbits = gcm_param->ulTagBits; + tag_len = CRYPTO_BITS2BYTES(tbits); + iv_len = gcm_param->ulIvLen; + gcm_ctx->gcm_tag_len = tag_len; gcm_ctx->gcm_processed_data_len = 0; @@ -684,10 +644,9 @@ gcm_init_ctx_impl(boolean_t gmac_mode, gcm_ctx_t *gcm_ctx, char *param, } /* * If this is a GCM context, use the MOVBE and the BSWAP - * variants alternately. GMAC contexts code paths do not - * use the MOVBE instruction. + * variants alternately. */ - if (gcm_ctx->gcm_use_avx == B_TRUE && gmac_mode == B_FALSE && + if (gcm_ctx->gcm_use_avx == B_TRUE && zfs_movbe_available() == B_TRUE) { (void) atomic_toggle_boolean_nv( (volatile boolean_t *)&gcm_avx_can_use_movbe); @@ -758,18 +717,6 @@ gcm_alloc_ctx(int kmflag) return (gcm_ctx); } -void * -gmac_alloc_ctx(int kmflag) -{ - gcm_ctx_t *gcm_ctx; - - if ((gcm_ctx = kmem_zalloc(sizeof (gcm_ctx_t), kmflag)) == NULL) - return (NULL); - - gcm_ctx->gcm_flags = GMAC_MODE; - return (gcm_ctx); -} - /* GCM implementation that contains the fastest methods */ static gcm_impl_ops_t gcm_fastest_impl = { .name = "fastest" diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/modes.c b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/modes.c index 95e0baed373b..16b4970e959a 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/modes/modes.c +++ b/sys/contrib/subrepo-openzfs/module/icp/algs/modes/modes.c @@ -126,20 +126,7 @@ crypto_free_mode_ctx(void *ctx) { common_ctx_t *common_ctx = (common_ctx_t *)ctx; - switch (common_ctx->cc_flags & - (ECB_MODE|CBC_MODE|CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) { - case ECB_MODE: - kmem_free(common_ctx, sizeof (ecb_ctx_t)); - break; - - case CBC_MODE: - kmem_free(common_ctx, sizeof (cbc_ctx_t)); - break; - - case CTR_MODE: - kmem_free(common_ctx, sizeof (ctr_ctx_t)); - break; - + switch (common_ctx->cc_flags & (CCM_MODE|GCM_MODE)) { case CCM_MODE: if (((ccm_ctx_t *)ctx)->ccm_pt_buf != NULL) vmem_free(((ccm_ctx_t *)ctx)->ccm_pt_buf, @@ -149,9 +136,12 @@ crypto_free_mode_ctx(void *ctx) break; case GCM_MODE: - case GMAC_MODE: gcm_clear_ctx((gcm_ctx_t *)ctx); kmem_free(ctx, sizeof (gcm_ctx_t)); + break; + + default: + __builtin_unreachable(); } } diff --git a/sys/contrib/subrepo-openzfs/module/icp/algs/sha2/sha2_generic.c b/sys/contrib/subrepo-openzfs/module/icp/algs/sha2/sha2_generic.c index 60d7ad9a1dfa..d53f4b69990a 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/algs/sha2/sha2_generic.c +++ b/sys/contrib/subrepo-openzfs/module/icp/algs/sha2/sha2_generic.c @@ -400,15 +400,13 @@ SHA2Init(int algotype, SHA2_CTX *ctx) sha256_ctx *ctx256 = &ctx->sha256; sha512_ctx *ctx512 = &ctx->sha512; - ASSERT3S(algotype, >=, SHA256_MECH_INFO_TYPE); - ASSERT3S(algotype, <=, SHA512_256_MECH_INFO_TYPE); + ASSERT3S(algotype, >=, SHA512_HMAC_MECH_INFO_TYPE); + ASSERT3S(algotype, <=, SHA512_256); memset(ctx, 0, sizeof (*ctx)); ctx->algotype = algotype; switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: + case SHA256: ctx256->state[0] = 0x6a09e667; ctx256->state[1] = 0xbb67ae85; ctx256->state[2] = 0x3c6ef372; @@ -420,24 +418,8 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx256->count[0] = 0; ctx256->ops = sha256_get_ops(); break; - case SHA384_MECH_INFO_TYPE: - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - ctx512->state[0] = 0xcbbb9d5dc1059ed8ULL; - ctx512->state[1] = 0x629a292a367cd507ULL; - ctx512->state[2] = 0x9159015a3070dd17ULL; - ctx512->state[3] = 0x152fecd8f70e5939ULL; - ctx512->state[4] = 0x67332667ffc00b31ULL; - ctx512->state[5] = 0x8eb44a8768581511ULL; - ctx512->state[6] = 0xdb0c2e0d64f98fa7ULL; - ctx512->state[7] = 0x47b5481dbefa4fa4ULL; - ctx512->count[0] = 0; - ctx512->count[1] = 0; - ctx512->ops = sha512_get_ops(); - break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: ctx512->state[0] = 0x6a09e667f3bcc908ULL; ctx512->state[1] = 0xbb67ae8584caa73bULL; ctx512->state[2] = 0x3c6ef372fe94f82bULL; @@ -450,20 +432,7 @@ SHA2Init(int algotype, SHA2_CTX *ctx) ctx512->count[1] = 0; ctx512->ops = sha512_get_ops(); break; - case SHA512_224_MECH_INFO_TYPE: - ctx512->state[0] = 0x8c3d37c819544da2ULL; - ctx512->state[1] = 0x73e1996689dcd4d6ULL; - ctx512->state[2] = 0x1dfab7ae32ff9c82ULL; - ctx512->state[3] = 0x679dd514582f9fcfULL; - ctx512->state[4] = 0x0f6d2b697bd44da8ULL; - ctx512->state[5] = 0x77e36f7304c48942ULL; - ctx512->state[6] = 0x3f9d85a86a1d36c8ULL; - ctx512->state[7] = 0x1112e6ad91d692a1ULL; - ctx512->count[0] = 0; - ctx512->count[1] = 0; - ctx512->ops = sha512_get_ops(); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: ctx512->state[0] = 0x22312194fc2bf72cULL; ctx512->state[1] = 0x9f555fa3c84c64c2ULL; ctx512->state[2] = 0x2393b86b6f53b151ULL; @@ -490,25 +459,14 @@ SHA2Update(SHA2_CTX *ctx, const void *data, size_t len) ASSERT3P(data, !=, NULL); switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: + case SHA256: sha256_update(&ctx->sha256, data, len); break; - case SHA384_MECH_INFO_TYPE: - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - sha512_update(&ctx->sha512, data, len); - break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_update(&ctx->sha512, data, len); break; - case SHA512_224_MECH_INFO_TYPE: - sha512_update(&ctx->sha512, data, len); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: sha512_update(&ctx->sha512, data, len); break; } @@ -519,25 +477,14 @@ void SHA2Final(void *digest, SHA2_CTX *ctx) { switch (ctx->algotype) { - case SHA256_MECH_INFO_TYPE: - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: + case SHA256: sha256_final(&ctx->sha256, digest, 256); break; - case SHA384_MECH_INFO_TYPE: - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - sha512_final(&ctx->sha512, digest, 384); - break; - case SHA512_MECH_INFO_TYPE: + case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha512_final(&ctx->sha512, digest, 512); break; - case SHA512_224_MECH_INFO_TYPE: - sha512_final(&ctx->sha512, digest, 224); - break; - case SHA512_256_MECH_INFO_TYPE: + case SHA512_256: sha512_final(&ctx->sha512, digest, 256); break; } diff --git a/sys/contrib/subrepo-openzfs/module/icp/core/kcf_mech_tabs.c b/sys/contrib/subrepo-openzfs/module/icp/core/kcf_mech_tabs.c index 41705e84bc4b..a1e95847d066 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/core/kcf_mech_tabs.c +++ b/sys/contrib/subrepo-openzfs/module/icp/core/kcf_mech_tabs.c @@ -41,7 +41,6 @@ * mech_index is the index for that mechanism in the table. * A mechanism belongs to exactly 1 table. * The tables are: - * . digest_mechs_tab[] for the msg digest mechs. * . cipher_mechs_tab[] for encrypt/decrypt and wrap/unwrap mechs. * . mac_mechs_tab[] for MAC mechs. * . sign_mechs_tab[] for sign & verify mechs. @@ -75,13 +74,11 @@ /* RFE 4687834 Will deal with the extensibility of these tables later */ -static kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST]; static kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER]; static kcf_mech_entry_t kcf_mac_mechs_tab[KCF_MAXMAC]; const kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = { {0, NULL}, /* No class zero */ - {KCF_MAXDIGEST, kcf_digest_mechs_tab}, {KCF_MAXCIPHER, kcf_cipher_mechs_tab}, {KCF_MAXMAC, kcf_mac_mechs_tab}, }; @@ -220,10 +217,7 @@ kcf_add_mech_provider(short mech_indx, crypto_func_group_t fg = mech_info->cm_func_group_mask; kcf_ops_class_t class; - if (fg & CRYPTO_FG_DIGEST || fg & CRYPTO_FG_DIGEST_ATOMIC) - class = KCF_DIGEST_CLASS; - else if (fg & CRYPTO_FG_ENCRYPT || fg & CRYPTO_FG_DECRYPT || - fg & CRYPTO_FG_ENCRYPT_ATOMIC || + if (fg & CRYPTO_FG_ENCRYPT_ATOMIC || fg & CRYPTO_FG_DECRYPT_ATOMIC) class = KCF_CIPHER_CLASS; else if (fg & CRYPTO_FG_MAC || fg & CRYPTO_FG_MAC_ATOMIC) diff --git a/sys/contrib/subrepo-openzfs/module/icp/illumos-crypto.c b/sys/contrib/subrepo-openzfs/module/icp/illumos-crypto.c index 13f05c06ed5c..89736a61bc89 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/illumos-crypto.c +++ b/sys/contrib/subrepo-openzfs/module/icp/illumos-crypto.c @@ -107,7 +107,6 @@ void icp_fini(void) { - skein_mod_fini(); sha2_mod_fini(); aes_mod_fini(); kcf_sched_destroy(); @@ -134,12 +133,6 @@ icp_init(void) /* initialize algorithms */ aes_mod_init(); sha2_mod_init(); - skein_mod_init(); return (0); } - -#if defined(_KERNEL) && defined(__FreeBSD__) -module_exit(icp_fini); -module_init(icp_init); -#endif diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/aes/aes_impl.h b/sys/contrib/subrepo-openzfs/module/icp/include/aes/aes_impl.h index 59b776bf45f0..2286599a801d 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/include/aes/aes_impl.h +++ b/sys/contrib/subrepo-openzfs/module/icp/include/aes/aes_impl.h @@ -149,13 +149,8 @@ extern int aes_decrypt_contiguous_blocks(void *ctx, char *data, size_t length, #ifdef _AES_IMPL typedef enum aes_mech_type { - AES_ECB_MECH_INFO_TYPE, /* SUN_CKM_AES_ECB */ - AES_CBC_MECH_INFO_TYPE, /* SUN_CKM_AES_CBC */ - AES_CBC_PAD_MECH_INFO_TYPE, /* SUN_CKM_AES_CBC_PAD */ - AES_CTR_MECH_INFO_TYPE, /* SUN_CKM_AES_CTR */ AES_CCM_MECH_INFO_TYPE, /* SUN_CKM_AES_CCM */ AES_GCM_MECH_INFO_TYPE, /* SUN_CKM_AES_GCM */ - AES_GMAC_MECH_INFO_TYPE /* SUN_CKM_AES_GMAC */ } aes_mech_type_t; #endif /* _AES_IMPL */ diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/modes/modes.h b/sys/contrib/subrepo-openzfs/module/icp/include/modes/modes.h index 23bf46ab51a0..daa0335b5c3b 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/include/modes/modes.h +++ b/sys/contrib/subrepo-openzfs/module/icp/include/modes/modes.h @@ -45,12 +45,8 @@ extern "C" { extern boolean_t gcm_avx_can_use_movbe; #endif -#define ECB_MODE 0x00000002 -#define CBC_MODE 0x00000004 -#define CTR_MODE 0x00000008 #define CCM_MODE 0x00000010 #define GCM_MODE 0x00000020 -#define GMAC_MODE 0x00000040 /* * cc_keysched: Pointer to key schedule. @@ -76,7 +72,7 @@ extern boolean_t gcm_avx_can_use_movbe; * by the caller, or internally, e.g. an init routine. * If allocated by the latter, then it needs to be freed. * - * ECB_MODE, CBC_MODE, CTR_MODE, or CCM_MODE + * CCM_MODE */ struct common_ctx { void *cc_keysched; @@ -91,57 +87,6 @@ struct common_ctx { typedef struct common_ctx common_ctx_t; -typedef struct ecb_ctx { - struct common_ctx ecb_common; - uint64_t ecb_lastblock[2]; -} ecb_ctx_t; - -#define ecb_keysched ecb_common.cc_keysched -#define ecb_keysched_len ecb_common.cc_keysched_len -#define ecb_iv ecb_common.cc_iv -#define ecb_remainder ecb_common.cc_remainder -#define ecb_remainder_len ecb_common.cc_remainder_len -#define ecb_lastp ecb_common.cc_lastp -#define ecb_copy_to ecb_common.cc_copy_to -#define ecb_flags ecb_common.cc_flags - -typedef struct cbc_ctx { - struct common_ctx cbc_common; - uint64_t cbc_lastblock[2]; -} cbc_ctx_t; - -#define cbc_keysched cbc_common.cc_keysched -#define cbc_keysched_len cbc_common.cc_keysched_len -#define cbc_iv cbc_common.cc_iv -#define cbc_remainder cbc_common.cc_remainder -#define cbc_remainder_len cbc_common.cc_remainder_len -#define cbc_lastp cbc_common.cc_lastp -#define cbc_copy_to cbc_common.cc_copy_to -#define cbc_flags cbc_common.cc_flags - -/* - * ctr_lower_mask Bit-mask for lower 8 bytes of counter block. - * ctr_upper_mask Bit-mask for upper 8 bytes of counter block. - */ -typedef struct ctr_ctx { - struct common_ctx ctr_common; - uint64_t ctr_lower_mask; - uint64_t ctr_upper_mask; - uint32_t ctr_tmp[4]; -} ctr_ctx_t; - -/* - * ctr_cb Counter block. - */ -#define ctr_keysched ctr_common.cc_keysched -#define ctr_keysched_len ctr_common.cc_keysched_len -#define ctr_cb ctr_common.cc_iv -#define ctr_remainder ctr_common.cc_remainder -#define ctr_remainder_len ctr_common.cc_remainder_len -#define ctr_lastp ctr_common.cc_lastp -#define ctr_copy_to ctr_common.cc_copy_to -#define ctr_flags ctr_common.cc_flags - /* * * ccm_mac_len: Stores length of the MAC in CCM mode. @@ -241,27 +186,21 @@ typedef struct gcm_ctx { #define gcm_copy_to gcm_common.cc_copy_to #define gcm_flags gcm_common.cc_flags -#define AES_GMAC_IV_LEN 12 -#define AES_GMAC_TAG_BITS 128 - void gcm_clear_ctx(gcm_ctx_t *ctx); typedef struct aes_ctx { union { - ecb_ctx_t acu_ecb; - cbc_ctx_t acu_cbc; - ctr_ctx_t acu_ctr; ccm_ctx_t acu_ccm; gcm_ctx_t acu_gcm; } acu; } aes_ctx_t; -#define ac_flags acu.acu_ecb.ecb_common.cc_flags -#define ac_remainder_len acu.acu_ecb.ecb_common.cc_remainder_len -#define ac_keysched acu.acu_ecb.ecb_common.cc_keysched -#define ac_keysched_len acu.acu_ecb.ecb_common.cc_keysched_len -#define ac_iv acu.acu_ecb.ecb_common.cc_iv -#define ac_lastp acu.acu_ecb.ecb_common.cc_lastp +#define ac_flags acu.acu_ccm.ccm_common.cc_flags +#define ac_remainder_len acu.acu_ccm.ccm_common.cc_remainder_len +#define ac_keysched acu.acu_ccm.ccm_common.cc_keysched +#define ac_keysched_len acu.acu_ccm.ccm_common.cc_keysched_len +#define ac_iv acu.acu_ccm.ccm_common.cc_iv +#define ac_lastp acu.acu_ccm.ccm_common.cc_lastp #define ac_pt_buf acu.acu_ccm.ccm_pt_buf #define ac_mac_len acu.acu_ccm.ccm_mac_len #define ac_data_len acu.acu_ccm.ccm_data_len @@ -269,55 +208,6 @@ typedef struct aes_ctx { #define ac_processed_data_len acu.acu_ccm.ccm_processed_data_len #define ac_tag_len acu.acu_gcm.gcm_tag_len -typedef struct blowfish_ctx { - union { - ecb_ctx_t bcu_ecb; - cbc_ctx_t bcu_cbc; - } bcu; -} blowfish_ctx_t; - -#define bc_flags bcu.bcu_ecb.ecb_common.cc_flags -#define bc_remainder_len bcu.bcu_ecb.ecb_common.cc_remainder_len -#define bc_keysched bcu.bcu_ecb.ecb_common.cc_keysched -#define bc_keysched_len bcu.bcu_ecb.ecb_common.cc_keysched_len -#define bc_iv bcu.bcu_ecb.ecb_common.cc_iv -#define bc_lastp bcu.bcu_ecb.ecb_common.cc_lastp - -typedef struct des_ctx { - union { - ecb_ctx_t dcu_ecb; - cbc_ctx_t dcu_cbc; - } dcu; -} des_ctx_t; - -#define dc_flags dcu.dcu_ecb.ecb_common.cc_flags -#define dc_remainder_len dcu.dcu_ecb.ecb_common.cc_remainder_len -#define dc_keysched dcu.dcu_ecb.ecb_common.cc_keysched -#define dc_keysched_len dcu.dcu_ecb.ecb_common.cc_keysched_len -#define dc_iv dcu.dcu_ecb.ecb_common.cc_iv -#define dc_lastp dcu.dcu_ecb.ecb_common.cc_lastp - -extern int ecb_cipher_contiguous_blocks(ecb_ctx_t *, char *, size_t, - crypto_data_t *, size_t, int (*cipher)(const void *, const uint8_t *, - uint8_t *)); - -extern int cbc_encrypt_contiguous_blocks(cbc_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*encrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - -extern int cbc_decrypt_contiguous_blocks(cbc_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*decrypt)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - -extern int ctr_mode_contiguous_blocks(ctr_ctx_t *, char *, size_t, - crypto_data_t *, size_t, - int (*cipher)(const void *, const uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - extern int ccm_mode_encrypt_contiguous_blocks(ccm_ctx_t *, char *, size_t, crypto_data_t *, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), @@ -360,15 +250,6 @@ extern int gcm_decrypt_final(gcm_ctx_t *, crypto_data_t *, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); -extern int ctr_mode_final(ctr_ctx_t *, crypto_data_t *, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)); - -extern int cbc_init_ctx(cbc_ctx_t *, char *, size_t, size_t, - void (*copy_block)(uint8_t *, uint64_t *)); - -extern int ctr_init_ctx(ctr_ctx_t *, ulong_t, uint8_t *, - void (*copy_block)(uint8_t *, uint8_t *)); - extern int ccm_init_ctx(ccm_ctx_t *, char *, int, boolean_t, size_t, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); @@ -378,11 +259,6 @@ extern int gcm_init_ctx(gcm_ctx_t *, char *, size_t, void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)); -extern int gmac_init_ctx(gcm_ctx_t *, char *, size_t, - int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), - void (*copy_block)(uint8_t *, uint8_t *), - void (*xor_block)(uint8_t *, uint8_t *)); - extern void calculate_ccm_mac(ccm_ctx_t *, uint8_t *, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)); @@ -392,12 +268,8 @@ extern void crypto_init_ptrs(crypto_data_t *, void **, offset_t *); extern void crypto_get_ptrs(crypto_data_t *, void **, offset_t *, uint8_t **, size_t *, uint8_t **, size_t); -extern void *ecb_alloc_ctx(int); -extern void *cbc_alloc_ctx(int); -extern void *ctr_alloc_ctx(int); extern void *ccm_alloc_ctx(int); extern void *gcm_alloc_ctx(int); -extern void *gmac_alloc_ctx(int); extern void crypto_free_mode_ctx(void *); #ifdef __cplusplus diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/impl.h b/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/impl.h index 4d17221ea9a3..0f5ef58ac009 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/impl.h +++ b/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/impl.h @@ -55,7 +55,7 @@ extern "C" { * When impl.h is broken up (bug# 4703218), this will be done. For now, * we hardcode these values. */ -#define KCF_OPS_CLASSSIZE 4 +#define KCF_OPS_CLASSSIZE 3 #define KCF_MAXMECHTAB 32 /* @@ -187,28 +187,6 @@ typedef struct kcf_mech_entry { avl_node_t me_node; } kcf_mech_entry_t; -/* - * If a component has a reference to a kcf_policy_desc_t, - * it REFHOLD()s. A new policy descriptor which is referenced only - * by the policy table has a reference count of one. - */ -#define KCF_POLICY_REFHOLD(desc) { \ - int newval = atomic_add_32_nv(&(desc)->pd_refcnt, 1); \ - ASSERT(newval != 0); \ -} - -/* - * Releases a reference to a policy descriptor. When the last - * reference is released, the descriptor is freed. - */ -#define KCF_POLICY_REFRELE(desc) { \ - membar_producer(); \ - int newval = atomic_add_32_nv(&(desc)->pd_refcnt, -1); \ - ASSERT(newval != -1); \ - if (newval == 0) \ - kcf_policy_free_desc(desc); \ -} - /* * Global tables. The sizes are from the predefined PKCS#11 v2.20 mechanisms, * with a margin of few extra empty entry points @@ -222,12 +200,11 @@ _Static_assert(KCF_MAXCIPHER == KCF_MAXMECHTAB, "KCF_MAXCIPHER != KCF_MAXMECHTAB"); /* See KCF_MAXMECHTAB comment */ typedef enum { - KCF_DIGEST_CLASS = 1, - KCF_CIPHER_CLASS, + KCF_CIPHER_CLASS = 1, KCF_MAC_CLASS, } kcf_ops_class_t; -#define KCF_FIRST_OPSCLASS KCF_DIGEST_CLASS +#define KCF_FIRST_OPSCLASS KCF_CIPHER_CLASS #define KCF_LAST_OPSCLASS KCF_MAC_CLASS _Static_assert( KCF_OPS_CLASSSIZE == (KCF_LAST_OPSCLASS - KCF_FIRST_OPSCLASS + 2), @@ -275,29 +252,14 @@ extern const kcf_mech_entry_tab_t kcf_mech_tabs_tab[]; * of type kcf_prov_desc_t. */ -#define KCF_PROV_DIGEST_OPS(pd) ((pd)->pd_ops_vector->co_digest_ops) #define KCF_PROV_CIPHER_OPS(pd) ((pd)->pd_ops_vector->co_cipher_ops) #define KCF_PROV_MAC_OPS(pd) ((pd)->pd_ops_vector->co_mac_ops) #define KCF_PROV_CTX_OPS(pd) ((pd)->pd_ops_vector->co_ctx_ops) -/* - * Wrappers for crypto_digest_ops(9S) entry points. - */ - -#define KCF_PROV_DIGEST_INIT(pd, ctx, mech) ( \ - (KCF_PROV_DIGEST_OPS(pd) && KCF_PROV_DIGEST_OPS(pd)->digest_init) ? \ - KCF_PROV_DIGEST_OPS(pd)->digest_init(ctx, mech) : \ - CRYPTO_NOT_SUPPORTED) - /* * Wrappers for crypto_cipher_ops(9S) entry points. */ -#define KCF_PROV_ENCRYPT_INIT(pd, ctx, mech, key, template) ( \ - (KCF_PROV_CIPHER_OPS(pd) && KCF_PROV_CIPHER_OPS(pd)->encrypt_init) ? \ - KCF_PROV_CIPHER_OPS(pd)->encrypt_init(ctx, mech, key, template) : \ - CRYPTO_NOT_SUPPORTED) - #define KCF_PROV_ENCRYPT_ATOMIC(pd, mech, key, plaintext, ciphertext, \ template) ( \ (KCF_PROV_CIPHER_OPS(pd) && KCF_PROV_CIPHER_OPS(pd)->encrypt_atomic) ? \ diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/spi.h b/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/spi.h index 63dfce7957a8..e9be7e0c54d8 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/spi.h +++ b/sys/contrib/subrepo-openzfs/module/icp/include/sys/crypto/spi.h @@ -66,22 +66,6 @@ typedef struct crypto_ctx { void *cc_framework_private; /* owned by framework */ } crypto_ctx_t; -/* - * The crypto_digest_ops structure contains pointers to digest - * operations for cryptographic providers. It is passed through - * the crypto_ops(9S) structure when providers register with the - * kernel using crypto_register_provider(9F). - */ -typedef struct crypto_digest_ops { - int (*digest_init)(crypto_ctx_t *, crypto_mechanism_t *); - int (*digest)(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); - int (*digest_update)(crypto_ctx_t *, crypto_data_t *); - int (*digest_key)(crypto_ctx_t *, crypto_key_t *); - int (*digest_final)(crypto_ctx_t *, crypto_data_t *); - int (*digest_atomic)(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); -} __no_const crypto_digest_ops_t; - /* * The crypto_cipher_ops structure contains pointers to encryption * and decryption operations for cryptographic providers. It is @@ -89,27 +73,8 @@ typedef struct crypto_digest_ops { * with the kernel using crypto_register_provider(9F). */ typedef struct crypto_cipher_ops { - int (*encrypt_init)(crypto_ctx_t *, - crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); - int (*encrypt)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*encrypt_update)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*encrypt_final)(crypto_ctx_t *, - crypto_data_t *); int (*encrypt_atomic)(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - - int (*decrypt_init)(crypto_ctx_t *, - crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); - int (*decrypt)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*decrypt_update)(crypto_ctx_t *, - crypto_data_t *, crypto_data_t *); - int (*decrypt_final)(crypto_ctx_t *, - crypto_data_t *); int (*decrypt_atomic)(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); } __no_const crypto_cipher_ops_t; @@ -156,7 +121,6 @@ typedef struct crypto_ctx_ops { * by calling crypto_register_provider(9F). */ typedef struct crypto_ops { - const crypto_digest_ops_t *co_digest_ops; const crypto_cipher_ops_t *co_cipher_ops; const crypto_mac_ops_t *co_mac_ops; const crypto_ctx_ops_t *co_ctx_ops; @@ -172,14 +136,10 @@ typedef struct crypto_ops { typedef uint32_t crypto_func_group_t; -#define CRYPTO_FG_ENCRYPT 0x00000001 /* encrypt_init() */ -#define CRYPTO_FG_DECRYPT 0x00000002 /* decrypt_init() */ -#define CRYPTO_FG_DIGEST 0x00000004 /* digest_init() */ #define CRYPTO_FG_MAC 0x00001000 /* mac_init() */ #define CRYPTO_FG_ENCRYPT_ATOMIC 0x00008000 /* encrypt_atomic() */ #define CRYPTO_FG_DECRYPT_ATOMIC 0x00010000 /* decrypt_atomic() */ #define CRYPTO_FG_MAC_ATOMIC 0x00020000 /* mac_atomic() */ -#define CRYPTO_FG_DIGEST_ATOMIC 0x00040000 /* digest_atomic() */ /* * Maximum length of the pi_provider_description field of the diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/sys/stack.h b/sys/contrib/subrepo-openzfs/module/icp/include/sys/stack.h deleted file mode 100644 index 0bace018b5ab..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/include/sys/stack.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_STACK_H -#define _SYS_STACK_H - -#if defined(__i386) || defined(__amd64) - -#include /* XX64 x86/sys/stack.h */ - -#endif - -#endif /* _SYS_STACK_H */ diff --git a/sys/contrib/subrepo-openzfs/module/icp/include/sys/trap.h b/sys/contrib/subrepo-openzfs/module/icp/include/sys/trap.h deleted file mode 100644 index 2f47d43939c1..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/include/sys/trap.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SYS_TRAP_H -#define _SYS_TRAP_H - -#if defined(__i386) || defined(__amd64) - -#include /* XX64 x86/sys/trap.h */ - -#endif - -#endif /* _SYS_TRAP_H */ diff --git a/sys/contrib/subrepo-openzfs/module/icp/io/aes.c b/sys/contrib/subrepo-openzfs/module/icp/io/aes.c index 522c436497bc..8ee2d036c1e0 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/io/aes.c +++ b/sys/contrib/subrepo-openzfs/module/icp/io/aes.c @@ -40,83 +40,28 @@ * Mechanism info structure passed to KCF during registration. */ static const crypto_mech_info_t aes_mech_info_tab[] = { - /* AES_ECB */ - {SUN_CKM_AES_ECB, AES_ECB_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_CBC */ - {SUN_CKM_AES_CBC, AES_CBC_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_CTR */ - {SUN_CKM_AES_CTR, AES_CTR_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, /* AES_CCM */ {SUN_CKM_AES_CCM, AES_CCM_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, + CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT_ATOMIC}, /* AES_GCM */ {SUN_CKM_AES_GCM, AES_GCM_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC}, - /* AES_GMAC */ - {SUN_CKM_AES_GMAC, AES_GMAC_MECH_INFO_TYPE, - CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC | - CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC | - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, + CRYPTO_FG_ENCRYPT_ATOMIC | CRYPTO_FG_DECRYPT_ATOMIC}, }; -static int aes_encrypt_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t); -static int aes_decrypt_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t); -static int aes_common_init(crypto_ctx_t *, crypto_mechanism_t *, - crypto_key_t *, crypto_spi_ctx_template_t, boolean_t); static int aes_common_init_ctx(aes_ctx_t *, crypto_spi_ctx_template_t *, crypto_mechanism_t *, crypto_key_t *, int, boolean_t); -static int aes_encrypt_final(crypto_ctx_t *, crypto_data_t *); -static int aes_decrypt_final(crypto_ctx_t *, crypto_data_t *); -static int aes_encrypt(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int aes_encrypt_update(crypto_ctx_t *, crypto_data_t *, - crypto_data_t *); static int aes_encrypt_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); -static int aes_decrypt(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int aes_decrypt_update(crypto_ctx_t *, crypto_data_t *, - crypto_data_t *); static int aes_decrypt_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); static const crypto_cipher_ops_t aes_cipher_ops = { - .encrypt_init = aes_encrypt_init, - .encrypt = aes_encrypt, - .encrypt_update = aes_encrypt_update, - .encrypt_final = aes_encrypt_final, .encrypt_atomic = aes_encrypt_atomic, - .decrypt_init = aes_decrypt_init, - .decrypt = aes_decrypt, - .decrypt_update = aes_decrypt_update, - .decrypt_final = aes_decrypt_final, .decrypt_atomic = aes_decrypt_atomic }; -static int aes_mac_atomic(crypto_mechanism_t *, crypto_key_t *, crypto_data_t *, - crypto_data_t *, crypto_spi_ctx_template_t); -static int aes_mac_verify_atomic(crypto_mechanism_t *, crypto_key_t *, - crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - -static const crypto_mac_ops_t aes_mac_ops = { - .mac_init = NULL, - .mac = NULL, - .mac_update = NULL, - .mac_final = NULL, - .mac_atomic = aes_mac_atomic, - .mac_verify_atomic = aes_mac_verify_atomic -}; - static int aes_create_ctx_template(crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t *, size_t *); static int aes_free_context(crypto_ctx_t *); @@ -127,9 +72,8 @@ static const crypto_ctx_ops_t aes_ctx_ops = { }; static const crypto_ops_t aes_crypto_ops = { - NULL, &aes_cipher_ops, - &aes_mac_ops, + NULL, &aes_ctx_ops, }; @@ -141,7 +85,6 @@ static const crypto_provider_info_t aes_prov_info = { }; static crypto_kcf_provider_handle_t aes_prov_handle = 0; -static crypto_data_t null_crypto_data = { CRYPTO_DATA_RAW }; int aes_mod_init(void) @@ -181,18 +124,6 @@ aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx) int rv = CRYPTO_SUCCESS; switch (mechanism->cm_type) { - case AES_ECB_MECH_INFO_TYPE: - param_required = B_FALSE; - alloc_fun = ecb_alloc_ctx; - break; - case AES_CBC_MECH_INFO_TYPE: - param_len = AES_BLOCK_LEN; - alloc_fun = cbc_alloc_ctx; - break; - case AES_CTR_MECH_INFO_TYPE: - param_len = sizeof (CK_AES_CTR_PARAMS); - alloc_fun = ctr_alloc_ctx; - break; case AES_CCM_MECH_INFO_TYPE: param_len = sizeof (CK_AES_CCM_PARAMS); alloc_fun = ccm_alloc_ctx; @@ -201,13 +132,8 @@ aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx) param_len = sizeof (CK_AES_GCM_PARAMS); alloc_fun = gcm_alloc_ctx; break; - case AES_GMAC_MECH_INFO_TYPE: - param_len = sizeof (CK_AES_GMAC_PARAMS); - alloc_fun = gmac_alloc_ctx; - break; default: - rv = CRYPTO_MECHANISM_INVALID; - return (rv); + __builtin_unreachable(); } if (param_required && mechanism->cm_param != NULL && mechanism->cm_param_len != param_len) { @@ -239,594 +165,9 @@ init_keysched(crypto_key_t *key, void *newbie) return (CRYPTO_SUCCESS); } -static int -aes_encrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template) -{ - return (aes_common_init(ctx, mechanism, key, template, B_TRUE)); -} - -static int -aes_decrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template) -{ - return (aes_common_init(ctx, mechanism, key, template, B_FALSE)); -} - - - /* * KCF software provider encrypt entry points. */ -static int -aes_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t template, - boolean_t is_encrypt_init) -{ - aes_ctx_t *aes_ctx; - int rv; - - if ((rv = aes_check_mech_param(mechanism, &aes_ctx)) - != CRYPTO_SUCCESS) - return (rv); - - rv = aes_common_init_ctx(aes_ctx, template, mechanism, key, KM_SLEEP, - is_encrypt_init); - if (rv != CRYPTO_SUCCESS) { - crypto_free_mode_ctx(aes_ctx); - return (rv); - } - - ctx->cc_provider_private = aes_ctx; - - return (CRYPTO_SUCCESS); -} - -static void -aes_copy_block64(uint8_t *in, uint64_t *out) -{ - if (IS_P2ALIGNED(in, sizeof (uint64_t))) { - /* LINTED: pointer alignment */ - out[0] = *(uint64_t *)&in[0]; - /* LINTED: pointer alignment */ - out[1] = *(uint64_t *)&in[8]; - } else { - uint8_t *iv8 = (uint8_t *)&out[0]; - - AES_COPY_BLOCK(in, iv8); - } -} - - -static int -aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, - crypto_data_t *ciphertext) -{ - int ret = CRYPTO_FAILED; - - aes_ctx_t *aes_ctx; - size_t saved_length, saved_offset, length_needed; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - /* - * For block ciphers, plaintext must be a multiple of AES block size. - * This test is only valid for ciphers whose blocksize is a power of 2. - */ - if (((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) - == 0) && (plaintext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_DATA_LEN_RANGE); - - ASSERT(ciphertext != NULL); - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following case. - */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) { - case CCM_MODE: - length_needed = plaintext->cd_length + aes_ctx->ac_mac_len; - break; - case GCM_MODE: - length_needed = plaintext->cd_length + aes_ctx->ac_tag_len; - break; - case GMAC_MODE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - - length_needed = aes_ctx->ac_tag_len; - break; - default: - length_needed = plaintext->cd_length; - } - - if (ciphertext->cd_length < length_needed) { - ciphertext->cd_length = length_needed; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_length = ciphertext->cd_length; - saved_offset = ciphertext->cd_offset; - - /* - * Do an update on the specified input data. - */ - ret = aes_encrypt_update(ctx, plaintext, ciphertext); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - /* - * For CCM mode, aes_ccm_encrypt_final() will take care of any - * left-over unprocessed data, and compute the MAC - */ - if (aes_ctx->ac_flags & CCM_MODE) { - /* - * ccm_encrypt_final() will compute the MAC and append - * it to existing ciphertext. So, need to adjust the left over - * length value accordingly - */ - - /* order of following 2 lines MUST not be reversed */ - ciphertext->cd_offset = ciphertext->cd_length; - ciphertext->cd_length = saved_length - ciphertext->cd_length; - ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, ciphertext, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - if (plaintext != ciphertext) { - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } - ciphertext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { - /* - * gcm_encrypt_final() will compute the MAC and append - * it to existing ciphertext. So, need to adjust the left over - * length value accordingly - */ - - /* order of following 2 lines MUST not be reversed */ - ciphertext->cd_offset = ciphertext->cd_length; - ciphertext->cd_length = saved_length - ciphertext->cd_length; - ret = gcm_encrypt_final((gcm_ctx_t *)aes_ctx, ciphertext, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - - if (plaintext != ciphertext) { - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } - ciphertext->cd_offset = saved_offset; - } - - ASSERT(aes_ctx->ac_remainder_len == 0); - (void) aes_free_context(ctx); - - return (ret); -} - - -static int -aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, - crypto_data_t *plaintext) -{ - int ret = CRYPTO_FAILED; - - aes_ctx_t *aes_ctx; - off_t saved_offset; - size_t saved_length, length_needed; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - /* - * For block ciphers, plaintext must be a multiple of AES block size. - * This test is only valid for ciphers whose blocksize is a power of 2. - */ - if (((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) - == 0) && (ciphertext->cd_length & (AES_BLOCK_LEN - 1)) != 0) { - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - } - - ASSERT(plaintext != NULL); - - /* - * Return length needed to store the output. - * Do not destroy context when plaintext buffer is too small. - * - * CCM: plaintext is MAC len smaller than cipher text - * GCM: plaintext is TAG len smaller than cipher text - * GMAC: plaintext length must be zero - */ - switch (aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) { - case CCM_MODE: - length_needed = aes_ctx->ac_processed_data_len; - break; - case GCM_MODE: - length_needed = ciphertext->cd_length - aes_ctx->ac_tag_len; - break; - case GMAC_MODE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - - length_needed = 0; - break; - default: - length_needed = ciphertext->cd_length; - } - - if (plaintext->cd_length < length_needed) { - plaintext->cd_length = length_needed; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = plaintext->cd_offset; - saved_length = plaintext->cd_length; - - /* - * Do an update on the specified input data. - */ - ret = aes_decrypt_update(ctx, ciphertext, plaintext); - if (ret != CRYPTO_SUCCESS) { - goto cleanup; - } - - if (aes_ctx->ac_flags & CCM_MODE) { - ASSERT(aes_ctx->ac_processed_data_len == aes_ctx->ac_data_len); - ASSERT(aes_ctx->ac_processed_mac_len == aes_ctx->ac_mac_len); - - /* order of following 2 lines MUST not be reversed */ - plaintext->cd_offset = plaintext->cd_length; - plaintext->cd_length = saved_length - plaintext->cd_length; - - ret = ccm_decrypt_final((ccm_ctx_t *)aes_ctx, plaintext, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) { - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } - } else { - plaintext->cd_length = saved_length; - } - - plaintext->cd_offset = saved_offset; - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { - /* order of following 2 lines MUST not be reversed */ - plaintext->cd_offset = plaintext->cd_length; - plaintext->cd_length = saved_length - plaintext->cd_length; - - ret = gcm_decrypt_final((gcm_ctx_t *)aes_ctx, plaintext, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) { - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } - } else { - plaintext->cd_length = saved_length; - } - - plaintext->cd_offset = saved_offset; - } - - ASSERT(aes_ctx->ac_remainder_len == 0); - -cleanup: - (void) aes_free_context(ctx); - - return (ret); -} - - -static int -aes_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext, - crypto_data_t *ciphertext) -{ - off_t saved_offset; - size_t saved_length, out_len; - int ret = CRYPTO_SUCCESS; - aes_ctx_t *aes_ctx; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - ASSERT(ciphertext != NULL); - - /* compute number of bytes that will hold the ciphertext */ - out_len = aes_ctx->ac_remainder_len; - out_len += plaintext->cd_length; - out_len &= ~(AES_BLOCK_LEN - 1); - - /* return length needed to store the output */ - if (ciphertext->cd_length < out_len) { - ciphertext->cd_length = out_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = ciphertext->cd_offset; - saved_length = ciphertext->cd_length; - - /* - * Do the AES update on the specified input data. - */ - switch (plaintext->cd_format) { - case CRYPTO_DATA_RAW: - ret = crypto_update_iov(ctx->cc_provider_private, - plaintext, ciphertext, aes_encrypt_contiguous_blocks); - break; - case CRYPTO_DATA_UIO: - ret = crypto_update_uio(ctx->cc_provider_private, - plaintext, ciphertext, aes_encrypt_contiguous_blocks); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* - * Since AES counter mode is a stream cipher, we call - * ctr_mode_final() to pick up any remaining bytes. - * It is an internal function that does not destroy - * the context like *normal* final routines. - */ - if ((aes_ctx->ac_flags & CTR_MODE) && (aes_ctx->ac_remainder_len > 0)) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, - ciphertext, aes_encrypt_block); - } - - if (ret == CRYPTO_SUCCESS) { - if (plaintext != ciphertext) - ciphertext->cd_length = - ciphertext->cd_offset - saved_offset; - } else { - ciphertext->cd_length = saved_length; - } - ciphertext->cd_offset = saved_offset; - - return (ret); -} - - -static int -aes_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, - crypto_data_t *plaintext) -{ - off_t saved_offset; - size_t saved_length, out_len; - int ret = CRYPTO_SUCCESS; - aes_ctx_t *aes_ctx; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - ASSERT(plaintext != NULL); - - /* - * Compute number of bytes that will hold the plaintext. - * This is not necessary for CCM, GCM, and GMAC since these - * mechanisms never return plaintext for update operations. - */ - if ((aes_ctx->ac_flags & (CCM_MODE|GCM_MODE|GMAC_MODE)) == 0) { - out_len = aes_ctx->ac_remainder_len; - out_len += ciphertext->cd_length; - out_len &= ~(AES_BLOCK_LEN - 1); - - /* return length needed to store the output */ - if (plaintext->cd_length < out_len) { - plaintext->cd_length = out_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - } - - saved_offset = plaintext->cd_offset; - saved_length = plaintext->cd_length; - - /* - * Do the AES update on the specified input data. - */ - switch (ciphertext->cd_format) { - case CRYPTO_DATA_RAW: - ret = crypto_update_iov(ctx->cc_provider_private, - ciphertext, plaintext, aes_decrypt_contiguous_blocks); - break; - case CRYPTO_DATA_UIO: - ret = crypto_update_uio(ctx->cc_provider_private, - ciphertext, plaintext, aes_decrypt_contiguous_blocks); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* - * Since AES counter mode is a stream cipher, we call - * ctr_mode_final() to pick up any remaining bytes. - * It is an internal function that does not destroy - * the context like *normal* final routines. - */ - if ((aes_ctx->ac_flags & CTR_MODE) && (aes_ctx->ac_remainder_len > 0)) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, plaintext, - aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - } - - if (ret == CRYPTO_SUCCESS) { - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } else { - plaintext->cd_length = saved_length; - } - plaintext->cd_offset = saved_offset; - - - return (ret); -} - -static int -aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) -{ - aes_ctx_t *aes_ctx; - int ret; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - if (data->cd_format != CRYPTO_DATA_RAW && - data->cd_format != CRYPTO_DATA_UIO) { - return (CRYPTO_ARGUMENTS_BAD); - } - - if (aes_ctx->ac_flags & CTR_MODE) { - if (aes_ctx->ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, data, - aes_encrypt_block); - if (ret != CRYPTO_SUCCESS) - return (ret); - } - } else if (aes_ctx->ac_flags & CCM_MODE) { - ret = ccm_encrypt_final((ccm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { - size_t saved_offset = data->cd_offset; - - ret = gcm_encrypt_final((gcm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - data->cd_length = data->cd_offset - saved_offset; - data->cd_offset = saved_offset; - } else { - /* - * There must be no unprocessed plaintext. - * This happens if the length of the last data is - * not a multiple of the AES block length. - */ - if (aes_ctx->ac_remainder_len > 0) { - return (CRYPTO_DATA_LEN_RANGE); - } - data->cd_length = 0; - } - - (void) aes_free_context(ctx); - - return (CRYPTO_SUCCESS); -} - -static int -aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data) -{ - aes_ctx_t *aes_ctx; - int ret; - off_t saved_offset; - size_t saved_length; - - ASSERT(ctx->cc_provider_private != NULL); - aes_ctx = ctx->cc_provider_private; - - if (data->cd_format != CRYPTO_DATA_RAW && - data->cd_format != CRYPTO_DATA_UIO) { - return (CRYPTO_ARGUMENTS_BAD); - } - - /* - * There must be no unprocessed ciphertext. - * This happens if the length of the last ciphertext is - * not a multiple of the AES block length. - */ - if (aes_ctx->ac_remainder_len > 0) { - if ((aes_ctx->ac_flags & CTR_MODE) == 0) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - else { - ret = ctr_mode_final((ctr_ctx_t *)aes_ctx, data, - aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - if (ret != CRYPTO_SUCCESS) - return (ret); - } - } - - if (aes_ctx->ac_flags & CCM_MODE) { - /* - * This is where all the plaintext is returned, make sure - * the plaintext buffer is big enough - */ - size_t pt_len = aes_ctx->ac_data_len; - if (data->cd_length < pt_len) { - data->cd_length = pt_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - ASSERT(aes_ctx->ac_processed_data_len == pt_len); - ASSERT(aes_ctx->ac_processed_mac_len == aes_ctx->ac_mac_len); - saved_offset = data->cd_offset; - saved_length = data->cd_length; - ret = ccm_decrypt_final((ccm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - data->cd_length = data->cd_offset - saved_offset; - } else { - data->cd_length = saved_length; - } - - data->cd_offset = saved_offset; - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } else if (aes_ctx->ac_flags & (GCM_MODE|GMAC_MODE)) { - /* - * This is where all the plaintext is returned, make sure - * the plaintext buffer is big enough - */ - gcm_ctx_t *ctx = (gcm_ctx_t *)aes_ctx; - size_t pt_len = ctx->gcm_processed_data_len - ctx->gcm_tag_len; - - if (data->cd_length < pt_len) { - data->cd_length = pt_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - saved_offset = data->cd_offset; - saved_length = data->cd_length; - ret = gcm_decrypt_final((gcm_ctx_t *)aes_ctx, data, - AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); - if (ret == CRYPTO_SUCCESS) { - data->cd_length = data->cd_offset - saved_offset; - } else { - data->cd_length = saved_length; - } - - data->cd_offset = saved_offset; - if (ret != CRYPTO_SUCCESS) { - return (ret); - } - } - - - if ((aes_ctx->ac_flags & (CTR_MODE|CCM_MODE|GCM_MODE|GMAC_MODE)) == 0) { - data->cd_length = 0; - } - - (void) aes_free_context(ctx); - - return (CRYPTO_SUCCESS); -} - static int aes_encrypt_atomic(crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, @@ -842,21 +183,6 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, ASSERT(ciphertext != NULL); - /* - * CTR, CCM, GCM, and GMAC modes do not require that plaintext - * be a multiple of AES block size. - */ - switch (mechanism->cm_type) { - case AES_CTR_MECH_INFO_TYPE: - case AES_CCM_MECH_INFO_TYPE: - case AES_GCM_MECH_INFO_TYPE: - case AES_GMAC_MECH_INFO_TYPE: - break; - default: - if ((plaintext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_DATA_LEN_RANGE); - } - if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS) return (ret); @@ -869,15 +195,11 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, case AES_CCM_MECH_INFO_TYPE: length_needed = plaintext->cd_length + aes_ctx.ac_mac_len; break; - case AES_GMAC_MECH_INFO_TYPE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - zfs_fallthrough; case AES_GCM_MECH_INFO_TYPE: length_needed = plaintext->cd_length + aes_ctx.ac_tag_len; break; default: - length_needed = plaintext->cd_length; + __builtin_unreachable(); } /* return size of buffer needed to store output */ @@ -914,21 +236,13 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, if (ret != CRYPTO_SUCCESS) goto out; ASSERT(aes_ctx.ac_remainder_len == 0); - } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE || - mechanism->cm_type == AES_GMAC_MECH_INFO_TYPE) { + } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) { ret = gcm_encrypt_final((gcm_ctx_t *)&aes_ctx, ciphertext, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); if (ret != CRYPTO_SUCCESS) goto out; ASSERT(aes_ctx.ac_remainder_len == 0); - } else if (mechanism->cm_type == AES_CTR_MECH_INFO_TYPE) { - if (aes_ctx.ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)&aes_ctx, - ciphertext, aes_encrypt_block); - if (ret != CRYPTO_SUCCESS) - goto out; - } } else { ASSERT(aes_ctx.ac_remainder_len == 0); } @@ -947,7 +261,7 @@ aes_encrypt_atomic(crypto_mechanism_t *mechanism, memset(aes_ctx.ac_keysched, 0, aes_ctx.ac_keysched_len); kmem_free(aes_ctx.ac_keysched, aes_ctx.ac_keysched_len); } - if (aes_ctx.ac_flags & (GCM_MODE|GMAC_MODE)) { + if (aes_ctx.ac_flags & GCM_MODE) { gcm_clear_ctx((gcm_ctx_t *)&aes_ctx); } return (ret); @@ -968,21 +282,6 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, ASSERT(plaintext != NULL); - /* - * CCM, GCM, CTR, and GMAC modes do not require that ciphertext - * be a multiple of AES block size. - */ - switch (mechanism->cm_type) { - case AES_CTR_MECH_INFO_TYPE: - case AES_CCM_MECH_INFO_TYPE: - case AES_GCM_MECH_INFO_TYPE: - case AES_GMAC_MECH_INFO_TYPE: - break; - default: - if ((ciphertext->cd_length & (AES_BLOCK_LEN - 1)) != 0) - return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE); - } - if ((ret = aes_check_mech_param(mechanism, NULL)) != CRYPTO_SUCCESS) return (ret); @@ -998,13 +297,8 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, case AES_GCM_MECH_INFO_TYPE: length_needed = ciphertext->cd_length - aes_ctx.ac_tag_len; break; - case AES_GMAC_MECH_INFO_TYPE: - if (plaintext->cd_length != 0) - return (CRYPTO_ARGUMENTS_BAD); - length_needed = 0; - break; default: - length_needed = ciphertext->cd_length; + __builtin_unreachable(); } /* return size of buffer needed to store output */ @@ -1050,8 +344,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, } else { plaintext->cd_length = saved_length; } - } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE || - mechanism->cm_type == AES_GMAC_MECH_INFO_TYPE) { + } else if (mechanism->cm_type == AES_GCM_MECH_INFO_TYPE) { ret = gcm_decrypt_final((gcm_ctx_t *)&aes_ctx, plaintext, AES_BLOCK_LEN, aes_encrypt_block, aes_xor_block); @@ -1063,24 +356,8 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, } else { plaintext->cd_length = saved_length; } - } else if (mechanism->cm_type != AES_CTR_MECH_INFO_TYPE) { - ASSERT(aes_ctx.ac_remainder_len == 0); - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } else { - if (aes_ctx.ac_remainder_len > 0) { - ret = ctr_mode_final((ctr_ctx_t *)&aes_ctx, - plaintext, aes_encrypt_block); - if (ret == CRYPTO_DATA_LEN_RANGE) - ret = CRYPTO_ENCRYPTED_DATA_LEN_RANGE; - if (ret != CRYPTO_SUCCESS) - goto out; - } - if (ciphertext != plaintext) - plaintext->cd_length = - plaintext->cd_offset - saved_offset; - } + } else + __builtin_unreachable(); } else { plaintext->cd_length = saved_length; } @@ -1096,7 +373,7 @@ aes_decrypt_atomic(crypto_mechanism_t *mechanism, if (aes_ctx.ac_pt_buf != NULL) { vmem_free(aes_ctx.ac_pt_buf, aes_ctx.ac_data_len); } - } else if (aes_ctx.ac_flags & (GCM_MODE|GMAC_MODE)) { + } else if (aes_ctx.ac_flags & GCM_MODE) { gcm_clear_ctx((gcm_ctx_t *)&aes_ctx); } @@ -1114,12 +391,8 @@ aes_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, size_t size; int rv; - if (mechanism->cm_type != AES_ECB_MECH_INFO_TYPE && - mechanism->cm_type != AES_CBC_MECH_INFO_TYPE && - mechanism->cm_type != AES_CTR_MECH_INFO_TYPE && - mechanism->cm_type != AES_CCM_MECH_INFO_TYPE && - mechanism->cm_type != AES_GCM_MECH_INFO_TYPE && - mechanism->cm_type != AES_GMAC_MECH_INFO_TYPE) + if (mechanism->cm_type != AES_CCM_MECH_INFO_TYPE && + mechanism->cm_type != AES_GCM_MECH_INFO_TYPE) return (CRYPTO_MECHANISM_INVALID); if ((keysched = aes_alloc_keysched(&size, KM_SLEEP)) == NULL) { @@ -1193,22 +466,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, aes_ctx->ac_keysched = keysched; switch (mechanism->cm_type) { - case AES_CBC_MECH_INFO_TYPE: - rv = cbc_init_ctx((cbc_ctx_t *)aes_ctx, mechanism->cm_param, - mechanism->cm_param_len, AES_BLOCK_LEN, aes_copy_block64); - break; - case AES_CTR_MECH_INFO_TYPE: { - CK_AES_CTR_PARAMS *pp; - - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (CK_AES_CTR_PARAMS)) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - pp = (CK_AES_CTR_PARAMS *)(void *)mechanism->cm_param; - rv = ctr_init_ctx((ctr_ctx_t *)aes_ctx, pp->ulCounterBits, - pp->cb, aes_copy_block); - break; - } case AES_CCM_MECH_INFO_TYPE: if (mechanism->cm_param == NULL || mechanism->cm_param_len != sizeof (CK_AES_CCM_PARAMS)) { @@ -1227,17 +484,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, aes_xor_block); break; - case AES_GMAC_MECH_INFO_TYPE: - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (CK_AES_GMAC_PARAMS)) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - rv = gmac_init_ctx((gcm_ctx_t *)aes_ctx, mechanism->cm_param, - AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, - aes_xor_block); - break; - case AES_ECB_MECH_INFO_TYPE: - aes_ctx->ac_flags |= ECB_MODE; } if (rv != CRYPTO_SUCCESS) { @@ -1249,75 +495,3 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, return (rv); } - -static int -process_gmac_mech(crypto_mechanism_t *mech, crypto_data_t *data, - CK_AES_GCM_PARAMS *gcm_params) -{ - /* LINTED: pointer alignment */ - CK_AES_GMAC_PARAMS *params = (CK_AES_GMAC_PARAMS *)mech->cm_param; - - if (mech->cm_type != AES_GMAC_MECH_INFO_TYPE) - return (CRYPTO_MECHANISM_INVALID); - - if (mech->cm_param_len != sizeof (CK_AES_GMAC_PARAMS)) - return (CRYPTO_MECHANISM_PARAM_INVALID); - - if (params->pIv == NULL) - return (CRYPTO_MECHANISM_PARAM_INVALID); - - gcm_params->pIv = params->pIv; - gcm_params->ulIvLen = AES_GMAC_IV_LEN; - gcm_params->ulTagBits = AES_GMAC_TAG_BITS; - - if (data == NULL) - return (CRYPTO_SUCCESS); - - if (data->cd_format != CRYPTO_DATA_RAW) - return (CRYPTO_ARGUMENTS_BAD); - - gcm_params->pAAD = (uchar_t *)data->cd_raw.iov_base; - gcm_params->ulAADLen = data->cd_length; - return (CRYPTO_SUCCESS); -} - -static int -aes_mac_atomic(crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, - crypto_spi_ctx_template_t template) -{ - CK_AES_GCM_PARAMS gcm_params; - crypto_mechanism_t gcm_mech; - int rv; - - if ((rv = process_gmac_mech(mechanism, data, &gcm_params)) - != CRYPTO_SUCCESS) - return (rv); - - gcm_mech.cm_type = AES_GCM_MECH_INFO_TYPE; - gcm_mech.cm_param_len = sizeof (CK_AES_GCM_PARAMS); - gcm_mech.cm_param = (char *)&gcm_params; - - return (aes_encrypt_atomic(&gcm_mech, - key, &null_crypto_data, mac, template)); -} - -static int -aes_mac_verify_atomic(crypto_mechanism_t *mechanism, crypto_key_t *key, - crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t template) -{ - CK_AES_GCM_PARAMS gcm_params; - crypto_mechanism_t gcm_mech; - int rv; - - if ((rv = process_gmac_mech(mechanism, data, &gcm_params)) - != CRYPTO_SUCCESS) - return (rv); - - gcm_mech.cm_type = AES_GCM_MECH_INFO_TYPE; - gcm_mech.cm_param_len = sizeof (CK_AES_GCM_PARAMS); - gcm_mech.cm_param = (char *)&gcm_params; - - return (aes_decrypt_atomic(&gcm_mech, - key, mac, &null_crypto_data, template)); -} diff --git a/sys/contrib/subrepo-openzfs/module/icp/io/sha2_mod.c b/sys/contrib/subrepo-openzfs/module/icp/io/sha2_mod.c index f068951b07f5..e515dabc9dda 100644 --- a/sys/contrib/subrepo-openzfs/module/icp/io/sha2_mod.c +++ b/sys/contrib/subrepo-openzfs/module/icp/io/sha2_mod.c @@ -60,48 +60,9 @@ * Mechanism info structure passed to KCF during registration. */ static const crypto_mech_info_t sha2_mech_info_tab[] = { - /* SHA256 */ - {SUN_CKM_SHA256, SHA256_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, - /* SHA256-HMAC */ - {SUN_CKM_SHA256_HMAC, SHA256_HMAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA256-HMAC GENERAL */ - {SUN_CKM_SHA256_HMAC_GENERAL, SHA256_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA384 */ - {SUN_CKM_SHA384, SHA384_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, - /* SHA384-HMAC */ - {SUN_CKM_SHA384_HMAC, SHA384_HMAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA384-HMAC GENERAL */ - {SUN_CKM_SHA384_HMAC_GENERAL, SHA384_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA512 */ - {SUN_CKM_SHA512, SHA512_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, /* SHA512-HMAC */ {SUN_CKM_SHA512_HMAC, SHA512_HMAC_MECH_INFO_TYPE, CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - /* SHA512-HMAC GENERAL */ - {SUN_CKM_SHA512_HMAC_GENERAL, SHA512_HMAC_GEN_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, -}; - -static int sha2_digest_init(crypto_ctx_t *, crypto_mechanism_t *); -static int sha2_digest(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int sha2_digest_update(crypto_ctx_t *, crypto_data_t *); -static int sha2_digest_final(crypto_ctx_t *, crypto_data_t *); -static int sha2_digest_atomic(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); - -static const crypto_digest_ops_t sha2_digest_ops = { - .digest_init = sha2_digest_init, - .digest = sha2_digest, - .digest_update = sha2_digest_update, - .digest_final = sha2_digest_final, - .digest_atomic = sha2_digest_atomic }; static int sha2_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, @@ -132,7 +93,6 @@ static const crypto_ctx_ops_t sha2_ctx_ops = { }; static const crypto_ops_t sha2_crypto_ops = { - &sha2_digest_ops, NULL, &sha2_mac_ops, &sha2_ctx_ops, @@ -184,27 +144,6 @@ sha2_mod_fini(void) return (ret); } -/* - * KCF software provider digest entry points. - */ - -static int -sha2_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism) -{ - - /* - * Allocate and initialize SHA2 context. - */ - ctx->cc_provider_private = kmem_alloc(sizeof (sha2_ctx_t), KM_SLEEP); - if (ctx->cc_provider_private == NULL) - return (CRYPTO_HOST_MEMORY); - - PROV_SHA2_CTX(ctx)->sc_mech_type = mechanism->cm_type; - SHA2Init(mechanism->cm_type, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - - return (CRYPTO_SUCCESS); -} - /* * Helper SHA2 digest update function for uio data. */ @@ -297,10 +236,8 @@ sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, * The computed SHA2 digest will fit in the current * iovec. */ - if (((sha2_ctx->algotype <= SHA256_HMAC_GEN_MECH_INFO_TYPE) && - (digest_len != SHA256_DIGEST_LENGTH)) || - ((sha2_ctx->algotype > SHA256_HMAC_GEN_MECH_INFO_TYPE) && - (digest_len != SHA512_DIGEST_LENGTH))) { + ASSERT3U(sha2_ctx->algotype, ==, SHA512_HMAC_MECH_INFO_TYPE); + if (digest_len != SHA512_DIGEST_LENGTH) { /* * The caller requested a short digest. Digest * into a scratch buffer and return to @@ -360,246 +297,6 @@ sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, return (CRYPTO_SUCCESS); } -static int -sha2_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - uint_t sha_digest_len; - - ASSERT(ctx->cc_provider_private != NULL); - - switch (PROV_SHA2_CTX(ctx)->sc_mech_type) { - case SHA256_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_MECH_INFO_TYPE: - sha_digest_len = SHA384_DIGEST_LENGTH; - break; - case SHA512_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following cases. - */ - if ((digest->cd_length == 0) || - (digest->cd_length < sha_digest_len)) { - digest->cd_length = sha_digest_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - /* - * Do the SHA2 update on the specified input data. - */ - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret != CRYPTO_SUCCESS) { - /* the update failed, free context and bail */ - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - digest->cd_length = 0; - return (ret); - } - - /* - * Do a SHA2 final, must be done separately since the digest - * type can be different than the input data type. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - digest, sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* all done, free context and return */ - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - return (ret); -} - -static int -sha2_digest_update(crypto_ctx_t *ctx, crypto_data_t *data) -{ - int ret = CRYPTO_SUCCESS; - - ASSERT(ctx->cc_provider_private != NULL); - - /* - * Do the SHA2 update on the specified input data. - */ - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - return (ret); -} - -static int -sha2_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - uint_t sha_digest_len; - - ASSERT(ctx->cc_provider_private != NULL); - - switch (PROV_SHA2_CTX(ctx)->sc_mech_type) { - case SHA256_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_MECH_INFO_TYPE: - sha_digest_len = SHA384_DIGEST_LENGTH; - break; - case SHA512_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } - - /* - * We need to just return the length needed to store the output. - * We should not destroy the context for the following cases. - */ - if ((digest->cd_length == 0) || - (digest->cd_length < sha_digest_len)) { - digest->cd_length = sha_digest_len; - return (CRYPTO_BUFFER_TOO_SMALL); - } - - /* - * Do a SHA2 final. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &PROV_SHA2_CTX(ctx)->sc_sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&PROV_SHA2_CTX(ctx)->sc_sha2_ctx, - digest, sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* all done, free context and return */ - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - kmem_free(ctx->cc_provider_private, sizeof (sha2_ctx_t)); - ctx->cc_provider_private = NULL; - - return (ret); -} - -static int -sha2_digest_atomic(crypto_mechanism_t *mechanism, crypto_data_t *data, - crypto_data_t *digest) -{ - int ret = CRYPTO_SUCCESS; - SHA2_CTX sha2_ctx; - uint32_t sha_digest_len; - - /* - * Do the SHA inits. - */ - - SHA2Init(mechanism->cm_type, &sha2_ctx); - - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Update(&sha2_ctx, (uint8_t *)data-> - cd_raw.iov_base + data->cd_offset, data->cd_length); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_update_uio(&sha2_ctx, data); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - /* - * Do the SHA updates on the specified input data. - */ - - if (ret != CRYPTO_SUCCESS) { - /* the update failed, bail */ - digest->cd_length = 0; - return (ret); - } - - if (mechanism->cm_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) - sha_digest_len = SHA256_DIGEST_LENGTH; - else - sha_digest_len = SHA512_DIGEST_LENGTH; - - /* - * Do a SHA2 final, must be done separately since the digest - * type can be different than the input data type. - */ - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SHA2Final((unsigned char *)digest->cd_raw.iov_base + - digest->cd_offset, &sha2_ctx); - break; - case CRYPTO_DATA_UIO: - ret = sha2_digest_final_uio(&sha2_ctx, digest, - sha_digest_len, NULL); - break; - default: - ret = CRYPTO_ARGUMENTS_BAD; - } - - if (ret == CRYPTO_SUCCESS) - digest->cd_length = sha_digest_len; - else - digest->cd_length = 0; - - return (ret); -} - /* * KCF software provider mac entry points. * @@ -635,13 +332,9 @@ sha2_mac_init_ctx(sha2_hmac_ctx_t *ctx, void *keyval, uint_t length_in_bytes) int i, block_size, blocks_per_int64; /* Determine the block size */ - if (ctx->hc_mech_type <= SHA256_HMAC_GEN_MECH_INFO_TYPE) { - block_size = SHA256_HMAC_BLOCK_SIZE; - blocks_per_int64 = SHA256_HMAC_BLOCK_SIZE / sizeof (uint64_t); - } else { - block_size = SHA512_HMAC_BLOCK_SIZE; - blocks_per_int64 = SHA512_HMAC_BLOCK_SIZE / sizeof (uint64_t); - } + ASSERT3U(ctx->hc_mech_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + block_size = SHA512_HMAC_BLOCK_SIZE; + blocks_per_int64 = SHA512_HMAC_BLOCK_SIZE / sizeof (uint64_t); (void) memset(ipad, 0, block_size); (void) memset(opad, 0, block_size); @@ -683,15 +376,7 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -731,22 +416,6 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, } } - /* - * Get the mechanism parameters, if applicable. - */ - if (mechanism->cm_type % 3 == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - } else { - PROV_SHA2_GET_DIGEST_LEN(mechanism, - PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len); - if (PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len > - sha_digest_len) - ret = CRYPTO_MECHANISM_PARAM_INVALID; - } - } - if (ret != CRYPTO_SUCCESS) { memset(ctx->cc_provider_private, 0, sizeof (sha2_hmac_ctx_t)); kmem_free(ctx->cc_provider_private, sizeof (sha2_hmac_ctx_t)); @@ -795,24 +464,9 @@ sha2_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac) /* Set the digest lengths to values appropriate to the mechanism */ switch (PROV_SHA2_HMAC_CTX(ctx)->hc_mech_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA384_DIGEST_LENGTH; - break; case SHA512_HMAC_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; break; - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - digest_len = PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len; - break; - case SHA384_HMAC_GEN_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA512_DIGEST_LENGTH; - digest_len = PROV_SHA2_HMAC_CTX(ctx)->hc_digest_len; - break; default: return (CRYPTO_ARGUMENTS_BAD); } @@ -912,15 +566,7 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -951,20 +597,6 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, } } - /* get the mechanism parameters, if applicable */ - if ((mechanism->cm_type % 3) == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - PROV_SHA2_GET_DIGEST_LEN(mechanism, digest_len); - if (digest_len > sha_digest_len) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - } - /* do a SHA2 update of the inner context using the specified data */ SHA2_MAC_UPDATE(data, sha2_hmac_ctx, ret); if (ret != CRYPTO_SUCCESS) @@ -979,16 +611,9 @@ sha2_mac_atomic(crypto_mechanism_t *mechanism, /* * Do an SHA2 update on the outer context, feeding the inner * digest as data. - * - * HMAC-SHA384 needs special handling as the outer hash needs only 48 - * bytes of the inner hash value. */ - if (mechanism->cm_type == SHA384_HMAC_MECH_INFO_TYPE || - mechanism->cm_type == SHA384_HMAC_GEN_MECH_INFO_TYPE) - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, - SHA384_DIGEST_LENGTH); - else - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); + ASSERT3U(mechanism->cm_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); /* * Do a SHA2 final on the outer context, storing the computed @@ -1044,15 +669,7 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -1083,20 +700,6 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, } } - /* get the mechanism parameters, if applicable */ - if (mechanism->cm_type % 3 == 2) { - if (mechanism->cm_param == NULL || - mechanism->cm_param_len != sizeof (ulong_t)) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - PROV_SHA2_GET_DIGEST_LEN(mechanism, digest_len); - if (digest_len > sha_digest_len) { - ret = CRYPTO_MECHANISM_PARAM_INVALID; - goto bail; - } - } - if (mac->cd_length != digest_len) { ret = CRYPTO_INVALID_MAC; goto bail; @@ -1114,16 +717,9 @@ sha2_mac_verify_atomic(crypto_mechanism_t *mechanism, /* * Do an SHA2 update on the outer context, feeding the inner * digest as data. - * - * HMAC-SHA384 needs special handling as the outer hash needs only 48 - * bytes of the inner hash value. */ - if (mechanism->cm_type == SHA384_HMAC_MECH_INFO_TYPE || - mechanism->cm_type == SHA384_HMAC_GEN_MECH_INFO_TYPE) - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, - SHA384_DIGEST_LENGTH); - else - SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); + ASSERT3U(mechanism->cm_type, ==, SHA512_HMAC_MECH_INFO_TYPE); + SHA2Update(&sha2_hmac_ctx.hc_ocontext, digest, sha_digest_len); /* * Do a SHA2 final on the outer context, storing the computed @@ -1215,15 +811,7 @@ sha2_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, * mechanism */ switch (mechanism->cm_type) { - case SHA256_HMAC_MECH_INFO_TYPE: - case SHA256_HMAC_GEN_MECH_INFO_TYPE: - sha_digest_len = SHA256_DIGEST_LENGTH; - sha_hmac_block_size = SHA256_HMAC_BLOCK_SIZE; - break; - case SHA384_HMAC_MECH_INFO_TYPE: - case SHA384_HMAC_GEN_MECH_INFO_TYPE: case SHA512_HMAC_MECH_INFO_TYPE: - case SHA512_HMAC_GEN_MECH_INFO_TYPE: sha_digest_len = SHA512_DIGEST_LENGTH; sha_hmac_block_size = SHA512_HMAC_BLOCK_SIZE; break; @@ -1272,17 +860,9 @@ sha2_free_context(crypto_ctx_t *ctx) if (ctx->cc_provider_private == NULL) return (CRYPTO_SUCCESS); - /* - * We have to free either SHA2 or SHA2-HMAC contexts, which - * have different lengths. - * - * Note: Below is dependent on the mechanism ordering. - */ - - if (PROV_SHA2_CTX(ctx)->sc_mech_type % 3 == 0) - ctx_len = sizeof (sha2_ctx_t); - else - ctx_len = sizeof (sha2_hmac_ctx_t); + ASSERT3U(PROV_SHA2_CTX(ctx)->sc_mech_type, ==, + SHA512_HMAC_MECH_INFO_TYPE); + ctx_len = sizeof (sha2_hmac_ctx_t); memset(ctx->cc_provider_private, 0, ctx_len); kmem_free(ctx->cc_provider_private, ctx_len); diff --git a/sys/contrib/subrepo-openzfs/module/icp/io/skein_mod.c b/sys/contrib/subrepo-openzfs/module/icp/io/skein_mod.c deleted file mode 100644 index 221e1debd45b..000000000000 --- a/sys/contrib/subrepo-openzfs/module/icp/io/skein_mod.c +++ /dev/null @@ -1,656 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2013 Saso Kiselkov. All rights reserved. - */ - -#include -#include -#include -#include -#define SKEIN_MODULE_IMPL -#include - -static const crypto_mech_info_t skein_mech_info_tab[] = { - {CKM_SKEIN_256, SKEIN_256_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, - {CKM_SKEIN_256_MAC, SKEIN_256_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN_512, SKEIN_512_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, - {CKM_SKEIN_512_MAC, SKEIN_512_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, - {CKM_SKEIN1024, SKEIN1024_MECH_INFO_TYPE, - CRYPTO_FG_DIGEST | CRYPTO_FG_DIGEST_ATOMIC}, - {CKM_SKEIN1024_MAC, SKEIN1024_MAC_MECH_INFO_TYPE, - CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC}, -}; - -static int skein_digest_init(crypto_ctx_t *, crypto_mechanism_t *); -static int skein_digest(crypto_ctx_t *, crypto_data_t *, crypto_data_t *); -static int skein_update(crypto_ctx_t *, crypto_data_t *); -static int skein_final(crypto_ctx_t *, crypto_data_t *); -static int skein_digest_atomic(crypto_mechanism_t *, crypto_data_t *, - crypto_data_t *); - -static const crypto_digest_ops_t skein_digest_ops = { - .digest_init = skein_digest_init, - .digest = skein_digest, - .digest_update = skein_update, - .digest_final = skein_final, - .digest_atomic = skein_digest_atomic -}; - -static int skein_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t); -static int skein_mac_atomic(crypto_mechanism_t *, crypto_key_t *, - crypto_data_t *, crypto_data_t *, crypto_spi_ctx_template_t); - -static const crypto_mac_ops_t skein_mac_ops = { - .mac_init = skein_mac_init, - .mac = NULL, - .mac_update = skein_update, /* using regular digest update is OK here */ - .mac_final = skein_final, /* using regular digest final is OK here */ - .mac_atomic = skein_mac_atomic, - .mac_verify_atomic = NULL -}; - -static int skein_create_ctx_template(crypto_mechanism_t *, crypto_key_t *, - crypto_spi_ctx_template_t *, size_t *); -static int skein_free_context(crypto_ctx_t *); - -static const crypto_ctx_ops_t skein_ctx_ops = { - .create_ctx_template = skein_create_ctx_template, - .free_context = skein_free_context -}; - -static const crypto_ops_t skein_crypto_ops = { - &skein_digest_ops, - NULL, - &skein_mac_ops, - &skein_ctx_ops, -}; - -static const crypto_provider_info_t skein_prov_info = { - "Skein Software Provider", - &skein_crypto_ops, - sizeof (skein_mech_info_tab) / sizeof (crypto_mech_info_t), - skein_mech_info_tab -}; - -static crypto_kcf_provider_handle_t skein_prov_handle = 0; - -typedef struct skein_ctx { - skein_mech_type_t sc_mech_type; - size_t sc_digest_bitlen; - /*LINTED(E_ANONYMOUS_UNION_DECL)*/ - union { - Skein_256_Ctxt_t sc_256; - Skein_512_Ctxt_t sc_512; - Skein1024_Ctxt_t sc_1024; - }; -} skein_ctx_t; -#define SKEIN_CTX(_ctx_) ((skein_ctx_t *)((_ctx_)->cc_provider_private)) -#define SKEIN_CTX_LVALUE(_ctx_) (_ctx_)->cc_provider_private -#define SKEIN_OP(_skein_ctx, _op, ...) \ - do { \ - skein_ctx_t *sc = (_skein_ctx); \ - switch (sc->sc_mech_type) { \ - case SKEIN_256_MECH_INFO_TYPE: \ - case SKEIN_256_MAC_MECH_INFO_TYPE: \ - (void) Skein_256_ ## _op(&sc->sc_256, __VA_ARGS__);\ - break; \ - case SKEIN_512_MECH_INFO_TYPE: \ - case SKEIN_512_MAC_MECH_INFO_TYPE: \ - (void) Skein_512_ ## _op(&sc->sc_512, __VA_ARGS__);\ - break; \ - case SKEIN1024_MECH_INFO_TYPE: \ - case SKEIN1024_MAC_MECH_INFO_TYPE: \ - (void) Skein1024_ ## _op(&sc->sc_1024, __VA_ARGS__);\ - break; \ - } \ - } while (0) - -static int -skein_get_digest_bitlen(const crypto_mechanism_t *mechanism, size_t *result) -{ - if (mechanism->cm_param != NULL) { - /*LINTED(E_BAD_PTR_CAST_ALIGN)*/ - skein_param_t *param = (skein_param_t *)mechanism->cm_param; - - if (mechanism->cm_param_len != sizeof (*param) || - param->sp_digest_bitlen == 0) { - return (CRYPTO_MECHANISM_PARAM_INVALID); - } - *result = param->sp_digest_bitlen; - } else { - switch (mechanism->cm_type) { - case SKEIN_256_MECH_INFO_TYPE: - *result = 256; - break; - case SKEIN_512_MECH_INFO_TYPE: - *result = 512; - break; - case SKEIN1024_MECH_INFO_TYPE: - *result = 1024; - break; - default: - return (CRYPTO_MECHANISM_INVALID); - } - } - return (CRYPTO_SUCCESS); -} - -int -skein_mod_init(void) -{ - /* - * Try to register with KCF - failure shouldn't unload us, since we - * still may want to continue providing misc/skein functionality. - */ - (void) crypto_register_provider(&skein_prov_info, &skein_prov_handle); - - return (0); -} - -int -skein_mod_fini(void) -{ - int ret = 0; - - if (skein_prov_handle != 0) { - if ((ret = crypto_unregister_provider(skein_prov_handle)) != - CRYPTO_SUCCESS) { - cmn_err(CE_WARN, - "skein _fini: crypto_unregister_provider() " - "failed (0x%x)", ret); - return (EBUSY); - } - skein_prov_handle = 0; - } - - return (0); -} - -/* - * General Skein hashing helper functions. - */ - -/* - * Performs an Update on a context with uio input data. - */ -static int -skein_digest_update_uio(skein_ctx_t *ctx, const crypto_data_t *data) -{ - off_t offset = data->cd_offset; - size_t length = data->cd_length; - uint_t vec_idx = 0; - size_t cur_len; - zfs_uio_t *uio = data->cd_uio; - - /* we support only kernel buffer */ - if (zfs_uio_segflg(uio) != UIO_SYSSPACE) - return (CRYPTO_ARGUMENTS_BAD); - - /* - * Jump to the first iovec containing data to be - * digested. - */ - offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == zfs_uio_iovcnt(uio)) { - /* - * The caller specified an offset that is larger than the - * total size of the buffers it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - - /* - * Now do the digesting on the iovecs. - */ - while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { - cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, length); - SKEIN_OP(ctx, Update, (uint8_t *)zfs_uio_iovbase(uio, vec_idx) - + offset, cur_len); - length -= cur_len; - vec_idx++; - offset = 0; - } - - if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { - /* - * The end of the specified iovec's was reached but - * the length requested could not be processed, i.e. - * The caller requested to digest more data than it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - - return (CRYPTO_SUCCESS); -} - -/* - * Performs a Final on a context and writes to a uio digest output. - */ -static int -skein_digest_final_uio(skein_ctx_t *ctx, crypto_data_t *digest) -{ - off_t offset = digest->cd_offset; - uint_t vec_idx = 0; - zfs_uio_t *uio = digest->cd_uio; - - /* we support only kernel buffer */ - if (zfs_uio_segflg(uio) != UIO_SYSSPACE) - return (CRYPTO_ARGUMENTS_BAD); - - /* - * Jump to the first iovec containing ptr to the digest to be returned. - */ - offset = zfs_uio_index_at_offset(uio, offset, &vec_idx); - if (vec_idx == zfs_uio_iovcnt(uio)) { - /* - * The caller specified an offset that is larger than the - * total size of the buffers it provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - if (offset + CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen) <= - zfs_uio_iovlen(uio, vec_idx)) { - /* The computed digest will fit in the current iovec. */ - SKEIN_OP(ctx, Final, - (uchar_t *)zfs_uio_iovbase(uio, vec_idx) + offset); - } else { - uint8_t *digest_tmp; - off_t scratch_offset = 0; - size_t length = CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen); - size_t cur_len; - - digest_tmp = kmem_alloc(CRYPTO_BITS2BYTES( - ctx->sc_digest_bitlen), KM_SLEEP); - if (digest_tmp == NULL) - return (CRYPTO_HOST_MEMORY); - SKEIN_OP(ctx, Final, digest_tmp); - while (vec_idx < zfs_uio_iovcnt(uio) && length > 0) { - cur_len = MIN(zfs_uio_iovlen(uio, vec_idx) - offset, - length); - memcpy(zfs_uio_iovbase(uio, vec_idx) + offset, - digest_tmp + scratch_offset, cur_len); - - length -= cur_len; - vec_idx++; - scratch_offset += cur_len; - offset = 0; - } - kmem_free(digest_tmp, CRYPTO_BITS2BYTES(ctx->sc_digest_bitlen)); - - if (vec_idx == zfs_uio_iovcnt(uio) && length > 0) { - /* - * The end of the specified iovec's was reached but - * the length requested could not be processed, i.e. - * The caller requested to digest more data than it - * provided. - */ - return (CRYPTO_DATA_LEN_RANGE); - } - } - - return (CRYPTO_SUCCESS); -} - -/* - * KCF software provider digest entry points. - */ - -/* - * Initializes a skein digest context to the configuration in `mechanism'. - * The mechanism cm_type must be one of SKEIN_*_MECH_INFO_TYPE. The cm_param - * field may contain a skein_param_t structure indicating the length of the - * digest the algorithm should produce. Otherwise the default output lengths - * are applied (32 bytes for Skein-256, 64 bytes for Skein-512 and 128 bytes - * for Skein-1024). - */ -static int -skein_digest_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism) -{ - int error = CRYPTO_SUCCESS; - - if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - - SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), KM_SLEEP); - if (SKEIN_CTX(ctx) == NULL) - return (CRYPTO_HOST_MEMORY); - - SKEIN_CTX(ctx)->sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, - &SKEIN_CTX(ctx)->sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - goto errout; - SKEIN_OP(SKEIN_CTX(ctx), Init, SKEIN_CTX(ctx)->sc_digest_bitlen); - - return (CRYPTO_SUCCESS); -errout: - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - return (error); -} - -/* - * Executes a skein_update and skein_digest on a pre-initialized crypto - * context in a single step. See the documentation to these functions to - * see what to pass here. - */ -static int -skein_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - if (digest->cd_length < - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - return (CRYPTO_BUFFER_TOO_SMALL); - } - - error = skein_update(ctx, data); - if (error != CRYPTO_SUCCESS) { - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - digest->cd_length = 0; - return (error); - } - error = skein_final(ctx, digest); - - return (error); -} - -/* - * Performs a skein Update with the input message in `data' (successive calls - * can push more data). This is used both for digest and MAC operation. - * Supported input data formats are raw, uio and mblk. - */ -static int -skein_update(crypto_ctx_t *ctx, crypto_data_t *data) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - switch (data->cd_format) { - case CRYPTO_DATA_RAW: - SKEIN_OP(SKEIN_CTX(ctx), Update, - (uint8_t *)data->cd_raw.iov_base + data->cd_offset, - data->cd_length); - break; - case CRYPTO_DATA_UIO: - error = skein_digest_update_uio(SKEIN_CTX(ctx), data); - break; - default: - error = CRYPTO_ARGUMENTS_BAD; - } - - return (error); -} - -/* - * Performs a skein Final, writing the output to `digest'. This is used both - * for digest and MAC operation. - * Supported output digest formats are raw, uio and mblk. - */ -static int -skein_final_nofree(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int error = CRYPTO_SUCCESS; - - ASSERT(SKEIN_CTX(ctx) != NULL); - - if (digest->cd_length < - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen)) { - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - return (CRYPTO_BUFFER_TOO_SMALL); - } - - switch (digest->cd_format) { - case CRYPTO_DATA_RAW: - SKEIN_OP(SKEIN_CTX(ctx), Final, - (uint8_t *)digest->cd_raw.iov_base + digest->cd_offset); - break; - case CRYPTO_DATA_UIO: - error = skein_digest_final_uio(SKEIN_CTX(ctx), digest); - break; - default: - error = CRYPTO_ARGUMENTS_BAD; - } - - if (error == CRYPTO_SUCCESS) - digest->cd_length = - CRYPTO_BITS2BYTES(SKEIN_CTX(ctx)->sc_digest_bitlen); - else - digest->cd_length = 0; - - return (error); -} - -static int -skein_final(crypto_ctx_t *ctx, crypto_data_t *digest) -{ - int error = skein_final_nofree(ctx, digest); - - if (error == CRYPTO_BUFFER_TOO_SMALL) - return (error); - - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*(SKEIN_CTX(ctx)))); - SKEIN_CTX_LVALUE(ctx) = NULL; - - return (error); -} - -/* - * Performs a full skein digest computation in a single call, configuring the - * algorithm according to `mechanism', reading the input to be digested from - * `data' and writing the output to `digest'. - * Supported input/output formats are raw, uio and mblk. - */ -static int -skein_digest_atomic(crypto_mechanism_t *mechanism, crypto_data_t *data, - crypto_data_t *digest) -{ - int error; - skein_ctx_t skein_ctx; - crypto_ctx_t ctx; - SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; - - /* Init */ - if (!VALID_SKEIN_DIGEST_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - skein_ctx.sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, &skein_ctx.sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - goto out; - SKEIN_OP(&skein_ctx, Init, skein_ctx.sc_digest_bitlen); - - if ((error = skein_update(&ctx, data)) != CRYPTO_SUCCESS) - goto out; - if ((error = skein_final_nofree(&ctx, data)) != CRYPTO_SUCCESS) - goto out; - -out: - if (error == CRYPTO_SUCCESS) - digest->cd_length = - CRYPTO_BITS2BYTES(skein_ctx.sc_digest_bitlen); - else - digest->cd_length = 0; - memset(&skein_ctx, 0, sizeof (skein_ctx)); - - return (error); -} - -/* - * Helper function that builds a Skein MAC context from the provided - * mechanism and key. - */ -static int -skein_mac_ctx_build(skein_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key) -{ - int error; - - if (!VALID_SKEIN_MAC_MECH(mechanism->cm_type)) - return (CRYPTO_MECHANISM_INVALID); - ctx->sc_mech_type = mechanism->cm_type; - error = skein_get_digest_bitlen(mechanism, &ctx->sc_digest_bitlen); - if (error != CRYPTO_SUCCESS) - return (error); - SKEIN_OP(ctx, InitExt, ctx->sc_digest_bitlen, 0, key->ck_data, - CRYPTO_BITS2BYTES(key->ck_length)); - - return (CRYPTO_SUCCESS); -} - -/* - * KCF software provide mac entry points. - */ -/* - * Initializes a skein MAC context. You may pass a ctx_template, in which - * case the template will be reused to make initialization more efficient. - * Otherwise a new context will be constructed. The mechanism cm_type must - * be one of SKEIN_*_MAC_MECH_INFO_TYPE. Same as in skein_digest_init, you - * may pass a skein_param_t in cm_param to configure the length of the - * digest. The key must be in raw format. - */ -static int -skein_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_spi_ctx_template_t ctx_template) -{ - int error; - - SKEIN_CTX_LVALUE(ctx) = kmem_alloc(sizeof (*SKEIN_CTX(ctx)), KM_SLEEP); - if (SKEIN_CTX(ctx) == NULL) - return (CRYPTO_HOST_MEMORY); - - if (ctx_template != NULL) { - memcpy(SKEIN_CTX(ctx), ctx_template, - sizeof (*SKEIN_CTX(ctx))); - } else { - error = skein_mac_ctx_build(SKEIN_CTX(ctx), mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - } - - return (CRYPTO_SUCCESS); -errout: - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - return (error); -} - -/* - * The MAC update and final calls are reused from the regular digest code. - */ - -/* - * Same as skein_digest_atomic, performs an atomic Skein MAC operation in - * one step. All the same properties apply to the arguments of this - * function as to those of the partial operations above. - */ -static int -skein_mac_atomic(crypto_mechanism_t *mechanism, - crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, - crypto_spi_ctx_template_t ctx_template) -{ - /* faux crypto context just for skein_digest_{update,final} */ - int error; - crypto_ctx_t ctx; - skein_ctx_t skein_ctx; - SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; - - if (ctx_template != NULL) { - memcpy(&skein_ctx, ctx_template, sizeof (skein_ctx)); - } else { - error = skein_mac_ctx_build(&skein_ctx, mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - } - - if ((error = skein_update(&ctx, data)) != CRYPTO_SUCCESS) - goto errout; - if ((error = skein_final_nofree(&ctx, mac)) != CRYPTO_SUCCESS) - goto errout; - - return (CRYPTO_SUCCESS); -errout: - memset(&skein_ctx, 0, sizeof (skein_ctx)); - return (error); -} - -/* - * KCF software provider context management entry points. - */ - -/* - * Constructs a context template for the Skein MAC algorithm. The same - * properties apply to the arguments of this function as to those of - * skein_mac_init. - */ -static int -skein_create_ctx_template(crypto_mechanism_t *mechanism, crypto_key_t *key, - crypto_spi_ctx_template_t *ctx_template, size_t *ctx_template_size) -{ - int error; - skein_ctx_t *ctx_tmpl; - - ctx_tmpl = kmem_alloc(sizeof (*ctx_tmpl), KM_SLEEP); - if (ctx_tmpl == NULL) - return (CRYPTO_HOST_MEMORY); - error = skein_mac_ctx_build(ctx_tmpl, mechanism, key); - if (error != CRYPTO_SUCCESS) - goto errout; - *ctx_template = ctx_tmpl; - *ctx_template_size = sizeof (*ctx_tmpl); - - return (CRYPTO_SUCCESS); -errout: - memset(ctx_tmpl, 0, sizeof (*ctx_tmpl)); - kmem_free(ctx_tmpl, sizeof (*ctx_tmpl)); - return (error); -} - -/* - * Frees a skein context in a parent crypto context. - */ -static int -skein_free_context(crypto_ctx_t *ctx) -{ - if (SKEIN_CTX(ctx) != NULL) { - memset(SKEIN_CTX(ctx), 0, sizeof (*SKEIN_CTX(ctx))); - kmem_free(SKEIN_CTX(ctx), sizeof (*SKEIN_CTX(ctx))); - SKEIN_CTX_LVALUE(ctx) = NULL; - } - - return (CRYPTO_SUCCESS); -} diff --git a/sys/contrib/subrepo-openzfs/module/os/freebsd/spl/spl_uio.c b/sys/contrib/subrepo-openzfs/module/os/freebsd/spl/spl_uio.c index 3a6924877bbc..17886cbeb501 100644 --- a/sys/contrib/subrepo-openzfs/module/os/freebsd/spl/spl_uio.c +++ b/sys/contrib/subrepo-openzfs/module/os/freebsd/spl/spl_uio.c @@ -45,6 +45,16 @@ #include #include +static void +zfs_freeuio(struct uio *uio) +{ +#if __FreeBSD_version > 1500013 + freeuio(uio); +#else + free(uio, M_IOV); +#endif +} + int zfs_uiomove(void *cp, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio) { @@ -77,7 +87,7 @@ zfs_uiocopy(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, size_t *cbytes) error = vn_io_fault_uiomove(p, n, uio_clone); *cbytes = zfs_uio_resid(uio) - uio_clone->uio_resid; if (uio_clone != &small_uio_clone) - freeuio(uio_clone); + zfs_freeuio(uio_clone); return (error); } diff --git a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/arc_os.c b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/arc_os.c index 478b74828c65..e271d3bf98a0 100644 --- a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/arc_os.c +++ b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/arc_os.c @@ -91,15 +91,15 @@ arc_available_memory(void) } #if !defined(UMA_MD_SMALL_ALLOC) && !defined(UMA_USE_DMAP) /* - * If we're on an i386 platform, it's possible that we'll exhaust the - * kernel heap space before we ever run out of available physical - * memory. Most checks of the size of the heap_area compare against - * tune.t_minarmem, which is the minimum available real memory that we - * can have in the system. However, this is generally fixed at 25 pages - * which is so low that it's useless. In this comparison, we seek to - * calculate the total heap-size, and reclaim if more than 3/4ths of the - * heap is allocated. (Or, in the calculation, if less than 1/4th is - * free) + * If we're on a platform without a direct map, it's possible that we'll + * exhaust the kernel heap space before we ever run out of available + * physical memory. Most checks of the size of the heap_area compare + * against tune.t_minarmem, which is the minimum available real memory + * that we can have in the system. However, this is generally fixed at + * 25 pages which is so low that it's useless. In this comparison, we + * seek to calculate the total heap-size, and reclaim if more than + * 3/4ths of the heap is allocated. (Or, in the calculation, if less + * than 1/4th is free) */ n = uma_avail() - (long)(uma_limit() / 4); if (n < lowest) { diff --git a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/kmod_core.c b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/kmod_core.c index bf891b4cd101..58445a3e32f6 100644 --- a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/kmod_core.c +++ b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/kmod_core.c @@ -111,6 +111,7 @@ static int zfs__fini(void); static void zfs_shutdown(void *, int); static eventhandler_tag zfs_shutdown_event_tag; +static eventhandler_tag zfs_mountroot_event_tag; #define ZFS_MIN_KSTACK_PAGES 4 @@ -305,16 +306,25 @@ zfs_modevent(module_t mod, int type, void *unused __unused) switch (type) { case MOD_LOAD: err = zfs__init(); - if (err == 0) + if (err == 0) { zfs_shutdown_event_tag = EVENTHANDLER_REGISTER( shutdown_post_sync, zfs_shutdown, NULL, SHUTDOWN_PRI_FIRST); + zfs_mountroot_event_tag = EVENTHANDLER_REGISTER( + mountroot, spa_boot_init, NULL, + SI_ORDER_ANY); + } return (err); case MOD_UNLOAD: err = zfs__fini(); - if (err == 0 && zfs_shutdown_event_tag != NULL) - EVENTHANDLER_DEREGISTER(shutdown_post_sync, - zfs_shutdown_event_tag); + if (err == 0) { + if (zfs_shutdown_event_tag != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, + zfs_shutdown_event_tag); + if (zfs_mountroot_event_tag != NULL) + EVENTHANDLER_DEREGISTER(mountroot, + zfs_mountroot_event_tag); + } return (err); case MOD_SHUTDOWN: return (0); @@ -330,9 +340,6 @@ static moduledata_t zfs_mod = { 0 }; -#ifdef _KERNEL -EVENTHANDLER_DEFINE(mountroot, spa_boot_init, NULL, 0); -#endif FEATURE(zfs, "OpenZFS support"); diff --git a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/zvol_os.c b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/zvol_os.c index 712ff1b837d7..38e9debbe877 100644 --- a/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/zvol_os.c +++ b/sys/contrib/subrepo-openzfs/module/os/freebsd/zfs/zvol_os.c @@ -292,6 +292,7 @@ zvol_geom_open(struct g_provider *pp, int flag, int count) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; kern_yield(PRI_USER); goto retry; } else { @@ -983,6 +984,7 @@ zvol_cdev_open(struct cdev *dev, int flags, int fmt, struct thread *td) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; kern_yield(PRI_USER); goto retry; } else { diff --git a/sys/contrib/subrepo-openzfs/module/os/linux/spl/spl-kmem-cache.c b/sys/contrib/subrepo-openzfs/module/os/linux/spl/spl-kmem-cache.c index 42821ad60256..737c2e063f71 100644 --- a/sys/contrib/subrepo-openzfs/module/os/linux/spl/spl-kmem-cache.c +++ b/sys/contrib/subrepo-openzfs/module/os/linux/spl/spl-kmem-cache.c @@ -21,6 +21,8 @@ * with the SPL. If not, see . */ +#define SPL_KMEM_CACHE_IMPLEMENTING + #include #include #include @@ -33,16 +35,6 @@ #include #include -/* - * Within the scope of spl-kmem.c file the kmem_cache_* definitions - * are removed to allow access to the real Linux slab allocator. - */ -#undef kmem_cache_destroy -#undef kmem_cache_create -#undef kmem_cache_alloc -#undef kmem_cache_free - - /* * Linux 3.16 replaced smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() * with smp_mb__{before,after}_atomic() because they were redundant. This is diff --git a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/abd_os.c b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/abd_os.c index cee7410c8833..4bf9eaf771b5 100644 --- a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/abd_os.c +++ b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/abd_os.c @@ -526,8 +526,8 @@ abd_alloc_zero_scatter(void) #define PAGE_SHIFT (highbit64(PAGESIZE)-1) #endif -#define zfs_kmap_atomic(chunk) ((void *)chunk) -#define zfs_kunmap_atomic(addr) do { (void)(addr); } while (0) +#define zfs_kmap_local(chunk) ((void *)chunk) +#define zfs_kunmap_local(addr) do { (void)(addr); } while (0) #define local_irq_save(flags) do { (void)(flags); } while (0) #define local_irq_restore(flags) do { (void)(flags); } while (0) #define nth_page(pg, i) \ @@ -980,7 +980,7 @@ abd_iter_map(struct abd_iter *aiter) aiter->iter_mapsize = MIN(aiter->iter_sg->length - offset, aiter->iter_abd->abd_size - aiter->iter_pos); - paddr = zfs_kmap_atomic(sg_page(aiter->iter_sg)); + paddr = zfs_kmap_local(sg_page(aiter->iter_sg)); } aiter->iter_mapaddr = (char *)paddr + offset; @@ -999,7 +999,7 @@ abd_iter_unmap(struct abd_iter *aiter) if (!abd_is_linear(aiter->iter_abd)) { /* LINTED E_FUNC_SET_NOT_USED */ - zfs_kunmap_atomic(aiter->iter_mapaddr - aiter->iter_offset); + zfs_kunmap_local(aiter->iter_mapaddr - aiter->iter_offset); } ASSERT3P(aiter->iter_mapaddr, !=, NULL); diff --git a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/vdev_disk.c b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/vdev_disk.c index 7284b922b3bf..e69c5f3841ec 100644 --- a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/vdev_disk.c +++ b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/vdev_disk.c @@ -150,7 +150,11 @@ vdev_bdev_mode(spa_mode_t smode) static uint64_t bdev_capacity(struct block_device *bdev) { +#ifdef HAVE_BDEV_NR_BYTES + return (bdev_nr_bytes(bdev)); +#else return (i_size_read(bdev->bd_inode)); +#endif } #if !defined(HAVE_BDEV_WHOLE) @@ -209,7 +213,7 @@ bdev_max_capacity(struct block_device *bdev, uint64_t wholedisk) * "reserved" EFI partition: in such cases return the device * usable capacity. */ - available = i_size_read(bdev_whole(bdev)->bd_inode) - + available = bdev_capacity(bdev_whole(bdev)) - ((EFI_MIN_RESV_SIZE + NEW_START_BLOCK + PARTITION_END_ALIGNMENT) << SECTOR_BITS); psize = MAX(available, bdev_capacity(bdev)); @@ -925,12 +929,12 @@ vdev_disk_io_rw(zio_t *zio) /* * Accessing outside the block device is never allowed. */ - if (zio->io_offset + zio->io_size > bdev->bd_inode->i_size) { + if (zio->io_offset + zio->io_size > bdev_capacity(bdev)) { vdev_dbgmsg(zio->io_vd, "Illegal access %llu size %llu, device size %llu", (u_longlong_t)zio->io_offset, (u_longlong_t)zio->io_size, - (u_longlong_t)i_size_read(bdev->bd_inode)); + (u_longlong_t)bdev_capacity(bdev)); return (SET_ERROR(EIO)); } @@ -1123,12 +1127,12 @@ vdev_classic_physio(zio_t *zio) /* * Accessing outside the block device is never allowed. */ - if (io_offset + io_size > bdev->bd_inode->i_size) { + if (io_offset + io_size > bdev_capacity(bdev)) { vdev_dbgmsg(zio->io_vd, "Illegal access %llu size %llu, device size %llu", (u_longlong_t)io_offset, (u_longlong_t)io_size, - (u_longlong_t)i_size_read(bdev->bd_inode)); + (u_longlong_t)bdev_capacity(bdev)); return (SET_ERROR(EIO)); } diff --git a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zfs_uio.c b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zfs_uio.c index c2ed67c438c6..a99a1ba88256 100644 --- a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zfs_uio.c +++ b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zfs_uio.c @@ -136,7 +136,7 @@ zfs_uiomove_bvec_impl(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) void *paddr; cnt = MIN(bv->bv_len - skip, n); - paddr = zfs_kmap_atomic(bv->bv_page); + paddr = zfs_kmap_local(bv->bv_page); if (rw == UIO_READ) { /* Copy from buffer 'p' to the bvec data */ memcpy(paddr + bv->bv_offset + skip, p, cnt); @@ -144,7 +144,7 @@ zfs_uiomove_bvec_impl(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) /* Copy from bvec data to buffer 'p' */ memcpy(p, paddr + bv->bv_offset + skip, cnt); } - zfs_kunmap_atomic(paddr); + zfs_kunmap_local(paddr); skip += cnt; if (skip == bv->bv_len) { @@ -168,7 +168,7 @@ zfs_copy_bvec(void *p, size_t skip, size_t cnt, zfs_uio_rw_t rw, { void *paddr; - paddr = zfs_kmap_atomic(bv->bv_page); + paddr = zfs_kmap_local(bv->bv_page); if (rw == UIO_READ) { /* Copy from buffer 'p' to the bvec data */ memcpy(paddr + bv->bv_offset + skip, p, cnt); @@ -176,7 +176,7 @@ zfs_copy_bvec(void *p, size_t skip, size_t cnt, zfs_uio_rw_t rw, /* Copy from bvec data to buffer 'p' */ memcpy(p, paddr + bv->bv_offset + skip, cnt); } - zfs_kunmap_atomic(paddr); + zfs_kunmap_local(paddr); } /* diff --git a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zvol_os.c b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zvol_os.c index 3e020e532263..c01caa6da8b4 100644 --- a/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zvol_os.c +++ b/sys/contrib/subrepo-openzfs/module/os/linux/zfs/zvol_os.c @@ -41,6 +41,7 @@ #include #include +#include #ifdef HAVE_BLK_MQ #include @@ -790,6 +791,7 @@ zvol_open(struct block_device *bdev, fmode_t flag) if (!mutex_tryenter(&spa_namespace_lock)) { mutex_exit(&zv->zv_state_lock); rw_exit(&zv->zv_suspend_lock); + drop_suspend = B_FALSE; #ifdef HAVE_BLKDEV_GET_ERESTARTSYS schedule(); @@ -1074,8 +1076,106 @@ static const struct block_device_operations zvol_ops = { #endif }; +typedef struct zvol_queue_limits { + unsigned int zql_max_hw_sectors; + unsigned short zql_max_segments; + unsigned int zql_max_segment_size; + unsigned int zql_io_opt; +} zvol_queue_limits_t; + +static void +zvol_queue_limits_init(zvol_queue_limits_t *limits, zvol_state_t *zv, + boolean_t use_blk_mq) +{ + limits->zql_max_hw_sectors = (DMU_MAX_ACCESS / 4) >> 9; + + if (use_blk_mq) { + /* + * IO requests can be really big (1MB). When an IO request + * comes in, it is passed off to zvol_read() or zvol_write() + * in a new thread, where it is chunked up into 'volblocksize' + * sized pieces and processed. So for example, if the request + * is a 1MB write and your volblocksize is 128k, one zvol_write + * thread will take that request and sequentially do ten 128k + * IOs. This is due to the fact that the thread needs to lock + * each volblocksize sized block. So you might be wondering: + * "instead of passing the whole 1MB request to one thread, + * why not pass ten individual 128k chunks to ten threads and + * process the whole write in parallel?" The short answer is + * that there's a sweet spot number of chunks that balances + * the greater parallelism with the added overhead of more + * threads. The sweet spot can be different depending on if you + * have a read or write heavy workload. Writes typically want + * high chunk counts while reads typically want lower ones. On + * a test pool with 6 NVMe drives in a 3x 2-disk mirror + * configuration, with volblocksize=8k, the sweet spot for good + * sequential reads and writes was at 8 chunks. + */ + + /* + * Below we tell the kernel how big we want our requests + * to be. You would think that blk_queue_io_opt() would be + * used to do this since it is used to "set optimal request + * size for the queue", but that doesn't seem to do + * anything - the kernel still gives you huge requests + * with tons of little PAGE_SIZE segments contained within it. + * + * Knowing that the kernel will just give you PAGE_SIZE segments + * no matter what, you can say "ok, I want PAGE_SIZE byte + * segments, and I want 'N' of them per request", where N is + * the correct number of segments for the volblocksize and + * number of chunks you want. + */ +#ifdef HAVE_BLK_MQ + if (zvol_blk_mq_blocks_per_thread != 0) { + unsigned int chunks; + chunks = MIN(zvol_blk_mq_blocks_per_thread, UINT16_MAX); + + limits->zql_max_segment_size = PAGE_SIZE; + limits->zql_max_segments = + (zv->zv_volblocksize * chunks) / PAGE_SIZE; + } else { + /* + * Special case: zvol_blk_mq_blocks_per_thread = 0 + * Max everything out. + */ + limits->zql_max_segments = UINT16_MAX; + limits->zql_max_segment_size = UINT_MAX; + } + } else { +#endif + limits->zql_max_segments = UINT16_MAX; + limits->zql_max_segment_size = UINT_MAX; + } + + limits->zql_io_opt = zv->zv_volblocksize; +} + +#ifdef HAVE_BLK_ALLOC_DISK_2ARG +static void +zvol_queue_limits_convert(zvol_queue_limits_t *limits, + struct queue_limits *qlimits) +{ + memset(qlimits, 0, sizeof (struct queue_limits)); + qlimits->max_hw_sectors = limits->zql_max_hw_sectors; + qlimits->max_segments = limits->zql_max_segments; + qlimits->max_segment_size = limits->zql_max_segment_size; + qlimits->io_opt = limits->zql_io_opt; +} +#else +static void +zvol_queue_limits_apply(zvol_queue_limits_t *limits, + struct request_queue *queue) +{ + blk_queue_max_hw_sectors(queue, limits->zql_max_hw_sectors); + blk_queue_max_segments(queue, limits->zql_max_segments); + blk_queue_max_segment_size(queue, limits->zql_max_segment_size); + blk_queue_io_opt(queue, limits->zql_io_opt); +} +#endif + static int -zvol_alloc_non_blk_mq(struct zvol_state_os *zso) +zvol_alloc_non_blk_mq(struct zvol_state_os *zso, zvol_queue_limits_t *limits) { #if defined(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS) #if defined(HAVE_BLK_ALLOC_DISK) @@ -1085,8 +1185,11 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) zso->zvo_disk->minors = ZVOL_MINORS; zso->zvo_queue = zso->zvo_disk->queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #elif defined(HAVE_BLK_ALLOC_DISK_2ARG) - struct gendisk *disk = blk_alloc_disk(NULL, NUMA_NO_NODE); + struct queue_limits qlimits; + zvol_queue_limits_convert(limits, &qlimits); + struct gendisk *disk = blk_alloc_disk(&qlimits, NUMA_NO_NODE); if (IS_ERR(disk)) { zso->zvo_disk = NULL; return (1); @@ -1107,6 +1210,7 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) } zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif /* HAVE_BLK_ALLOC_DISK */ #else zso->zvo_queue = blk_generic_alloc_queue(zvol_request, NUMA_NO_NODE); @@ -1120,13 +1224,14 @@ zvol_alloc_non_blk_mq(struct zvol_state_os *zso) } zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif /* HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ return (0); } static int -zvol_alloc_blk_mq(zvol_state_t *zv) +zvol_alloc_blk_mq(zvol_state_t *zv, zvol_queue_limits_t *limits) { #ifdef HAVE_BLK_MQ struct zvol_state_os *zso = zv->zv_zso; @@ -1142,9 +1247,12 @@ zvol_alloc_blk_mq(zvol_state_t *zv) return (1); } zso->zvo_queue = zso->zvo_disk->queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); zso->zvo_disk->minors = ZVOL_MINORS; #elif defined(HAVE_BLK_ALLOC_DISK_2ARG) - struct gendisk *disk = blk_mq_alloc_disk(&zso->tag_set, NULL, zv); + struct queue_limits qlimits; + zvol_queue_limits_convert(limits, &qlimits); + struct gendisk *disk = blk_mq_alloc_disk(&zso->tag_set, &qlimits, zv); if (IS_ERR(disk)) { zso->zvo_disk = NULL; blk_mq_free_tag_set(&zso->tag_set); @@ -1170,6 +1278,7 @@ zvol_alloc_blk_mq(zvol_state_t *zv) /* Our queue is now created, assign it to our disk */ zso->zvo_disk->queue = zso->zvo_queue; + zvol_queue_limits_apply(limits, zso->zvo_queue); #endif #endif @@ -1209,6 +1318,9 @@ zvol_alloc(dev_t dev, const char *name) zv->zv_zso->use_blk_mq = zvol_use_blk_mq; #endif + zvol_queue_limits_t limits; + zvol_queue_limits_init(&limits, zv, zv->zv_zso->use_blk_mq); + /* * The block layer has 3 interfaces for getting BIOs: * @@ -1225,10 +1337,10 @@ zvol_alloc(dev_t dev, const char *name) * disk and the queue separately. (5.13 kernel or older) */ if (zv->zv_zso->use_blk_mq) { - ret = zvol_alloc_blk_mq(zv); + ret = zvol_alloc_blk_mq(zv, &limits); zso->zvo_disk->fops = &zvol_ops_blk_mq; } else { - ret = zvol_alloc_non_blk_mq(zso); + ret = zvol_alloc_non_blk_mq(zso, &limits); zso->zvo_disk->fops = &zvol_ops; } if (ret != 0) @@ -1338,6 +1450,101 @@ zvol_wait_close(zvol_state_t *zv) { } +struct add_disk_work { + struct delayed_work work; + struct gendisk *disk; + int error; +}; + +static int +__zvol_os_add_disk(struct gendisk *disk) +{ + int error = 0; +#ifdef HAVE_ADD_DISK_RET + error = add_disk(disk); +#else + add_disk(disk); +#endif + return (error); +} + +#if defined(HAVE_BDEV_FILE_OPEN_BY_PATH) +static void +zvol_os_add_disk_work(struct work_struct *work) +{ + struct add_disk_work *add_disk_work; + add_disk_work = container_of(work, struct add_disk_work, work.work); + add_disk_work->error = __zvol_os_add_disk(add_disk_work->disk); +} +#endif + +/* + * SPECIAL CASE: + * + * This function basically calls add_disk() from a workqueue. You may be + * thinking: why not just call add_disk() directly? + * + * When you call add_disk(), the zvol appears to the world. When this happens, + * the kernel calls disk_scan_partitions() on the zvol, which behaves + * differently on the 6.9+ kernels: + * + * - 6.8 and older kernels - + * disk_scan_partitions() + * handle = bdev_open_by_dev( + * zvol_open() + * bdev_release(handle); + * zvol_release() + * + * + * - 6.9+ kernels - + * disk_scan_partitions() + * file = bdev_file_open_by_dev() + * zvol_open() + * fput(file) + * < wait for return to userspace > + * zvol_release() + * + * The difference is that the bdev_release() from the 6.8 kernel is synchronous + * while the fput() from the 6.9 kernel is async. Or more specifically it's + * async that has to wait until we return to userspace (since it adds the fput + * into the caller's work queue with the TWA_RESUME flag set). This is not the + * behavior we want, since we want do things like create+destroy a zvol within + * a single ZFS_IOC_CREATE ioctl, and the "create" part needs to release the + * reference to the zvol while we're in the IOCTL, which can't wait until we + * return to userspace. + * + * We can get around this since fput() has a special codepath for when it's + * running in a kernel thread or interrupt. In those cases, it just puts the + * fput into the system workqueue, which we can force to run with + * __flush_workqueue(). That is why we call add_disk() from a workqueue - so it + * run from a kernel thread and "tricks" the fput() codepaths. + * + * Note that __flush_workqueue() is slowly getting deprecated. This may be ok + * though, since our IOCTL will spin on EBUSY waiting for the zvol release (via + * fput) to happen, which it eventually, naturally, will from the system_wq + * without us explicitly calling __flush_workqueue(). + */ +static int +zvol_os_add_disk(struct gendisk *disk) +{ +#if defined(HAVE_BDEV_FILE_OPEN_BY_PATH) /* 6.9+ kernel */ + struct add_disk_work add_disk_work; + + INIT_DELAYED_WORK(&add_disk_work.work, zvol_os_add_disk_work); + add_disk_work.disk = disk; + add_disk_work.error = 0; + + /* Use *_delayed_work functions since they're not GPL'd */ + schedule_delayed_work(&add_disk_work.work, 0); + flush_delayed_work(&add_disk_work.work); + + __flush_workqueue(system_wq); + return (add_disk_work.error); +#else /* <= 6.8 kernel */ + return (__zvol_os_add_disk(disk)); +#endif +} + /* * Create a block device minor node and setup the linkage between it * and the specified volume. Once this function returns the block @@ -1417,74 +1624,10 @@ zvol_os_create_minor(const char *name) set_capacity(zv->zv_zso->zvo_disk, zv->zv_volsize >> 9); - blk_queue_max_hw_sectors(zv->zv_zso->zvo_queue, - (DMU_MAX_ACCESS / 4) >> 9); - if (zv->zv_zso->use_blk_mq) { - /* - * IO requests can be really big (1MB). When an IO request - * comes in, it is passed off to zvol_read() or zvol_write() - * in a new thread, where it is chunked up into 'volblocksize' - * sized pieces and processed. So for example, if the request - * is a 1MB write and your volblocksize is 128k, one zvol_write - * thread will take that request and sequentially do ten 128k - * IOs. This is due to the fact that the thread needs to lock - * each volblocksize sized block. So you might be wondering: - * "instead of passing the whole 1MB request to one thread, - * why not pass ten individual 128k chunks to ten threads and - * process the whole write in parallel?" The short answer is - * that there's a sweet spot number of chunks that balances - * the greater parallelism with the added overhead of more - * threads. The sweet spot can be different depending on if you - * have a read or write heavy workload. Writes typically want - * high chunk counts while reads typically want lower ones. On - * a test pool with 6 NVMe drives in a 3x 2-disk mirror - * configuration, with volblocksize=8k, the sweet spot for good - * sequential reads and writes was at 8 chunks. - */ - - /* - * Below we tell the kernel how big we want our requests - * to be. You would think that blk_queue_io_opt() would be - * used to do this since it is used to "set optimal request - * size for the queue", but that doesn't seem to do - * anything - the kernel still gives you huge requests - * with tons of little PAGE_SIZE segments contained within it. - * - * Knowing that the kernel will just give you PAGE_SIZE segments - * no matter what, you can say "ok, I want PAGE_SIZE byte - * segments, and I want 'N' of them per request", where N is - * the correct number of segments for the volblocksize and - * number of chunks you want. - */ -#ifdef HAVE_BLK_MQ - if (zvol_blk_mq_blocks_per_thread != 0) { - unsigned int chunks; - chunks = MIN(zvol_blk_mq_blocks_per_thread, UINT16_MAX); - - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, - PAGE_SIZE); - blk_queue_max_segments(zv->zv_zso->zvo_queue, - (zv->zv_volblocksize * chunks) / PAGE_SIZE); - } else { - /* - * Special case: zvol_blk_mq_blocks_per_thread = 0 - * Max everything out. - */ - blk_queue_max_segments(zv->zv_zso->zvo_queue, - UINT16_MAX); - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, - UINT_MAX); - } -#endif - } else { - blk_queue_max_segments(zv->zv_zso->zvo_queue, UINT16_MAX); - blk_queue_max_segment_size(zv->zv_zso->zvo_queue, UINT_MAX); - } blk_queue_physical_block_size(zv->zv_zso->zvo_queue, zv->zv_volblocksize); - blk_queue_io_opt(zv->zv_zso->zvo_queue, zv->zv_volblocksize); blk_queue_max_discard_sectors(zv->zv_zso->zvo_queue, (zvol_max_discard_blocks * zv->zv_volblocksize) >> 9); blk_queue_discard_granularity(zv->zv_zso->zvo_queue, @@ -1549,11 +1692,7 @@ zvol_os_create_minor(const char *name) rw_enter(&zvol_state_lock, RW_WRITER); zvol_insert(zv); rw_exit(&zvol_state_lock); -#ifdef HAVE_ADD_DISK_RET - error = add_disk(zv->zv_zso->zvo_disk); -#else - add_disk(zv->zv_zso->zvo_disk); -#endif + error = zvol_os_add_disk(zv->zv_zso->zvo_disk); } else { ida_simple_remove(&zvol_ida, idx); } diff --git a/sys/contrib/subrepo-openzfs/module/zfs/dsl_dataset.c b/sys/contrib/subrepo-openzfs/module/zfs/dsl_dataset.c index b4de0e7ff073..45d8a290d67d 100644 --- a/sys/contrib/subrepo-openzfs/module/zfs/dsl_dataset.c +++ b/sys/contrib/subrepo-openzfs/module/zfs/dsl_dataset.c @@ -3712,16 +3712,19 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) spa_history_log_internal_ds(hds, "promote", tx, " "); dsl_dir_rele(odd, FTAG); - promote_rele(ddpa, FTAG); /* - * Transfer common error blocks from old head to new head. + * Transfer common error blocks from old head to new head, before + * calling promote_rele() on ddpa since we need to dereference + * origin_head and hds. */ if (spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_HEAD_ERRLOG)) { uint64_t old_head = origin_head->ds_object; uint64_t new_head = hds->ds_object; spa_swap_errlog(dp->dp_spa, new_head, old_head, tx); } + + promote_rele(ddpa, FTAG); } /* diff --git a/sys/contrib/subrepo-openzfs/module/zfs/vdev.c b/sys/contrib/subrepo-openzfs/module/zfs/vdev.c index c74f72159dc9..11cc39ba3527 100644 --- a/sys/contrib/subrepo-openzfs/module/zfs/vdev.c +++ b/sys/contrib/subrepo-openzfs/module/zfs/vdev.c @@ -2021,6 +2021,7 @@ vdev_open(vdev_t *vd) vd->vdev_stat.vs_aux = VDEV_AUX_NONE; vd->vdev_cant_read = B_FALSE; vd->vdev_cant_write = B_FALSE; + vd->vdev_fault_wanted = B_FALSE; vd->vdev_min_asize = vdev_get_min_asize(vd); /* diff --git a/sys/contrib/subrepo-openzfs/scripts/dkms.mkconf b/sys/contrib/subrepo-openzfs/scripts/dkms.mkconf index 0bd383420435..046ce9edcefe 100755 --- a/sys/contrib/subrepo-openzfs/scripts/dkms.mkconf +++ b/sys/contrib/subrepo-openzfs/scripts/dkms.mkconf @@ -26,6 +26,7 @@ PACKAGE_VERSION="${pkgver}" PACKAGE_CONFIG="${pkgcfg}" NO_WEAK_MODULES="yes" PRE_BUILD="configure + --disable-dependency-tracking --prefix=/usr --with-config=kernel --with-linux=\$( diff --git a/sys/contrib/subrepo-openzfs/tests/runfiles/linux.run b/sys/contrib/subrepo-openzfs/tests/runfiles/linux.run index 92ce09ec6fcb..bd6cc56f3589 100644 --- a/sys/contrib/subrepo-openzfs/tests/runfiles/linux.run +++ b/sys/contrib/subrepo-openzfs/tests/runfiles/linux.run @@ -121,7 +121,7 @@ tests = ['auto_offline_001_pos', 'auto_online_001_pos', 'auto_online_002_pos', 'auto_replace_001_pos', 'auto_replace_002_pos', 'auto_spare_001_pos', 'auto_spare_002_pos', 'auto_spare_multiple', 'auto_spare_ashift', 'auto_spare_shared', 'decrypt_fault', 'decompress_fault', - 'scrub_after_resilver', 'zpool_status_-s'] + 'scrub_after_resilver', 'suspend_resume_single', 'zpool_status_-s'] tags = ['functional', 'fault'] [tests/functional/features/large_dnode:Linux] diff --git a/sys/contrib/subrepo-openzfs/tests/test-runner/bin/zts-report.py.in b/sys/contrib/subrepo-openzfs/tests/test-runner/bin/zts-report.py.in index 5ca130931364..de06c7c6e2c1 100755 --- a/sys/contrib/subrepo-openzfs/tests/test-runner/bin/zts-report.py.in +++ b/sys/contrib/subrepo-openzfs/tests/test-runner/bin/zts-report.py.in @@ -379,6 +379,7 @@ if os.environ.get('CI') == 'true': 'fault/auto_replace_002_pos': ['SKIP', ci_reason], 'fault/auto_spare_ashift': ['SKIP', ci_reason], 'fault/auto_spare_shared': ['SKIP', ci_reason], + 'fault/suspend_resume_single': ['SKIP', ci_reason], 'procfs/pool_state': ['SKIP', ci_reason], }) diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/cmd/checksum/sha2_test.c b/sys/contrib/subrepo-openzfs/tests/zfs-tests/cmd/checksum/sha2_test.c index efcf812d7749..d36b670db8ba 100644 --- a/sys/contrib/subrepo-openzfs/tests/zfs-tests/cmd/checksum/sha2_test.c +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/cmd/checksum/sha2_test.c @@ -72,31 +72,6 @@ static const uint8_t sha256_test_digests[][32] = { /* no test vector for test_msg2 */ }; -static const uint8_t sha384_test_digests[][48] = { - { - /* for test_msg0 */ - 0xCB, 0x00, 0x75, 0x3F, 0x45, 0xA3, 0x5E, 0x8B, - 0xB5, 0xA0, 0x3D, 0x69, 0x9A, 0xC6, 0x50, 0x07, - 0x27, 0x2C, 0x32, 0xAB, 0x0E, 0xDE, 0xD1, 0x63, - 0x1A, 0x8B, 0x60, 0x5A, 0x43, 0xFF, 0x5B, 0xED, - 0x80, 0x86, 0x07, 0x2B, 0xA1, 0xE7, 0xCC, 0x23, - 0x58, 0xBA, 0xEC, 0xA1, 0x34, 0xC8, 0x25, 0xA7 - }, - { - /* no test vector for test_msg1 */ - 0 - }, - { - /* for test_msg2 */ - 0x09, 0x33, 0x0C, 0x33, 0xF7, 0x11, 0x47, 0xE8, - 0x3D, 0x19, 0x2F, 0xC7, 0x82, 0xCD, 0x1B, 0x47, - 0x53, 0x11, 0x1B, 0x17, 0x3B, 0x3B, 0x05, 0xD2, - 0x2F, 0xA0, 0x80, 0x86, 0xE3, 0xB0, 0xF7, 0x12, - 0xFC, 0xC7, 0xC7, 0x1A, 0x55, 0x7E, 0x2D, 0xB9, - 0x66, 0xC3, 0xE9, 0xFA, 0x91, 0x74, 0x60, 0x39 - } -}; - static const uint8_t sha512_test_digests[][64] = { { /* for test_msg0 */ @@ -126,27 +101,6 @@ static const uint8_t sha512_test_digests[][64] = { } }; -static const uint8_t sha512_224_test_digests[][28] = { - { - /* for test_msg0 */ - 0x46, 0x34, 0x27, 0x0F, 0x70, 0x7B, 0x6A, 0x54, - 0xDA, 0xAE, 0x75, 0x30, 0x46, 0x08, 0x42, 0xE2, - 0x0E, 0x37, 0xED, 0x26, 0x5C, 0xEE, 0xE9, 0xA4, - 0x3E, 0x89, 0x24, 0xAA - }, - { - /* no test vector for test_msg1 */ - 0 - }, - { - /* for test_msg2 */ - 0x23, 0xFE, 0xC5, 0xBB, 0x94, 0xD6, 0x0B, 0x23, - 0x30, 0x81, 0x92, 0x64, 0x0B, 0x0C, 0x45, 0x33, - 0x35, 0xD6, 0x64, 0x73, 0x4F, 0xE4, 0x0E, 0x72, - 0x68, 0x67, 0x4A, 0xF9 - } -}; - static const uint8_t sha512_256_test_digests[][32] = { { /* for test_msg0 */ @@ -191,7 +145,7 @@ main(int argc, char *argv[]) do { \ SHA2_CTX ctx; \ uint8_t digest[diglen / 8]; \ - SHA2Init(SHA ## mode ## _MECH_INFO_TYPE, &ctx); \ + SHA2Init(mode, &ctx); \ SHA2Update(&ctx, _m, strlen(_m)); \ SHA2Final(digest, &ctx); \ (void) printf("SHA%-9sMessage: " #_m \ @@ -215,7 +169,7 @@ main(int argc, char *argv[]) struct timeval start, end; \ memset(block, 0, sizeof (block)); \ (void) gettimeofday(&start, NULL); \ - SHA2Init(SHA ## mode ## _MECH_INFO_TYPE, &ctx); \ + SHA2Init(mode, &ctx); \ for (i = 0; i < 8192; i++) \ SHA2Update(&ctx, block, sizeof (block)); \ SHA2Final(digest, &ctx); \ @@ -231,16 +185,12 @@ main(int argc, char *argv[]) } while (0) (void) printf("Running algorithm correctness tests:\n"); - SHA2_ALGO_TEST(test_msg0, 256, 256, sha256_test_digests[0]); - SHA2_ALGO_TEST(test_msg1, 256, 256, sha256_test_digests[1]); - SHA2_ALGO_TEST(test_msg0, 384, 384, sha384_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 384, 384, sha384_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512, 512, sha512_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512, 512, sha512_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512_224, 224, sha512_224_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512_224, 224, sha512_224_test_digests[2]); - SHA2_ALGO_TEST(test_msg0, 512_256, 256, sha512_256_test_digests[0]); - SHA2_ALGO_TEST(test_msg2, 512_256, 256, sha512_256_test_digests[2]); + SHA2_ALGO_TEST(test_msg0, SHA256, 256, sha256_test_digests[0]); + SHA2_ALGO_TEST(test_msg1, SHA256, 256, sha256_test_digests[1]); + SHA2_ALGO_TEST(test_msg0, SHA512, 512, sha512_test_digests[0]); + SHA2_ALGO_TEST(test_msg2, SHA512, 512, sha512_test_digests[2]); + SHA2_ALGO_TEST(test_msg0, SHA512_256, 256, sha512_256_test_digests[0]); + SHA2_ALGO_TEST(test_msg2, SHA512_256, 256, sha512_256_test_digests[2]); if (failed) return (1); @@ -251,13 +201,13 @@ main(int argc, char *argv[]) for (id = 0; id < sha256->getcnt(); id++) { sha256->setid(id); const char *name = sha256->getname(); - SHA2_PERF_TEST(256, 256, name); + SHA2_PERF_TEST(SHA256, 256, name); } for (id = 0; id < sha512->getcnt(); id++) { sha512->setid(id); const char *name = sha512->getname(); - SHA2_PERF_TEST(512, 512, name); + SHA2_PERF_TEST(SHA512, 512, name); } return (0); diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/include/libtest.shlib b/sys/contrib/subrepo-openzfs/tests/zfs-tests/include/libtest.shlib index dfab48d2cdaf..a2f42999a31e 100644 --- a/sys/contrib/subrepo-openzfs/tests/zfs-tests/include/libtest.shlib +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/include/libtest.shlib @@ -62,11 +62,39 @@ function compare_version_gte } # Helper function used by linux_version() and freebsd_version() +# $1, if provided, should be a MAJOR, MAJOR.MINOR or MAJOR.MINOR.PATCH +# version number function kernel_version { typeset ver="$1" - [ -z "$ver" ] && ver=$(uname -r | grep -Eo "^[0-9]+\.[0-9]+\.[0-9]+") + [ -z "$ver" ] && case "$UNAME" in + Linux) + # Linux version numbers are X.Y.Z followed by optional + # vendor/distro specific stuff + # RHEL7: 3.10.0-1160.108.1.el7.x86_64 + # Fedora 37: 6.5.12-100.fc37.x86_64 + # Debian 12.6: 6.1.0-22-amd64 + ver=$(uname -r | grep -Eo "^[0-9]+\.[0-9]+\.[0-9]+") + ;; + FreeBSD) + # FreeBSD version numbers are X.Y-BRANCH-pZ. Depending on + # branch, -pZ may not be present, but this is typically only + # on pre-release or true .0 releases, so can be assumed 0 + # if not present. + # eg: + # 13.2-RELEASE-p4 + # 14.1-RELEASE + # 15.0-CURRENT + ver=$(uname -r | \ + grep -Eo "[0-9]+\.[0-9]+(-[A-Z0-9]+-p[0-9]+)?" | \ + sed -E "s/-[^-]+-p/./") + ;; + *) + # Unknown system + log_fail "Don't know how to get kernel version for '$UNAME'" + ;; + esac typeset version major minor _ IFS='.' read -r version major minor _ <<<"$ver" diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/Makefile.am b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/Makefile.am index 62230dcc2ccb..a0040215fe22 100644 --- a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/Makefile.am +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/Makefile.am @@ -1555,6 +1555,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \ functional/fault/decompress_fault.ksh \ functional/fault/decrypt_fault.ksh \ functional/fault/scrub_after_resilver.ksh \ + functional/fault/suspend_resume_single.ksh \ functional/fault/setup.ksh \ functional/fault/zpool_status_-s.ksh \ functional/features/async_destroy/async_destroy_001_pos.ksh \ diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh new file mode 100755 index 000000000000..041dadb1eadb --- /dev/null +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/fault/suspend_resume_single.ksh @@ -0,0 +1,102 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2024, Klara Inc. +# + +. $STF_SUITE/include/libtest.shlib + +set -x + +DATAFILE="$TMPDIR/datafile" + +function cleanup +{ + destroy_pool $TESTPOOL + unload_scsi_debug + rm -f $DATA_FILE +} + +log_onexit cleanup + +log_assert "ensure single-disk pool resumes properly after suspend and clear" + +# create a file, and take a checksum, so we can compare later +log_must dd if=/dev/random of=$DATAFILE bs=128K count=1 +typeset sum1=$(cat $DATAFILE | md5sum) + +# make a debug device that we can "unplug" +load_scsi_debug 100 1 1 1 '512b' +sd=$(get_debug_device) + +# create a single-device pool +log_must zpool create $TESTPOOL $sd +log_must zpool sync + +# "pull" the disk +log_must eval "echo offline > /sys/block/$sd/device/state" + +# copy data onto the pool. it'll appear to succeed, but only be in memory +log_must cp $DATAFILE /$TESTPOOL/file + +# wait until sync starts, and the pool suspends +log_note "waiting for pool to suspend" +typeset -i tries=10 +until [[ $(cat /proc/spl/kstat/zfs/$TESTPOOL/state) == "SUSPENDED" ]] ; do + if ((tries-- == 0)); then + log_fail "pool didn't suspend" + fi + sleep 1 +done + +# return the disk +log_must eval "echo running > /sys/block/$sd/device/state" + +# clear the error states, which should reopen the vdev, get the pool back +# online, and replay the failed IO +log_must zpool clear $TESTPOOL + +# wait a while for everything to sync out. if something is going to go wrong, +# this is where it will happen +log_note "giving pool time to settle and complete txg" +sleep 7 + +# if the pool suspended, then everything is bad +if [[ $(cat /proc/spl/kstat/zfs/$TESTPOOL/state) == "SUSPENDED" ]] ; then + log_fail "pool suspended" +fi + +# export the pool, to make sure it exports clean, and also to clear the file +# out of the cache +log_must zpool export $TESTPOOL + +# import the pool +log_must zpool import $TESTPOOL + +# sum the file we wrote earlier +typeset sum2=$(cat /$TESTPOOL/file | md5sum) + +# make sure the checksums match +log_must test "$sum1" = "$sum2" + +log_pass "single-disk pool resumes properly after disk suspend and clear" diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh index 3e2aeb733546..ec11610742fb 100755 --- a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh @@ -96,7 +96,7 @@ log_must zfs destroy -R $clone2 log_must eval "zfs send -i $sendfs#book2 --redact book3 $sendfs@snap2 >$stream" log_must eval "zfs recv $recvfs <$stream" log_must mount_redacted -f $recvfs -log_must diff <(ls $send_mnt) <(ls $recv_mnt) +log_must [ "$(ls $send_mnt)" == "$(ls $recv_mnt)" ] log_must zfs destroy -R $recvfs log_must zfs rollback -R $sendfs@snap diff --git a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh index 0bc4bf461747..c041469163c5 100755 --- a/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh +++ b/sys/contrib/subrepo-openzfs/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh @@ -71,8 +71,7 @@ log_must ismounted $recvfs # deleted. contents=$(log_must find $recv_mnt) contents_orig=$(log_must find $send_mnt) -log_must diff <(echo ${contents//$recv_mnt/}) \ - <(echo ${contents_orig//$send_mnt/}) +log_must [ "${contents//$recv_mnt/}" == "${contents_orig//$send_mnt/}" ] log_must zfs redact $sendvol@snap book2 $clonevol@snap log_must eval "zfs send --redact book2 $sendvol@snap >$stream" log_must eval "zfs receive $recvvol <$stream" @@ -103,7 +102,6 @@ log_must mount_redacted -f $recvfs log_must ismounted $recvfs contents=$(log_must find $recv_mnt) contents_orig=$(log_must find $send_mnt) -log_must diff <(echo ${contents//$recv_mnt/}) \ - <(echo ${contents_orig//$send_mnt/}) +log_must [ "${contents//$recv_mnt/}" == "${contents_orig//$send_mnt/}" ] log_pass "Received redacted streams can be mounted."