diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 21:50:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 21:50:09 +0000 |
commit | c8389f594d2f9d84b9ef89902418893dc153b16b (patch) | |
tree | 40c316cedbb4b84212f80bfead3c6fb0d2213a33 | |
parent | 89a2c994054e1176dafb8b386679f4ae6c3fb62e (diff) |
Roll back to 8323, the -pedantic switch thing totally breaks building the way i implemented it here :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8328 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-x | configure | 34 |
1 files changed, 8 insertions, 26 deletions
@@ -1007,13 +1007,13 @@ sub dir_check { sub getosflags { $config{LDLIBS} = "-lstdc++"; - $config{FLAGS} = "-W -pedantic -fPIC $config{OPTIMISATI}"; - $config{DEVELOPER} = "-W -pedantic -fPIC -g"; + $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; + $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated -g"; $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; $config{MAKEPROG} = "make"; if ($config{OSNAME} =~ /darwin/i) { - $config{FLAGS} = "-W -pedantic -DDARWIN -frtti -fPIC $config{OPTIMISATI}"; + $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup"; $config{LDLIBS} = "-ldl -lstdc++"; } @@ -1034,7 +1034,7 @@ sub getosflags { if ($config{OSNAME} =~ /Linux/i) { $config{LDLIBS} = "-ldl -lstdc++"; - $config{FLAGS} = "-W -pedantic -fPIC $config{OPTIMISATI}"; + $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -Wno-deprecated $config{OPTIMISATI}"; $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS}); $config{LDLIBS} .= " " . $ENV{LDLIBS} if exists($ENV{LDLIBS}); $config{MAKEPROG} = "make"; @@ -1286,23 +1286,16 @@ all: \$(MODULES) EOF -$nicerflags = $config{FLAGS}; -$nicerflags =~ s/\-pedantic//g; - if ($config{OSNAME} =~ /darwin/) { print FILEHANDLE <<EOCHEESE; PICLDFLAGS = -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle -LAMEFLAGS = $nicerflags -LAMEPICFLAGS = -twolevel_namespace -undefined dynamic_lookup $nicerflags -bundle EOCHEESE } else { print FILEHANDLE <<EOCHEESE; PICLDFLAGS = -fPIC -DPIC -shared \$(FLAGS) -LAMEFLAGS = $nicerflags -LAMEPICFLAGS = -fPIC -DPIC -shared $nicerflags EOCHEESE } @@ -1324,23 +1317,12 @@ EOCHEESE $cmflags = getcompilerflags("src/modules/m_".$i.".cpp"); $liflags = getlinkerflags("src/modules/m_".$i.".cpp"); $deps = getdependencies("src/modules/m_".$i.".cpp"); - - if (nopedantic("src/modules/m_".$i.".cpp")) - { - $fl = "\$(LAMEFLAGS)"; - $pfl = "\$(LAMEPICFLAGS)"; - } - else - { - $fl = "\$(FLAGS)"; - $pfl = "\$(PICFLAGS)"; - } #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n"; print FILEHANDLE <<EOCHEESE; m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps - \$(CC) -pipe -I../../include $fl $cmflags $pfl $liflags -export-dynamic -o m_$i.so m_$i.cpp + \$(CC) -pipe -I../../include \$(FLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp EOCHEESE $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n"; ### @@ -1361,9 +1343,9 @@ EOCHEESE print "Composing Makefile rules for directory \033[1;32m$name\033[0m... (\033[1;32m$mfcount files found\033[0m)\n"; print FILEHANDLE "$name.so: ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $mobjs\n"; if ($config{IS_DARWIN} eq "YES") { - print FILEHANDLE " \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup $fl $mliflags -bundle -o $name.so $mobjs\n"; + print FILEHANDLE " \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) $mliflags -bundle -o $name.so $mobjs\n"; } else { - print FILEHANDLE " \$(CC) -pipe $fl -shared $mliflags -o $name.so $mobjs\n"; + print FILEHANDLE " \$(CC) -pipe \$(FLAGS) -shared $mliflags -o $name.so $mobjs\n"; } print FILEHANDLE "\n$mfrules\n"; closedir(MDIRHANDLE); @@ -1450,7 +1432,7 @@ sub write_dynamic_makefile if ($name =~ /^cmd_(.+)\.cpp$/) { $cmdlist[$i++] = $1; - $install_list = $install_list . " -install -m \$(INSTMODE) src/commands/cmd_" . $1 . ".so \$(LIBPATH)\n"; + $install_list = $install_list . " -install -m \$(INSTMODE) src/commands/cmd_" . $name . ".so \$(LIBPATH)\n"; } } closedir(DIRHANDLE); |