* [PATCH] buildtools: remove invalid option for Microsoft linker
@ 2025-03-12 1:53 Andre Muezerie
2025-03-12 10:29 ` Bruce Richardson
2025-03-12 11:53 ` David Marchand
0 siblings, 2 replies; 3+ messages in thread
From: Andre Muezerie @ 2025-03-12 1:53 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: dev, Andre Muezerie
When compiling "drivers" directory with MSVC the errors below popped up:
drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
missing ')' before '('
drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
missing ')' before 'const'
drivers/rte_mempool_stack.pmd.c(1): error C2091: function returns function
The fix is to use common macros compatible with MSVC.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
buildtools/pmdinfogen.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index dfb89500c0..116f05e7a8 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -192,7 +192,7 @@ def dump(self, file):
dumped = json.dumps(self.__dict__)
escaped = dumped.replace('"', '\\"')
print(
- 'const char %s_pmd_info[] __attribute__((used)) = "PMD_INFO_STRING= %s";'
+ 'const char %s_pmd_info[] __rte_used = "PMD_INFO_STRING= %s";'
% (self.name, escaped),
file=file,
)
@@ -252,7 +252,8 @@ def open_output(path):
def write_header(output):
output.write(
- "static __attribute__((unused)) const char *generator = \"%s\";\n" % sys.argv[0]
+ "#include <rte_common.h>\n"
+ "static __rte_unused const char *generator = \"%s\";\n" % sys.argv[0]
)
--
2.48.1.vfs.0.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] buildtools: remove invalid option for Microsoft linker
2025-03-12 1:53 [PATCH] buildtools: remove invalid option for Microsoft linker Andre Muezerie
@ 2025-03-12 10:29 ` Bruce Richardson
2025-03-12 11:53 ` David Marchand
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-03-12 10:29 UTC (permalink / raw)
To: Andre Muezerie; +Cc: Dmitry Kozlyuk, dev
On Tue, Mar 11, 2025 at 06:53:08PM -0700, Andre Muezerie wrote:
> When compiling "drivers" directory with MSVC the errors below popped up:
>
> drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
> missing ')' before '('
> drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
> drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
> drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
> missing ')' before 'const'
> drivers/rte_mempool_stack.pmd.c(1): error C2091: function returns function
>
> The fix is to use common macros compatible with MSVC.
>
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] buildtools: remove invalid option for Microsoft linker
2025-03-12 1:53 [PATCH] buildtools: remove invalid option for Microsoft linker Andre Muezerie
2025-03-12 10:29 ` Bruce Richardson
@ 2025-03-12 11:53 ` David Marchand
1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2025-03-12 11:53 UTC (permalink / raw)
To: Andre Muezerie; +Cc: Dmitry Kozlyuk, dev
On Wed, Mar 12, 2025 at 2:53 AM Andre Muezerie
<andremue@linux.microsoft.com> wrote:
>
> When compiling "drivers" directory with MSVC the errors below popped up:
>
> drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
> missing ')' before '('
> drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
> drivers/rte_mempool_stack.pmd.c(1): error C2059: syntax error: ')'
> drivers/rte_mempool_stack.pmd.c(1): error C2143: syntax error:
> missing ')' before 'const'
> drivers/rte_mempool_stack.pmd.c(1): error C2091: function returns function
>
> The fix is to use common macros compatible with MSVC.
>
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
Out of curiosity, did you try dpdk-pmdinfo.py on generated binaries?
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-12 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12 1:53 [PATCH] buildtools: remove invalid option for Microsoft linker Andre Muezerie
2025-03-12 10:29 ` Bruce Richardson
2025-03-12 11:53 ` David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).