From 8e18c7c5d5c7c85c571d262cfbb10eabbb618e03 Mon Sep 17 00:00:00 2001
From: Benny Baumann <BenBE@geshi.org>
Date: Sun, 9 Dec 2018 17:12:44 +0100
Subject: [PATCH] fix: Do proper check and initialize all affected variables

---
 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6aecd23..1c73eb5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,13 @@
 CFLAGS += -march=native -masm=intel -g -Og -fsanitize=address,signed-integer-overflow,undefined -pedantic -Wall -Wextra -Werror -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -Wshadow -Wformat=2 -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-overflow=5 -Wwrite-strings -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code -Winit-self -fno-strict-aliasing -Wno-unknown-warning-option
 CXXFLAGS += ${CFLAGS} -std=c++11 -std=c++17 -Wuseless-cast -Weffc++
-LFLAGS += -flto
+LFLAGS +=
 DEPFLAGS = -MT $@ -MMD -MP -MF $(patsubst ${OBJDIR}/%.o,${DEPDIR}/%.d,$@)
 
-ifeq "$(shell uname -s)" "Linux"
+OS = $(shell uname -s)
+ifeq "${OS}" "Linux"
 CFLAGS += -flto
 CXXFLAGS += -flto
+LFLAGS += -flto
 endif
 
 CC ?= gcc
-- 
GitLab