X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fconfigurator%2Fconfigurator.c;h=d5a23c2a8503ec39ffd38e842ec45baaf5a51637;hb=20ea8a370823bd73a3c96da40a4779fa6ea66462;hp=8353f08899aede35f7c947e6724e80fa4e1ab482;hpb=655bae650e868e037d3db9f6e475f59b58e3e078;p=ccan diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 8353f088..d5a23c2a 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -33,7 +33,7 @@ #include #define DEFAULT_COMPILER "cc" -#define DEFAULT_FLAGS "-g -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition" +#define DEFAULT_FLAGS "-g3 -ggdb -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition" #define OUTPUT_FILE "configurator.out" #define INPUT_FILE "configuratortest.c" @@ -181,6 +181,13 @@ static struct test tests[] = { " qsort_r(array, 3, sizeof(int), cmp, &called);\n" " return called && array[0] == 2 && array[1] == 5 && array[2] == 9 ? 0 : 1;\n" "}\n" }, + { "HAVE_SECTION_START_STOP", + DEFINES_FUNC, NULL, + "static void *__attribute__((__section__(\"mysec\"))) p = &p;\n" + "static int func(void) {\n" + " extern void *__start_mysec[], *__stop_mysec[];\n" + " return __stop_mysec - __start_mysec;\n" + "}\n" }, { "HAVE_STACK_GROWS_UPWARDS", DEFINES_EVERYTHING|EXECUTE, NULL, "static long nest(const void *base, unsigned int i)\n" "{\n" @@ -433,6 +440,8 @@ int main(int argc, const char *argv[]) printf("#endif\n"); printf("#define CCAN_COMPILER \"%s\"\n", argv[1]); printf("#define CCAN_CFLAGS \"%s\"\n\n", cmd + strlen(argv[1]) + 1); + /* This one implies "#include