Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2024 20:53:21 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 95ca89cda1a6 - main - ctfmerge: demote "No ctf sections found" to a warning
Message-ID:  <202402142053.41EKrLW2085129@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa

commit 95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-02-14 14:48:42 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-02-14 20:53:11 +0000

    ctfmerge: demote "No ctf sections found" to a warning
    
    If there are no CTF sections then ctfmerge just has nothing to do; it
    should not be an error.
    
    Note that ctfmerge has an option to require CTF:
         -t      Make sure that all object files have a CTF section.
    
    Before this change, this option explicitly exited without error if none
    of the object files have CTF sections, with the comment:
    
        If we're verifying that C files have CTF, it's safe to
        assume that in this case, we're building only from assembly
        inputs.
    
    PR:             276930
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D43878
---
 cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
index 27aa4d01b03d..c5be22ecfa1b 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
@@ -912,14 +912,8 @@ main(int argc, char **argv)
 	 */
 	if (read_ctf(ifiles, nifiles, NULL, merge_ctf_cb,
 	    &wq, require_ctf) == 0) {
-		/*
-		 * If we're verifying that C files have CTF, it's safe to
-		 * assume that in this case, we're building only from assembly
-		 * inputs.
-		 */
-		if (require_ctf)
-			exit(0);
-		terminate("No ctf sections found to merge\n");
+		warning("No ctf sections found to merge\n");
+		exit(0);
 	}
 
 	pthread_mutex_lock(&wq.wq_queue_lock);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402142053.41EKrLW2085129>