[Firm] support cygwin?

KIMURA Masaru hiyuh.root at gmail.com
Mon Dec 7 01:13:56 CET 2015


Hi,

> Having said that, we are of course happy to accept patches that improve
> the situation.
> Let me try to give some hints to get you started:
> - cparser uses machine triples to describe target system configurations.
>   The concept itself stems from the infamous autoconf/config.guess
>   scripts AFAIK.
>   You can learn more about the format in the src/driver/machine_triple.*
>   files.
>   You should probably research what machine triples are typically in use
>   for cygwin.
> - To fix your specific problem you probably need to modify
>   src/driver/target.c, specifically:
>    * get_host_machine_triple() attempts to guess an apropriate target
>      triple if none was specified in config.mak, you
>    * set_options_for_machine() takes the information from the triple and
>      configures firm for the target, things like selecting the object
>      file format, preprocessor defines,  size/alignment of some data
>      types, etc.
>      I typically do a combination of compiling small tests programs and
>      reading something like gcc/config/i386/cyg* in the gcc sourcecode to
>      find the apropriate values for a new system.
>
> You should also be able to adjust the Makefile to not use -fPIC on cygwin
> or at least provide a way that config.mak can override the default flags
> used to build shared libraries.

Matthias-san,
thank you for giving above bunch of hints.
i'll continue to try this issue.

Peace,



More information about the Firm mailing list