+#ifdef WITH_LIBCORE
+
+static lc_opt_entry_t *be_grp_root = NULL;
+
+/* possible dumping options */
+static const lc_opt_enum_mask_items_t dump_items[] = {
+ { "none", 0 },
+ { "initial", DUMP_INITIAL },
+ { "abi", DUMP_ABI },
+ { "sched", DUMP_SCHED },
+ { "prepared", DUMP_PREPARED },
+ { "regalloc", DUMP_RA },
+ { "final", DUMP_FINAL },
+ { "all", 2 * DUMP_FINAL - 1 },
+ { NULL, 0 }
+};
+
+/* register allocators */
+static const lc_opt_enum_const_ptr_items_t ra_items[] = {
+ { "chordal", &be_ra_chordal_allocator },
+ { "external", &be_ra_external_allocator },
+ { NULL, NULL }
+};
+
+/* instruction set architectures. */
+static const lc_opt_enum_const_ptr_items_t isa_items[] = {
+ { "ia32", &ia32_isa_if },
+#if 0
+ { "arm", &arm_isa_if },
+ { "ppc32", &ppc32_isa_if },
+ { "mips", &mips_isa_if },
+#endif
+ { NULL, NULL }
+};
+
+/* verify options. */
+static const lc_opt_enum_int_items_t vrfy_items[] = {
+ { "off", BE_VRFY_OFF },
+ { "warn", BE_VRFY_WARN },
+ { "assert", BE_VRFY_ASSERT },
+ { NULL, 0 }
+};
+static lc_opt_enum_mask_var_t dump_var = {
+ &dump_flags, dump_items
+};
+
+static lc_opt_enum_const_ptr_var_t ra_var = {
+ (const void **) &ra, ra_items
+};
+
+static lc_opt_enum_const_ptr_var_t isa_var = {
+ (const void **) &isa_if, isa_items
+};
+
+static lc_opt_enum_int_var_t vrfy_var = {
+ &vrfy_option, vrfy_items
+};
+
+static const lc_opt_table_entry_t be_main_options[] = {
+ LC_OPT_ENT_ENUM_MASK("dump", "dump irg on several occasions", &dump_var),
+ LC_OPT_ENT_ENUM_PTR ("ra", "register allocator", &ra_var),
+ LC_OPT_ENT_ENUM_PTR ("isa", "the instruction set architecture", &isa_var),
+ LC_OPT_ENT_NEGBOOL ("noomitfp", "do not omit frame pointer", &be_omit_fp),
+ LC_OPT_ENT_BOOL ("mris", "enable mris schedule preparation", &be_enable_mris),
+ LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg (off, warn, assert)", &vrfy_var),
+
+#ifdef WITH_ILP
+ LC_OPT_ENT_STR ("ilp.server", "the ilp server name", be_options.ilp_server, sizeof(be_options.ilp_server)),
+ LC_OPT_ENT_STR ("ilp.solver", "the ilp solver name", be_options.ilp_solver, sizeof(be_options.ilp_solver)),
+#endif /* WITH_ILP */
+ { NULL }
+};
+
+#endif /* WITH_LIBCORE */
+
+void be_opt_register(void)