Force also the update of cc & cxx

This commit is contained in:
Sylvestre Ledru 2014-07-15 13:20:50 +00:00
parent 9d7644a8ce
commit 123767a4b5

16
debian/rules vendored
View File

@ -22,9 +22,6 @@ DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
OCAML_STDLIB_DIR ?= $(shell ocamlc -where)
export CC=gcc-$(GCC_VERSION)
export CXX=g++-$(GCC_VERSION)
LDFLAGS_EXTRA=
CXXFLAGS_EXTRA=
CONFIGURE_EXTRA=
@ -33,6 +30,14 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe))
LDFLAGS_EXTRA += -latomic
endif
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0)
# Too old version of gcc. Force 4.8
GCC_VERSION := 4.8
endif
export CC=gcc-$(GCC_VERSION)
export CXX=g++-$(GCC_VERSION)
confargs := \
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
@ -47,11 +52,6 @@ ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
opt_flags += -marm
endif
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0)
# Too old version of gcc. Force 4.8
GCC_VERSION := 4.8
endif
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.8-20121128-1~ ; echo $$?),0)
control_vars = '-Vdep:devlibs=libstdc++-$(GCC_VERSION)-dev, libgcc-$(GCC_VERSION)-dev, libobjc-$(GCC_VERSION)-dev'
else ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.7.2-10~ ; echo $$?),0)