@@ -301,9 +301,15 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
+HOST_LFS_CFLAGS := $(getconf LFS_CFLAGS)
+HOST_LFS_LDFLAGS := $(getconf LFS_LDFLAGS)
+HOST_LFS_LIBS := $(getconf LFS_LIBS)
+
HOSTCC = gcc
HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
+HOSTLDFLAGS = $(HOST_LFS_LDFLAGS)
+HOSTLOADLIBES = $(HOST_LFS_LIBS)
-HOSTCXXFLAGS = -O2
+HOSTCXXFLAGS = -O2 $(HOST_LFS_CFLAGS)
ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)