aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2007-03-19 01:31:56 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2007-03-19 01:31:56 +0000
commite4422395996b9d9f1b7a57a5a058836f1144b8f8 (patch)
tree9969efe59c2175b62da313906315b0790f813c3c
parent7ec28dfa33cc92754490ba1e2ffe5fa907b57710 (diff)
downloadpaludis-e4422395996b9d9f1b7a57a5a058836f1144b8f8.tar.gz
paludis-e4422395996b9d9f1b7a57a5a058836f1144b8f8.tar.xz
Add support for bare-metal targets like 'spu-elf'.
-rw-r--r--src/clients/contrarius/contrarius.cc7
-rw-r--r--src/clients/contrarius/default_config.txt8
-rw-r--r--src/clients/contrarius/target_config.cc7
3 files changed, 16 insertions, 6 deletions
diff --git a/src/clients/contrarius/contrarius.cc b/src/clients/contrarius/contrarius.cc
index 8e93928..4433027 100644
--- a/src/clients/contrarius/contrarius.cc
+++ b/src/clients/contrarius/contrarius.cc
@@ -91,14 +91,19 @@ int main(int argc, char *argv[])
break;
if (CommandLine::get_instance()->a_headers.specified())
+ {
+ if (TargetConfig::get_instance()->headers().empty())
+ throw DoHelp("--headers specified though CTARGET does not need any headers");
builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new KernelHeadersStage(env)));
+ }
builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new MinimalStage(env)));
if (stage == "minimal")
break;
- if (! CommandLine::get_instance()->a_headers.specified())
+ if ((! CommandLine::get_instance()->a_headers.specified()) &&
+ (! TargetConfig::get_instance()->headers().empty()))
builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new KernelHeadersStage(env)));
if (stage == "headers")
diff --git a/src/clients/contrarius/default_config.txt b/src/clients/contrarius/default_config.txt
index b04a5a7..bc52538 100644
--- a/src/clients/contrarius/default_config.txt
+++ b/src/clients/contrarius/default_config.txt
@@ -1,9 +1,11 @@
*-*-linux-* headers linux-headers
*-*-freebsd*-* headers freebsd-lib
-*-*-mingw*-* headers w32api
+*-*-mingw*-* headers mingw-runtime
+*-*-*-elf headers
+*-*-*-elf libc newlib
*-*-*-gnu libc glibc
-*-*-*-freebsd*-* libc freebds-lib
-*-*-*-mingw* libc mingw-runtime
+*-*-*-freebsd*-* libc freebsd-lib
+*-*-*-mingw* libc w32api
*-*-*-uclibc libc uclibc
*-*-*-* binutils binutils
*-*-*-* gcc gcc
diff --git a/src/clients/contrarius/target_config.cc b/src/clients/contrarius/target_config.cc
index 3108f61..03441a1 100644
--- a/src/clients/contrarius/target_config.cc
+++ b/src/clients/contrarius/target_config.cc
@@ -43,9 +43,9 @@ TargetConfig::_parse_defaults()
WhitespaceTokeniser::get_instance()->tokenise(*l, std::back_inserter(tokens));
SpecEntryList * list(&_binutils_list);
- if (("aux" == tokens[1]) && (2 == std::distance(tokens.begin(), tokens.end())))
+ if ((("aux" == tokens[1]) || "headers" == tokens[1]) && (2 == std::distance(tokens.begin(), tokens.end())))
tokens.push_back("");
- else if (2 > std::distance(tokens.begin(), tokens.end()))
+ else if (3 > std::distance(tokens.begin(), tokens.end()))
throw TargetConfigError("Illegal number of tokens encountered");
if ("binutils" == tokens[1])
@@ -96,6 +96,9 @@ TargetConfig::_find_match(SpecEntryList & list)
else if (3 == index)
t = stringify(_target.userland);
+ if ((t.empty()) && ("*" == token))
+ continue;
+
if (t.length() < token.length())
break;