ports/net/asterisk16/files/patch-Makefile.rules
Guido Falsi 103c97c2f5 net/asterisk16: Add red_geolocation support
Add a GEOLOCATION option (off by default) to allow building the new
res_geolocation module, which allows to use geolocation information
in SIP protocol (upstream provider support required).

Since it requires architecture specific flags to be passed to ld,
I've enabled it only for tier 1 architectures at present.

PR:		266053
Tested by:	Seneca Cunningham <seneca@vybenetworks.com>
2022-08-30 10:06:02 +02:00

27 lines
1 KiB
Text

--- Makefile.rules.orig 2022-08-18 15:13:55 UTC
+++ Makefile.rules
@@ -107,6 +107,11 @@ ifeq ($(C_COMPILER_FAMILY),clang)
# Clang -Werror warning suppressions
ifeq ($(C_COMPILER_FAMILY),clang)
CC_CFLAGS+=-Wno-unused-value -Wno-parentheses-equality
+ BINARY_LLD_FLAGS= -z noexecstack
+ LLD_EMULATION=%%LLD_EMULATION%%
+else
+ BINARY_LLD_FLAGS=
+ LLD_EMULATION=
endif
ifeq ($(GNU_LD),1)
@@ -213,10 +218,10 @@ endif
# extern const size_t _binary_abc_def_xml_size;
%.o: %.xml
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
- $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
+ $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^
%.o: %.xslt
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
- $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^
+ $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^
dist-clean:: clean