[PATCH libgpg-error] build: fix mutex size computation on systems without gawk

Alexis Lothoré alexis.lothore at bootlin.com
Tue Jun 23 08:40:40 CEST 2026


On Tue Jun 23, 2026 at 3:24 AM CEST, NIIBE Yutaka wrote:
> Hello,
>
> Alexis Lothoré wrote:
>> but when the build host does not have gawk but mawk for example, the
>> script fails to parse correctly the objdump output, leading to a faulty
>> header being generated:
>
> I see the problem.
>
>> Fix size parsing by replacing objdump, which outputs a hexadecimal value
>> (prefixed with 0x) with nm.
>
> Your idea sounds good.
>
>
> I think that we can go further, to remove use of AWK in the script.
>
> Testing the change, I noticed that use of NM has two possible issue(s).
>
> (1) Considering the future where we use the script for other OS...
> When objdump is available, it is highly likely it's GNU objdump
> implementation (otherwise, it has compatible options and compatible
> output), but it's different in case of NM.  Since NM is a standard tool
> (there are multiple active implementations among different OS), we have
> to care about portable use of NM.  IIUC, -S option is not portable.  I
> think that it is good to use of -P option (which asks the POSIX.2
> standard output format), instead.
>
> (2) NM is actually affected by libtool (specifically, m4/libtool.m4).
> It is currently no problem for the script, but we should remember.
>
>
> Attached is revised version.  If no problem, I will push this change.

Indeed, that looks even better, and works on my setup too, so ok for me.

Thanks,

Alexis




-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




More information about the Gnupg-devel mailing list