From 4202999cdd57532155db10fb0cda5293f3a035cf Mon Sep 17 00:00:00 2001 From: verhaegs Date: Thu, 25 Apr 2013 18:36:41 +0000 Subject: [PATCH] genmodule/writeautoinit.c: forcebase libbases will now bring in the __aros_getbase_LibBase() function. Old implementation was not working when using libmodname_rel.a git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@47312 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- tools/genmodule/writeautoinit.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tools/genmodule/writeautoinit.c b/tools/genmodule/writeautoinit.c index 9bb2c5f678..7e7625a649 100644 --- a/tools/genmodule/writeautoinit.c +++ b/tools/genmodule/writeautoinit.c @@ -60,17 +60,14 @@ void writeautoinit(struct config *cfg, int is_rel) forcelistit = forcelistit->next ) { - fprintf(out, "extern struct Library *%s;\n", forcelistit->s); + /* By bringing in __aros_getbase_XXXBase() we assure parent will open + this library */ + fprintf( + out, + "AROS_IMPORT_ASM_SYM(void *, __dummy_%s, __aros_getbase_%s);\n", + forcelistit->s, forcelistit->s + ); } - fprintf(out, "\nvoid __%s_forcelibs(void)\n{\n", cfg->modulename); - for (forcelistit = cfg->forcelist; - forcelistit!=NULL; - forcelistit = forcelistit->next - ) - { - fprintf(out, " %s = NULL;\n", forcelistit->s); - } - fprintf(out, "}\n"); } fclose(out); } -- 2.11.4.GIT