From db003e8a10a1a2ca781b7bee13ba51d4fc820c9f Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 19 Mar 2025 11:12:06 +0100 Subject: [PATCH] fix wrong usage of TARGET_xxx macros They are for make targets, i.e. file dependent flags not for target architecture dependent flags. --- configure/os/CONFIG.Common.RHEL8-x86_64 | 4 ++-- configure/os/CONFIG.Common.RHEL9-x86_64 | 4 ++-- configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 | 2 +- configure/os/CONFIG_SITE.Common.linuxCommon | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure/os/CONFIG.Common.RHEL8-x86_64 b/configure/os/CONFIG.Common.RHEL8-x86_64 index 2f1d4bc9e..7296a31a4 100644 --- a/configure/os/CONFIG.Common.RHEL8-x86_64 +++ b/configure/os/CONFIG.Common.RHEL8-x86_64 @@ -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)),) diff --git a/configure/os/CONFIG.Common.RHEL9-x86_64 b/configure/os/CONFIG.Common.RHEL9-x86_64 index 2f1d4bc9e..7296a31a4 100644 --- a/configure/os/CONFIG.Common.RHEL9-x86_64 +++ b/configure/os/CONFIG.Common.RHEL9-x86_64 @@ -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)),) diff --git a/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 b/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 index 6f0ed17e8..d9aebf55b 100644 --- a/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 +++ b/configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64 @@ -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. diff --git a/configure/os/CONFIG_SITE.Common.linuxCommon b/configure/os/CONFIG_SITE.Common.linuxCommon index d79c1f805..f9ae0e2aa 100644 --- a/configure/os/CONFIG_SITE.Common.linuxCommon +++ b/configure/os/CONFIG_SITE.Common.linuxCommon @@ -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