Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11
Hi Jack, On 17 Jun 2011, at 03:21, Jack Howarth wrote: The gcj compiler needs to pass -no_pie for linkage on darwin11 due to the new -pie default of the linker. The attached patch accomplishes this by passing -no_pie on SYSTEMSPEC for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its linker, I included it in the triplet match to simplify the syntax. Bootstrap and tested on x86_64- apple-darwin11. Okay for gcc trunk? Jack 2011-06-16 Jack Howarth howa...@bromo.med.uc.edu * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. * libjava/configure: Regenerate. I would like to see some more analysis of what the underlying reasons for failure are. -fpie works fine with darwin 9 and darwin 10 libjava [XCode 3.1.4 and 3.2.5 respectively, bootstrap w/4.2.1] (modulo suppressing it when building test-suite .dylibs *** - which is a testsuite options handling issue - not a fundamental problem). so: make -k check-target-libjava RUNTESTFLAGS=--target_board=unix/-fpie\{- m32,-m64\} passes without regression (re the no pie case) given that pie is suppressed for dylibs. - So is your proposed patch a work-around for (as yet unreleased) darwin 11 tool-chain bugs or ... ? Iain === kludge to suppress pie for for dylibs (use in place of the darwin9.h hunk from the attachment on PR49371). Index: gcc/config/darwin9.h === --- gcc/config/darwin9.h(revision 175110) +++ gcc/config/darwin9.h(working copy) @@ -35,6 +35,12 @@ along with GCC; see the file COPYING3. If not see /* Tell collect2 to run dsymutil for us as necessary. */ #define COLLECT_RUN_DSYMUTIL 1 +#undef PIE_SPEC +#define PIE_SPEC \ + %{fpie|pie|fPIE: %{!Zdynamiclib: \ + %{mdynamic-no-pic: %n'-mdynamic-no-pic' overrides '-pie', '- fpie' or '-fPIE'; \ + :-pie}}} + #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ do { \
Re: objc/objc++: switch all testcases to Modern Objective-C runtime API
On 6 Jun 2011, at 18:21, Nicola Pero wrote: This patch switches all the testcases in the ObjC/ObjC++ testsuite to use the Modern Objective-C runtime API when executing with the GNU runtime. This will allow me to complete removing the Traditional Objective-C runtime API from libobjc. :-) ... I tested this on GNU/Linux i686, and on Apple 10.6.7 64-bit. That tests both the GNU runtime and a recent NeXT runtime. I'd like to test with an older NeXT runtime, but I don't have any access to an Apple machine with Mac OS X 10.5. testing at m32 should exercise all the post 10.4 stuff - and would be a good indicator of any major hassles. I'll try and do a 10.4 test during the week ... (assuming trunk still bootstrap on it). Iain
Re: objc/objc++: switch all testcases to Modern Objective-C runtime API
On 6 Jun 2011, at 21:07, Nicola Pero wrote: On x86_64-apple-darwin10 I have the following failures with -m32 darwin10 is Mac OS X 10.6, right ? I have access to that. So, how do you test with -m32 ? I thought the testsuite would do that (test both with -m32 and -m64 if they are available) automatically, but clearly it doesn't, because I never saw these failures ;-) It doesn't... .. if you want to be pedantic the following should cover all bases on a given platform 10.4: make -k check-objc check-obj-c++ RUNTESTFLAGS=--target_board=unix\{- m32,-m32/-fabi-version=1,-m64\} I am doing this on i686-darwin9 at the moment with your original path - will re-try your re-posted patch. As a far as my opinion, if it passes OK @m32 on darwin9 (10.5.x) - I'm with Mike that we have time to sort out any problems on darwin8 (10.4.x). cheers Iain
Re: objc/objc++: switch all testcases to Modern Objective-C runtime API
On 6 Jun 2011, at 21:23, IainS wrote: It doesn't... .. if you want to be pedantic the following should cover all bases on a given platform 10.4: make -k check-objc check-obj-c++ RUNTESTFLAGS=--target_board=unix\{- m32,-m32/-fabi-version=1,-m64\} duh.. I should check my typing before hitting send.. .. make that -fobjc-abi-version=1. Iain
Re: objc/objc++: switch all testcases to Modern Objective-C runtime API
On 6 Jun 2011, at 22:37, Mike Stump wrote: On Jun 6, 2011, at 1:32 PM, Dominique Dhumieres wrote: The revamped patch in attach should fix them. :-) It does, thanks, Ok, Iain chimed in that he's ok with it going in sooner, and since - m32 now works, I think this work can go in now, thanks. Thanks for the testing help Dominique! I checked on i686-darwin9 with both m32 and m32/abi=1 the only difference I see is the XPASSes for m64 torture/forward-1.m for gnu runtime. I will try to test on darwin8 during the week - but time v. limited. cheers Iain
Re: fix for 48208 and 48260 on darwin
Hi Christian, On 28 Mar 2011, at 04:55, Christian Schüler wrote: F -C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) +Driver C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after \ %qs) -F dir Add dir to the end of the main framework include path This looks right (but I cannot approve it). +++ gcc-4.6.0-RC-20110321-patched/gcc/config/darwin-driver.c 2011-03-26 07:01:02.0 +0100 @@ -161,6 +161,13 @@ continue; switch ((*decoded_options)[i].opt_index) { +#if DARWIN_X86 + case OPT_arch: + if (!strcmp ((*decoded_options)[i].arg, i386)) + generate_option (OPT_m32, NULL, 1, CL_DRIVER, (*decoded_options) [i]); + else if (!strcmp ((*decoded_options)[i].arg, x86_64)) + generate_option (OPT_m64, NULL, 1, CL_DRIVER, (*decoded_options) [i]); + break; +#endif Hm - this doesn't quite cover the scenario - what about people using GCC on powerpc*-darwin9? (or people on x86-darwin10 targeting powerpc on darwin9)? Normally, the arch option is recognized (and swallowed) by the Apple way 'driverdriver.c' program which then emits the right driver lines for the arch (and deals with cross-compiler lines for ppc). driverdriver.c is available from the Apple Local GCC open source releases (e.g. http://opensource.apple.com/source/gcc/gcc-5646/driverdriver.c) - it's at the top of the source tree - it builds OK against gcc-4.5 headers - which is OK, since it's a stand-alone program that just manipulates command lines (doesn't compile against gcc-4.6 headers because of the changes in option handling) [I guess someone should cook up one for gcc/contrib that works with our new system]. One then builds the {ppc,x86}-apple-darwin* compilers, installs them and you have a working set that does the Apple way layer on top of GCC. This works (at least a few weeks ago) - since I managed to get pre- release 4.6 going within XCode - but needs a couple more small patches to deal with other options. --- -- ping me off list, if you would like to try this and I'll try and send more detailed instructions and a couple of additional patches that are work in progress ... -- however, I can neither approve nor reject your patches ;-) cheers Iain