From 2d7cf5ea998cba736928e3e759e40807ae933add Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:22:14 +0800 Subject: [PATCH] update 2023-09-04 16:22:14 --- mhz/Makefile | 2 +- ...efile-allow-overriding-CC-and-CFLAGS.patch | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 mhz/patches/0001-Makefile-allow-overriding-CC-and-CFLAGS.patch diff --git a/mhz/Makefile b/mhz/Makefile index ddbb188e5..4977388ad 100644 --- a/mhz/Makefile +++ b/mhz/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mhz -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/wtarreau/mhz.git diff --git a/mhz/patches/0001-Makefile-allow-overriding-CC-and-CFLAGS.patch b/mhz/patches/0001-Makefile-allow-overriding-CC-and-CFLAGS.patch new file mode 100644 index 000000000..569bc998b --- /dev/null +++ b/mhz/patches/0001-Makefile-allow-overriding-CC-and-CFLAGS.patch @@ -0,0 +1,29 @@ +From d55f7b578eb2126d2e4a7f045321f6ba7df3800a Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Wed, 30 Aug 2023 20:31:07 +0200 +Subject: [PATCH] Makefile: allow overriding CC and CFLAGS + +For OpenWrt and Buildroot which support really large amount of different +architectures and cores it is sometimes required to pass our own CFLAGS. +This is especially true if hardening options are to be respected. + +Also, for cross-compiling CC should be respected as currently it is +working since both OpenWrt and Buildroot symlink gcc to the cross compiler. + +So, lets set the current values as defaults but allow them to be overriden. + +Signed-off-by: Robert Marko +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ +-CC := gcc +-CFLAGS := -O3 -Wall -fomit-frame-pointer ++CC ?= gcc ++CFLAGS ?= -O3 -Wall -fomit-frame-pointer + + all: mhz +