mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Mock - compatibility fix for shell calls (#9183)
echo does not seem to have escape mode with GH actions runner trying to fix apparently broken makefile funcs from #9117
This commit is contained in:
parent
3a5157e3ba
commit
1d6e50f7d0
@ -71,8 +71,8 @@ $(shell mkdir -p $(BINDIR))
|
|||||||
# Core files sometimes override libc functions, check when necessary to hide them
|
# Core files sometimes override libc functions, check when necessary to hide them
|
||||||
# TODO proper configure script / other build system?
|
# TODO proper configure script / other build system?
|
||||||
ifeq (,$(wildcard $(BINDIR)/.have_strlcpy))
|
ifeq (,$(wildcard $(BINDIR)/.have_strlcpy))
|
||||||
$(shell echo -e '#include <cstring>\nint main(){char a[4]{}; char b[4]{}; strlcpy(&a[0], &b[0], sizeof(a)); return 0;}' | \
|
$(shell printf '#include <cstring>\nint main(){char a[4]{}; char b[4]{}; strlcpy(&a[0], &b[0], sizeof(a)); return 0;}\n' | \
|
||||||
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcpy 2>/dev/null || ( echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcpy ; chmod +x $(BINDIR)/.have_strlcpy; ))
|
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcpy 2>/dev/null || ( printf '#!/bin/sh\nexit 1\n' > $(BINDIR)/.have_strlcpy ; chmod +x $(BINDIR)/.have_strlcpy; ))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(shell $(BINDIR)/.have_strlcpy)
|
$(shell $(BINDIR)/.have_strlcpy)
|
||||||
@ -81,8 +81,8 @@ FLAGS += -DSTRLCPY_MISSING
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (,$(wildcard $(BINDIR)/.have_strlcat))
|
ifeq (,$(wildcard $(BINDIR)/.have_strlcat))
|
||||||
$(shell echo -e '#include <cstring>\nint main(){char a[4]{}; strlcat(&a[0], "test", sizeof(a)); return 0;}' | \
|
$(shell printf '#include <cstring>\nint main(){char a[4]{}; strlcat(&a[0], "test", sizeof(a)); return 0;}\n' | \
|
||||||
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcat 2>/dev/null || ( echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcat ; chmod +x $(BINDIR)/.have_strlcat; ))
|
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcat 2>/dev/null || ( printf '#!/bin/sh\nexit 1\n' > $(BINDIR)/.have_strlcat ; chmod +x $(BINDIR)/.have_strlcat; ))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(shell $(BINDIR)/.have_strlcat)
|
$(shell $(BINDIR)/.have_strlcat)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user