Age | Commit message (Collapse) | Author | Files | Lines |
|
Instead of having individual rules to generate .d, add -MMD to
HOSTCC parameters, and just include the generated .d files.
This fixes a few weird dependency issues.
Also, make the mambo hello_kernel test depend on skiboot.lid
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We now warn on any function or stack frame that's going to use
more than 1024 bytes of stack.
The current biggest user with 912 bytes is p7ioc_init_ci_routing()
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When using a build directory different from the source tree, .C files
and make_version.sh are not found :
make: *** No rule to make target `libpore/p8_pore_table_gen_api_fixed.o', needed by `libpore/built-in.o'.
make: *** No rule to make target `make_version.sh', needed by `version.c'.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
whoops
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We grab a version from git tags (or SKIBOOT_VERSION environment variable),
optionally tack on EXTRA_VERSION (if from git) as well as add things to the
git version number if we're ahead of the most recent tag or the tree is dirty.
Also fix-up makefiles so that we don't have to rebuild version.c every time
you run make.
fsp attn area needed updating as we can have >40 character version strings.
We also export the version string via device tree rather than just the gitid.
For buildroot builds, setting SKIBOOT_VERSION environment variable to the
tag you grab will do the correct thing.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We use a double link technique, doing a first pass with a .o containing
a dummy symbol map, then re-linking with a new .o
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds:
- Normal builds are done with -fstack-protector (we want to investigate
using -fstack-protector-strong on gcc4.9 but for now we just use that
- Build with STACK_CHECK=1 will use -fstack-protector-all and -pg and
will check the stack in mcount
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Otherwise, if your path contains something like "linux-foo" then the "linux"
part gets replaced by the preprocessor due to stupid built-ins.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add support in core/test/Makefile.check to build -gcov
binaries (with -lgcov and -fprofile-blah-blah) as well
as some targets for producing lcov HTML code coverage reports.
As part of this, I had to fix up an oddity in run-mem_region_init
where that due to running under Valgrind, we'd be malloc()ed a
heap with a small address, well inside the mem_regions we added but
when not running under valgrind (e.g. for code coverage reporting)
we would get a much larger address, outside this range and hit
an assert. So, after fiddling with the memory stuff for this test,
I think I have it right - it passes both under valgrind and not and
does produce code coverage data.
Currently, we're at this level of code coverage by unit tests:
Hit Total Coverage
Lines: 1936 2574 75.2 %
Functions: 177 225 78.7 %
Branches: 1243 2360 52.7 %
The totals should largely be ignored due to the only code being
counted is that linked into the unit tests (total LOC is ~50kLOC
according to sloccount... so unit tests currently cover < 5%)
Try the "make coverage-report" target, you'll get coverage-report
directory with a LCOV HTML report
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
If skiboot doesn't live in a git repository, the makefile will go
searching up the directory tree for one. To save confusion, only look in
the source tree for the git repository.
The gitid can be overridden by passing GIT_SHA=foo as an argument to
make. This is useful for doing builds outside of a git tree, as
buildroot does.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The objcopy call was the odd one out in our build output.
Before:
[LD] hw/built-in.o
[LD] skiboot.elf
powerpc-linux-gnu-objcopy -O binary -S skiboot.elf skiboot.lid
[NM] skiboot.map
After:
[LD] hw/built-in.o
[LD] skiboot.elf
[OBJCOPY] skiboot.lid
[NM] skiboot.map
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
It turns out that GCC will use a builtin printf implementation that
directly wraps vfprintf (or something), so when I tried to do my
neat trick of overriding printf() with a call to vprlog() adding the
timebase and default log level to the log message, it wouldn't work as
GCC was being helpful.
This change to compiler options will mean that other places where GCC
is being helpful and using builtins rather than our implementations will
go away, potentially helping/hurting us.
We probably want to build with -ffreestanding anyway though.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|