From d04979df092f93e2e0031b0d866afff418994e05 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 21 Oct 2014 09:37:50 +0100 Subject: Fix some small bugs in the makefile template. - GCC in C++ mode should be called g++ not gcc. - ICC in C++ mode should be called icpc not icc. --- make/template/main.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/template/main.mk b/make/template/main.mk index e55e36c0a..f88a80e3a 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -50,7 +50,7 @@ INSTMODE_DIR = 0755 INSTMODE_BIN = 0755 INSTMODE_LIB = 0644 -@IFEQ $(CC) icc +@IFEQ $(CC) icpc CXXFLAGS += -Wshadow @ELSE CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall @@ -91,7 +91,7 @@ INSTMODE_LIB = 0644 DBGOK=0 @IFEQ $(D) 0 CXXFLAGS += -O2 -@IFEQ $(CC) gcc +@IFEQ $(CC) g++ CXXFLAGS += -g1 @ENDIF HEADER = std-header -- cgit v1.2.3 From 92e84bea6186b8d5ef44cee18b75d0bb633afb8e Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 21 Oct 2014 22:05:51 +0100 Subject: Use clang++ on FreeBSD 10 instead of g++. --- configure | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 33e9b4c50..6a8e28fe9 100755 --- a/configure +++ b/configure @@ -260,6 +260,11 @@ if ($config{OSNAME} =~ /darwin/i) $config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX. $config{CC} = "xcrun clang++"; # C++ compiler for OSX. } +elsif ($config{OSNAME} =~ /freebsd/i) +{ + chomp(my $fbsd_version = `uname -r`); + $config{CC} = $fbsd_version ge '10.0' ? 'clang++' : 'g++'; +} else { $config{CC} = "g++"; # C++ compiler @@ -281,11 +286,8 @@ if ($config{HAS_OPENSSL} =~ /^([-[:digit:].]+)(?:[a-z])?(?:\-[a-z][0-9])?/) { } if (($config{GCCVER} eq "") || ($config{GCCMINOR} eq "")) { - if ($config{IS_DARWIN} eq "YES") { - print $config{CC} . " was not found! You require clang++ (the LLVM C++ compiler, part of the OSX developer tools) to build InspIRCd!\n"; - } else { - print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n"; - } + print "`$config{CC}` was not found! A C++ compiler is required to build InspIRCd!\n"; + print "You can pass a custom compiler to $0 using --with-cc=[name].\n"; exit; } -- cgit v1.2.3