Skip to content

Commit

Permalink
Several improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Sep 20, 2024
1 parent 3132772 commit 65603f3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
4 changes: 3 additions & 1 deletion include/private/dsp/arch/aarch64/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

#ifdef ARCH_AARCH64

#ifdef PLATFORM_POSIX
#if defined(PLATFORM_MACOSX)
// TODO: add another method to detect hardware features
#elif defined(PLATFORM_POSIX)
#include <sys/auxv.h>
#endif /* PLATFORM_POSIX */

Expand Down
39 changes: 32 additions & 7 deletions make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ ifeq ($(PLATFORM),OpenBSD)
X_AR_TOOL := ar
X_LD_TOOL := ld
X_PKG_CONFIG := pkg-config
else ifeq($(PLATFORM),BSD)
X_CC_TOOL := clang
X_CXX_TOOL := clang++
X_AS_TOOL := as
X_AR_TOOL := ar
X_LD_TOOL := ld
X_PKG_CONFIG := pkg-config
else ifeq($(PLATFORM),MacOS)
X_CC_TOOL := clang
X_CXX_TOOL := clang++
X_AS_TOOL := as
X_AR_TOOL := ar
X_LD_TOOL := ld
X_PKG_CONFIG := pkg-config
else
X_CC_TOOL := gcc
X_CXX_TOOL := g++
Expand All @@ -49,13 +63,23 @@ PHP ?= $(X_PHP_TOOL)
PKG_CONFIG ?= $(X_PKG_CONFIG)

# Define tool variables for host build
HOST_CC ?= $(CC)
HOST_CXX ?= $(CXX)
HOST_AS ?= $(AS)
HOST_AR ?= $(AR)
HOST_LD ?= $(LD)
HOST_PHP ?= $(PHP)
HOST_PKG_CONFIG ?= $(PKG_CONFIG)
ifeq ($(CROSS_COMPILE),1)
HOST_CC ?= $(X_CC_TOOL)
HOST_CXX ?= $(X_CXX_TOOL)
HOST_AS ?= $(X_AS_TOOL)
HOST_AR ?= $(X_AR_TOOL)
HOST_LD ?= $(X_LD_TOOL)
HOST_PHP ?= $(X_PHP_TOOL)
HOST_PKG_CONFIG ?= $(X_PKG_CONFIG)
else
HOST_CC ?= $(CC)
HOST_CXX ?= $(CXX)
HOST_AS ?= $(AS)
HOST_AR ?= $(AR)
HOST_LD ?= $(LD)
HOST_PHP ?= $(PHP)
HOST_PKG_CONFIG ?= $(PKG_CONFIG)
endif

# Miscellaneous tools
GIT ?= $(X_GIT_TOOL)
Expand Down Expand Up @@ -85,6 +109,7 @@ else ifeq ($(PLATFORM),Windows)
else ifeq ($(PLATFORM),MacOS)
FLAG_RELRO =
FLAG_GC_SECTIONS =
CXXFLAGS_EXT += -std=c++11
else ifeq ($(PLATFORM),Haiku)
EXE_FLAGS_EXT += -L/system/lib -L/system/develop/lib
SO_FLAGS_EXT += -L/system/lib -L/system/develop/lib
Expand Down

0 comments on commit 65603f3

Please sign in to comment.