Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 418253 - sys-libs/libunwind: add --enable-cxx-exceptions to the econf line
Summary: sys-libs/libunwind: add --enable-cxx-exceptions to the econf line
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-30 15:27 UTC by Alexis Ballier
Modified: 2012-05-31 20:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed ebuild patch (unwind.patch,1.88 KB, patch)
2012-05-31 12:03 UTC, Alexis Ballier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ballier gentoo-dev 2012-05-30 15:27:11 UTC
From 1.0.1 ./configure --help output:
  --enable-cxx-exceptions use libunwind to handle C++ exceptions
  --enable-debug-frame Load the ".debug_frame" section if available
  --enable-block-signals Block signals before performing mutex operations
  --enable-conservative-checks Validate all memory addresses before use
  --enable-msabi-support Enables support for Microsoft ABI extensions

maybe it'd be nice to expose this as use flags, or default enable them


for sure, cxx-exceptions is disabled here, and with it enabled i could build libcxxrt on top of libunwind and get rid of the gpl-3 libgcc_s dep for the whole libc++ stack.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-05-30 15:33:38 UTC
So your motivation for filing this bug is entirely LICENSE related for userland_BSD?

Not everything is deserving a USE flag, and staying with close to upstream ./configure defaults sounds sane.
Mostly, only options that expose external dependencies should be with USE flag.
Comment 2 Alexis Ballier gentoo-dev 2012-05-30 16:06:00 UTC
(In reply to comment #1)
> So your motivation for filing this bug is entirely LICENSE related for
> userland_BSD?

not really; motivation in the long term is to have a gcc-less freebsd, yes; it is far from being possible but a libc++ stack not depending on gcc libs is a step.

if that were only for bsd, i could just build what they imported from freebsd-lib, but imho making it possible to have clang not depending on gcc has nothing freebsd-specific.

> Not everything is deserving a USE flag, and staying with close to upstream
> ./configure defaults sounds sane.

upstream defaults depend on $host, which is clearly a no go for us: if i need cxx-exception support, how do i depend on that ? moreover, their defaults might change with time, so this gets really messy to get the deps.

> Mostly, only options that expose external dependencies should be with USE
> flag.

Im sure you can find plenty of examples where this is not the case :)

anyway, i dont wanna argue if this needs a useflag or not, that's why i suggested enabling them within the ebuild.
Comment 3 Alexis Ballier gentoo-dev 2012-05-30 18:30:02 UTC
thinking more about it, these flags seem to break the ABI, so its definitely not a good idea to expose them without masking or forcing the useflags...

since, at least the cxx-exceptions stuff are declared in the installed headers and, depending on the host, built or not in the shared library, i guess we could just always build them and be safe.
Comment 4 SpanKY gentoo-dev 2012-05-30 18:41:03 UTC
cxx-exceptions is fine by me

does debug-frame affect the ABI ?  doesn't seem like it should.

block-signals doesn't affect the ABI, but does affect the API.  i think we should leave that alone until someone complains.

conservative-checks could be useful under USE=debug
Comment 5 Alexis Ballier gentoo-dev 2012-05-31 12:03:14 UTC
(In reply to comment #4)
> cxx-exceptions is fine by me
> 
> does debug-frame affect the ABI ?  doesn't seem like it should.

doesnt seem to, at least nm -D --defined-only output is the same

> 
> block-signals doesn't affect the ABI, but does affect the API.  i think we
> should leave that alone until someone complains.

yep

> 
> conservative-checks could be useful under USE=debug

and yep
Comment 6 Alexis Ballier gentoo-dev 2012-05-31 12:03:33 UTC
Created attachment 313705 [details, diff]
proposed ebuild patch
Comment 7 SpanKY gentoo-dev 2012-05-31 16:14:36 UTC
Comment on attachment 313705 [details, diff]
proposed ebuild patch

LGTM; feel free to commit
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2012-05-31 20:38:22 UTC
(In reply to comment #7)
> LGTM; feel free to commit

done