Commit ff3ad50d authored by Dom Sekotill's avatar Dom Sekotill
Browse files

fix GCC sysroot for older versions

parent 0d31b5e4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -439,12 +439,12 @@ endif

# Returns the location of the libc.a file for the given compiler + flags
define toolchain_find_libc_a
$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a))
$$(readlink -f $$(LANG=C $(1) --sysroot=$(TOOLCHAIN_EXTERNAL_INSTALL_DIR) -print-file-name=libc.a))
endef

# Returns the sysroot location for the given compiler + flags
define toolchain_find_sysroot
$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?/([^/]*/)?libc\.a::')
$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:/(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a:/:')
endef

# Returns the lib subdirectory for the given compiler + flags (i.e