fix wrong usage of TARGET_xxx macros

They are for make targets, i.e. file dependent flags
not for target architecture dependent flags.
This commit is contained in:
2025-03-19 11:12:06 +01:00
parent 1732c9440a
commit db003e8a10
4 changed files with 7 additions and 7 deletions

View File

@ -9,8 +9,8 @@ STD_CXXFLAGS = -std=c++20
# Fix bug in gcc-toolset-11 calling the old assembler
ifneq ($(filter %-11,$(TOOLSET)),)
TARGET_CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
TARGET_LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
endif
ifneq (($(TOOLSET)),)

View File

@ -9,8 +9,8 @@ STD_CXXFLAGS = -std=c++20
# Fix bug in gcc-toolset-11 calling the old assembler
ifneq ($(filter %-11,$(TOOLSET)),)
TARGET_CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
TARGET_LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
endif
ifneq (($(TOOLSET)),)

View File

@ -14,7 +14,7 @@ SYSROOT = /opt/RHEL8
# But linker gets confused with LD_LIBRARY_PATH.
# Thus only wrap the compiler.
WRAPPER = -wrapper env,LD_LIBRARY_PATH=$(TOOLSET_DIR:%=$(SYSROOT)%/usr/lib64:)/usr/lib64:$(SYSROOT)/usr/lib64
TARGET_CPPFLAGS += $(WRAPPER)
CPPFLAGS += $(WRAPPER)
# These programs as cross tools would also need LD_LIBRARY_PATH.
# But but our host versions work just fine.

View File

@ -15,8 +15,8 @@ STD_CXXFLAGS = -std=c++11
TOOLSET_DIR = $(TOOLSET:%=$(TOOLSET_LOCATION)/%/root)
GNU_DIR = $(SYSROOT)$(TOOLSET_DIR)
TARGET_CPPFLAGS += $(SYSROOT:%=--sysroot=%)
TARGET_LDFLAGS += $(SYSROOT:%=--sysroot=%)
CPPFLAGS += $(SYSROOT:%=--sysroot=%)
LDFLAGS += $(SYSROOT:%=--sysroot=%)
# backward compatibility: Keep unversioned libs
# in order to prevent dynamic linking problems