09 Sep, 2015
1 commit
-
Pull core kbuild updates from Michal Marek:
- modpost portability fix
- linker script fix
- genksyms segfault fix
- fixdep cleanup
- fix for clang detection* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Fix clang detection
kbuild: fixdep: drop meaningless hash table initialization
kbuild: fixdep: optimize code slightly
genksyms: Regenerate parser
genksyms: Duplicate function pointer type definitions segfault
kbuild: Fix .text.unlikely placement
Avoid conflict with host definitions when cross-compiling
04 Sep, 2015
1 commit
-
We cannot detect clang before including the arch Makefile, because that
can set the default cross compiler. We also cannot detect clang after
including the arch Makefile, because powerpc wants to know about clang.
Solve this by using an deferred variable. This costs us a few shell
invocations, but this is only a constant number.Reported-by: Behan Webster
Reported-by: Anton Blanchard
Signed-off-by: Michal Marek
14 Aug, 2015
1 commit
-
Since commit 1329e8cc69 ("modsign: Extract signing cert from
CONFIG_MODULE_SIG_KEY if needed"), the build system has carefully coped
with the signing key being specified as a relative path in either the
source or or the build trees.However, the actual signing of modules has not worked if the filename
is relative to the source tree.Fix that by moving the config_filename helper into scripts/Kbuild.include
so that it can be used from elsewhere, and then using it in the top-level
Makefile to find the signing key file.Kill the intermediate $(MODPUBKEY) and $(MODSECKEY) variables too, while
we're at it. There's no need for them.Signed-off-by: David Woodhouse
Signed-off-by: David Howells
10 Jan, 2015
3 commits
-
The macro "try-run" can have an argument for each of true and false
cases. Having an argument for the false case of cc-ifversion (and
ld-ifversion) would be useful too.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek -
The macros cc-version, cc-fullversion and ld-version take no argument.
It is not necessary to add $(call ...) to invoke them.Signed-off-by: Masahiro Yamada
Acked-by: Helge Deller [parisc]
Signed-off-by: Michal Marek -
The macro "cc-version" takes no argument. Drop $(CC) from the
"cc-ifversion" definition.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
21 Dec, 2014
1 commit
-
Pull kbuild updates from Michal Marek:
"Here are the kbuild changes for v3.19-rc1:- Cleanups and deduplication in the main Makefile and
scripts/Makefile.*
- Sort the output of *config targets in make help
- Old is always removed to avoid a surprise during
bisecting
- Warning fix in kconfig"* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: remove redundant -rR flag of hdr-inst
kbuild: Fix make help- on powerpc
kbuild: Automatically remove stale file
kconfig: Fix warning "‘jump’ may be used uninitialized"
Makefile: sort list of defconfig targets in make help output
kbuild: Remove duplicate $(cmd) definition in Makefile.clean
kbuild: collect shorthands into scripts/Kbuild.include
03 Dec, 2014
1 commit
-
Passing -rR for "make headers_install" is redundant because
the top Makefile has already set -rR to MAKEFLAGS.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
26 Nov, 2014
1 commit
-
The shorthand "clean" is defined in both the top Makefile and
scripts/Makefile.clean. Likewise, the "hdr-inst" is defined in
both the top Makefile and scripts/Makefile.headersinst.To reduce code duplication, this commit collects them into
scripts/Kbuild.include like the "build" and "modbuiltin" shorthands.
It requires scripts/Makefile.clean to include scripts/Kbuild.include,
but its impact on the performance of "make clean" should be
negligible.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
22 Oct, 2014
1 commit
-
Move dtbs install rules to Makefile.dtbinst. This change is needed to
implement support for dts vendor subdirs. The change makes Makefiles
easier and smaller as no longer the dtbs_install rule needs to be
defined. Another advantage is that install goals are not encoded in
targets anymore (%.dtb_dtbinst_).Signed-off-by: Robert Richter
02 Oct, 2014
1 commit
-
$(if $(KBUILD_SRC),$(srctree)/) was a useful strategy
to omit a long absolute path for in-source-tree build
prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af
(kbuild: Use relative path when building in the source tree).Now $(srctree) is "." when building in the source tree.
It would not be annoying to add "$(srctree)/" all the time.Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
08 Aug, 2014
1 commit
-
Commit c353acba ("kbuild: make: fix if_changed when command contains
backslashes") attempted to handle backslashes in *.cmd files, but it
only handled double backslashes for some reason. Changing make-cmd to also
handle single backslashes fixes rebuilds with dash, but it breaks bash
again. The reason is that the two shells disagree about the
interpretation of backslash sequences in the echo builtin. The way out
of this is to print the command with printf '%s\n'. While at it,
document what the individual parts of make-cmd do and why.Reported-and-tested-by: Konstantin Khlebnikov
Reviewed-by: Sam Ravnborg
Signed-off-by: Michal Marek
08 Apr, 2014
1 commit
-
Pull kbuild changes from Michal Marek:
- cleanups in the main Makefiles and Documentation/DocBook/Makefile
- make O=... directory is automatically created if needed
- mrproper/distclean removes the old include/linux/version.h to make
life easier when bisecting across the commit that moved the version.h
file* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: docbook: fix the include error when executing "make help"
kbuild: create a build directory automatically for out-of-tree build
kbuild: remove redundant '.*.cmd' pattern from make distclean
kbuild: move "quote" to Kbuild.include to be consistent
kbuild: docbook: use $(obj) and $(src) rather than specific path
kbuild: unconditionally clobber include/linux/version.h on distclean
kbuild: docbook: specify KERNELDOC dependency correctly
kbuild: docbook: include cmd files more simply
kbuild: specify build_docproc as a phony target
30 Mar, 2014
1 commit
-
Signed-off-by: Masahiro Yamada
Signed-off-by: Michal Marek
14 Feb, 2014
1 commit
-
To check the linker version. Used by the LTO makefile.
Signed-off-by: Andi Kleen
Link: http://lkml.kernel.org/r/1391846481-31491-9-git-send-email-ak@linux.intel.com
Signed-off-by: H. Peter Anvin
08 Apr, 2013
1 commit
-
The kbuild's ld-option function is broken because
the command
$(CC) /dev/null -c -o "$$TMPO"
does not create object file!I have used a relatively old mips gcc 3.4.6 cross-compiler
and a relatively new gcc 4.7.2 to check this fact
but the results are the same.EXAMPLE:
$ rm /tmp/1.o
$ mips-linux-gcc /dev/null -c -o /tmp/1.o
mips-linux-gcc: /dev/null: linker input file unused because linking not done
$ ls -la /tmp/1.o
ls: cannot access /tmp/1.o: No such file or directoryWe can easily fix the problem by adding
the '-x c' compiler option.EXAMPLE:
$ rm /tmp/1.o
$ mips-linux-gcc -x c /dev/null -c -o /tmp/1.o
$ ls -la /tmp/1.o
-rw-r--r-- 1 antony antony 778 Apr 2 20:40 /tmp/1.oAlso fix wrong ld-option example.
Signed-off-by: Antony Pavlov
Signed-off-by: Michal Marek
08 Oct, 2012
1 commit
-
Pull kbuild fixes from Michal Marek:
"Here are two fixes I intended to send after v3.6-rc7, but failed to do
so. So please pull them for v3.7-rc1 and they will be picked up by
stable.The first one fixes gcc -x syntax in various build-time
tests, which icecream and possible other gcc wrappers did not
understand (and yes, icecream is going to be fixed as well).The second one fixes make tar-pkg so that unpacking the tarball does
not replace the /lib -> /usr/lib symlink on recent Fedora releases."* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Fix gcc -x syntax
kbuild: Do not package /boot and /lib in make tar-pkg
06 Oct, 2012
1 commit
-
The call if_changed mechanism does not work when the command contains
backslashes. This basically is an issue with lzo and bzip2 compressed
kernels. The compressed binaries do not contain the uncompressed image
size, so these use size_append to append the size. This results in
backslashes in the executed command. With this if_changed always
detects a change in the command and rebuilds the compressed image even
if nothing has changed.Fix this by escaping backslashes in make-cmd
Signed-off-by: Sascha Hauer
Signed-off-by: Jan Luebbe
Cc: Sam Ravnborg
Cc: Bernhard Walle
Cc: Michal Marek
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Oct, 2012
1 commit
-
The correct syntax for gcc -x is "gcc -x assembler", not
"gcc -xassembler". Even though the latter happens to work, the former
is what is documented in the manual page and thus what gcc wrappers
such as icecream do expect.This isn't a cosmetic change. The missing space prevents icecream from
recognizing compilation tasks it can't handle, leading to silent kernel
miscompilations.Besides me, credits go to Michael Matz and Dirk Mueller for
investigating the miscompilation issue and tracking it down to this
incorrect -x parameter syntax.Signed-off-by: Jean Delvare
Acked-by: Ingo Molnar
Cc: stable@vger.kernel.org
Cc: Bernhard Walle
Cc: Michal Marek
Cc: Ralf Baechle
Signed-off-by: Michal Marek
25 Mar, 2012
1 commit
-
"echo -e" is a GNU extension. When cross-compiling the kernel on a
BSD-like operating system (Mac OS X in my case), this doesn't work.One could install a GNU version of echo, put that in the $PATH before
the system echo and use "/usr/bin/env echo", but the solution with
printf is simpler.Since it is no disadvantage on Linux, I hope that gets accepted even if
cross-compiling the Linux kernel on another Unix operating system is
quite a rare use case.Signed-off-by: Bernhard Walle
Andreas Bießmann
Signed-off-by: Michal Marek
10 Jun, 2011
1 commit
-
On the same model as `basetarget', it represents the filename of first
prerequisite with directory and extension stripped.Signed-off-by: Arnaud Lacombe
16 May, 2011
1 commit
-
Based on a patch by Rabin Vincent.
Fix building with KBUILD_NOCMDDEP=1, which currently does not work
because it does not build built-in.o with no dependencies:LD fs/notify/built-in.o
ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory
ld: cannot find fs/notify/inotify/built-in.o: No such file or directory
ld: cannot find fs/notify/fanotify/built-in.o: No such file or directoryReported-and-tested-by: Rabin Vincent
Signed-off-by: Michal Marek
03 May, 2011
1 commit
-
Starting with 4.4, gcc will happily accept -Wno- in the
cc-option test and complain later when compiling a file that has some
other warning. This rather unexpected behavior is intentional as per
http://gcc.gnu.org/PR28322, so work around it by testing for support of
the opposite option (without the no-). Introduce a new Makefile function
cc-disable-warning that does this and update two uses of cc-option in
the toplevel Makefile.Reported-and-tested-by: Stephen Rothwell
Signed-off-by: Michal Marek
20 Apr, 2011
1 commit
-
The D option of ar is only available in newer versions.
Signed-off-by: Michal Marek
12 Dec, 2009
1 commit
-
To make it easier for module-init-tools and scripts like mkinitrd to
distinguish builtin and missing modules, install a modules.builtin file
listing all builtin modules. This is done by generating an additional
config file (tristate.conf) with tristate options set to uppercase 'Y'
or 'M'. If we source that config file, the builtin modules appear in
obj-Y.Signed-off-by: Michal Marek
12 Oct, 2009
1 commit
-
Alek reported that on Ubuntu, where dash is used, 'echo -e'
can't work, so let's use non-builtin echo in this case.Reported-by: Alek Du
Signed-off-by: WANG Cong
Signed-off-by: Sam Ravnborg
20 Sep, 2009
3 commits
-
The arch/*/boot/Makefile use cc-options to check for GCC command options
and cc-options use the hardened specs when checking for GCC command
options. When -fPIE is pass to cc1 it can't use -ffreestanding or
-fno-toplevel-reorder. Then it fail to build stuff with -ffreestanding
and -fno-toplevel-reorder.Thanks to Fredric Johansson for finding the main problem behind a failed
build using a hardened toolchain.Signed-off-by: Magnus Granberg
Signed-off-by: Jory A. Pratt
Cc: Fredric Johansson
Cc: "H. Peter Anvin"
Signed-off-by: Andrew Morton
Cc:
Signed-off-by: Sam Ravnborg -
ld-option is used to check if $(LD) supports a specific option.
Based on patch from Andi Kleen.
Cc: Andi Kleen
Signed-off-by: Sam Ravnborg
First use is to check if option -X is supported (upcoming patch).
Theis is ne -
ld-option is misnamed as it test options to gcc, not to ld.
Renamed it to reflect this.Cc: Andi Kleen
Cc: Roland McGrath
Signed-off-by: Sam Ravnborg
04 Dec, 2008
3 commits
-
Convert a few echos in the build system to new $(kecho) so we get correct
output according to build verbosity.Signed-off-by: Mike Frysinger
[sam: added kecho in a few more places for O=... builds]
Signed-off-by: Sam Ravnborg -
There is a bunch of places in the build system where we do 'echo' to show
some nice status lines. This means we still get output when running in
silent mode. So declare a new KECHO variable that only does 'echo' when we
are in a suitable verbose build mode.Signed-off-by: Mike Frysinger
[sam: added Documentation]
Signed-off-by: Sam Ravnborg -
When adding extra -I options with O=... we could
end up in a situation where there were no parameters to -I.
So we had a commandline that looked like this:... -I -Wall ...
This had the undesired side effect that gcc assumed "-Wall"
was a path to look for include files so this options was
effectively ignored.This happens only when we build the generated module.mod.c files
as part of the final modules builds and is as such harmless
with current kbuild.
This bug was exposed when we rearranged the options to gcc.Signed-off-by: Sam Ravnborg
10 Sep, 2008
1 commit
-
David Sanders wrote:
> I'm getting this error:
> as: unrecognized option `-mtune=generic32'
> I have binutils 2.17.Use -c instead of -S in cc-option and cc-option-yn, so we can probe
options related to the assembler.Signed-off-by: H. Peter Anvin
Cc: Sam Ravnborg
Cc: kbuild devel
Signed-off-by: Ingo Molnar
12 Feb, 2008
1 commit
-
When make -s support were added to filechk to
combination created with make V=1 were not
covered.
Fix it by explicitly cover this case too.Signed-off-by: Sam Ravnborg
Cc: Mike Frysinger
09 Feb, 2008
1 commit
-
Signed-off-by: Mike Frysinger
Signed-off-by: Sam Ravnborg