Description: Remove hardcoded GCC optimization flags
 This is necessary in order to make DEB_BUILD_OPTIONS=noopt work as expected.
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: not-needed
Last-Update: 2012-11-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Make.inc
+++ b/Make.inc
@@ -173,7 +173,7 @@ CXX = $(CROSS_COMPILE)g++
 JCFLAGS = -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
 JCXXFLAGS = -pipe $(fPIC) -fno-rtti
 DEBUGFLAGS = -O0 -ggdb3 -DDEBUG -fstack-protector-all
-SHIPFLAGS = -O3 -falign-functions
+SHIPFLAGS = -falign-functions
 endif
 
 ifeq ($(USECLANG),1)
@@ -196,7 +196,7 @@ JCFLAGS += -D_LARGEFILE_SOURCE -D_DARWIN
 endif
 endif
 
-JFFLAGS = -O2 $(fPIC)
+JFFLAGS = $(fPIC)
 CPP = $(CC) -E
 AR := $(CROSS_COMPILE)ar
 AS := $(CROSS_COMPILE)as
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -523,7 +523,7 @@ install-pcre: $(PCRE_OBJ_TARGET)
 
 ## Grisu floating-point printing library ##
 
-GRISU_OPTS = $(CXXFLAGS) -O3 -fvisibility=hidden $(fPIC)
+GRISU_OPTS = $(CXXFLAGS) -fvisibility=hidden $(fPIC)
 GRISU_OBJ_TARGET = $(BUILD)/$(JL_LIBDIR)/libgrisu.$(SHLIB_EXT)
 
 double-conversion-$(GRISU_VER).tar.gz:
@@ -629,7 +629,7 @@ install-openlibm-extras: $(OPENLIBMEXT_O
 LIBRANDOM_OBJ_TARGET = $(BUILD)/$(JL_LIBDIR)/librandom.$(SHLIB_EXT)
 LIBRANDOM_OBJ_SOURCE = random/librandom.$(SHLIB_EXT)
 
-LIBRANDOM_CFLAGS = $(CFLAGS) -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing \
+LIBRANDOM_CFLAGS = $(CFLAGS) -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing \
 				   --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall  -std=c99 \
 				   -DDSFMT_MEXP=19937 $(fPIC) -shared -DDSFMT_DO_NOT_USE_OLD_NAMES
 ifeq ($(ARCH), x86_64)
@@ -1230,7 +1230,7 @@ $(BUILD)/$(JL_LIBDIR)/libsuitesparse_wra
 endif
 
 $(BUILD)/$(JL_LIBDIR)/libsuitesparse_wrapper.$(SHLIB_EXT): SuiteSparse_wrapper.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -O2 -shared $(fPIC) $(SUITESPARSE_INC) $< -o $@ $(SUITESPARSE_LIB)
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $(fPIC) $(SUITESPARSE_INC) $< -o $@ $(SUITESPARSE_LIB)
 	$(INSTALL_NAME_CMD)libsuitesparse_wrapper.$(SHLIB_EXT) $@
 	touch -c $@
 
--- a/deps/openlibm/Make.inc
+++ b/deps/openlibm/Make.inc
@@ -3,7 +3,6 @@
 OS := $(shell uname)
 
 FC = gfortran
-FFLAGS += -O3
 
 USEGCC = 1
 USECLANG = 0
@@ -31,7 +30,7 @@ ifeq ($(ARCH),mingw32)
 $(error "the mingw32 compiler you are using fails the openblas testsuite. please see the Julia README.windows.md document for a replacement")
 endif
 
-CFLAGS_add += -std=c99 -Wall -O3 -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
+CFLAGS_add += -std=c99 -Wall -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
 
 default: all
 
--- a/deps/Rmath/Make.inc
+++ b/deps/Rmath/Make.inc
@@ -4,12 +4,11 @@ OS = $(shell uname)
 ARCH = $(shell uname -m)
 
 FC = gfortran
-FFLAGS-add += -O3
 
 USEGCC = 1
 USECLANG = 0
 
-CFLAGS-add += -Wall -O3
+CFLAGS-add += -Wall
 
 ifeq ($(USECLANG),1)
 USEGCC = 0
