43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
|
|
From 2587ee2d2c1a7720282d1b290a511cacffad1075 Mon Sep 17 00:00:00 2001
|
||
|
|
From: jiangheng <jiangheng14@huawei.com>
|
||
|
|
Date: Mon, 13 May 2024 15:24:06 +0800
|
||
|
|
Subject: [PATCH] remove symbol for examples and app
|
||
|
|
|
||
|
|
The examples and app use static build to link all pmd drivers by default.
|
||
|
|
In this way, you do not need to add -d parameter to specify dynamic library.
|
||
|
|
But the size of debuginfo is too large(2GB), therefore, remove app and examples symbols.
|
||
|
|
|
||
|
|
---
|
||
|
|
app/meson.build | 2 +-
|
||
|
|
examples/meson.build | 1 +
|
||
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/app/meson.build b/app/meson.build
|
||
|
|
index e22bbb2..32eea18 100644
|
||
|
|
--- a/app/meson.build
|
||
|
|
+++ b/app/meson.build
|
||
|
|
@@ -45,7 +45,7 @@ endif
|
||
|
|
default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
|
||
|
|
default_cflags += ['-fPIE', '-pie', '-fPIC', '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-O2', '-Wall']
|
||
|
|
default_cflags += ['-Wl,-z,relro,-z,now,-z,noexecstack', '-Wtrampolines']
|
||
|
|
-default_ldflags = []
|
||
|
|
+default_ldflags = ['-s']
|
||
|
|
if get_option('default_library') == 'static' and not is_windows
|
||
|
|
default_ldflags += ['-Wl,--export-dynamic']
|
||
|
|
endif
|
||
|
|
diff --git a/examples/meson.build b/examples/meson.build
|
||
|
|
index 51c975d..bfc7113 100644
|
||
|
|
--- a/examples/meson.build
|
||
|
|
+++ b/examples/meson.build
|
||
|
|
@@ -86,6 +86,7 @@ default_ldflags = dpdk_extra_ldflags
|
||
|
|
if get_option('default_library') == 'static' and not is_windows
|
||
|
|
default_ldflags += ['-Wl,--export-dynamic']
|
||
|
|
endif
|
||
|
|
+default_ldflags += ['-s']
|
||
|
|
default_cflags += ['-fPIE', '-pie', '-fPIC', '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-O2', '-Wall']
|
||
|
|
default_cflags += ['-Wl,-z,relro,-z,now,-z,noexecstack', '-Wtrampolines']
|
||
|
|
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|