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
parent
4403155dce
commit
d6c3cff581
|
@ -5,6 +5,14 @@ ifdef CONFIG
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
REPRODUCIBLE ?= 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)
|
include $(CONFIG)
|
||||||
|
|
||||||
CFLAGS = -Wall \
|
CFLAGS = -Wall \
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -686,7 +686,7 @@ make_boot_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_deps_apt() {
|
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
|
check_ret sudo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ LIBS = -ldl -lm -lrt -lpthread -Wl,--export-dynamic
|
||||||
|
|
||||||
# clang spams warnings if we use -Wl,--no-as-needed with -c
|
# clang spams warnings if we use -Wl,--no-as-needed with -c
|
||||||
# -Wl,--no-as-needed is a gcc optimization, not required
|
# -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
|
SITE_CFLAGS += -Wl,--no-as-needed
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue