Fix the libcompiler_rt path.
authorTim 'mithro' Ansell <me@mith.ro>
Mon, 24 Feb 2020 01:04:47 +0000 (17:04 -0800)
committerTim 'mithro' Ansell <me@mith.ro>
Sun, 12 Apr 2020 01:37:06 +0000 (18:37 -0700)
litex/soc/integration/builder.py
litex/soc/software/libcompiler_rt/Makefile

index 6e995fa4c7a75c7b27b3ed407a4ddcd848ad8ba5..80cc3753a71bb62ea46748e9eb86323b8e1cdfa0 100644 (file)
@@ -15,6 +15,7 @@ import struct
 import shutil
 
 from litex.build.tools import write_to_file
+from litex.data.find import find_data
 from litex.soc.integration import export, soc_core
 
 __all__ = ["soc_software_packages", "soc_directory",
@@ -100,6 +101,8 @@ class Builder:
                 exec_profiles["EXECUTE_IN_PLACE"] = "1"
             for k, v in exec_profiles.items():
                 define(k, v)
+            define(
+                "COMPILER_RT_DIRECTORY", find_data("software", "compiler_rt"))
             define("SOC_DIRECTORY", soc_directory)
             variables_contents.append("export BUILDINC_DIRECTORY\n")
             define("BUILDINC_DIRECTORY", self.include_dir)
index 929616b3ce1098b14d1f947fa29d74dfe1988e6b..ef78cd5695ac96bbf653b34178c838d24aefe440 100644 (file)
@@ -23,7 +23,7 @@ libcompiler_rt.a: $(OBJECTS)
 mulsi3.o: $(SOC_DIRECTORY)/software/libcompiler_rt/mulsi3.c
        $(compile)
 
-%.o: $(SOC_DIRECTORY)/software/compiler_rt/lib/builtins/%.c
+%.o: $(COMPILER_RT_DIRECTORY)/lib/builtins/%.c
        $(compile)
 
 .PHONY: all clean