Re: Signal names when cross-compiling

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

 



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)

Attachment: su-make-signals.sh
Description: Bourne shell script


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

  Powered by Linux