Currently EXTRA_BUILDDEPS is evaluated before build.mk. This means that
userspace apps or other EXTRA_BUILDRULES cannot add items to
EXTRA_BUILDDEPS and have it function as would be expected.
Bug: 143636864
Change-Id: Idc1504b09f31b4c54148bb6892193d11f45e08ff
From working with -Wpacked its clear that some of the virtio
structures are overly packed and result in bad codegen on particular
architectures such as riscv. Roll back from using packed but
statically assert that the sizes are correct for some future arch
where things naturally pack differently.
Mostly just a few warnings where things are promoted via passing floats to
printf. Those we should generally remove anyway because they're just
benchmarking code. Most things LK runs on either doesn't have float or
doesn't have double sized floats.
Been carrying this flag around for years but from sleuthing around in
the compiler it seems to only exist as the opposite to -fno-inline which
has an actual effect. Only reason -finline would do anything would be to
cancel a previous -fno-inline switch.
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