Bug 224653 - arm64 kernel compile fail with "nooptions KDB"
Summary: arm64 kernel compile fail with "nooptions KDB"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Some People
Assignee: Oleksandr Tymoshenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-28 19:25 UTC by Andreas Schwarz
Modified: 2018-04-04 02:33 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwarz 2017-12-28 19:25:36 UTC
The kernel compile fail when build without KDB. Reason is the usage of kdb_trap() in /usr/src/sys/arm64/arm64/trap.c:326 outside of an "#ifdef KDB" condition. It's easy to fix, just put it into #ifdef KDB [...] #endif.

I've put the last lines of the "make buildkernel" output below.

[...]
--- trap.o ---
/usr/src/sys/arm64/arm64/trap.c:326:3: error: implicit declaration of function 'kdb_trap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                kdb_trap(exception, 0,
                ^
/usr/src/sys/arm64/arm64/trap.c:326:3: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
2 errors generated.
*** [trap.o] Error code 1

make[2]: stopped in /usr/obj/usr/src/arm64.aarch64/sys/PINE64-ASC
1 error

make[2]: stopped in /usr/obj/usr/src/arm64.aarch64/sys/PINE64-ASC
*** [buildkernel] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
*** [buildkernel] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-04-04 01:13:39 UTC
A commit references this bug:

Author: gonzo
Date: Wed Apr  4 01:13:28 UTC 2018
New revision: 331967
URL: https://svnweb.freebsd.org/changeset/base/331967

Log:
  Fix arm64 buildkernel target with "nooptions KDB"

  Make kdb_trap in breakpoint exception handler conditional. If "options KDB"
  is not present just panic with message that debugger is not enabled.

  PR:		224653

Changes:
  head/sys/arm64/arm64/trap.c