RE: Signal names when cross-compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When cross compiling you need to break the mksignames compilation apart from the rule that runs it.
You run it against you sysroot for your target arch/platform and it grabs the correct signals from the sysroot instead of the host.

Brian

-----Original Message-----
From: Steffen Nurpmeso <steffen@xxxxxxxxxx> 
Sent: Wednesday, October 4, 2023 1:44 PM
To: Thorsten Otto <admin@xxxxxxxxxxx>
Cc: dash@xxxxxxxxxxxxxxx
Subject: Re: Signal names when cross-compiling

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hello.

Thorsten Otto wrote in
 <19502212.sIn9rWBj0N@earendil>:
 |when cross-compiling dash, signames.c is generated by a mksignames \  |that was  |compiled for the host. This will generate wrong signal mappings because  |obviously this will use the signal numbers of the build system, not the  |target.
 |
 |I currently dont't have no idea how to solve that, other than populating \  |the  |signal_names array at runtime rather than compile time.

Actually i have no idea, but i do have a yet unused script for signals names (that mirrors one for errors names that is in use for years.  I will attach it.  It is meant for the MUA i maintain (a future lib part of it) and does lots of things you surely do not need, as it is for C and C++ and creates mapping tables for by-name etc lookups, the signal documentation strings etc etc.
You run it local to create the portable stuff (uses perl, and the MUA i maintain for creating hash values), and then during compile time.  This compile_time() function is surely what you want, it requires some POSIX tools (awk, sort, rm) and a C compiler ($CC), actually only the preprocessing stage (much easier to let the compiler to the C preprocessor part), which' output is then parsed.  Eg

  TARGET=./output-file sh su-make-signals.sh compile_time

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off (By Robert Gernhardt)




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux