Bug 217307 - Commit r314075 produces implicit forward declaration error
Summary: Commit r314075 produces implicit forward declaration error
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-23 04:40 UTC by karl
Modified: 2017-02-23 15:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description karl 2017-02-23 04:40:42 UTC
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@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.)
Comment 1 karl 2017-02-23 15:09:35 UTC
Fixed by r314118 last evening