Commit 7cd6ad5e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

compel hgen: drop -u option

This -u option always looked wrong to me, I mean, how the hell a user
is supposed to know where the hell those headers are? It took quite
a while to figure out what to do with it, but the end result is --
this option is not needed at all and can easily be dropped.

For finding paths to includes, there is a -I compiler option,
there's no need to specify something to compel.

In fact, it should know by itself where its own headers are kept
(and emit -I... to cflags if needed), but that's another story
which is to be told when we'll decide to pack compel as a standalone
tool. For now, just add "#include <compel/compel.h>" and be done.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 2a1db9c2
......@@ -11,7 +11,6 @@
typedef struct {
char *input_filename;
char *output_filename;
char *uapi_dir;
char *prefix;
FILE *fout;
} piegen_opt_t;
......
......@@ -222,7 +222,7 @@ int __handle_elf(void *mem, size_t size)
}
pr_out("/* Autogenerated from %s */\n", opts.input_filename);
pr_out("#include \"%s/compel.h\"\n", opts.uapi_dir);
pr_out("#include <compel/compel.h>\n");
for (i = 0; i < symtab_hdr->sh_size / symtab_hdr->sh_entsize; i++) {
Elf_Sym *sym = &symbols[i];
......
......@@ -54,7 +54,6 @@ static const compel_cflags_t compel_cflags[] = {
piegen_opt_t opts = {
.input_filename = NULL,
.output_filename = NULL,
.uapi_dir = "piegen/uapi",
.fout = NULL,
};
......@@ -145,12 +144,11 @@ int main(int argc, char *argv[])
int opt, idx, i;
char *action;
static const char short_opts[] = "a:f:o:u:p:hVl:";
static const char short_opts[] = "a:f:o:p:hVl:";
static struct option long_opts[] = {
{ "arch", required_argument, 0, 'a' },
{ "file", required_argument, 0, 'f' },
{ "output", required_argument, 0, 'o' },
{ "uapi-dir", required_argument, 0, 'u' },
{ "prefix", required_argument, 0, 'p' },
{ "help", no_argument, 0, 'h' },
{ "version", no_argument, 0, 'V' },
......@@ -183,9 +181,6 @@ int main(int argc, char *argv[])
case 'o':
opts.output_filename = optarg;
break;
case 'u':
opts.uapi_dir = optarg;
break;
case 'p':
opts.prefix = optarg;
break;
......
......@@ -28,7 +28,6 @@ spy: spy.c $(COMPEL_LIBRARY) | parasite.h
parasite.h: parasite.po
$(COMPEL) hgen -f $^ -l 4 \
-p parasite \
-u $(COMPEL_IDIR) \
-o $@
parasite.po: parasite.o $(COMPEL_PLUGINS)/std.built-in.o
......
......@@ -127,7 +127,6 @@ $(obj)/%-blob.h: $(obj)/%.built-in.bin.o $(SRC_DIR)/compel/compel-host
$(Q) $(SRC_DIR)/compel/compel-host hgen -f $< \
-l 4 \
-p $(call target-name,$@) \
-u $(SRC_DIR)/compel/include/uapi \
-o $@ $(piegen_stdout)
else # !piegen-y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment