]> git.tdb.fi Git - builder.git/commitdiff
Don't load a cross prefix for a native architecture
authorMikko Rasa <tdb@tdb.fi>
Mon, 26 Dec 2022 12:55:38 +0000 (14:55 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 26 Dec 2022 19:12:50 +0000 (21:12 +0200)
source/architecture.cpp
source/architecture.h

index dbe40010c896680dfebbc6c0382f34fff06ad106..54ffcf0f872cf7d5e1483190e9156cded9012402 100644 (file)
@@ -327,5 +327,11 @@ void Architecture::parse_specification(const string &spec)
 Architecture::Loader::Loader(Architecture &a):
        DataFile::ObjectLoader<Architecture>(a)
 {
-       add("prefix", &Architecture::cross_prefix);
+       add("prefix", &Loader::cross_prefix);
+}
+
+void Architecture::Loader::cross_prefix(const string &p)
+{
+       if(!obj.native)
+               obj.cross_prefix = p;
 }
index 6a17c3e44852aeecfc0e7b6ae9a2fd24e748dabc..2cf4fa2fdff88bd9014e7cd800aa4754b1d9f3a0 100644 (file)
@@ -19,6 +19,9 @@ public:
        {
        public:
                Loader(Architecture &);
+
+       private:
+               void cross_prefix(const std::string &);
        };
 
 private: