This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] -gused and -gfull for darwin


Darwin GCC uses -gfull and -gused to select debugging symbol
optimization scheme (BINCL/EINCL removal or only used symbols).
This patch maps this options to appropriate -feliminate-unused...

-gused is selected by default when just -g is supplied.

Bootstrapped and tested on powerpc-darwin.

2004-06-04 Devang Patel <dpatel@apple.com>

        * config/rs6000/darwin.h (CC1_SPEC): Handle -gused and -gfull.
        * config/i386/darwin.h (CC1_SPEC): Same.

OK to install?
Thanks,
--
Devang


Index: gcc/config/rs6000/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.52
diff -Idpatel.pbxuser -c -3 -p -r1.52 darwin.h
*** gcc/config/rs6000/darwin.h 9 Apr 2004 19:57:46 -0000 1.52
--- gcc/config/rs6000/darwin.h 2 Jun 2004 19:00:14 -0000
*************** do { \
*** 94,100 ****



#define CC1_SPEC "\
! %{gused: -feliminate-unused-debug-symbols %<gused }\
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
%{!static:%{!mdynamic-no-pic:-fPIC}}"


--- 94,102 ----


#define CC1_SPEC "\
! %{gused: -g -feliminate-unused-debug-symbols %<gused }\
! %{gfull: -g -fno-eliminate-unused-debug-symbols %<gfull }\
! %{g: %{!gfull: -feliminate-unused-debug-symbols %<gfull }}\
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
%{!static:%{!mdynamic-no-pic:-fPIC}}"


Index: gcc/config/i386/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/darwin.h,v
retrieving revision 1.14
diff -Idpatel.pbxuser -c -3 -p -r1.14 darwin.h
*** gcc/config/i386/darwin.h    15 Mar 2004 18:20:48 -0000      1.14
--- gcc/config/i386/darwin.h    2 Jun 2004 19:00:14 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 43,48 ****
--- 43,51 ----

  #define ASM_SPEC "-arch i686 \
    -force_cpusubtype_ALL \
+   %{gused: -g -feliminate-unused-debug-symbols %<gused }\
+   %{gfull: -g -fno-eliminate-unused-debug-symbols %<gfull }\
+   %{g: %{!gfull: -feliminate-unused-debug-symbols %<gfull }}\
    %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
    %{!Zforce_cpusubtype_ALL:%{mmmx:-force_cpusubtype_ALL}\
                           %{msse:-force_cpusubtype_ALL}\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]