diff options
author | Peter Powell <petpow@saberuk.com> | 2016-06-04 12:55:17 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-06-27 15:41:27 +0100 |
commit | 9401f1fbc35bdcf4f24be447b1bdf47d157464fa (patch) | |
tree | 70421277ddfea0681f49c156a5db5a64c0dd466f /configure | |
parent | 61854caa5a7819b303c7b60e182b54c0a06b2fab (diff) |
GCC should never assume that this can not be null.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -965,6 +965,9 @@ EOF my @dotfiles = qw(main.mk inspircd); push @dotfiles, 'org.inspircd.plist' if $config{OSNAME} eq 'darwin'; + # HACK: we need to know if we are on GCC6 to disable the omission of `this` null pointer checks. + $config{GCC6} = `$config{CC} --version 2>/dev/null` =~ /gcc/i && $config{GCCVER} ge "6" ? "true" : "false"; + foreach my $file (@dotfiles) { open(FILEHANDLE, "make/template/$file") or die "Can't open make/template/$file: $!"; $_ = join '', <FILEHANDLE>; @@ -974,7 +977,7 @@ EOF for my $var (qw( CC SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR DATA_DIR UID - STARTSCRIPT DESTINATION SOCKETENGINE LOG_DIR + STARTSCRIPT DESTINATION SOCKETENGINE LOG_DIR GCC6 )) { s/\@$var\@/$config{$var}/g; } |