Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.
Disable one warning that was annoying about comparing null to arguments
marked nonnull.
When lib/version was included, a rule depended on .PHONY. This would
unexpectedly invoke other rules defined as dependent on .PHONY (standard
phony-ness signal).
As a side effect, this used to generate srcfiles.txt and
include_paths.txt in build dir. Since they are useful, we might always
build those anyway, and not make them phony at all.
If some included rule.mk defines an additional make target that the user
might want to call (e.g., "flash"), and user specifies a project name on
the command line, then previously the outer "makefile" would call
engine.mk multiple times. The new logic prevents that.
Additionally, silence extra "Nothing to be done" messages when calling
engine.mk again after removing the project name from make goals.
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
Move statement that sets DEPS make variable a bit later in engine.mk
execution flow (after including make/build.mk) so that it would include
modules added through EXTRA_BUILDRULES mechanism.
Change-Id: I5c7a02eaf272f009a81ac9868f378b9baa23faae
This is almost always due to #ifdefed code referring to a label.
Since you cant mark a label as UNUSED the way you can a variable,
adding this warning squelch seems like the best strategy.
Added architecture specific variables
ARCH_COMPILEFLAGS
ARCH_CFLAGS
ARCH_CPPFLAGS
ARCH_ASMFLAGS
These variables are passed directly to $(CC) command and
are supposed to have global but architecture specific
settings.
Change-Id: I0929afacb4ad5229f503217ee370e0a84a15f35d
All makefiles added to EXTRA_BUILDRULES variable
will be included right before processing bulk of build.mk
Change-Id: Ic37e37ea7469ee57e6f6543f378c5d0c1510824b
Add LKROOT to LKINC only if it is not already there.
This would allow to specify particular overlay processing
order if required.
Remove adding separate LKROOT/include to GLOBAL_DEFINES as
It is already a part of LKINC list.
Add all directories specified by LKINC to GLOBAL_LDFLAGS instead
of just LKROOT
Change-Id: Ia61623f88f2c5978182c40b09d98b6e5b84e3955
This fileformat does not support large offsets, and fail to build if
the kernel base is at a high address on 64 bit systems.
Change-Id: I4e2cb58f46c62fded0de485c982dfdc5b6f3622f
-Have arch set the default optimization level. Most will use
O2, but arm-m sets to Os.
-Make the link time garbage collection be optional. Only set
for arm-m.
Split the MAKECONFIGHEADER macro into the part that generates
the header and the part that tests if you should replace the
target file with the generated one.
The kernel shouldn't really own most of the bringup of all
the modules. Generally speaking the kernel can and should be treated
like any other module in the system.
-Remove top level DEBUG=<N> define
-Rename DEBUGLEVEL to LK_DEBUGLEVEL to be clear.
-Fix the places that used DEBUGLEVEL and the few spots that #ifdef
on DEBUG.
To be more consistent, rename make variable INCLUDES to GLOBAL_INCLUDES.
Also remove the need to put -I in front of each field, the make system
will do that for you.
To fix your module makefiles:
-Change INCLUDES -> GLOBAL_INCLUDES
-Remove -I prefix
Using environment variables LKROOT and LKINC you can specify multiple
parallel top level directories (outside of the lk root) that are overlayed
on top of the build system. This allows for a structure like
lk/
testproject/
someotherfirmware/
Where each of these subdirs has an entire overlayed tree of libraries, platforms,
targets, and projects.
To accomplish this, copy makefile into the root dir and build a lk_inc.mk that
sets LKROOT and LKINC.