Commits

Aleš Erjavec  committed 9cb46d7

Added -fno-strict-aliasing compiler flag.

  • Participants
  • Parent commits 0abf613

Comments (0)

Files changed (1)

File source/makefile.defs

   else
   	export MACOSX_DEPLOYMENT_TARGET = 10.4
   endif
-  COMPILEOPTIONS = -fPIC -fpermissive -fno-common -w -DDARWIN -D$(MODULENAME)_EXPORTS -O3 -I$(NUMPY_INCLUDE) $(CXXFLAGS)
-  STATICCOMPILEOPTIONS = -fpermissive -fno-common -w -DDARWIN -D$(MODULENAME)_EXPORTS -O3 -I$(NUMPY_INCLUDE) $(CXXFLAGS)
+  COMPILEOPTIONS = -fPIC -fpermissive -fno-strict-aliasing -fno-common -w -DDARWIN -D$(MODULENAME)_EXPORTS -O3 -I$(NUMPY_INCLUDE) $(CXXFLAGS)
+  STATICCOMPILEOPTIONS = -fpermissive -fno-strict-aliasing -fno-common -w -DDARWIN -D$(MODULENAME)_EXPORTS -O3 -I$(NUMPY_INCLUDE) $(CXXFLAGS)
   LINKOPTIONS = -dynamiclib -headerpad_max_install_names -undefined dynamic_lookup -lstdc++ -L$(OLD) -lorange_include $(LDFLAGS)
   LINKER = g++
 else
 ifeq ($(OS), FreeBSD)
-  COMPILEOPTIONS = -fPIC -fpermissive -w -DFREEBSD -O3 $(CXXFLAGS)
-  STATICCOMPILEOPTIONS = -fpermissive -w -DFREEBSD -O3 $(CXXFLAGS)
+  COMPILEOPTIONS = -fPIC -fpermissive -fno-strict-aliasing -w -DFREEBSD -O3 $(CXXFLAGS)
+  STATICCOMPILEOPTIONS = -fpermissive -fno-strict-aliasing -w -DFREEBSD -O3 $(CXXFLAGS)
   LINKOPTIONS = -shared -lstdc++ -L$(OLD) -lorange_include $(LDFLAGS)
   LINKOPTIONS += `gsl-config --libs`
   MAKE = gmake
 else
   # for icc, also add -D"__sync_fetch_and_add(ptr,addend)=_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(ptr)), addend)"
-  COMPILEOPTIONS = -fPIC -fpermissive -w -DLINUX -D$(MODULENAME)_EXPORTS -O3 $(CXXFLAGS)
-  STATICCOMPILEOPTIONS = -fpermissive -w -DLINUX -D$(MODULENAME)_EXPORTS -O3 $(CXXFLAGS) # To make Debian package managers happy
+  COMPILEOPTIONS = -fPIC -fpermissive -fno-strict-aliasing -w -DLINUX -D$(MODULENAME)_EXPORTS -O3 $(CXXFLAGS)
+  STATICCOMPILEOPTIONS = -fpermissive -fno-strict-aliasing -w -DLINUX -D$(MODULENAME)_EXPORTS -O3 $(CXXFLAGS) # To make Debian package managers happy
   LINKOPTIONS = -Wl,-R'$$ORIGIN' -shared -lstdc++ -L$(OLD) -lorange_include $(LDFLAGS)
 endif
 endif