Skip to content

Commit c573927

Browse files
committed
fixed #14626 - execinfo.h detection in Makefile did not work
1 parent f6b31b7 commit c573927

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/CI-unixish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,13 @@ jobs:
679679
test -z "$(nm processexecutor.o)"
680680
# TODO: test NO_* defines
681681
682+
- name: Test execinfo.h detection
683+
if: matrix.os == 'ubuntu-22.04'
684+
run: |
685+
make clean
686+
make cli/stacktrace.o | grep HAVE_EXECINFO_H=1
687+
test -n "$(nm cli/stacktrace.o)"
688+
682689
- name: Test testrunner inclusion/exclusion
683690
run: |
684691
! ./testrunner -d TestUtils | grep -v TestUtils > /dev/null

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ else ifneq ($(HAVE_RULES),)
155155
$(error invalid HAVE_RULES value '$(HAVE_RULES)')
156156
endif
157157

158-
HAVE_EXECINFO_H=$(shell echo "\#include <execinfo.h>" | $(CXX) -c -xc - 2> /dev/null && echo "1" || echo "0")
158+
HAVE_EXECINFO_H=$(shell echo "#include <execinfo.h>" | $(CXX) -c -xc - 2> /dev/null && echo "1" || echo "0")
159159
override CPPFLAGS += -DHAVE_EXECINFO_H=$(HAVE_EXECINFO_H)
160160

161161
override CXXFLAGS += $(CXXOPTS)

tools/dmake/dmake.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ int main(int argc, char **argv)
772772
<< "endif\n\n";
773773

774774
// the # needs to be escaped on older make versions
775-
fout << "HAVE_EXECINFO_H=$(shell echo \"\\#include <execinfo.h>\" | $(CXX) -c -xc - 2> /dev/null && echo \"1\" || echo \"0\")\n"
775+
fout << "HAVE_EXECINFO_H=$(shell echo \"#include <execinfo.h>\" | $(CXX) -c -xc - 2> /dev/null && echo \"1\" || echo \"0\")\n"
776776
<< "override CPPFLAGS += -DHAVE_EXECINFO_H=$(HAVE_EXECINFO_H)\n\n";
777777

778778
fout << "override CXXFLAGS += $(CXXOPTS)\n";

0 commit comments

Comments
 (0)