--enable-split-objs should be the default on supported platforms #169

exbb2 opened this Issue Oct 2, 2012 · 5 comments


None yet

3 participants


It's essential to have this flag enabled if you want to distribute executables that don't weight a ton.
It's already default on Arch and I see no downsides in enabling it for Gentoo.

Gentoo Haskell Community User member

What architecture you are suffering missing splitobjs?

$ ghc --info | egrep 'split|Host'
 ,("Host platform","x86_64-unknown-linux")
 ,("Object splitting supported","YES")

It was enabled by default sort of forever:

if use alpha || use ia64 || use ppc64; then
    echo "SplitObjs=NO" >> mk/build.mk

if use sparc; then
    echo "SplitObjs=NO" >> mk/build.mk
Gentoo Haskell Community User member

Or you mean Cabal's --enable-split-objs?


@trofi I meant Cabal's --enable-split-objs.


and I see no downsides in enabling it for Gentoo.

Now that i tested it, I'm no longer sure that it should be the default — compilation does get slightly slower with splitobjs enabled, and not everyone redistributes binaries. However, some other way to enable split-objs except CABAL_EXTRA_CONFIGURE_FLAGS(add a useflag?) or some documentation on the matter might be beneficial.

Gentoo Haskell Community User member

CABAL_EXTRA_CONFIGURE_FLAGS is a way to go, the most simple and maintainable way for you will be using package env, for this you need:
1). create file /etc/portage/package.env (or directrory with arbitrary named files in it) file format is:

package-atom conf-file-name

package-atom supports wildcard usage so '/::gentoo-haskell' is perfectly valid, conf-file-name is a name of file suffixed with .conf.

2). create an env file in /etc/portage/env/conf-file-name, this file should contain additional environment options


in your case.

Then all packages you've configure will be build with this flags.

I'm closing bug, if you think that I need to add some more info or put it in any other place (gentoo or haskell wiki, or on gentoo-haskell project page) feel free to request.

@qnikst qnikst closed this Jun 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment