Permalink
Browse files

Use same CC as configure when generating native code

  • Loading branch information...
nickg committed Apr 8, 2012
1 parent 8c75456 commit 9a4abe1688abda320d04408c55488a303136cd08
Showing with 6 additions and 1 deletion.
  1. +3 −0 config.h.in
  2. +2 −0 configure.ac
  3. +1 −1 src/link.c
View
@@ -235,6 +235,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* System compiler */
+#undef SYSTEM_CC
+
/* Version number of package */
#undef VERSION
View
@@ -71,6 +71,8 @@ case $host_os in
*cygwin* ) CFLAGS="$CFLAGS -I-" ;;
esac
+AC_DEFINE_UNQUOTED([SYSTEM_CC], ["$(which $CC)"], [System compiler])
+
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT([Makefile src/Makefile src/rt/Makefile test/Makefile \
lib/Makefile lib/std/Makefile lib/ieee/Makefile \
View
@@ -150,7 +150,7 @@ static void link_shared(tree_t top)
{
link_args_begin();
- link_arg_f("/usr/bin/cc");
+ link_arg_f("%s", SYSTEM_CC);
link_arg_f("-shared");
link_arg_f("-o");
link_output(top, "so"); // TODO: different on OS X, etc.

0 comments on commit 9a4abe1

Please sign in to comment.