diff options
Diffstat (limited to 'cddl')
72 files changed, 174 insertions, 1911 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 86887bbe8dd9..786c3d6e50d1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2025 +.Dd November 30, 2025 .Dt DTRACE 1 .Os .Sh NAME @@ -837,10 +837,6 @@ __unix .It __SVR4 .It -__sparc (on SPARC systems only) -.It -__sparcv9 (on SPARC systems only when 64-bit programs are compiled) -.It __i386 (on x86 systems only when 32-bit programs are compiled) .It __amd64 (on x86 systems only when 64-bit programs are compiled) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst index 19fc3aca51c2..035dd5cb694e 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst @@ -66,7 +66,6 @@ common/usdt/tst.reeval.ksh common/usdt/tst.static.ksh common/usdt/tst.static2.ksh common/usdt/tst.user.ksh -sparc/usdt/tst.tailcall.ksh common/pid/tst.provregex3.ksh common/pid/tst.provregex4.ksh diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d index e8fc9b4dfba1..1324d4eaec4f 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d @@ -54,7 +54,7 @@ pid$1:a.out:go: exit(1); } -syscall::exit:entry +syscall::_exit:entry /pid == $1/ { exit(0); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d index 30bf5ae4bf0a..64fe885b6124 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d @@ -54,7 +54,7 @@ syscall::getpid:entry timeout = timestamp + 500000000; } -syscall::exit:entry +syscall::_exit:entry /pid == $1/ { exit(0); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d index 7d18442d7408..8b08bface705 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d @@ -54,7 +54,7 @@ syscall::getpid:return timeout = timestamp + 500000000; } -syscall::exit:entry +syscall::_exit:entry /pid == $1/ { exit(0); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d index 30bf5ae4bf0a..64fe885b6124 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d @@ -54,7 +54,7 @@ syscall::getpid:entry timeout = timestamp + 500000000; } -syscall::exit:entry +syscall::_exit:entry /pid == $1/ { exit(0); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.vahole.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.vahole.d index 2ef40a5ac474..a285509316d9 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.vahole.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.vahole.d @@ -38,11 +38,7 @@ fbt::: { n++; -#ifdef __sparc - trace(*(int *)0x8000000000000000 ^ rand()); -#else trace(*(int *)(`kernelbase - 1)); -#endif } dtrace:::ERROR diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/prov.h b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/prov.h index e29654edb672..bebf9754f691 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/prov.h +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/prov.h @@ -15,21 +15,12 @@ extern "C" { #define TESTER_ENTRY() \ __dtrace_tester___entry() -#ifndef __sparc #define TESTER_ENTRY_ENABLED() \ __dtraceenabled_tester___entry() -#else -#define TESTER_ENTRY_ENABLED() \ - __dtraceenabled_tester___entry(0) -#endif extern void __dtrace_tester___entry(void); -#ifndef __sparc extern int __dtraceenabled_tester___entry(void); -#else -extern int __dtraceenabled_tester___entry(long); -#endif #else diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d deleted file mode 100644 index 3ef38983ad52..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d +++ /dev/null @@ -1,85 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - - -#pragma ident "%Z%%M% %I% %E% SMI" - - -/* - * ASSERTION: - * Positive test to make sure that we can invoke sparc - * ureg[] aliases. - * - * SECTION: User Process Tracing/uregs Array - * - * NOTES: This test does no verification - the value of the output - * is not deterministic. - */ - -#pragma D option quiet - -BEGIN -{ - printf("R_G0 = 0x%x\n", uregs[R_G0]); - printf("R_G1 = 0x%x\n", uregs[R_G1]); - printf("R_G2 = 0x%x\n", uregs[R_G2]); - printf("R_G3 = 0x%x\n", uregs[R_G3]); - printf("R_G4 = 0x%x\n", uregs[R_G4]); - printf("R_G5 = 0x%x\n", uregs[R_G5]); - printf("R_G6 = 0x%x\n", uregs[R_G6]); - printf("R_G7 = 0x%x\n", uregs[R_G7]); - printf("R_O0 = 0x%x\n", uregs[R_O0]); - printf("R_O1 = 0x%x\n", uregs[R_O1]); - printf("R_O2 = 0x%x\n", uregs[R_O2]); - printf("R_O3 = 0x%x\n", uregs[R_O3]); - printf("R_O4 = 0x%x\n", uregs[R_O4]); - printf("R_O5 = 0x%x\n", uregs[R_O5]); - printf("R_O6 = 0x%x\n", uregs[R_O6]); - printf("R_O7 = 0x%x\n", uregs[R_O7]); - printf("R_L0 = 0x%x\n", uregs[R_L0]); - printf("R_L1 = 0x%x\n", uregs[R_L1]); - printf("R_L2 = 0x%x\n", uregs[R_L2]); - printf("R_L3 = 0x%x\n", uregs[R_L3]); - printf("R_L4 = 0x%x\n", uregs[R_L4]); - printf("R_L5 = 0x%x\n", uregs[R_L5]); - printf("R_L6 = 0x%x\n", uregs[R_L6]); - printf("R_L7 = 0x%x\n", uregs[R_L7]); - printf("R_I0 = 0x%x\n", uregs[R_I0]); - printf("R_I1 = 0x%x\n", uregs[R_I1]); - printf("R_I2 = 0x%x\n", uregs[R_I2]); - printf("R_I3 = 0x%x\n", uregs[R_I3]); - printf("R_I4 = 0x%x\n", uregs[R_I4]); - printf("R_I5 = 0x%x\n", uregs[R_I5]); - printf("R_I6 = 0x%x\n", uregs[R_I6]); - printf("R_I7 = 0x%x\n", uregs[R_I7]); - printf("R_CCR = 0x%x\n", uregs[R_CCR]); - printf("R_PC = 0x%x\n", uregs[R_PC]); - printf("R_NPC = 0x%x\n", uregs[R_NPC]); - printf("R_Y = 0x%x\n", uregs[R_Y]); - printf("R_ASI = 0x%x\n", uregs[R_ASI]); - printf("R_FPRS = 0x%x\n", uregs[R_FPRS]); - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.d deleted file mode 100644 index 3e4662740816..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.d +++ /dev/null @@ -1,40 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: On SPARC, you can't trace misaligned offsets - * - * SECTION: User Process Tracing/pid Provider - * - * NOTES: - * - */ - -pid$1:a.out:main:7 -{ -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe deleted file mode 100644 index 595db1de33da..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/ksh -# -# 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://www.opensolaris.org/os/licensing. -# 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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -sleep 1000000 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d deleted file mode 100644 index cf1dc02ec47c..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d +++ /dev/null @@ -1,70 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: Trace all instructions in the function 'test' to verify that - * the branches are emulated correctly. - */ - -#pragma D option destructive -#pragma D option quiet - -pid$1:a.out:waiting:entry -{ - this->a = (char *)alloca(1); - *this->a = 1; - copyout(this->a, arg0, 1); -} - -pid$1:a.out:test: -{ - printf("%s:%s\n", probefunc, probename); -} - -syscall::rexit:entry -/pid == $1/ -{ - exit(0); -} - - -BEGIN -{ - /* - * Let's just do this for 5 seconds. - */ - timeout = timestamp + 5000000000; -} - -profile:::tick-4 -/timestamp > timeout/ -{ - trace("test timed out"); - exit(1); -} - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d.out deleted file mode 100644 index 8559271e4aac..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.d.out +++ /dev/null @@ -1,23 +0,0 @@ -test:entry -test:0 -test:4 -test:8 -test:c -test:10 -test:14 -test:18 -test:1c -test:20 -test:24 -test:28 -test:2c -test:30 -test:34 -test:38 -test:3c -test:40 -test:44 -test:48 -test:4c -test:return - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.s b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.s deleted file mode 100644 index dfa7d27074f2..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.s +++ /dev/null @@ -1,81 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/asm_linkage.h> - - DGDEF(__fsr_init_value) - .word 0 - - ENTRY(waiting) - retl - ldub [%o0], %o0 - SET_SIZE(waiting) - - ENTRY(test) - mov 1, %g1 - - brz %g1, 1f - nop - brlez %g1, 1f - nop - brlz %g0, 1f - nop - brlz %g1, 1f - nop - brnz %g0, 1f - sub %g0, 2, %g1 - brgz %g1, 1f - nop - brgz %g0, 1f - nop - brgez %g1, 1f - nop - - mov %g1, %o0 - -1: - retl - nop - SET_SIZE(test) - - ENTRY(main) - save %sp, -SA(MINFRAME + 4), %sp - stb %g0, [%fp - 4] -1: - call waiting - sub %fp, 4, %o0 - tst %o0 - bz 1b - nop - - call test - nop - - ret - restore %g0, %g0, %o0 - SET_SIZE(main) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.d deleted file mode 100644 index cfcf0a715d1a..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.d +++ /dev/null @@ -1,78 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: - * - * SECTION: - * - * NOTES: - * - */ - -#pragma D option destructive - -pid$1:a.out:waiting:entry -{ - this->a = (char *)alloca(1); - *this->a = 1; - copyout(this->a, arg0, 1); -} - -pid$1:a.out:main:, -pid$1:a.out:other: -{ -} - -pid$1:a.out:bad:entry -{ - exit(1); -} - -syscall::rexit:entry -/pid == $1/ -{ - exit(0); -} - - -BEGIN -{ - /* - * Let's just do this for 5 seconds. - */ - timeout = timestamp + 5000000000; -} - -profile:::tick-4 -/timestamp > timeout/ -{ - trace("test timed out"); - exit(1); -} - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.s b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.s deleted file mode 100644 index 3e6531f32190..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.s +++ /dev/null @@ -1,63 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/asm_linkage.h> - - DGDEF(__fsr_init_value) - .word 0 - - ENTRY(waiting) - retl - ldub [%o0], %o0 - SET_SIZE(waiting) - - ENTRY(main) - save %sp, -SA(MINFRAME + 4), %sp - stb %g0, [%fp - 4] -1: - call waiting - sub %fp, 4, %o0 - tst %o0 - bz 1b - nop - - restore - - tst %g0 - be other - nop - - ALTENTRY(bad) - illtrap - SET_SIZE(bad) - SET_SIZE(main) - - ENTRY(other) - retl - clr %o0 - SET_SIZE(other) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.d deleted file mode 100644 index c484c3f0c721..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.d +++ /dev/null @@ -1,73 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: - * - * SECTION: - * - * NOTES: - * - */ - -#pragma D option destructive - -pid$1:a.out:waiting:entry -{ - this->a = (char *)alloca(1); - *this->a = 1; - copyout(this->a, arg0, 1); -} - -pid$1:a.out:main:, -pid$1:a.out:inner: -{ -} - -syscall::rexit:entry -/pid == $1/ -{ - exit(0); -} - - -BEGIN -{ - /* - * Let's just do this for 5 seconds. - */ - timeout = timestamp + 5000000000; -} - -profile:::tick-4 -/timestamp > timeout/ -{ - trace("test timed out"); - exit(1); -} - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s deleted file mode 100644 index 612f0b926142..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s +++ /dev/null @@ -1,59 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/asm_linkage.h> - - DGDEF(__fsr_init_value) - .word 0 - - ENTRY(waiting) - retl - ldub [%o0], %o0 - SET_SIZE(waiting) - - ENTRY(main) - save %sp, -SA(MINFRAME + 4), %sp - stb %g0, [%fp - 4] -1: - call waiting - sub %fp, 4, %o0 - tst %o0 - bz 1b - nop - - restore - - ALTENTRY(inner) - nop - nop - nop - SET_SIZE(inner) - - retl - clr %o0 - SET_SIZE(main) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/usdt/tst.tailcall.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/usdt/tst.tailcall.ksh deleted file mode 100644 index c3651ecf7eb4..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/usdt/tst.tailcall.ksh +++ /dev/null @@ -1,132 +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://www.opensolaris.org/os/licensing. -# 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 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" - -# -# ASSERTION: Make sure USDT probes work as tail-calls on SPARC. -# - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 -DIR=/var/tmp/dtest.$$ - -mkdir $DIR -cd $DIR - -cat > test.s <<EOF -#include <sys/asm_linkage.h> - - DGDEF(__fsr_init_value) - .word 0 - - ENTRY(test) - save %sp, -SA(MINFRAME + 4), %sp - mov 9, %i0 - mov 19, %i1 - mov 2006, %i2 - call __dtrace_test___fire - restore - SET_SIZE(test) - - ENTRY(main) - save %sp, -SA(MINFRAME + 4), %sp - -1: - call test - nop - - ba 1b - nop - - ret - restore %g0, %g0, %o0 - SET_SIZE(main) -EOF - -cat > prov.d <<EOF -provider test { - probe fire(int, int, int); -}; -EOF - -/usr/bin/as -xregsym=no -P -D_ASM -o test.o test.s -if [ $? -ne 0 ]; then - print -u2 "failed to compile test.s" - exit 1 -fi - -$dtrace -G -32 -s prov.d test.o -if [ $? -ne 0 ]; then - print -u2 "failed to create DOF" - exit 1 -fi - -cc -o test test.o prov.o -if [ $? -ne 0 ]; then - print -u2 "failed to link final executable" - exit 1 -fi - -$dtrace -c ./test -s /dev/stdin <<EOF -test\$target:::fire -/arg0 == 9 && arg1 == 19 && arg2 == 2006/ -{ - printf("%d/%d/%d", arg0, arg1, arg2); - exit(0); -} - -test\$target:::fire -{ - printf("%d/%d/%d", arg0, arg1, arg2); - exit(1); -} - -BEGIN -{ - /* - * Let's just do this for 5 seconds. - */ - timeout = timestamp + 5000000000; -} - -profile:::tick-4 -/timestamp > timeout/ -{ - trace("test timed out"); - exit(1); -} -EOF - -status=$? - -cd / -/bin/rm -rf $DIR - -exit $status diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/annotated_helper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/annotated_helper.d deleted file mode 100644 index 3577f86f8ee6..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/annotated_helper.d +++ /dev/null @@ -1,32 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ident "%Z%%M% %I% %E% SMI" - -dtrace:helper:ustack: -{ - "@it's annotated" -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/helper_helper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/helper_helper.d deleted file mode 100644 index 8abc47d006dc..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/helper_helper.d +++ /dev/null @@ -1,32 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -dtrace:helper:ustack: -{ - "<it's working>" -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.c deleted file mode 100644 index 8cdf8abad5af..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.c +++ /dev/null @@ -1,43 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -int -baz(void) -{ - return (8); -} - -int -main(int argc, char **argv) -{ - for (;;) { - baz(); - } - - return (0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d deleted file mode 100644 index dd795bece03f..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d +++ /dev/null @@ -1,35 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#pragma D option quiet - -pid$1:a.out:baz:entry -{ - ustack(1, 1024); - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d.out deleted file mode 100644 index 806d6a2b43dc..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d.out +++ /dev/null @@ -1,4 +0,0 @@ - - tst.annotated.exe`baz - [ it's annotated ] - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.d deleted file mode 100644 index 78218bd72aea..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.d +++ /dev/null @@ -1,46 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -syscall::getpid:entry -/pid == $1/ -{ - @[ustackdepth] = count(); -} - -ERROR -/arg4 == DTRACEFLT_BADSTACK/ -{ - exit(0); -} - -profile:::tick-1s -/++n == 10/ -{ - exit(1) -} - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.s b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.s deleted file mode 100644 index a5076c969d92..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.s +++ /dev/null @@ -1,44 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/asm_linkage.h> - - DGDEF(__fsr_init_value) - .word 0 - - ENTRY(main) - save %sp, -SA(MINFRAME), %sp - mov %sp, %fp -loop: - call getpid - nop - ba loop - nop - ret - restore - SET_SIZE(main) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.c deleted file mode 100644 index fa4802acd5d6..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.c +++ /dev/null @@ -1,81 +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://www.opensolaris.org/os/licensing. - * 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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdint.h> -#include <stdlib.h> -#include <strings.h> - -int -baz(void) -{ - return (8); -} - -static int -foo(void) -{ - /* - * In order to assure that our helper is properly employed to identify - * the frame, we're going to trampoline through data. - */ - uint32_t instr[] = { - 0x9de3bfa0, /* save %sp, -0x60, %sp */ - 0x40000000, /* call baz */ - 0x01000000, /* nop */ - 0x81c7e008, /* ret */ - 0x81e80000 /* restore */ - }; - uint32_t *fp = malloc(sizeof (instr)); - - /* - * Do our little relocation dance. - */ - instr[1] |= ((uintptr_t)baz - (uintptr_t)&fp[1]) >> 2; - - /* - * Copy the code to the heap (it's a pain to build in ON with an - * executable stack). - */ - bcopy(instr, fp, sizeof (instr)); - - (*(int (*)(void))fp)(); - - free(fp); - - return (0); -} - -int -main(int argc, char **argv) -{ - for (;;) { - foo(); - } - - return (0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d deleted file mode 100644 index ce2b9b30f14f..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d +++ /dev/null @@ -1,44 +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://www.opensolaris.org/os/licensing. - * 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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ASSERTION: - * - * SECTION: - * - * NOTES: - * - */ - -#pragma D option quiet - -pid$1:a.out:baz:entry -{ - ustack(2, 1024); - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d.out deleted file mode 100644 index 29646288e7ac..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d.out +++ /dev/null @@ -1,4 +0,0 @@ - - tst.helper.exe`baz - <it's working> - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.trapstat.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.trapstat.ksh deleted file mode 100644 index 84af8006768f..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.trapstat.ksh +++ /dev/null @@ -1,87 +0,0 @@ -#/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 http://www.opensolaris.org/os/licensing. -# 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 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" - -# -# This script verifies that user-land stacks can be walked safely -# when the trapstat(1M) utility is running. An arbitrary program, w(1), -# is started once a second to ensure stacks can be walked at all stages -# of the process lifecycle. -# - -script() -{ - $dtrace -o $dtraceout -s /dev/stdin <<EOF - fbt::: - { - @[ustackdepth] = count(); - } -EOF -} - -run_commands() -{ - cnt=0 - - while [ $cnt -lt 10 ]; do - w > /dev/null - sleep 1 - cnt=$(($cnt+1)) - done -} - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 -dtraceout=/tmp/dtrace.out.$$ -script 2>/dev/null & -timeout=15 - -# -# Sleep while the above script fires into life. To guard against dtrace dying -# and us sleeping forever we allow 15 secs for this to happen. This should be -# enough for even the slowest systems. -# -while [ ! -f $dtraceout ]; do - sleep 1 - timeout=$(($timeout-1)) - if [ $timeout -eq 0 ]; then - echo "dtrace failed to start. Exiting." - exit 1 - fi -done - -run_commands & -trapstat -t 1 10 -status=$? - -rm $dtraceout - -exit $status diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c index 40200771fd4d..f2352ffe832a 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c @@ -1263,19 +1263,6 @@ alloc: else if (flags & DTRACE_O_ILP32) dtp->dt_conf.dtc_ctfmodel = CTF_MODEL_ILP32; -#ifdef __sparc - /* - * On SPARC systems, __sparc is always defined for <sys/isa_defs.h> - * and __sparcv9 is defined if we are doing a 64-bit compile. - */ - if (dt_cpp_add_arg(dtp, "-D__sparc") == NULL) - return (set_open_errno(dtp, errp, EDT_NOMEM)); - - if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_LP64 && - dt_cpp_add_arg(dtp, "-D__sparcv9") == NULL) - return (set_open_errno(dtp, errp, EDT_NOMEM)); -#endif - #ifdef illumos #ifdef __x86 /* diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c index 232a3723b11d..ca7bf407290f 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c @@ -441,12 +441,8 @@ dt_header_decl(dt_idhash_t *dhp, dt_ident_t *idp, void *data) return (dt_set_errno(dtp, errno)); if (fprintf(infop->dthi_out, - "#ifndef\t__sparc\n" - "extern int __dtraceenabled_%s___%s(void);\n" - "#else\n" - "extern int __dtraceenabled_%s___%s(long);\n" - "#endif\n", - infop->dthi_pfname, fname, infop->dthi_pfname, fname) < 0) + "extern int __dtraceenabled_%s___%s(void);\n", + infop->dthi_pfname, fname) < 0) return (dt_set_errno(dtp, errno)); return (0); @@ -509,15 +505,8 @@ dt_header_probe(dt_idhash_t *dhp, dt_ident_t *idp, void *data) if (!infop->dthi_empty) { if (fprintf(infop->dthi_out, - "#ifndef\t__sparc\n" - "#define\t%s_%s_ENABLED() \\\n" - "\t__dtraceenabled_%s___%s()\n" - "#else\n" "#define\t%s_%s_ENABLED() \\\n" - "\t__dtraceenabled_%s___%s(0)\n" - "#endif\n", - infop->dthi_pmname, mname, - infop->dthi_pfname, fname, + "\t__dtraceenabled_%s___%s()\n", infop->dthi_pmname, mname, infop->dthi_pfname, fname) < 0) return (dt_set_errno(dtp, errno)); diff --git a/cddl/contrib/opensolaris/lib/libdtrace/sparc/dt_isadep.c b/cddl/contrib/opensolaris/lib/libdtrace/sparc/dt_isadep.c deleted file mode 100644 index ed05275e7f83..000000000000 --- a/cddl/contrib/opensolaris/lib/libdtrace/sparc/dt_isadep.c +++ /dev/null @@ -1,338 +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 http://www.opensolaris.org/os/licensing. - * 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. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdlib.h> -#include <assert.h> -#include <errno.h> -#include <string.h> -#include <libgen.h> - -#include <dt_impl.h> -#include <dt_pid.h> - -#define OP(x) ((x) >> 30) -#define OP2(x) (((x) >> 22) & 0x07) -#define COND(x) (((x) >> 25) & 0x0f) -#define A(x) (((x) >> 29) & 0x01) - -#define OP_BRANCH 0 - -#define OP2_BPcc 0x1 -#define OP2_Bicc 0x2 -#define OP2_BPr 0x3 -#define OP2_FBPfcc 0x5 -#define OP2_FBfcc 0x6 - -/*ARGSUSED*/ -int -dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, - fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) -{ - ftp->ftps_type = DTFTP_ENTRY; - ftp->ftps_pc = (uintptr_t)symp->st_value; - ftp->ftps_size = (size_t)symp->st_size; - ftp->ftps_noffs = 1; - ftp->ftps_offs[0] = 0; - - if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { - dt_dprintf("fasttrap probe creation ioctl failed: %s\n", - strerror(errno)); - return (dt_set_errno(dtp, errno)); - } - - return (1); -} - -int -dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, - fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret) -{ - - uint32_t *text; - int i; - int srdepth = 0; - - if ((text = malloc(symp->st_size + 4)) == NULL) { - dt_dprintf("mr sparkle: malloc() failed\n"); - return (DT_PROC_ERR); - } - - if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { - dt_dprintf("mr sparkle: Pread() failed\n"); - free(text); - return (DT_PROC_ERR); - } - - /* - * Leave a dummy instruction in the last slot to simplify edge - * conditions. - */ - text[symp->st_size / 4] = 0; - - ftp->ftps_type = DTFTP_RETURN; - ftp->ftps_pc = symp->st_value; - ftp->ftps_size = symp->st_size; - ftp->ftps_noffs = 0; - - for (i = 0; i < symp->st_size / 4; i++) { - /* - * If we encounter an existing tracepoint, query the - * kernel to find out the instruction that was - * replaced at this spot. - */ - while (text[i] == FASTTRAP_INSTR) { - fasttrap_instr_query_t instr; - - instr.ftiq_pid = Pstatus(P)->pr_pid; - instr.ftiq_pc = symp->st_value + i * 4; - - if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_GETINSTR, - &instr) != 0) { - - if (errno == ESRCH || errno == ENOENT) { - if (Pread(P, &text[i], 4, - instr.ftiq_pc) != 4) { - dt_dprintf("mr sparkle: " - "Pread() failed\n"); - free(text); - return (DT_PROC_ERR); - } - continue; - } - - free(text); - dt_dprintf("mr sparkle: getinstr query " - "failed: %s\n", strerror(errno)); - return (DT_PROC_ERR); - } - - text[i] = instr.ftiq_instr; - break; - } - - /* save */ - if ((text[i] & 0xc1f80000) == 0x81e00000) { - srdepth++; - continue; - } - - /* restore */ - if ((text[i] & 0xc1f80000) == 0x81e80000) { - srdepth--; - continue; - } - - if (srdepth > 0) { - /* ret */ - if (text[i] == 0x81c7e008) - goto is_ret; - - /* return */ - if (text[i] == 0x81cfe008) - goto is_ret; - - /* call or jmpl w/ restore in the slot */ - if (((text[i] & 0xc0000000) == 0x40000000 || - (text[i] & 0xc1f80000) == 0x81c00000) && - (text[i + 1] & 0xc1f80000) == 0x81e80000) - goto is_ret; - - /* call to one of the stret routines */ - if ((text[i] & 0xc0000000) == 0x40000000) { - int32_t disp = text[i] << 2; - uint64_t dest = ftp->ftps_pc + i * 4 + disp; - - dt_dprintf("dest = %llx\n", (u_longlong_t)dest); - - if (dest == stret[0] || dest == stret[1] || - dest == stret[2] || dest == stret[3]) - goto is_ret; - } - } else { - /* external call */ - if ((text[i] & 0xc0000000) == 0x40000000) { - int32_t dst = text[i] << 2; - - dst += i * 4; - - if ((uintptr_t)dst >= (uintptr_t)symp->st_size) - goto is_ret; - } - - /* jmpl into %g0 -- this includes the retl pseudo op */ - if ((text[i] & 0xfff80000) == 0x81c00000) - goto is_ret; - - /* external branch -- possible return site */ - if (OP(text[i]) == OP_BRANCH) { - int32_t dst; - int baa; - - switch (OP2(text[i])) { - case OP2_BPcc: - dst = text[i] & 0x7ffff; - dst <<= 13; - dst >>= 11; - - baa = COND(text[i]) == 8 && A(text[i]); - break; - case OP2_Bicc: - dst = text[i] & 0x3fffff; - dst <<= 10; - dst >>= 8; - - baa = COND(text[i]) == 8 && A(text[i]); - break; - case OP2_BPr: - dst = (((text[i]) >> 6) & 0xc000) | - ((text[i]) & 0x3fff); - dst <<= 16; - dst >>= 14; - - baa = 0; - break; - case OP2_FBPfcc: - dst = text[i] & 0x7ffff; - dst <<= 13; - dst >>= 11; - - baa = COND(text[i]) == 8 && A(text[i]); - break; - case OP2_FBfcc: - dst = text[i] & 0x3fffff; - dst <<= 10; - dst >>= 8; - - baa = COND(text[i]) == 8 && A(text[i]); - break; - default: - continue; - } - - dst += i * 4; - - /* - * Interpret branches outside of the function's - * bounds as potential return sites. If the - * branch is a ba,a don't skip the instruction - * in the delay slot. - */ - if ((uintptr_t)dst >= - (uintptr_t)symp->st_size) { - if (baa) - goto is_ret_baa; - else - goto is_ret; - } - } - } - - continue; -is_ret: - i++; -is_ret_baa: - dt_dprintf("return at offset %x\n", i * 4); - ftp->ftps_offs[ftp->ftps_noffs++] = i * 4; - } - - free(text); - if (ftp->ftps_noffs > 0) { - if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { - dt_dprintf("fasttrap probe creation ioctl failed: %s\n", - strerror(errno)); - return (dt_set_errno(dtp, errno)); - } - } - - - return (ftp->ftps_noffs); -} - -/*ARGSUSED*/ -int -dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp, - fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off) -{ - if (off & 0x3) - return (DT_PROC_ALIGN); - - ftp->ftps_type = DTFTP_OFFSETS; - ftp->ftps_pc = (uintptr_t)symp->st_value; - ftp->ftps_size = (size_t)symp->st_size; - ftp->ftps_noffs = 1; - ftp->ftps_offs[0] = off; - - if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { - dt_dprintf("fasttrap probe creation ioctl failed: %s\n", - strerror(errno)); - return (dt_set_errno(dtp, errno)); - } - - return (1); -} - -/*ARGSUSED*/ -int -dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp, - fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern) -{ - ulong_t i; - - ftp->ftps_type = DTFTP_OFFSETS; - ftp->ftps_pc = (uintptr_t)symp->st_value; - ftp->ftps_size = (size_t)symp->st_size; - ftp->ftps_noffs = 0; - - /* - * If we're matching against everything, just iterate through each - * instruction in the function, otherwise look for matching offset - * names by constructing the string and comparing it against the - * pattern. - */ - if (strcmp("*", pattern) == 0) { - for (i = 0; i < symp->st_size; i += 4) { - ftp->ftps_offs[ftp->ftps_noffs++] = i; - } - } else { - char name[sizeof (i) * 2 + 1]; - - for (i = 0; i < symp->st_size; i += 4) { - (void) sprintf(name, "%lx", i); - if (gmatch(name, pattern)) - ftp->ftps_offs[ftp->ftps_noffs++] = i; - } - } - - if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) { - dt_dprintf("fasttrap probe creation ioctl failed: %s\n", - strerror(errno)); - return (dt_set_errno(dtp, errno)); - } - - return (ftp->ftps_noffs); -} diff --git a/cddl/contrib/opensolaris/lib/libdtrace/sparc/regs.d b/cddl/contrib/opensolaris/lib/libdtrace/sparc/regs.d deleted file mode 100644 index 7c4bc0fac519..000000000000 --- a/cddl/contrib/opensolaris/lib/libdtrace/sparc/regs.d +++ /dev/null @@ -1,120 +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 http://www.opensolaris.org/os/licensing. - * 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -inline int R_G0 = 0; -#pragma D binding "1.0" R_G0 -inline int R_G1 = 1; -#pragma D binding "1.0" R_G1 -inline int R_G2 = 2; -#pragma D binding "1.0" R_G2 -inline int R_G3 = 3; -#pragma D binding "1.0" R_G3 -inline int R_G4 = 4; -#pragma D binding "1.0" R_G4 -inline int R_G5 = 5; -#pragma D binding "1.0" R_G5 -inline int R_G6 = 6; -#pragma D binding "1.0" R_G6 -inline int R_G7 = 7; -#pragma D binding "1.0" R_G7 - -inline int R_O0 = 8; -#pragma D binding "1.0" R_O0 -inline int R_O1 = 9; -#pragma D binding "1.0" R_O1 -inline int R_O2 = 10; -#pragma D binding "1.0" R_O2 -inline int R_O3 = 11; -#pragma D binding "1.0" R_O3 -inline int R_O4 = 12; -#pragma D binding "1.0" R_O4 -inline int R_O5 = 13; -#pragma D binding "1.0" R_O5 -inline int R_O6 = 14; -#pragma D binding "1.0" R_O6 -inline int R_O7 = 15; -#pragma D binding "1.0" R_O7 - -inline int R_L0 = 16; -#pragma D binding "1.0" R_L0 -inline int R_L1 = 17; -#pragma D binding "1.0" R_L1 -inline int R_L2 = 18; -#pragma D binding "1.0" R_L2 -inline int R_L3 = 19; -#pragma D binding "1.0" R_L3 -inline int R_L4 = 20; -#pragma D binding "1.0" R_L4 -inline int R_L5 = 21; -#pragma D binding "1.0" R_L5 -inline int R_L6 = 22; -#pragma D binding "1.0" R_L6 -inline int R_L7 = 23; -#pragma D binding "1.0" R_L7 - -inline int R_I0 = 24; -#pragma D binding "1.0" R_I0 -inline int R_I1 = 25; -#pragma D binding "1.0" R_I1 -inline int R_I2 = 26; -#pragma D binding "1.0" R_I2 -inline int R_I3 = 27; -#pragma D binding "1.0" R_I3 -inline int R_I4 = 28; -#pragma D binding "1.0" R_I4 -inline int R_I5 = 29; -#pragma D binding "1.0" R_I5 -inline int R_I6 = 30; -#pragma D binding "1.0" R_I6 -inline int R_I7 = 31; -#pragma D binding "1.0" R_I7 - -inline int R_CCR = 32; -#pragma D binding "1.0" R_CCR -inline int R_PC = 33; -#pragma D binding "1.0" R_PC -inline int R_nPC = 34; -#pragma D binding "1.0" R_nPC -inline int R_NPC = R_nPC; -#pragma D binding "1.0" R_NPC -inline int R_Y = 35; -#pragma D binding "1.0" R_Y -inline int R_ASI = 36; -#pragma D binding "1.0" R_ASI -inline int R_FPRS = 37; -#pragma D binding "1.0" R_FPRS -inline int R_PS = R_CCR; -#pragma D binding "1.0" R_PS -inline int R_SP = R_O6; -#pragma D binding "1.0" R_SP -inline int R_FP = R_I6; -#pragma D binding "1.0" R_FP -inline int R_R0 = R_O0; -#pragma D binding "1.0" R_R0 -inline int R_R1 = R_O1; -#pragma D binding "1.0" R_R1 diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c index c0719620dbde..e1f54e994ce3 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c @@ -38,9 +38,6 @@ */ #include <pthread.h> -#ifdef illumos -#include <synch.h> -#endif #include <stdio.h> #include "barrier.h" @@ -49,12 +46,7 @@ void barrier_init(barrier_t *bar, int nthreads) { pthread_mutex_init(&bar->bar_lock, NULL); -#ifdef illumos - sema_init(&bar->bar_sem, 0, USYNC_THREAD, NULL); -#else - sem_init(&bar->bar_sem, 0, 0); -#endif - + pthread_cond_init(&bar->bar_cv, NULL); bar->bar_numin = 0; bar->bar_nthr = nthreads; } @@ -65,26 +57,14 @@ barrier_wait(barrier_t *bar) pthread_mutex_lock(&bar->bar_lock); if (++bar->bar_numin < bar->bar_nthr) { + pthread_cond_wait(&bar->bar_cv, &bar->bar_lock); pthread_mutex_unlock(&bar->bar_lock); -#ifdef illumos - sema_wait(&bar->bar_sem); -#else - sem_wait(&bar->bar_sem); -#endif return (0); - } else { - int i; - /* reset for next use */ bar->bar_numin = 0; - for (i = 1; i < bar->bar_nthr; i++) -#ifdef illumos - sema_post(&bar->bar_sem); -#else - sem_post(&bar->bar_sem); -#endif + pthread_cond_broadcast(&bar->bar_cv); pthread_mutex_unlock(&bar->bar_lock); return (1); diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h index babf2e64e33f..138386f8ed46 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h @@ -33,12 +33,7 @@ * APIs for the barrier synchronization primitive. */ -#ifdef illumos -#include <synch.h> -#else -#include <semaphore.h> -typedef sem_t sema_t; -#endif +#include <pthread.h> #ifdef __cplusplus extern "C" { @@ -48,7 +43,7 @@ typedef struct barrier { pthread_mutex_t bar_lock; /* protects bar_numin */ int bar_numin; /* current number of waiters */ - sema_t bar_sem; /* where everyone waits */ + pthread_cond_t bar_cv; /* where everyone waits */ int bar_nthr; /* # of waiters to trigger release */ } barrier_t; diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index 42faaad65db5..815cc5478473 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -1360,11 +1360,7 @@ typedef struct fp_size_map { static const fp_size_map_t fp_encodings[] = { { { 4, 4 }, { CTF_FP_SINGLE, CTF_FP_CPLX, CTF_FP_IMAGRY } }, { { 8, 8 }, { CTF_FP_DOUBLE, CTF_FP_DCPLX, CTF_FP_DIMAGRY } }, -#ifdef __sparc - { { 16, 16 }, { CTF_FP_LDOUBLE, CTF_FP_LDCPLX, CTF_FP_LDIMAGRY } }, -#else { { 12, 16 }, { CTF_FP_LDOUBLE, CTF_FP_LDCPLX, CTF_FP_LDIMAGRY } }, -#endif { { 0, 0 }, { 0, 0, 0 } } }; diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile index 50250887e379..dda6168a8195 100644 --- a/cddl/lib/drti/Makefile +++ b/cddl/lib/drti/Makefile @@ -12,11 +12,11 @@ CLEANFILES= ${FILES} .undef LIBRARIES_ONLY CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index 4ce1de20a3d9..aef8c34c853c 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl +.PATH: ${ZFSTOP}/module/avl PACKAGE= zfs LIB_PACKAGE= @@ -8,9 +8,10 @@ LIBADD= spl SRCS= avl.c WARNS?= 3 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h + .include <bsd.lib.mk> diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile index 1c605182bc1d..b47f4a47551a 100644 --- a/cddl/lib/libctf/Makefile +++ b/cddl/lib/libctf/Makefile @@ -22,10 +22,10 @@ WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index dae6200d80c1..0742d0b5cd5a 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -78,11 +78,11 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index 833ecbb1c7f7..15846e67a14b 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${ZFSTOP}/module/icp PACKAGE= zfs LIB_PACKAGE= @@ -97,14 +97,14 @@ WARNS?= 2 SHLIB_MAJOR= 3 CSTD= c99 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index 0a5a81f4ab7f..8dc8c396774c 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${ZFSTOP}/module/icp PACKAGE= utilities LIB= icp_rescue @@ -86,7 +86,7 @@ KERNEL_C = \ core/kcf_prov_tabs.c \ $(ASM_SOURCES_C) -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +.PATH: ${ZFSTOP}/module/zfs KERNEL_C+= zfs_impl.c SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) @@ -95,14 +95,14 @@ WARNS?= 2 SHLIB_MAJOR= 3 CSTD= c99 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index 8245b324688b..c66424cef219 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -1,6 +1,6 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/module/nvpair +.PATH: ${ZFSTOP}/lib/libnvpair +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -20,12 +20,12 @@ SRCS+= nvpair_alloc_fixed.c \ WARNS?= 2 CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd 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+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID -DHAVE_CONFIG_H -DHAVE_XDR_BYTESREC .include <bsd.lib.mk> diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 173e9116e284..b0f47172e52d 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,8 +1,8 @@ .include <bsd.init.mk> .include <bsd.compiler.mk> -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libspl +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -49,12 +49,12 @@ SRCS += \ WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h .if ${COMPILER_TYPE} == "clang" diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile index 3a50a21bf62c..1ebfc52f5be9 100644 --- a/cddl/lib/libtpool/Makefile +++ b/cddl/lib/libtpool/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libtpool -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libtpool +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -14,13 +14,13 @@ SRCS= thread_pool.c WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libtpool/tests/Makefile b/cddl/lib/libtpool/tests/Makefile index 19e43cc18821..72a82b6afa59 100644 --- a/cddl/lib/libtpool/tests/Makefile +++ b/cddl/lib/libtpool/tests/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - ATF_TESTS_C+= libtpool_test TEST_METADATA+= timeout="10" diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 947e755d4aae..ca5a71d811f7 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -1,4 +1,4 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil +.PATH: ${ZFSTOP}/lib/libuutil PACKAGE= zfs LIB_PACKAGE= @@ -14,12 +14,12 @@ SRCS=\ WARNS?= 2 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd 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+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h LIBADD= avl spl diff --git a/cddl/lib/libzdb/Makefile b/cddl/lib/libzdb/Makefile index 040d7d2c63f9..f5a6a42d7aad 100644 --- a/cddl/lib/libzdb/Makefile +++ b/cddl/lib/libzdb/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzdb -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libzdb +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -13,15 +13,15 @@ SRCS = libzdb.c WARNS?= 2 CSTD= c99 -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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs 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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/lib/libzutil CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 376e32fb893f..ed0c240b1113 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -1,11 +1,11 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare -.PATH: ${SRCTOP}/sys/contrib/openzfs/include -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib +.PATH: ${ZFSTOP}/module/icp +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/lib/libzfs +.PATH: ${ZFSTOP}/lib/libzfs/os/freebsd +.PATH: ${ZFSTOP}/lib/libshare +.PATH: ${ZFSTOP}/include +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib PACKAGE= zfs LIB_PACKAGE= @@ -89,17 +89,17 @@ WARNS?= 2 SHLIB_MAJOR= 4 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libshare +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -DHAVE_EXECVPE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index 10533c5de05b..72b0f519e21d 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -1,7 +1,7 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core -.PATH: ${SRCTOP}/sys/contrib/openzfs/include -.PATH: ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/freebsd/zfs +.PATH: ${ZFSTOP}/lib/libzfs_core +.PATH: ${ZFSTOP}/include +.PATH: ${ZFSTOP}/include/os/freebsd/zfs +.PATH: ${ZFSTOP}/module/os/freebsd/zfs PACKAGE= zfs LIB_PACKAGE= @@ -17,17 +17,17 @@ SRCS= libzfs_core.c \ WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core/common -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libzfs_core +CFLAGS+= -I${ZFSTOP}/lib/libzfs_core/common +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/libzfsbootenv/Makefile b/cddl/lib/libzfsbootenv/Makefile index 22f5da1ee5b1..eba6a1d8bea8 100644 --- a/cddl/lib/libzfsbootenv/Makefile +++ b/cddl/lib/libzfsbootenv/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/lib/libzfsbootenv +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB_PACKAGE= @@ -20,16 +20,16 @@ SRCS= $(USER_C) CSTD= c99 CFLAGS+= -DIN_BASE -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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS.lzbe_device.c= -Wno-cast-qual CFLAGS.lzbe_util.c= -Wno-cast-qual CFLAGS.lzbe_pair.c= -Wno-cast-qual diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 031cc27fb431..80fec2eb3fb1 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/lib/libzpool # ZFS_COMMON_SRCS @@ -263,7 +261,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index 37e9e8dd5e63..952ebda889b2 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -1,6 +1,6 @@ -.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 +.PATH: ${ZFSTOP}/lib/libzutil +.PATH: ${ZFSTOP}/lib/libzutil/os/freebsd +.PATH: ${ZFSTOP}/module/os/freebsd/zfs PACKAGE= zfs LIB_PACKAGE= @@ -27,15 +27,15 @@ SRCS += zfs_ioctl_compat.c WARNS?= 2 CSTD= c99 -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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs 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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzutil +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -I${ZFSTOP}/lib/libzutil CFLAGS+= -DHAVE_ISSETUGID -DIN_BASE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile index 517ca402d4da..345321b5926d 100644 --- a/cddl/lib/pam_zfs_key/Makefile +++ b/cddl/lib/pam_zfs_key/Makefile @@ -1,5 +1,5 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key -.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${ZFSTOP}/contrib/pam_zfs_key +.PATH: ${ZFSTOP}/include PACKAGE= zfs LIB= pam_zfs_key @@ -13,17 +13,17 @@ SRCS= pam_zfs_key.c WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP} +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -I${ZFSTOP}/include/os/freebsd/zfs CFLAGS+= -DRUNSTATEDIR=\"/var/run\" .include "../../lib/libpam/modules/Makefile.inc" diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile index 9a0a5198602e..3b9abe4446e8 100644 --- a/cddl/sbin/zfs/Makefile +++ b/cddl/sbin/zfs/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zfs .PATH: ${ZFSTOP}/man/man7 .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile index ab7b852b4d9a..e2d8bf61e75b 100644 --- a/cddl/sbin/zpool/Makefile +++ b/cddl/sbin/zpool/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/man/man4 .PATH: ${ZFSTOP}/man/man5 .PATH: ${ZFSTOP}/man/man7 @@ -67,7 +65,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/cmd/zpool \ diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile index 6d3663081ae6..4bc8da774168 100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zpool/compatibility.d PACKAGE= zfs diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile index df53c46b7246..8ce1fce2a711 100644 --- a/cddl/usr.bin/ctfconvert/Makefile +++ b/cddl/usr.bin/ctfconvert/Makefile @@ -25,9 +25,9 @@ SRCS= alist.c \ util.c CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile index 357598583ae7..03d4632603ba 100644 --- a/cddl/usr.bin/ctfdump/Makefile +++ b/cddl/usr.bin/ctfdump/Makefile @@ -8,9 +8,9 @@ SRCS= dump.c \ utils.c CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${OPENSOLARIS_USR_DISTDIR} \ diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile index 81bccc047a25..73c929605414 100644 --- a/cddl/usr.bin/ctfmerge/Makefile +++ b/cddl/usr.bin/ctfmerge/Makefile @@ -25,9 +25,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile index fd8437ed3f2c..cd22feda937a 100644 --- a/cddl/usr.bin/zinject/Makefile +++ b/cddl/usr.bin/zinject/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zinject .PATH: ${ZFSTOP}/man/man8 @@ -15,7 +13,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index 7b753f79c4d7..d3371101f6dc 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zstream .PATH: ${ZFSTOP}/man/man8 @@ -25,7 +23,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile index ef4bd561b41a..192c0222377a 100644 --- a/cddl/usr.bin/ztest/Makefile +++ b/cddl/usr.bin/ztest/Makefile @@ -1,7 +1,5 @@ .include <src.opts.mk> -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd .PATH: ${ZFSTOP}/man/man1 @@ -15,7 +13,7 @@ CFLAGS+= \ -I${ZFSTOP}/include \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${ZFSTOP}/module/icp/include \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ diff --git a/cddl/usr.libexec/zfs_prepare_disk/Makefile b/cddl/usr.libexec/zfs_prepare_disk/Makefile index 0d3f9b56b28c..1a261c5684bc 100644 --- a/cddl/usr.libexec/zfs_prepare_disk/Makefile +++ b/cddl/usr.libexec/zfs_prepare_disk/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/scripts PACKAGE= zfs diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile index f91ce1a7a213..53779443573d 100644 --- a/cddl/usr.libexec/zpool_influxdb/Makefile +++ b/cddl/usr.libexec/zpool_influxdb/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zpool_influxdb .PATH: ${ZFSTOP}/man/man8 diff --git a/cddl/usr.sbin/dtrace/Makefile b/cddl/usr.sbin/dtrace/Makefile index cdfd8af8fe72..2cc5376c5fed 100644 --- a/cddl/usr.sbin/dtrace/Makefile +++ b/cddl/usr.sbin/dtrace/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/usr.sbin/lockstat/Makefile b/cddl/usr.sbin/lockstat/Makefile index 498e2a5857e0..cd2cb8c0c861 100644 --- a/cddl/usr.sbin/lockstat/Makefile +++ b/cddl/usr.sbin/lockstat/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris diff --git a/cddl/usr.sbin/plockstat/Makefile b/cddl/usr.sbin/plockstat/Makefile index 2880c6aeafc7..dcc51d9ac2b4 100644 --- a/cddl/usr.sbin/plockstat/Makefile +++ b/cddl/usr.sbin/plockstat/Makefile @@ -11,9 +11,9 @@ WARNS?= 1 CFLAGS+= -DIN_BASE CFLAGS+= -DSKIP_SPL_SYS_CONDVAR_H -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+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index f8f7eea6050b..6707d8fdaae7 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd/zdb .PATH: ${ZFSTOP}/man/man8 @@ -18,7 +16,7 @@ CFLAGS+= \ -I${ZFSTOP}/lib/libspl/include \ -I${ZFSTOP}/lib/libspl/include/os/freebsd \ -I${ZFSTOP}/lib/libspl/include/os/freebsd/spl \ - -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include \ + -I${ZFSTOP}/lib/libzpool/include \ -I${SRCTOP}/sys \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index 487caf54a0ce..c610a3bf3e5b 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -14,12 +14,12 @@ WARNS?= 2 IGNORE_PRAGMA= YES CFLAGS+= -DIN_BASE -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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -I${SRCTOP}/cddl/usr.sbin CFLAGS+= -DHAVE_ISSETUGID diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile index 2b981919e17b..a238da39a243 100644 --- a/cddl/usr.sbin/zhack/Makefile +++ b/cddl/usr.sbin/zhack/Makefile @@ -1,5 +1,3 @@ -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - .PATH: ${ZFSTOP}/cmd .PATH: ${ZFSTOP}/man/man1 @@ -12,14 +10,14 @@ CSTD= c99 WARNS?= 2 CFLAGS+= -DIN_BASE -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+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzpool/include +CFLAGS+= -I${ZFSTOP}/include +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/ +CFLAGS+= -I${ZFSTOP}/lib/libspl/include/os/freebsd +CFLAGS+= -I${ZFSTOP}/lib/libzpool/include 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+= -I${ZFSTOP}/module/icp/include +CFLAGS+= -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h |
