summaryrefslogtreecommitdiff
path: root/arch/sandbox/Makefile
AgeCommit message (Collapse)Author
2026-06-04sandbox: Drop special link order treatment of start.o and sdl.oTom Rini
On hardware architectures, we need to treat start.o (generated from start.S) very special due to the constraints of being a program running on hardware in an unknown state. These objects are treated a little different than the rest by the linker and linker scripts on various architectures. Sandbox is different, and doesn't need to do that. In fact, it can lead to hard to diagnose problems because of just how subtly different the treatment is. For example, the comment about LTO in include/event.h introduced with commit 87a5d1b5d012 ("event: Add basic support for events") was only a sandbox issue because of the event in start.c and in turn linking start.o isn't treated the same way as an archive with all its sections considered. Correct all of this by removing the "head-" lines for cpu.o and sdl.o from arch/sandbox/Makefile (and unused cmd_cc_sdl.o lines) and change arch/sandbox/cpu/Makefile to treating them both with "obj-" and not "extra-". Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-04-07sandbox: Adjust how OS-interface files are builtSimon Glass
The current mechanism uses a completely separate build rule for each file which must be built with system headers. This is tricky to maintain. Add a foreach template in the sandbox cpu Makefile which generates the custom compile rules from a CFLAGS_USE_SYSHDRS list. This keeps the rules data-driven without needing changes to the common scripts/Makefile.lib, which could affect other architectures. Move initjmp.o into the template since it uses the same pattern. Add sdl.o to the list too, with an override for its command since it also needs -fshort-wchar removed and -fno-lto added. Signed-off-by: Simon Glass <[email protected]>
2022-02-09sandbox: fix build failure with musl and SDLHeinrich Schuchardt
sdl.c is compiled against the SDL library. Trying to redefine wchar_t with -fshort-wchar is not necessary and leads to build failures when compiling against musl. Cc: Milan P. Stanić <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2018-12-05sandbox: Use 'extras' to specify 'head' filesSimon Glass
At present sandbox has a start.o in the 'start' target but also includes it in the normal target list. This is not how this is normally handled. It is needed because sandbox does not include the u-boot-init variable in its link rule. Update the rule and move start.o from the normal target list to the 'extras' list. Signed-off-by: Simon Glass <[email protected]>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <[email protected]>
2014-12-08Kbuild: introduce Makefile in arch/$ARCH/Daniel Schwierzeck
Introduce a Makefile under arch/$ARCH/ and include it in the top Makefile (similar to Linux kernel). This allows further refactoringi like moving architecture-specific code out of global makefiles, deprecating config variables (CPU, CPUDIR, SOC) or deprecating arch/$ARCH/config.mk. In contrary to Linux kernel, U-Boot defines the ARCH variable by Kconfig, thus the arch Makefile can only included conditionally after the top config.mk. Signed-off-by: Daniel Schwierzeck <[email protected]> Acked-by: Masahiro Yamada <[email protected]>