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)
Wed, Nov 13, 6:52 AM
Unknown Object (File)
Sat, Oct 26, 6:51 PM
Unknown Object (File)
Oct 19 2024, 5:29 PM
Unknown Object (File)
Oct 4 2024, 11:55 AM
Unknown Object (File)
Oct 4 2024, 4:10 AM
Unknown Object (File)
Oct 1 2024, 7:50 PM
Unknown Object (File)
Sep 28 2024, 10:48 AM
Unknown Object (File)
Sep 25 2024, 10:42 PM
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.