Commit Graph

5 Commits

Author SHA1 Message Date
Bruce Richardson
c78471cd06 buildtools: fix build with Meson 0.60
Meson 0.60 switched the format of uninstalled static libraries
to thin archives, that is, they contain only paths to object files,
not the files themselves. Files cannot be extracted in this case,
resulting in build errors:

    ar: `x' cannot be used on thin archives.

Handle thin archives when invoking pmdinfogen by directly using the
files referenced in the archive, when they already exist, and extracting
them if not.

Bugzilla ID: 836
Fixes: e6e9730c70 ("buildtools: support object file extraction for Windows")
Cc: stable@dpdk.org

Reported-by: Michal Berger <michallinuxstuff@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-11-03 14:16:29 +01:00
Dmitry Kozlyuk
c85ebb39db buildtools: fix archive extraction for LLVM 8
"llvm-ar xv lib.a" from LLVM 8 doesn't print extracted object file
names. The effect of "v" is not formally specified either.
Use "llvm-ar t" to get archive member names.

Reported-by: Xueming Zhang <xuemingx.zhang@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-01-28 22:48:29 +01:00
Dmitry Kozlyuk
3feefc80ac buildtools: use build directory for temporary files
Use current build directory as base for temporary directories,
so that all build files are isolated there.

Fixes: e6e9730c70 ("buildtools: support object file extraction for Windows")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-01-26 00:41:08 +01:00
Dmitry Kozlyuk
a38eae8efa buildtools: fix archive extraction for Python 3.5
Python 3.5 subprocess.run() has no capture_output parameter.
Use subprocess.PIPE available in all versions.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-01-26 00:40:35 +01:00
Dmitry Kozlyuk
e6e9730c70 buildtools: support object file extraction for Windows
clang archiver tool is llvm-ar on Windows and ar on other platforms.
MinGW always uses ar. Replace shell script (Unix-only) that calls ar
with a Python script (OS-independent) that calls an appropriate archiver
tool selected at configuration time. Move the logic not to generate
empty sources into pmdinfogen.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-01-25 23:23:50 +01:00