Skip to content

Commit

Permalink
Fix unset CXXFLAGS variable in Makefile.direct on AIX
Browse files Browse the repository at this point in the history
(fix of commit f7cfa9d)

Issue #483 (bdwgc).

AIX Make seems not to recognize "?=" operator properly.

The proposed workaround to duplicate all flags of CFLAGS to CXXFLAGS
(appended to the user-supplied CXXFLAGS if any).

* Makefile.direct (CXXFLAGS): Set to empty value (using "?=");
append all flags of CFLAGS (i.e., expand CFLAGS manually).
  • Loading branch information
ivmai committed Jan 1, 2023
1 parent 31fc56f commit 9d0f674
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile.direct
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ HOSTCFLAGS= $(CFLAGS)
# Look into doc/README.macros for the description of the "define arguments"
# influencing the collector configuration.

CXXFLAGS?= $(CFLAGS)
# Flags for the C++ files.
# Note: non-GNU make might not recognize "?=" properly, so just duplicate
# the flags of CFLAGS as a workaround.
CXXFLAGS?=
CXXFLAGS+= -I$(srcdir)/include -I$(AO_SRC_DIR)/src \
$(CFLAGS_DEFAULT_MACROS) $(CFLAGS_FOR_PIC) $(CFLAGS_EXTRA)

AR= ar

RANLIB= ranlib
Expand Down

0 comments on commit 9d0f674

Please sign in to comment.