summaryrefslogtreecommitdiff
path: root/net/asterisk18/files/patch-Makefile.rules
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2022-08-30 10:06:58 +0200
committerGuido Falsi <madpilot@FreeBSD.org>2022-08-30 10:06:58 +0200
commite32f5ab610e49d510e70a9e5d8851a8b436fc18c (patch)
treeeb66a07eaf579002178f94a35c4028883d428be9 /net/asterisk18/files/patch-Makefile.rules
parentnet/asterisk16: Add red_geolocation support (diff)
net/asterisk18: 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>
Diffstat (limited to 'net/asterisk18/files/patch-Makefile.rules')
-rw-r--r--net/asterisk18/files/patch-Makefile.rules27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/asterisk18/files/patch-Makefile.rules b/net/asterisk18/files/patch-Makefile.rules
new file mode 100644
index 000000000000..3bebe8ad02de
--- /dev/null
+++ b/net/asterisk18/files/patch-Makefile.rules
@@ -0,0 +1,27 @@
+--- Makefile.rules.orig 2022-08-18 15:18:29 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