From a1632bea664617a2762a68494430895dde2e8b2d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 26 Dec 2022 14:55:38 +0200 Subject: [PATCH] Don't load a cross prefix for a native architecture --- source/architecture.cpp | 8 +++++++- source/architecture.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/architecture.cpp b/source/architecture.cpp index dbe4001..54ffcf0 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -327,5 +327,11 @@ void Architecture::parse_specification(const string &spec) Architecture::Loader::Loader(Architecture &a): DataFile::ObjectLoader(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; } diff --git a/source/architecture.h b/source/architecture.h index 6a17c3e..2cf4fa2 100644 --- a/source/architecture.h +++ b/source/architecture.h @@ -19,6 +19,9 @@ public: { public: Loader(Architecture &); + + private: + void cross_prefix(const std::string &); }; private: -- 2.43.0