1 | From: IainS
|
---|
2 | To: Juan E Sanchez
|
---|
3 |
|
---|
4 |
|
---|
5 | On 27 May 2010, at 16:23, Juan E Sanchez wrote:
|
---|
6 |
|
---|
7 | > I noticed that you submitted a patch online, that would fix the
|
---|
8 | > current problem I am having with macports on Darwin. The specific
|
---|
9 | > issue is that c++ exception handling is not being handled properly
|
---|
10 | > on Darwin 10.6 when linked against libgcc_s_10.5.so.
|
---|
11 |
|
---|
12 | hmm.
|
---|
13 | I don't see any real issues with the g++ testsuite on gcc-trunk (or
|
---|
14 | 4.5).
|
---|
15 |
|
---|
16 | > Would you happen to know why I might be having this issue?
|
---|
17 |
|
---|
18 | In a way it should not make any difference, since libgcc_s.10.5.dylib
|
---|
19 | is just a stub linked to libSystem on darwin10.
|
---|
20 |
|
---|
21 | I would suspect that your problem is more likely to be that you've
|
---|
22 | built and installed a version of libgcc_s.10.5.dylib that is being
|
---|
23 | found ahead of the system one.
|
---|
24 |
|
---|
25 | This would cause code to be executed from the newly-built libgcc_s
|
---|
26 | instead of libSystem and the unwinder will get confused Big Time.
|
---|
27 |
|
---|
28 | It's essential to make sure that you *don't* build the stubs *unless*
|
---|
29 | you are Apple :-)
|
---|
30 | (or a darwin OS releaser - and I mean stand-alone system release).
|
---|
31 |
|
---|
32 | Therefore you should *not* build gcc with --slibdir= but let the
|
---|
33 | mechanisms I put in place from 4.5 onwards deal with the stub libs
|
---|
34 | (including the _ext which is needed for emutls etc.).
|
---|
35 |
|
---|
36 | I recommend something like:
|
---|
37 |
|
---|
38 | /GCC/source/dir/configure --prefix=/path/to/installation/ --
|
---|
39 | target=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --
|
---|
40 | build=x86_64-apple-darwin10 --enable-languages=c,objc,c++,obj-c+
|
---|
41 | +,fortran --enable-version-specific-runtime-libs --enable-threads --
|
---|
42 | enable-checking=release --with-libiconv-prefix=/usr --with-system-zlib
|
---|
43 | --program-suffix=-X.Y.Z
|
---|
44 |
|
---|
45 | with host/target adjusted as per the requirements
|
---|
46 | (or drop it so that it's found for different targets - might be easier
|
---|
47 | for macports scenario).
|
---|
48 |
|
---|
49 | e.g:
|
---|
50 | /GCC/source/dir/configure --prefix=/path/to/installation/ --enable-
|
---|
51 | languages=c,objc,c++,obj-c++,fortran --enable-version-specific-runtime-
|
---|
52 | libs --enable-threads --enable-checking=release --with-libiconv-
|
---|
53 | prefix=/usr --with-system-zlib --program-suffix=-X.Y.Z
|
---|
54 |
|
---|
55 | > I notice that the XCode specs file for gcc 4.2 and your specs file
|
---|
56 | > both have this correction:
|
---|
57 | >
|
---|
58 | > %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)
|
---|
59 |
|
---|
60 | I guess you can always apply a local patch - but first make sure you
|
---|
61 | aren't short-circuiting things (because it *will* upset darwin8 and 9
|
---|
62 | as well as darwin10).
|
---|
63 |
|
---|
64 | Note that this in gcc/config/darwin10.h is also important:
|
---|
65 | #undef LIB_SPEC
|
---|
66 | #define LIB_SPEC "%{!static:-no_compact_unwind -lSystem}"
|
---|
67 |
|
---|
68 | but that's been in gcc-trunk for a while - it should be in 4.5
|
---|
69 |
|
---|
70 | > Has your patch been accepted?
|
---|
71 |
|
---|
72 | not yet,
|
---|
73 | but as I say above, perhaps the real issue lies elsewhere.
|
---|
74 |
|
---|
75 | cheers,
|
---|
76 | Iain
|
---|
77 |
|
---|