aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-30 16:57:27 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-30 16:57:27 +0000
commit3eaeb9d5a621f0bc464fecc6d71ac64bc8a98b98 (patch)
treefb5761515ce0da03ddffadc5d61c96761a26741d
parent8665cc6dcfcbd84d09c9e84133b72c3df7d15040 (diff)
downloadpaludis-3eaeb9d5a621f0bc464fecc6d71ac64bc8a98b98.tar.gz
paludis-3eaeb9d5a621f0bc464fecc6d71ac64bc8a98b98.tar.xz
Add support for cross toolchains targeted at BSD architectures.
-rw-r--r--src/clients/contrarius/contrarius.cc35
-rw-r--r--src/clients/contrarius/stage.cc9
-rw-r--r--src/clients/contrarius/stage.hh4
3 files changed, 30 insertions, 18 deletions
diff --git a/src/clients/contrarius/contrarius.cc b/src/clients/contrarius/contrarius.cc
index 8d97210..77b764a 100644
--- a/src/clients/contrarius/contrarius.cc
+++ b/src/clients/contrarius/contrarius.cc
@@ -86,29 +86,36 @@ int main(int argc, char *argv[])
OurStageBuilderTask builder(stage_opts);
- builder.queue_stage(StageBase::ConstPointer(new BinutilsStage(contrarius_opts)));
+ do
+ {
+ builder.queue_stage(StageBase::ConstPointer(new BinutilsStage(contrarius_opts)));
+
+ if (stage == "binutils")
+ break;
+
+ if (CommandLine::get_instance()->a_headers.specified())
+ builder.queue_stage(StageBase::ConstPointer(new KernelHeadersStage(contrarius_opts)));
- if (stage == "binutils")
- goto run;
+ builder.queue_stage(StageBase::ConstPointer(new MinimalStage(contrarius_opts)));
- builder.queue_stage(StageBase::ConstPointer(new MinimalStage(contrarius_opts)));
+ if (stage == "minimal")
+ break;
- if (stage == "minimal")
- goto run;
+ if (! CommandLine::get_instance()->a_headers.specified())
+ builder.queue_stage(StageBase::ConstPointer(new KernelHeadersStage(contrarius_opts)));
- builder.queue_stage(StageBase::ConstPointer(new KernelHeadersStage(contrarius_opts)));
+ if (stage == "headers")
+ break;
- if (stage == "headers")
- goto run;
+ builder.queue_stage(StageBase::ConstPointer(new LibCStage(contrarius_opts)));
- builder.queue_stage(StageBase::ConstPointer(new LibCStage(contrarius_opts)));
+ if (stage == "libc")
+ break;
- if (stage == "libc")
- goto run;
+ builder.queue_stage(StageBase::ConstPointer(new FullStage(contrarius_opts)));
- builder.queue_stage(StageBase::ConstPointer(new FullStage(contrarius_opts)));
+ } while (false);
- run:
builder.execute();
return EXIT_SUCCESS;
diff --git a/src/clients/contrarius/stage.cc b/src/clients/contrarius/stage.cc
index 72462fb..fe5e5fe 100644
--- a/src/clients/contrarius/stage.cc
+++ b/src/clients/contrarius/stage.cc
@@ -143,8 +143,13 @@ LibCStage::build(const StageOptions &) const
bool
LibCStage::is_rebuild() const
{
- return (! DefaultEnvironment::get_instance()->package_database()
- ->query(_options.libc, is_installed_only)->empty());
+ PackageDatabaseEntryCollection::ConstPointer c(
+ DefaultEnvironment::get_instance()->package_database()->query(_options.libc, is_installed_only));
+
+ if (c->empty())
+ return false;
+
+ return (! DefaultEnvironment::get_instance()->query_use(UseFlagName("crosscompile_opts_headers-only"), &(*c->last())));
}
int
diff --git a/src/clients/contrarius/stage.hh b/src/clients/contrarius/stage.hh
index 315bc41..8ab817d 100644
--- a/src/clients/contrarius/stage.hh
+++ b/src/clients/contrarius/stage.hh
@@ -58,7 +58,7 @@ namespace paludis
virtual std::string description() const
{
return "Building the GNU binutils (" + stringify(*_options.binutils)
- + ") as part of cross toolchain";
+ + ") as part of the cross toolchain";
};
virtual bool is_rebuild() const;
@@ -83,7 +83,7 @@ namespace paludis
virtual std::string description() const
{
return "Building the kernel headers (" + stringify(*_options.headers)
- + ") as part of cross toolchain";
+ + ") as part of the cross toolchain";
};
virtual bool is_rebuild() const;