Commit 53e024b4 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Use the correct cc command line on MacOS. This is a gross hack.

Also, ignore the result of dlclose().


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1721 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fc70ac86
......@@ -181,7 +181,11 @@ mgt_CallCc(const char *source, struct vsb *sb)
/* Attempt to open a pipe to the system C-compiler */
len = snprintf(buf, sizeof buf,
"ln -f %s _.c ;" /* XXX: for debugging */
#ifdef __APPLE__
"exec cc -dynamiclib -Wl,-flat_namespace,-undefined,suppress -o %s -x c - < %s 2>&1",
#else
"exec cc -fpic -shared -Wl,-x -o %s -x c - < %s 2>&1",
#endif
sf, of, sf);
xxxassert(len < sizeof buf);
......@@ -229,7 +233,7 @@ mgt_CallCc(const char *source, struct vsb *sb)
free(of);
of = NULL;
} else
AZ(dlclose(p));
(void)dlclose(p);
/* clean up and return */
unlink(sf);
......
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