Created attachment 496 [details] Fix for dropped Mac OS X 10.5 The attached path fixes the dropped Mac OS X 10.5 support as far as I can see.
I don't think the changes to machobj.c are necessary. Did you try it without them?
Yes I tried, it doesn't work, bus error. If I build the compiler with this patch on 10.5 and build a binary on 10.5 it runs on 10.5 and 10.6. If I use the same compiler and build a binary on 10.6 it runs on 10.6 but not on 10.5. Maybe not perfect but at least it's better.
I installed the 10.4 sdk from the OSX 10.6 sdk. Unfortunately, now the .4u sdk seems to be missing stdarg.h (it was there with 10.5's version of the .4u sdk). I changed it to the .5 sdk, and now it builds.
I'm closing this one now, it seems to work, don't know what I did the first time
Fixed dmd 1.053 and 2.037
Why do we check for the OS version to workaround linker bugs? If there really is no other way we should at least check the linker/gcc-toolchain version. If I understood the changes correctly then the "10.6" linker segfaults when linking empty segments, right? What's the issue with 10.5? >If I use the same compiler and build a binary on 10.6 it runs on 10.6 but not on 10.5. Maybe not perfect but at least it's better. What has happened here? Isn't all of this completely unnecessary now that we use onAddImage/getSection?
(In reply to comment #6) > Why do we check for the OS version to workaround linker bugs? > If there really is no other way we should at least check the > linker/gcc-toolchain version. How would you do that during runtime? > If I understood the changes correctly then the "10.6" linker segfaults when > linking empty segments, right? > What's the issue with 10.5? Yes, I think so. The changes to fix 10.6 broke the 10.5 support. I just added back the code that worked in 10.5, depending on what version the compiler is running. > >If I use the same compiler and build a binary on 10.6 it > runs on 10.6 but not on 10.5. Maybe not perfect but at least it's better. > > What has happened here? > > Isn't all of this completely unnecessary now that we use onAddImage/getSection? I don't know, maybe.
On OSX 10.5.2 the XCode3.0 linker (ld64-77) still crashes when handling debug_line sections with an empty line table because it calculates the wrong minimal section length. This bug is still present on ld64-134.9 but they "fixed" the symptom by adding a NULL check in ld64-87. ---- http://www.opensource.apple.com/source/ld64/ld64-97.2/ChangeLog ---- 2008年07月18日 Nick Kledzik <kledzik@apple.com> * src/MachOReaderRelocatable.hpp: don't crash if debug_line section has no line table ----
Created attachment 1196 [details] ld64-77 patch
Created attachment 1197 [details] ld64-77 patch
https://github.com/D-Programming-Language/dmd/pull/1701
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル