summaryrefslogtreecommitdiff
path: root/6/main.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-03-10 19:43:20 -0800
committerOri Bernstein <ori@eigenstate.org>2016-03-10 19:44:55 -0800
commit5269edd399f1b55f98e10fc5e809e22bec6c7bb1 (patch)
tree2f53682f7058f8071250f581f72b49d5623bf45d /6/main.c
parentf15c3cc3fc96cc9cd383f53d6dd662bfb835a1b2 (diff)
downloadmc-5269edd399f1b55f98e10fc5e809e22bec6c7bb1.tar.gz
Fix build on OSX, by deduping syms correctly.
With macho, we need to set a different attribute for asm than we need on ELF targets.
Diffstat (limited to '6/main.c')
-rw-r--r--6/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/6/main.c b/6/main.c
index d8ee23b..3315b40 100644
--- a/6/main.c
+++ b/6/main.c
@@ -165,7 +165,7 @@ int main(int argc, char **argv)
outfile = NULL;
- optinit(&ctx, "cd:?hSo:I:9G", argv, argc);
+ optinit(&ctx, "cd:?hSo:I:9G:", argv, argc);
asmsyntax = Defaultasm;
while (!optdone(&ctx)) {
switch (optnext(&ctx)) {
@@ -191,7 +191,12 @@ int main(int argc, char **argv)
asmsyntax = Plan9;
break;
case 'G':
- asmsyntax = Gnugas;
+ if (!strcmp(ctx.optarg, "e"))
+ asmsyntax = Gnugaself;
+ else if (!strcmp(ctx.optarg, "m"))
+ asmsyntax = Gnugasmacho;
+ else
+ die("unknown gnu syntax flavor");
break;
case 'I':
lappend(&incpaths, &nincpaths, ctx.optarg);