New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding codesynthesis odb #1198
Comments
License-wise, it's fine since it's GPL.
err… how would one acquire that then?
Yes there is. Is this ODB compiler target-dependent? In other words, will I need one ODB compiler for 32-bit and one for 64-bit, or does one work for all? |
The compiler "package" (see the download page) is just a archive with a precompiled odb compiler called "odb". WIth some configuration files and support libraries in the usual linux filesystem paths /usr /etc/ etc... It only needs to be able to run on the host. So thats why it's so weird. If you are compiling for i686-w64-mingw32 and x86_64-w64-mingw32 on a x86_64 machine, you would only need the x86_64 odb binary for your host. It just converts #pramas in code to source files which are then compiled by your target compiler. (which you somehow define in your buildsystem, I made some cmake files to do this, but this could be done manually aswell) So like I said you could install the odb compiler on your host system, that works. But it kinda feels wrong, so I want to somehow include it in the mxe system. |
That page says:
Being a port-like system, we always prefer building from source code.
Ah cool. Yes, you can make odb compiler a "native package" that is only built once for all targets. Add $(PKG)_TARGETS := $(BUILD) and in the @tonytheodore and @starius should be able to help you more with creating native packages. |
Right, missed that. Test building it now to see if there are any pitfalls. It seems it only has libcutl as dependency which should also become a "native package" then. But I'll complete the odb build and test the resulting binary to make sure everything is working. Edit: So I'll just wait for some more info on "native packages" especially if it is ok to add these to MXE. |
So I was trying to create the libcutl and odb native packages today, but I ran into an issue. The 2 .mk's I created: libcutl.mk
libodb.mk
The problem is that odb package also needs the gcc plugin development headers. These are installed on my system, but because of the prefix, set by the EDIT:
Which raises some questions. Is this acceptable / am I doing some thing wrong in the first place that I have to set these CPPFLAGS and LDFLAGS. This also depends in hard way on gcc, which is obvious if you know the project and take into account it uses a gcc plugin. But I also notice that there are some efforts to support clang in MXE. Then this build script would fail. But there is no reason that you could not build all the software with the clang compiler but still have the gcc dependent odb compiler. but then I should somehow specify it depends on gcc which I currently cannot do (adding it to depends won't work because gcc won't be build for X86_64-unknown-linux-gnu as it uses the native one). But these are just some thoughts. |
I can't see anything wrong with that, the native
Not sure how best to handle this, future support for clang is as a cross-compiler, native clang support is already present (say OSX). Most likely we'd have to (conditionally?) build a native gcc that could be added to deps. |
I have 2 questions about adding ODB to mxe.
I don't know if there is a way to make a mxe package that installs a binary in "$(MXE_ROOT)/usr/bin/", which would have my preference. And installing it on the host might work but that makes it less user friendly when using it in the MXE context. Because you need to know that you need to install a separate package on the host system when you want to use ODB.
Kind regards,
Dennis
The text was updated successfully, but these errors were encountered: