summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-01 11:49:46 +0000
committersmatz <smatz@openttd.org>2009-06-01 11:49:46 +0000
commitc03ce4b1c704ef638374f56bbb9692db0e4e354c (patch)
tree72c24a2c268425261ae4e01f9900cedef22ecc26 /config.lib
parentbab70a823dd810e1d4477f0c01d3a7b3e9b19ac8 (diff)
downloadopenttd-c03ce4b1c704ef638374f56bbb9692db0e4e354c.tar.xz
(svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed.
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib36
1 files changed, 12 insertions, 24 deletions
diff --git a/config.lib b/config.lib
index 78d328903..313061396 100644
--- a/config.lib
+++ b/config.lib
@@ -1100,34 +1100,23 @@ make_cflags_and_ldflags() {
# Enable some things only for certain GCC versions
cc_version=`$cc_host -dumpversion | cut -c 1,3`
- if [ $cc_version -ge 29 ]; then
- CFLAGS="$CFLAGS -Wall -Wno-multichar -Wsign-compare -Wundef"
- CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith"
- CFLAGS="$CFLAGS -Wno-uninitialized"
-
- CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes"
+ if [ $cc_version -lt 30 ]; then
+ log 1 "configure: error: gcc older than 3.0 can't compile OpenTTD because of its poor template support"
+ exit 1
fi
- gcc295=""
- if [ "$cc_version" = 29 ]; then
- # Make sure we mark GCC 2.95 flag for Makefile.src.in, as we
- # need a lovely hack there to make it compile correctly.
- gcc295="1"
+ CFLAGS="$CFLAGS -Wall -Wno-multichar -Wsign-compare -Wundef"
+ CFLAGS="$CFLAGS -Wwrite-strings -Wpointer-arith"
+ CFLAGS="$CFLAGS -Wno-uninitialized"
- # Disable warnings about unused variables when
- # compiling with asserts disabled
- if [ $enable_assert -eq 0 ]; then
- CFLAGS="$CFLAGS -Wno-unused"
- fi
- fi
+ CFLAGS="$CFLAGS -W -Wno-unused-parameter -Wformat=2"
+ CFLAGS="$CFLAGS -Wredundant-decls"
+
+ CC_CFLAGS="$CC_CFLAGS -Wstrict-prototypes"
- if [ $cc_version -ge 30 ]; then
- CFLAGS="$CFLAGS -W -Wno-unused-parameter -Wformat=2"
- CFLAGS="$CFLAGS -Wredundant-decls"
+ if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
- if [ $enable_assert -eq 0 ]; then
- CFLAGS="$CFLAGS -Wno-unused-variable"
- fi
+ CFLAGS="$CFLAGS -Wno-unused-variable"
fi
if [ $cc_version -ge 34 ]; then
@@ -2666,7 +2655,6 @@ make_sed() {
s@!!CONFIGURE_FILES!!@$CONFIGURE_FILES@g;
s@!!REVISION!!@$revision@g;
s@!!AWK!!@$awk@g;
- s@!!GCC295!!@$gcc295@g;
s@!!DISTCC!!@$distcc@g;
"