debian: Don't install gcc g++ on debian.

gmake assumes default CC is cc, CXX is g++ (not c++).
In order to make this sane (c++), we check if the shell variable CXX was set
and if so we honor it, else we set CXX to c++.
windows-drag
Doug Coleman 2019-03-08 21:08:26 -06:00
parent 4403155dce
commit d6c3cff581
3 changed files with 13 additions and 2 deletions

View File

@ -5,6 +5,14 @@ ifdef CONFIG
DEBUG ?= 0
REPRODUCIBLE ?= 0
# gmake's default CXX is g++, we prefer c++
SHELL_CXX = $(shell printenv CXX)
ifeq ($(SHELL_CXX),)
CXX=c++
else
CXX=$(SHELL_CXX)
endif
include $(CONFIG)
CFLAGS = -Wall \

View File

@ -686,7 +686,7 @@ make_boot_image() {
}
install_deps_apt() {
sudo apt install --yes libc6-dev libpango1.0-dev libx11-dev xorg-dev libgtk2.0-dev gtk2-engines-pixbuf libgtkglext1-dev wget git git-doc rlwrap clang gcc make screen tmux libssl-dev g++
sudo apt install --yes libc6-dev libpango1.0-dev libx11-dev xorg-dev libgtk2.0-dev gtk2-engines-pixbuf libgtkglext1-dev wget git git-doc rlwrap clang make screen tmux libssl-dev
check_ret sudo
}

View File

@ -5,6 +5,9 @@ LIBS = -ldl -lm -lrt -lpthread -Wl,--export-dynamic
# clang spams warnings if we use -Wl,--no-as-needed with -c
# -Wl,--no-as-needed is a gcc optimization, not required
ifneq ($(CXX),clang++)
# we want to work with g++ aliased as c++ here, too
IS_GCC = $(shell $(CXX) --version | grep '(GCC)')
ifdef ($(IS_GCC))
SITE_CFLAGS += -Wl,--no-as-needed
endif