X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fcompile.c;fp=tools%2Fcompile.c;h=bf68ad26477644dc8542aaa1414c9d10fda1572b;hp=fc7dc34789fbcfac6c832fce41ff7b6e0253499c;hb=a200e1ad1cf5a4828ea4e4e222838ddad5a4a9a3;hpb=e9d8020e0300f586bef1ef27bfff3593ac1317c2 diff --git a/tools/compile.c b/tools/compile.c index fc7dc347..bf68ad26 100644 --- a/tools/compile.c +++ b/tools/compile.c @@ -17,10 +17,11 @@ char *link_objects(const void *ctx, const char *objs, char **errmsg) /* Compile a single C file to an object file. Returns errmsg if fails. */ char *compile_object(const void *ctx, const char *cfile, const char *ccandir, + const char *extra_cflags, const char *outfile) { - return run_command(ctx, NULL, "cc " CFLAGS " -I%s -c -o %s %s", - ccandir, outfile, cfile); + return run_command(ctx, NULL, "cc " CFLAGS " -I%s %s -c -o %s %s", + ccandir, extra_cflags, outfile, cfile); } /* Compile and link single C file, with object files.