summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-24 20:07:12 +0000
committerrubidium <rubidium@openttd.org>2008-04-24 20:07:12 +0000
commit4ac6655bad6975638afd1772f1f05f16857be207 (patch)
tree768e8e18603f549cf96a8b59600fb7751aba8e0a /config.lib
parentbf702602c15b71f7e9c35c3632269895a846192b (diff)
downloadopenttd-4ac6655bad6975638afd1772f1f05f16857be207.tar.xz
(svn r12876) -Fix [FS#1928]: gcc on FreeBSD does not support -dumpmachine. As gcc is not necessary for FreeBSD compiles we 'just' use g++ as that support -dumpmachine.
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib21
1 files changed, 17 insertions, 4 deletions
diff --git a/config.lib b/config.lib
index 5a70d4351..1a3229756 100644
--- a/config.lib
+++ b/config.lib
@@ -419,11 +419,11 @@ check_params() {
detect_awk
+ detect_os
+
check_build
check_host
- detect_os
-
# We might enable universal builds always on OSX targets.. but currently we don't
# if [ "$enable_universal" = "1" ] && [ "$os" != "OSX" ]; then
if [ "$enable_universal" = "1" ]; then
@@ -1347,13 +1347,26 @@ check_compiler() {
}
check_build() {
- check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
+ if [ "$os" = "FREEBSD" ]; then
+ # FreeBSD's C compiler does not support dump machine.
+ # However, removing C support is not possible because PSP must be linked with the C compiler.
+ check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CXX" "g++" "c++" "0" "-dumpmachine"
+ else
+ check_compiler "build system type" "cc_build" "$build" "$cc_build" "$CC" "gcc" "cc" "0" "-dumpmachine"
+ fi
}
check_host() {
# By default the host is the build
if [ -z "$host" ]; then host="$build"; fi
- check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
+
+ if [ "$os" = "FREEBSD" ]; then
+ # FreeBSD's C compiler does not support dump machine.
+ # However, removing C support is not possible because PSP must be linked with the C compiler.
+ check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CXX" "g++" "c++" "0" "-dumpmachine"
+ else
+ check_compiler "host system type" "cc_host" "$host" "$cc_host" "$CC" "gcc" "cc" "0" "-dumpmachine"
+ fi
}
check_cxx_build() {