Skip to content
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

[Use files] Custom pkgs - because llvm/SDL/others have NIH syndrome. #492

Closed
nddrylliog opened this issue Nov 30, 2012 · 0 comments
Closed

Comments

@nddrylliog
Copy link
Member

pkg-config is the best thing that's happened to ooc since ACS.

Except it's not. Because some packages insist on having their own config tool, which sucks considerable balls (and ovaries).

For example, the ooc-llvm sample, right now, has a Makefile with the following C flags:

OOCFLAGS:=$(shell llvm-config --cflags --ldflags --libs core executionengine jit interpreter native) -v --linker=g++ +-DNDEBUG +-D_GNU_SOURCE +-D__STDC_LIMIT_MACROS +-D__STDC_CONSTANT_MACROS +-O3 +-fPIC +-fomit-frame-pointer

Which, needless to say, is less than ideal. We could alleviate the pain if we allowed this in .use files:

CustomPkg: llvm-config, core execution engine jit interpreter native, --cflags, --ldflags --libs

There's an existing PkgConfigFrontend in rock, it's just waiting to be adapted to handle the general case.

Note that llvm-config, sdl-config and all the im-better-than-you-config usually obey the same rules, aka 'util-name --cflags pkgname' or 'util-name --libs pkgname'.

However llvm-config itself has a little subtlety: it has --ldflags - we can't throw it by default because it'll trip up pkg-config and sdl-config (sigh) but we can allow CustomPackage to take additional arguments (3 and 4, respectively).

Anyway, I'm on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant