[dpdk-dev] [EXTERNAL] [PATCH] eal/windows: use bundled getopt with MinGW

Khoa To khot at microsoft.com
Sat Sep 26 03:23:45 CEST 2020


> -----Original Message-----
> From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Sent: Thursday, September 24, 2020 4:17 PM
> To: dev at dpdk.org
> Cc: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>; stable at dpdk.org; Khoa To
> <khot at microsoft.com>; Tal Shnaiderman <talshn at nvidia.com>; Narcisa Ana
> Maria Vasile <navasile at linux.microsoft.com>; Dmitry Malloy
> (MESHCHANINOV) <dmitrym at microsoft.com>; Pallavi Kadam
> <pallavi.kadam at intel.com>
> Subject: [EXTERNAL] [PATCH] eal/windows: use bundled getopt with MinGW
> 
> Clang builds use getopt.c in librte_eal while MinGW provides
> implementation as part of the toolchain. Statically linking librte_eal
> to an application that depends on getopt results in undefined reference
> errors with MinGW. There are no such errors with Clang, because with
> Clang librte_eal actually defines getopt functions.
> 
> Use getopt.c in EAL with Clang and MinGW to get identical behavior.
> Adjust code for MinGW. Incidentally, this removes a bug when free() is
> called on uninitialized memory.
> 
> Fixes: 5e373e456e6 ("eal/windows: add getopt implementation")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Reported-by: Khoa To <khot at microsoft.com>
> Reported-by: Tal Shnaiderman <talshn at nvidia.com>
> ---
> 
> This patch probably supesedes
> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> work.dpdk.org%2Fpatch%2F78574%2F&data=02%7C01%7Ckhot%40micr
> osoft.com%7C7f6e47a7db0945b2c93708d860dffaa3%7C72f988bf86f141af91a
> b2d7cd011db47%7C1%7C0%7C637365862839491238&sdata=%2BQPJ2US
> hknxQLV97rQRVc0sT55TpTNjNTq1m9oj9eFs%3D&reserved=0.
> 

Acked-by: Khoa To <khot at microsoft.com>



More information about the dev mailing list