[Firm] support cygwin?

Matthias Braun matze at braunis.de
Sat Dec 5 23:01:43 CET 2015


Hi,

while we try not to intentionally break windows support none of the firm developers uses windows and we have no buildbots or similar running on windows. 

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.

Greetings
    Matthias

> On Dec 5, 2015, at 7:23 AM, KIMURA Masaru <hiyuh.root at gmail.com> wrote:
> 
> Hi,
> 
> just clone cparser from git and build it on cygwin.
> but it looks unusable ATM.
> 
> $ ./build/debug/cparser.exe -o hello hello.c
> error: unknown operating system 'win32' in target-triple
> 
> $ grep -e 'unknown operating system' $(find . -name '*.c')
> ./src/driver/target.c:          errorf(NULL, "unknown operating system
> '%s' in target-triple", os);
> 
> but it looks having mingw support.
> where can i start to fix this?
> 
> Peace,
> 
> P.S.
> just make cparser vomits ton of -fPIC warning on cygwin.
> and it looks simply uncool.
> 
> _______________________________________________
> Firm mailing list
> Firm at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/firm




More information about the Firm mailing list