Page MenuHomeFreeBSD

ARM: Allow systems that do not define LINUX_BOOT_ABI to compile properly
ClosedPublic

Authored by sgalabov on Nov 7 2016, 9:46 AM.
Tags
Referenced Files
Unknown Object (File)
Thu, Apr 11, 1:34 PM
Unknown Object (File)
Sat, Mar 23, 2:16 AM
Unknown Object (File)
Mon, Mar 18, 6:49 AM
Unknown Object (File)
Dec 27 2023, 5:36 PM
Unknown Object (File)
Dec 27 2023, 5:09 PM
Unknown Object (File)
Dec 20 2023, 1:59 AM
Unknown Object (File)
Nov 25 2023, 3:31 PM
Unknown Object (File)
Nov 20 2023, 4:03 AM
Subscribers

Details

Summary

At the moment the SHEEVAPLUG (for example) kernel can't be compiled as is due to the fact that it doesn't define LINUX_BOOT_ABI.
The reason is that we include sys/boot.h unconditionally, but do not use its contents (specifically the howto_names static array defined within it) if LINUX_BOOT_ABI is not defined.
So, let's only include the file if LINUX_BOOT_ABI is defined.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sgalabov retitled this revision from to ARM: Allow systems that do not define LINUX_BOOT_ABI to compile properly.
sgalabov updated this object.
sgalabov edited the test plan for this revision. (Show Details)
sgalabov added a reviewer: ARM.
sgalabov set the repository for this revision to rS FreeBSD src repository - subversion.
sgalabov added a project: ARM.

Actual build failure message is:
/src/current.git/sys/sys/boot.h:40: warning: 'howto_names' defined but not used

Looking at sys/sys/boot.h this is more or less normal. Looking at the implementation of sys/arm/arm/machdep.c, the only place where we use howto_names is within a #ifdef LINUX_BOOT_ABI block, so it makes sense to include sys/sys/boot.h only if LINUX_BOOT_ABI is defined.

mmel added a reviewer: mmel.
mmel added a subscriber: mmel.

Hmm, right.

Btw, which compiler you use? It seems that clang doesn't generate error for unused external variables...

This revision is now accepted and ready to land.Nov 7 2016, 10:29 AM
In D8459#175948, @meloun-miracle-cz wrote:

Hmm, right.

Btw, which compiler you use? It seems that clang doesn't generate error for unused external variables...

I'm using the default gcc.. maybe this is not 100% correct for ARM anymore (it was, last time I used it :-) ), but in any case I guess we should go ahead and put the include of sys/boot.h within an #ifdef LINUX_BOOT_ABI block..

This revision was automatically updated to reflect the committed changes.