freebsd first work

This commit is contained in:
Jos Dehaes 2021-10-22 10:31:37 +02:00
parent de62167921
commit f037ab306a
4 changed files with 1160 additions and 2 deletions

View file

@ -101,8 +101,8 @@ OBJEXT := o
#? Flags, Libraries and Includes
override REQFLAGS := -std=c++20
WARNFLAGS := -Wall -Wextra -pedantic
OPTFLAGS ?= -O2 -ftree-loop-vectorize -flto=$(THREADS)
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions $(ADDFLAGS)
OPTFLAGS ?= -O0 -g # -ftree-loop-vectorize -flto=$(THREADS)
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -Wl,-rpath=/usr/local/lib/gcc11 -lstdc++ -lm #-fstack-protector -fstack-clash-protection $(ADDFLAGS)
override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
INC := -I$(INCDIR) -I$(SRCDIR)

View file

@ -18,6 +18,9 @@ tab-size = 4
#include <csignal>
#include <pthread.h>
#ifdef __FreeBSD__
#include <pthread_np.h>
#endif
#include <thread>
#include <numeric>
#include <ranges>

View file

@ -33,6 +33,10 @@ tab-size = 4
#include <btop_shared.hpp>
#include <btop_tools.hpp>
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 256
#endif
using std::string_view, std::max, std::floor, std::to_string, std::cin, std::cout, std::flush, robin_hood::unordered_flat_map;
namespace fs = std::filesystem;
namespace rng = std::ranges;

1151
src/freebsd/btop_collect.cpp Normal file

File diff suppressed because it is too large Load diff