[Bug 217307] Commit r314075 produces implicit forward declaration error

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Feb 23 04:40:42 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217307

            Bug ID: 217307
           Summary: Commit r314075 produces implicit forward declaration
                    error
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: karl at denninger.net

Post this commit the following blowup occurs in Crochet when trying to build
for the RPI3:

--- all_subdir_tests ---
/pics/CrossBuild-12/src/tests/sys/kern/ptrace_test.c:1694:3: error: implicit
declaration of function 'breakpoint' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
                breakpoint();
                ^
--- all_subdir_lib ---


This call was introduced here:

root at NewFS:/pics/CrossBuild-12/src/tests/sys/kern # svnlite log -r314075 --diff
ptrace_test.c | more
------------------------------------------------------------------------
r314075 | badger | 2017-02-21 22:35:07 -0600 (Tue, 21 Feb 2017) | 7 lines

Fix world build for archs where __builtin_debugtrap() does not work.

The offending code was introduced in r313992.

Reported by:    rpokala
Approved by:    kib (mentor)


Index: ptrace_test.c
===================================================================
--- ptrace_test.c       (revision 314074)
+++ ptrace_test.c       (revision 314075)
@@ -37,6 +37,7 @@
 #include <sys/user.h>
 #include <sys/wait.h>
 #include <errno.h>
+#include <machine/cpufunc.h>
 #include <pthread.h>
 #include <semaphore.h>
 #include <signal.h>
@@ -1690,7 +1691,7 @@
        ATF_REQUIRE((fpid = fork()) != -1);
        if (fpid == 0) {
                trace_me();
-               __builtin_debugtrap();
+               breakpoint();
                exit(1);
        }


------------------------------------------------------------------------

At present I am only building -HEAD for the Pi3, so I do not know if the same
issue arises on all architectures (I assume not, or the commit likely would not
have been posted.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list