]> git.proxmox.com Git - grub2.git/commitdiff
Use dpkg-buildflags at least for the host binaries.
authorFelix Zielcke <fzielcke@z-51.de>
Sat, 22 Aug 2015 19:07:11 +0000 (21:07 +0200)
committerFelix Zielcke <fzielcke@z-51.de>
Sat, 22 Aug 2015 19:07:11 +0000 (21:07 +0200)
debian/changelog
debian/rules

index 4e50762b5bdaca1ab5911072dabd70cf58747447..ab9f920b778ec47a88c0b5aa56702bae97015173 100644 (file)
@@ -5,6 +5,7 @@ grub2 (2.02~beta2-27) UNRELEASED; urgency=medium
   * Stop forcing gcc-4.9 for building.
   * Update to Policy 3.9.6.
   * Update the Browser URL for our git repository.
+  * Use dpkg-buildflags at least for the host binaries.
 
  -- Felix Zielcke <fzielcke@z-51.de>  Mon, 17 Aug 2015 22:29:04 +0200
 
index fb28490427e2e56e1d9bbd74d89d54da8fd1ab15..77cac6fdc6a31fc300ca3adb40a81d58975111e6 100755 (executable)
@@ -10,16 +10,14 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
 
-HOST_CFLAGS := -g -Wall -Wno-error=unused-result
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       HOST_CFLAGS += -O0
-else
-       HOST_CFLAGS += -O2
-endif
+HOST_CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+HOST_CFLAGS := -Wall -Wno-error=unused-result $(shell dpkg-buildflags --get CFLAGS)
+HOST_LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
 unexport CFLAGS
+export HOST_CPPFLAGS
 export HOST_CFLAGS
+export HOST_LDFLAGS
 export TARGET_CPPFLAGS := -Wno-unused-but-set-variable
 
 ifeq (,$(shell which qemu-system-i386 2>/dev/null))
@@ -28,9 +26,7 @@ else
 with_check := yes
 endif
 
-#CC := gcc-4.9
-
-confflags = PACKAGE_VERSION="$(deb_version)" PACKAGE_STRING="GRUB $(deb_version)" CC=$(CC) TARGET_CC=$(CC) --enable-grub-mkfont
+confflags = PACKAGE_VERSION="$(deb_version)" PACKAGE_STRING="GRUB $(deb_version)" --enable-grub-mkfont
 substvars =
 
 AUTOGEN_DEB_FILES = config templates preinst postinst postrm dirs install links maintscript