mirror of https://github.com/aristocratos/btop.git
Compare commits
5 Commits
5a02125a86
...
b93206f038
Author | SHA1 | Date |
---|---|---|
Steffen Winter | b93206f038 | |
Jakob P. Liljenberg | ac62ba9de1 | |
Jakob P. Liljenberg | 3f917c0412 | |
Andrea Jemmett | 0127e8b3cd | |
Jos Dehaes | ebc86e9702 |
|
@ -193,6 +193,12 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|||
INSTALL_RPATH "/usr/local/lib/gcc${GCC_VERSION_MAJOR}"
|
||||
BUILD_WITH_INSTALL_RPATH TRUE
|
||||
)
|
||||
|
||||
# The gcc compiler wrapper doesn't add '--eh-frame-hdr' on FreeBSD with static builds
|
||||
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278551
|
||||
if(BTOP_STATIC)
|
||||
target_link_options(btop PRIVATE LINKER:--eh-frame-hdr)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(devstat REQUIRED)
|
||||
|
|
25
Makefile
25
Makefile
|
@ -97,17 +97,18 @@ ifneq ($(PLATFORM) $(ARCH),macos arm64)
|
|||
endif
|
||||
|
||||
ifeq ($(STATIC),true)
|
||||
ifeq ($(CXX_IS_CLANG) $(CLANG_WORKS),true true)
|
||||
ifeq ($(CXX_IS_CLANG),true)
|
||||
ifeq ($(shell $(CXX) -print-target-triple | grep gnu >/dev/null; echo $$?),0)
|
||||
$(error $(shell printf "\033[1;91mERROR: \033[97m$(CXX) can't statically link glibc\033[0m"))
|
||||
endif
|
||||
else
|
||||
override ADDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
ifeq ($(PLATFORM_LC),linux)
|
||||
override ADDFLAGS += -DSTATIC_BUILD -static -Wl,--fatal-warnings
|
||||
else ifeq ($(PLATFORM_LC),freebsd)
|
||||
override ADDFLAGS += -DSTATIC_BUILD
|
||||
|
||||
ifeq ($(PLATFORM_LC),$(filter $(PLATFORM_LC),freebsd linux))
|
||||
override ADDFLAGS += -DSTATIC_BUILD -static
|
||||
else
|
||||
ifeq ($(CXX_IS_CLANG),false)
|
||||
override ADDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -130,9 +131,13 @@ else ifeq ($(PLATFORM_LC),freebsd)
|
|||
PLATFORM_DIR := freebsd
|
||||
THREADS := $(shell getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
|
||||
SU_GROUP := wheel
|
||||
override ADDFLAGS += -lm -lkvm -ldevstat -Wl,-rpath=/usr/local/lib/gcc$(CXX_VERSION_MAJOR)
|
||||
ifneq ($(STATIC),true)
|
||||
override ADDFLAGS += -lstdc++
|
||||
override ADDFLAGS += -lm -lkvm -ldevstat
|
||||
ifeq ($(STATIC),true)
|
||||
override ADDFLAGS += -lelf -Wl,--eh-frame-hdr
|
||||
endif
|
||||
|
||||
ifeq ($(CXX_IS_CLANG),false)
|
||||
override ADDFLAGS += -lstdc++ -Wl,rpath=/usr/local/lib/gcc$(CXX_VERSION_MAJOR)
|
||||
endif
|
||||
export MAKE = gmake
|
||||
else ifeq ($(PLATFORM_LC),macos)
|
||||
|
|
|
@ -381,11 +381,16 @@ namespace Theme {
|
|||
if (themefile.good()) {
|
||||
Logger::debug("Loading theme file: " + filename);
|
||||
while (not themefile.bad()) {
|
||||
if (themefile.peek() == '#') {
|
||||
themefile.ignore(SSmax, '\n');
|
||||
continue;
|
||||
}
|
||||
themefile.ignore(SSmax, '[');
|
||||
if (themefile.eof()) break;
|
||||
string name, value;
|
||||
getline(themefile, name, ']');
|
||||
if (not Default_theme.contains(name)) {
|
||||
themefile.ignore(SSmax, '\n');
|
||||
continue;
|
||||
}
|
||||
themefile.ignore(SSmax, '=');
|
||||
|
@ -394,6 +399,7 @@ namespace Theme {
|
|||
if (themefile.peek() == '"') {
|
||||
themefile.ignore(1);
|
||||
getline(themefile, value, '"');
|
||||
themefile.ignore(SSmax, '\n');
|
||||
}
|
||||
else getline(themefile, value, '\n');
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ namespace Cpu {
|
|||
const int file_id = atoi(file.path().filename().c_str() + 4); // skip "temp" prefix
|
||||
string file_path = file.path();
|
||||
|
||||
if (!s_contains(file_path, file_suffix)) {
|
||||
if (!s_contains(file_path, file_suffix) or s_contains(file_path, "nvme")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue