Skip to content

Commit

Permalink
Merge pull request #2300 from jwillemsen/jwi-makeincludeclean
Browse files Browse the repository at this point in the history
ACE make support cleanup
  • Loading branch information
jwillemsen authored Nov 12, 2024
2 parents 1839bdf + 17514f8 commit a148a43
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 40 deletions.
1 change: 0 additions & 1 deletion ACE/include/makeinclude/platform_clang_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ else
endif

CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)

CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)

# Only modify LDFLAGS if DLD has been set.
Expand Down
20 changes: 9 additions & 11 deletions ACE/include/makeinclude/platform_g++_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,18 @@ else
CXX_FOR_VERSION_TEST ?= $(CXX)
endif

CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
CXX_MACHINE := $(shell $(CXX_FOR_VERSION_TEST) -dumpmachine)
ifeq (cmd,$(findstring cmd,$(SHELL)))
CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION)))
else
CXX_MAJOR_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/\..*$$//')
ifndef CXX_VERSION
CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
endif
ifeq (cmd,$(findstring cmd,$(SHELL)))
CXX_MINOR_VERSION := $(word 2,$(subst ., ,$(CXX_VERSION)))
else
CXX_MINOR_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/^[0-9]*\.//' | sed -e 's/\..*$$//')
ifndef CXX_MACHINE
CXX_MACHINE := $(shell $(CXX_FOR_VERSION_TEST) -dumpmachine)
endif
ifndef CXX_FULL_VERSION
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
endif

CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION)))
CXX_MINOR_VERSION := $(word 2,$(subst ., ,$(CXX_VERSION)))

# Minimum C++ level is now C++17, gcc until version 11 have an older version as default
ifeq ($(CXX_MAJOR_VERSION),7)
Expand Down
2 changes: 0 additions & 2 deletions ACE/include/makeinclude/platform_gcc_clang_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ else ifeq ($(c++20),1)
CCFLAGS += -std=c++20
else ifeq ($(c++17),1)
CCFLAGS += -std=c++17
else ifeq ($(c++14),1)
CCFLAGS += -std=c++14
endif

# If no option has been specified, set templates to automatic
Expand Down
26 changes: 7 additions & 19 deletions ACE/include/makeinclude/platform_linux.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ else
CXX_FOR_VERSION_TEST ?= g++
endif

CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)

ifeq (Ubuntu, $(findstring Ubuntu,$(LSB_RELEASE_ID)))
ifeq (7.10, $(findstring 7.10,$(LSB_RELEASE_RELEASE)))
no_hidden_visibility ?= 1
endif
ifeq (7.04, $(findstring 7.04,$(LSB_RELEASE_RELEASE)))
no_hidden_visibility ?= 1
endif
ifndef CXX_FULL_VERSION
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
endif
ifndef CXX_VERSION
CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
endif

ifeq ($(buildbits),32)
Expand Down Expand Up @@ -52,15 +47,8 @@ endif
#
include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU

# TAO with GCC 4.0.2 and -O3 seems to result in runtime issues, for example
# the ForwardRequest PI test will fail. For GCC 4.0.2 we default to -O2
ifeq ($(CXX_VERSION),4.0.2)
OCFLAGS ?= -O2
OCCFLAGS ?=-O2
else
OCFLAGS ?= -O3
OCCFLAGS ?= -O3
endif
OCFLAGS ?= -O3
OCCFLAGS ?= -O3

#### GNU gas has a string limit of 4096 characters. On Alphas,
#### builds will fail due to running over that limit. There are
Expand Down
7 changes: 0 additions & 7 deletions ACE/include/makeinclude/platform_linux_clang.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ endif
ifndef CXX_VERSION
CXX_VERSION := $(shell $(CXX) -dumpversion)
endif
ifeq (cmd,$(findstring cmd,$(SHELL)))
CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION)))
else
CXX_MAJOR_DOT = $(word $2,$(subst ., ,$1))
CXX_MAJOR_VERSION := $(call CXX_MAJOR_DOT,$(CXX_VERSION),1)
endif

# clang 16 and newer default to C++17
ifeq ($(CXX_MAJOR_VERSION),$(filter $(CXX_MAJOR_VERSION),4 5 6 7 8 9 10 11 12 13 14 15))
Expand Down Expand Up @@ -47,8 +42,6 @@ else ifeq ($(c++20),1)
CCFLAGS += -std=c++20
else ifeq ($(c++17),1)
CCFLAGS += -std=c++17
else ifeq ($(c++14),1)
CCFLAGS += -std=c++14
endif

ifeq ($(no_deprecated),1)
Expand Down

0 comments on commit a148a43

Please sign in to comment.