diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-03-10 20:28:14 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-11 16:11:39 +0100 |
commit | 739a49a9738280736698f0e15169e0be14cac77a (patch) | |
tree | 819444a18d098343a18d356682588185c494f9ff /Makefile | |
parent | 9e4fc459e1429ffa73122ef8ecce6f1739806540 (diff) | |
download | barebox-739a49a9738280736698f0e15169e0be14cac77a.tar.gz barebox-739a49a9738280736698f0e15169e0be14cac77a.tar.xz |
kbuild: rename barebox-pbl-common to BAREBOX_PBL_OBJS
'export barebox-pbl-common' does not work reliably because hyphens
are disallowed in shell variables.
This caused a problem in Linux in the past. See Linux commit 2bfbe7881ee0
("kbuild: Do not use hyphen in exported variable name").
The same problem occurs when you build barebox with O= and the directory
path to the source tree contains a shell special character like '~'.
The maintainer of GNU Make stated that there is no consistent way to
export variables that do not meet the shell's naming criteria.
(https://savannah.gnu.org/bugs/?55719)
Consequently, you cannot use hyphens in exported variables.
Rename barebox-pbl-common to BAREBOX_PBL_OBJS.
I named it after KBUILD_VMLINUX_OBJS in the Linux top Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -584,8 +584,7 @@ export DEFAULT_COMPRESSION_SUFFIX # System.map is generated to document addresses of all kernel symbols barebox-common := $(common-y) -barebox-pbl-common := $(pbl-common-y) -export barebox-pbl-common +export BAREBOX_PBL_OBJS := $(pbl-common-y) barebox-all := $(barebox-common) barebox-lds := $(lds-y) @@ -777,7 +776,7 @@ barebox.srec: barebox # The actual objects are generated when descending, # make sure no implicit rule kicks in -$(sort $(barebox-common) ) $(barebox-lds) $(barebox-pbl-common): $(barebox-dirs) ; +$(sort $(barebox-common) ) $(barebox-lds) $(BAREBOX_PBL_OBJS): $(barebox-dirs) ; # Handle descending into subdirectories listed in $(barebox-dirs) # Preset locale variables to speed up the build process. Limit locale |