Hello, while some Makefiles allow to use CC, other just stick to gcc. I think we should change to
CC ?= gcc everywhere Cheers, Ilya Shipitsin
From 246341f636d085a4e99bdc9f66b5fa3c7bb2b7d3 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <chipits...@gmail.com> Date: Wed, 4 Oct 2017 23:43:05 +0500 Subject: [PATCH] MINOR: build: allow to use other compilers than gcc --- Makefile | 2 +- contrib/debug/Makefile | 2 +- contrib/halog/Makefile | 2 +- contrib/ip6range/Makefile | 2 +- contrib/iprange/Makefile | 2 +- contrib/spoa_example/Makefile | 2 +- contrib/tcploop/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ddc32df4..6ca904c0 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ ARCH = #### Toolchain options. # GCC is normally used both for compiling and linking. -CC = gcc +CC ?= gcc LD = $(CC) #### Debug flags (typically "-g"). diff --git a/contrib/debug/Makefile b/contrib/debug/Makefile index 74e7547e..0fbe93c0 100644 --- a/contrib/debug/Makefile +++ b/contrib/debug/Makefile @@ -1,6 +1,6 @@ INCLUDE = -I../../include -I../../ebtree -CC = gcc +CC ?= gcc OPTIMIZE = -O2 DEFINE = OBJS = flags diff --git a/contrib/halog/Makefile b/contrib/halog/Makefile index 5e687c09..34754493 100644 --- a/contrib/halog/Makefile +++ b/contrib/halog/Makefile @@ -1,7 +1,7 @@ EBTREE_DIR = ../../ebtree INCLUDE = -I../../include -I$(EBTREE_DIR) -CC = gcc +CC ?= gcc # note: it is recommended to also add -fomit-frame-pointer on i386 OPTIMIZE = -O3 diff --git a/contrib/ip6range/Makefile b/contrib/ip6range/Makefile index 55849b6d..a11654f6 100644 --- a/contrib/ip6range/Makefile +++ b/contrib/ip6range/Makefile @@ -1,4 +1,4 @@ -CC = gcc +CC ?= gcc OPTIMIZE = -O3 LDFLAGS = -s diff --git a/contrib/iprange/Makefile b/contrib/iprange/Makefile index b3c72eda..5aec1057 100644 --- a/contrib/iprange/Makefile +++ b/contrib/iprange/Makefile @@ -1,4 +1,4 @@ -CC = gcc +CC ?= gcc OPTIMIZE = -O3 LDFLAGS = -s diff --git a/contrib/spoa_example/Makefile b/contrib/spoa_example/Makefile index 3105ef0f..f8eaf53f 100644 --- a/contrib/spoa_example/Makefile +++ b/contrib/spoa_example/Makefile @@ -2,7 +2,7 @@ DESTDIR = PREFIX = /usr/local BINDIR = $(PREFIX)/bin -CC = gcc +CC ?= gcc LD = $(CC) CFLAGS = -g -O2 -Wall -Werror -pthread diff --git a/contrib/tcploop/Makefile b/contrib/tcploop/Makefile index 42a6259c..46b2869d 100644 --- a/contrib/tcploop/Makefile +++ b/contrib/tcploop/Makefile @@ -1,4 +1,4 @@ -CC = gcc +CC ?= gcc OPTIMIZE = -O2 -g DEFINE = INCLUDE = -- 2.13.3