summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFlorian Gilcher <florian.gilcher@asquera.de>2014-03-27 09:50:30 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-03-27 12:20:52 +0100
commitf850123e8987517a0048d9de0974b758e2f30bee (patch)
treef5f903211b31e0595d76a9f96d32acd5846da313 /configure.ac
parent6d1cc890183fb6a433f4683aba98cdc8d6fe8549 (diff)
build: support darwin targets
Mac OS X now uses the llvm linker, so our --gc-sections logic is not supported. Furthermore, linker-scripts aren't supported either. Add GNU-ld and Darwin detection and drop any GNU-ld specific options if not supported. Dropping --gc-sections and its related options is fine. We will produce bigger binaries, but that's just what you get if you don't support that. On Darwin we try the -dead_stip options instead. They should work sufficiently well. Regarding version-scripts, we still set visibility=hidden by default and require compilers to support __attribute__((__visibility__("public"))). So symbols are correctly exported, but version-information will be lost. Again, that's an issue of the target architecture and we don't care whether they lack useful features. (extended commit-msg and reorder am-conditionals) Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4373b92..9b4d02f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,25 @@ AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
[test "x$enable_optimizations" = "xyes"])
#
+# Check which linker is used
+#
+
+AM_CONDITIONAL([BUILD_HAVE_GNU_LD],
+ [test "x$with_gnu_ld" = "xyes"])
+
+#
+# Detect darwin targets
+#
+
+case "$host_os" in
+ darwin*)
+ $is_darwin = "xyes";;
+esac
+
+AM_CONDITIONAL([BUILD_IS_DARWIN],
+ [test "x$is_darwin" = "xyes"])
+
+#
# Makefile vars
# After everything is configured, we create all makefiles.
#
@@ -137,6 +156,7 @@ AC_MSG_NOTICE([Build configuration:
exec-prefix: $exec_prefix
libdir: $libdir
includedir: $includedir
+ host-os: $host_os
Miscellaneous Options:
debug: $enable_debug