summaryrefslogtreecommitdiffstats
path: root/build-root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'build-root/Makefile')
-rw-r--r--build-root/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/build-root/Makefile b/build-root/Makefile
index ed25a0cc06d..aa50255b007 100644
--- a/build-root/Makefile
+++ b/build-root/Makefile
@@ -172,7 +172,12 @@ native_libdir = $($(NATIVE_ARCH)_libdir)
arch_lib_dir = lib$($(BASIC_ARCH)_libdir)
# OS to configure for. configure --host will be set to $(ARCH)-$(OS)
-OS = mu-linux
+# Allow per-platform overrides
+
+OS = $(strip $($(PLATFORM)_os))
+ifeq ($(OS),)
+ OS = mu-linux
+endif
spu_target = spu
native_target =
@@ -506,9 +511,13 @@ DYNAMIC_LINKER=${shell cd $(TOOL_INSTALL_LIB_DIR); echo ld*.so.*}
lots_of_slashes_to_pad_names = "/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"
# When PLATFORM != native we *always* use our own versions of GLIBC and dynamic linker
-CROSS_LDFLAGS = \
- -Wl,--dynamic-linker=$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)/$(DYNAMIC_LINKER) \
- -Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)
+# Allow per-platform overrides
+CROSS_LDFLAGS = $(strip $($(PLATFORM)_cross_ldflags))
+ifeq ($(CROSS_LDFLAGS),)
+ CROSS_LDFLAGS = \
+ -Wl,--dynamic-linker=$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)/$(DYNAMIC_LINKER) \
+ -Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)
+endif
cross_ldflags = $(if $(is_native)$(is_build_tool),,$(CROSS_LDFLAGS) )