From patchwork Thu Aug 12 23:01:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Avoid -lm and -lpthread in libjava on darwin Date: Thu, 12 Aug 2010 13:01:59 -0000 From: Jack Howarth X-Patchwork-Id: 61653 Message-Id: <20100812230159.GA27587@bromo.med.uc.edu> To: Mike Stump Cc: gcc-patches@gcc.gnu.org, iains@gcc.gnu.org Mike, On a different topic, what do you think about allowing darwin to default to -fomit-frame-pointer on i386 like linux? I assume the required change would be... Any opinions? Jack Index: configure.ac =================================================================== --- configure.ac (revision 163208) +++ configure.ac (working copy) @@ -1584,7 +1584,7 @@ [ --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86], [], [ case $target_os in -linux*) +linux* | darwin*) # Enable -fomit-frame-pointer by default for Linux. enable_frame_pointer=no ;; Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 163208) +++ config/i386/i386.c (working copy) @@ -3276,9 +3276,8 @@ { if (flag_zee == 2) flag_zee = 1; - /* Mach-O doesn't support omitting the frame pointer for now. */ if (flag_omit_frame_pointer == 2) - flag_omit_frame_pointer = (TARGET_MACHO ? 0 : 1); + flag_omit_frame_pointer = 1; if (flag_asynchronous_unwind_tables == 2) flag_asynchronous_unwind_tables = 1; if (flag_pcc_struct_return == 2) @@ -3288,10 +3287,8 @@ { if (flag_zee == 2) flag_zee = 0; - /* Mach-O doesn't support omitting the frame pointer for now. */ if (flag_omit_frame_pointer == 2) - flag_omit_frame_pointer = - (TARGET_MACHO ? 0 : !(USE_IX86_FRAME_POINTER || optimize_size)); + flag_omit_frame_pointer = !(USE_IX86_FRAME_POINTER || optimize_size); if (flag_asynchronous_unwind_tables == 2) flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER; if (flag_pcc_struct_return == 2)